Updated to Chrome 45
diff --git a/bindings/IDLExtendedAttributes.txt b/bindings/IDLExtendedAttributes.txt
index 73cd6bd..c88d15d 100644
--- a/bindings/IDLExtendedAttributes.txt
+++ b/bindings/IDLExtendedAttributes.txt
@@ -42,8 +42,8 @@
 Constructor
 # FIXME: remove [ConstructorCallWith=Document], as can instead use
 # [ConstructorCallWith=ExecutionContext] + toDocument(executionContext)
-ConstructorCallWith=ExecutionContext|Document
-Custom=|Getter|Setter|LegacyCallAsFunction|ToV8|VisitDOMWrapper|Wrap|PropertyGetter|PropertyEnumerator|PropertyQuery
+ConstructorCallWith=ExecutionContext|ScriptState|Document
+Custom=|Getter|Setter|LegacyCallAsFunction|VisitDOMWrapper|PropertyGetter|PropertyEnumerator|PropertyQuery|CallPrologue|CallEpilogue
 CustomConstructor
 CustomElementCallbacks
 # Dartium specific attributes.
@@ -71,8 +71,8 @@
 DoNotCheckConstants
 DoNotCheckSecurity=|Setter
 DoNotCheckSignature
+DoNotExposeJSAccessors
 EnforceRange
-EventConstructor
 ExposeJSAccessors
 Exposed=*
 GarbageCollected
@@ -80,24 +80,25 @@
 Immutable
 ImplementedAs=*
 ImplementedInPrivateScript
-InitializedByEventConstructor
 Iterable
+LegacyInterfaceTypeChecking
 LegacyTreatAsPartialInterface
+LenientThis
 LogActivity=|GetterOnly|SetterOnly
 LogAllWorlds
+NewObject
+Measure
 MeasureAs=*
 NamedConstructor=*
 NoImplHeader
 NoInterfaceObject
 NotEnumerable
-NotScriptWrappable
 OnlyExposedToPrivateScript
 OverrideBuiltins
 PartialInterfaceImplementedAs=*
-# Valid values for [PerContextEnabled] are Context Features, in
-# ContextFeatures::FeatureType in Source/core/dom/ContextFeatures.h
-PerContextEnabled=*
+PermissiveDictionaryConversion
 PerWorldBindings
+PostMessage
 PrimaryGlobal=|*
 PutForwards=*
 RaisesException=|Getter|Setter|Constructor
@@ -110,14 +111,15 @@
 # Valid values for [RuntimeEnabled] are the Runtime Enabled Features, listed in
 # Source/core/page/RuntimeEnabledFeatures.in
 RuntimeEnabled=*
+SameObject
 SetWrapperReferenceFrom=*
 SetWrapperReferenceTo=*
 SetterCallWith=ExecutionContext|ScriptArguments|ActiveWindow|FirstWindow
-SpecialWrapFor=*
 TreatNullAs=NullString|EmptyString
 TreatReturnedNullStringAs=Null|Undefined
 TreatUndefinedAs=NullString
-TypeChecking=Interface|Unrestricted
+TypeChecking=Interface
 URL
 Unforgeable
+Unscopeable
 WillBeGarbageCollected
diff --git a/bindings/README b/bindings/README
index 418d1e5..630832e 100644
--- a/bindings/README
+++ b/bindings/README
@@ -5,5 +5,5 @@
 using the script: $DART_ROOT/sdk/lib/html/scripts/idlsync.py
 
 The current version corresponds to:
-URL: http://src.chromium.org/blink/branches/dart/dartium
-Current revision: 190578
+URL: https://src.chromium.org/blink/branches/dart/2454_1
+Current revision: 202759
diff --git a/bindings/dart/gyp/scripts/build_dart_snapshot.py b/bindings/dart/gyp/scripts/build_dart_snapshot.py
index 323f38a..4efc717 100755
--- a/bindings/dart/gyp/scripts/build_dart_snapshot.py
+++ b/bindings/dart/gyp/scripts/build_dart_snapshot.py
@@ -68,15 +68,18 @@
             # Skip internal libraries - they should be indirectly imported via the public ones.
             if not name.startswith('_'):
                 snapshotScript.write('import \'dart:%(name)s\' as %(name)s;\n' % {'name': name})
+        snapshotScript.write('import \'dart:vmserviceio\';\n')
 
-    binarySnapshotFile = path(outputFilePath, 'DartSnapshot.bin')
+    binaryVmIsolateSnapshotFile = path(outputFilePath, 'DartVmIsolateSnapshot.bin')
+    binaryIsolateSnapshotFile = path(outputFilePath, 'DartIsolateSnapshot.bin')
 
     # Build a command to generate the snapshot bin file.
     command = [
         'python',
         path(dartPath, 'runtime', 'tools', 'create_snapshot_bin.py'),
         '--executable=%s' % path(genSnapshotBinPath),
-        '--output_bin=%s' % binarySnapshotFile,
+        '--vm_output_bin=%s' % binaryVmIsolateSnapshotFile,
+        '--output_bin=%s' % binaryIsolateSnapshotFile,
         '--script=%s' % snapshotScriptName,
     ]
     command.extend(['--url_mapping=dart:%s,%s' % lib for lib in snapshottedLibs])
@@ -93,7 +96,8 @@
         'python',
         path(dartPath, 'runtime', 'tools', 'create_snapshot_file.py'),
         '--input_cc=%s' % dartSnapshotTemplateFile,
-        '--input_bin=%s' % binarySnapshotFile,
+        '--vm_input_bin=%s' % binaryVmIsolateSnapshotFile,
+        '--input_bin=%s' % binaryIsolateSnapshotFile,
         '--output=%s' % path(outputFilePath, 'DartSnapshot.bytes'),
     ]
 
@@ -104,7 +108,7 @@
     if (pipe.returncode != 0):
         raise Exception('Snapshot file generation failed: %s/%s' % (out, error))
 
-    snapshotSizeInBytes = os.path.getsize(binarySnapshotFile)
+    snapshotSizeInBytes = os.path.getsize(binaryIsolateSnapshotFile)
     productDir = os.path.dirname(genSnapshotBinPath)
     snapshotSizeOutputPath = os.path.join(productDir, 'snapshot-size.txt')
     with file(snapshotSizeOutputPath, 'w') as snapshotSizeFile:
diff --git a/bindings/dart/scripts/__init__.py b/bindings/dart/scripts/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/bindings/dart/scripts/__init__.py
+++ /dev/null
diff --git a/bindings/dart/scripts/code_generator_dart.py b/bindings/dart/scripts/code_generator_dart.py
deleted file mode 100644
index df3818e..0000000
--- a/bindings/dart/scripts/code_generator_dart.py
+++ /dev/null
@@ -1,403 +0,0 @@
-# Copyright (C) 2013 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Generate Blink C++ bindings (.h and .cpp files) for use by Dart:HTML.
-
-If run itself, caches Jinja templates (and creates dummy file for build,
-since cache filenames are unpredictable and opaque).
-
-This module is *not* concurrency-safe without care: bytecode caching creates
-a race condition on cache *write* (crashes if one process tries to read a
-partially-written cache). However, if you pre-cache the templates (by running
-the module itself), then you can parallelize compiling individual files, since
-cache *reading* is safe.
-
-Input: An object of class IdlDefinitions, containing an IDL interface X
-Output: DartX.h and DartX.cpp
-
-Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
-"""
-
-import os
-import cPickle as pickle
-import re
-import sys
-
-
-# Path handling for libraries and templates
-# Paths have to be normalized because Jinja uses the exact template path to
-# determine the hash used in the cache filename, and we need a pre-caching step
-# to be concurrency-safe. Use absolute path because __file__ is absolute if
-# module is imported, and relative if executed directly.
-# If paths differ between pre-caching and individual file compilation, the cache
-# is regenerated, which causes a race condition and breaks concurrent build,
-# since some compile processes will try to read the partially written cache.
-module_path, module_filename = os.path.split(os.path.realpath(__file__))
-third_party_dir = os.path.normpath(os.path.join(
-    module_path, os.pardir, os.pardir, os.pardir, os.pardir, os.pardir))
-templates_dir = os.path.normpath(os.path.join(module_path, 'templates'))
-
-# Make sure extension is .py, not .pyc or .pyo, so doesn't depend on caching
-module_pyname = os.path.splitext(module_filename)[0] + '.py'
-
-# jinja2 is in chromium's third_party directory.
-# Insert at 1 so at front to override system libraries, and
-# after path[0] == invoking script dir
-sys.path.insert(1, third_party_dir)
-
-# Add the base compiler scripts to the path here as in compiler.py
-dart_script_path = os.path.dirname(os.path.abspath(__file__))
-script_path = os.path.join(os.path.dirname(os.path.dirname(dart_script_path)),
-                          'scripts')
-sys.path.extend([script_path])
-
-import jinja2
-
-import idl_types
-from idl_types import IdlType
-import dart_callback_interface
-import dart_interface
-import dart_types
-from dart_utilities import DartUtilities
-from utilities import write_pickle_file, idl_filename_to_interface_name
-import dart_dictionary
-from v8_globals import includes, interfaces
-
-
-def render_template(interface_info, header_template, cpp_template,
-                    template_context):
-    template_context['code_generator'] = module_pyname
-
-    # Add includes for any dependencies
-    template_context['header_includes'] = sorted(
-        template_context['header_includes'])
-    includes.update(interface_info.get('dependencies_include_paths', []))
-    template_context['cpp_includes'] = sorted(includes)
-
-    header_text = header_template.render(template_context)
-    cpp_text = cpp_template.render(template_context)
-    return header_text, cpp_text
-
-class CodeGeneratorDart(object):
-    def __init__(self, interfaces_info, cache_dir):
-        interfaces_info = interfaces_info or {}
-        self.interfaces_info = interfaces_info
-        self.jinja_env = initialize_jinja_env(cache_dir)
-
-        # Set global type info
-        if 'ancestors' in interfaces_info:
-            idl_types.set_ancestors(interfaces_info['ancestors'])
-        if 'callback_interfaces' in interfaces_info:
-            IdlType.set_callback_interfaces(interfaces_info['callback_interfaces'])
-        if 'dictionaries' in interfaces_info:
-            IdlType.set_dictionaries(interfaces_info['dictionaries'])
-        if 'implemented_as_interfaces' in interfaces_info:
-            IdlType.set_implemented_as_interfaces(interfaces_info['implemented_as_interfaces'])
-        if 'garbage_collected_interfaces' in interfaces_info:
-            IdlType.set_garbage_collected_types(interfaces_info['garbage_collected_interfaces'])
-        if 'will_be_garbage_collected_interfaces' in interfaces_info:
-            IdlType.set_will_be_garbage_collected_types(interfaces_info['will_be_garbage_collected_interfaces'])
-        if 'component_dirs' in interfaces_info:
-            dart_types.set_component_dirs(interfaces_info['component_dirs'])
-
-    def generate_code(self, definitions, interface_name, idl_pickle_filename,
-                      only_if_changed):
-        """Returns .h/.cpp code as (header_text, cpp_text)."""
-
-        IdlType.set_enums((enum.name, enum.values)
-                          for enum in definitions.enumerations.values())
-
-        if interface_name in definitions.interfaces:
-            interface = definitions.interfaces[interface_name]
-        elif interface_name in definitions.dictionaries:
-            output_code_list = self.generate_dictionary_code(
-                definitions, interface_name,
-                definitions.dictionaries[interface_name])
-
-            # Pickle the dictionary information...
-            idl_world = self.load_idl_pickle_file(idl_pickle_filename)
-            idl_world['dictionary'] = {'name': interface_name}
-            write_pickle_file(idl_pickle_filename,  idl_world, only_if_changed)
-
-            return output_code_list
-        else:
-            raise ValueError('%s is not in IDL definitions' % interface_name)
-
-        # Store other interfaces for introspection
-        interfaces.update(definitions.interfaces)
-
-        # Set local type info
-        IdlType.set_callback_functions(definitions.callback_functions.keys())
-
-        # Select appropriate Jinja template and contents function
-        if interface.is_callback:
-            header_template_filename = 'callback_interface_h.template'
-            cpp_template_filename = 'callback_interface_cpp.template'
-            generate_contents = dart_callback_interface.generate_callback_interface
-        else:
-            header_template_filename = 'interface_h.template'
-            cpp_template_filename = 'interface_cpp.template'
-            generate_contents = dart_interface.interface_context
-        header_template = self.jinja_env.get_template(header_template_filename)
-        cpp_template = self.jinja_env.get_template(cpp_template_filename)
-
-        # Generate contents (input parameters for Jinja)
-        template_contents = generate_contents(interface)
-        template_contents['code_generator'] = module_pyname
-
-        # Add includes for interface itself and any dependencies
-        interface_info = self.interfaces_info[interface_name]
-        template_contents['header_includes'].add(interface_info['include_path'])
-        template_contents['header_includes'] = sorted(template_contents['header_includes'])
-        includes.update(interface_info.get('dependencies_include_paths', []))
-
-        # Remove includes that are not needed for Dart and trigger fatal
-        # compile warnings if included. These IDL files need to be
-        # imported by Dart to generate the list of events but the
-        # associated header files do not contain any code used by Dart.
-        includes.discard('core/dom/GlobalEventHandlers.h')
-        includes.discard('core/frame/DOMWindowEventHandlers.h')
-
-        # Remove v8 usages not needed.
-        includes.discard('core/frame/UseCounter.h')
-        includes.discard('bindings/core/v8/V8ScriptState.h')
-        includes.discard('bindings/core/v8/V8DOMActivityLogger.h')
-        includes.discard('bindings/core/v8/V8DOMConfiguration.h')
-        includes.discard('bindings/core/v8/V8ExceptionState.h')
-        includes.discard('bindings/core/v8/V8HiddenValue.h')
-        includes.discard('bindings/core/v8/V8ObjectConstructor.h')
-        includes.discard('core/dom/ContextFeatures.h')
-        includes.discard('core/dom/Document.h')
-        includes.discard('platform/RuntimeEnabledFeatures.h')
-        includes.discard('platform/TraceEvent.h')
-
-        template_contents['cpp_includes'] = sorted(includes)
-
-        idl_world = self.load_idl_pickle_file(idl_pickle_filename)
-
-        if 'interface_name' in template_contents:
-            # interfaces no longer remember there component_dir re-compute based
-            # on relative_dir (first directory is the component).
-            component_dir = split_path(interface_info['relative_dir'])[0]
-            interface_global = {'name': template_contents['interface_name'],
-                                'parent_interface': template_contents['parent_interface'],
-                                'is_active_dom_object': template_contents['is_active_dom_object'],
-                                'is_event_target': template_contents['is_event_target'],
-                                'has_resolver': template_contents['interface_name'],
-                                'native_entries': sorted(template_contents['native_entries'], key=lambda(x): x['blink_entry']),
-                                'is_node': template_contents['is_node'],
-                                'conditional_string': template_contents['conditional_string'],
-                                'component_dir': component_dir,
-                               }
-            idl_world['interface'] = interface_global
-        else:
-            callback_global = {'name': template_contents['cpp_class']}
-            idl_world['callback'] = callback_global
-
-        write_pickle_file(idl_pickle_filename,  idl_world, only_if_changed)
-
-        # Render Jinja templates
-        header_text = header_template.render(template_contents)
-        cpp_text = cpp_template.render(template_contents)
-        return header_text, cpp_text
-
-    def load_idl_pickle_file(self, idl_pickle_filename):
-        # Pickle the dictionary information...
-        idl_world = {'interface': None, 'callback': None, 'dictionary': None}
-
-        # Load the pickle file for this IDL.
-        if os.path.isfile(idl_pickle_filename):
-            with open(idl_pickle_filename) as idl_pickle_file:
-                idl_global_data = pickle.load(idl_pickle_file)
-                idl_pickle_file.close()
-            idl_world['interface'] = idl_global_data['interface']
-            idl_world['callback'] = idl_global_data['callback']
-            idl_world['dictionary'] = idl_global_data['dictionary']
-
-        return idl_world
-
-    def generate_dictionary_code(self, definitions, dictionary_name,
-                                 dictionary):
-        interface_info = self.interfaces_info[dictionary_name]
-        bindings_results = self.generate_dictionary_bindings(
-            dictionary_name, interface_info, dictionary)
-        impl_results = self.generate_dictionary_impl(
-            dictionary_name, interface_info, dictionary)
-        return bindings_results + impl_results
-
-    def generate_dictionary_bindings(self, dictionary_name,
-                                     interface_info, dictionary):
-        header_template = self.jinja_env.get_template('dictionary_dart_h.template')
-        cpp_template = self.jinja_env.get_template('dictionary_dart_cpp.template')
-        template_context = dart_dictionary.dictionary_context(dictionary)
-        # Add the include for interface itself
-        template_context['header_includes'].add(interface_info['include_path'])
-        header_text, cpp_text = render_template(
-            interface_info, header_template, cpp_template, template_context)
-        return (header_text, cpp_text)
-
-    def generate_dictionary_impl(self, dictionary_name,
-                                 interface_info, dictionary):
-        header_template = self.jinja_env.get_template('dictionary_impl_h.template')
-        cpp_template = self.jinja_env.get_template('dictionary_impl_cpp.template')
-        template_context = dart_dictionary.dictionary_impl_context(
-            dictionary, self.interfaces_info)
-        header_text, cpp_text = render_template(
-            interface_info, header_template, cpp_template, template_context)
-        return (header_text, cpp_text)
-
-    def load_global_pickles(self, global_entries):
-        # List of all interfaces and callbacks for global code generation.
-        world = {'interfaces': [], 'callbacks': [], 'dictionary': []}
-
-        # Load all pickled data for each interface.
-        for (directory, file_list) in global_entries:
-            for idl_filename in file_list:
-                interface_name = idl_filename_to_interface_name(idl_filename)
-                idl_pickle_filename = interface_name + "_globals.pickle"
-                idl_pickle_filename = os.path.join(directory, idl_pickle_filename)
-                with open(idl_pickle_filename) as idl_pickle_file:
-                    idl_world = pickle.load(idl_pickle_file)
-                    if 'interface' in idl_world:
-                        # FIXME: Why are some of these None?
-                        if idl_world['interface']:
-                            world['interfaces'].append(idl_world['interface'])
-                    if 'callbacks' in idl_world:
-                        # FIXME: Why are some of these None?
-                        if idl_world['callbacks']:
-                            world['callbacks'].append(idl_world['callback'])
-                    if 'dictionary' in idl_world:
-                        # It's an IDL dictionary
-                        if idl_world['dictionary']:
-                            world['dictionary'].append(idl_world['dictionary'])
-        world['interfaces'] = sorted(world['interfaces'], key=lambda (x): x['name'])
-        world['callbacks'] = sorted(world['callbacks'], key=lambda (x): x['name'])
-        world['dictionary'] = sorted(world['dictionary'], key=lambda (x): x['name'])
-        return world
-
-    # Generates global file for all interfaces.
-    def generate_globals(self, global_entries):
-        template_contents = self.load_global_pickles(global_entries)
-        template_contents['code_generator'] = module_pyname
-
-        header_template_filename = 'global_h.template'
-        header_template = self.jinja_env.get_template(header_template_filename)
-        header_text = header_template.render(template_contents)
-
-        cpp_template_filename = 'global_cpp.template'
-        cpp_template = self.jinja_env.get_template(cpp_template_filename)
-        cpp_text = cpp_template.render(template_contents)
-
-        return header_text, cpp_text
-
-    # Generates global dart blink file for all interfaces.
-    def generate_dart_blink(self, global_entries):
-        template_contents = self.load_global_pickles(global_entries)
-        template_contents['code_generator'] = module_pyname
-
-        template_filename = 'dart_blink.template'
-        template = self.jinja_env.get_template(template_filename)
-
-        text = template.render(template_contents)
-        return text
-
-
-def initialize_jinja_env(cache_dir):
-    jinja_env = jinja2.Environment(
-        loader=jinja2.FileSystemLoader(templates_dir),
-        # Bytecode cache is not concurrency-safe unless pre-cached:
-        # if pre-cached this is read-only, but writing creates a race condition.
-        # bytecode_cache=jinja2.FileSystemBytecodeCache(cache_dir),
-        keep_trailing_newline=True,  # newline-terminate generated files
-        lstrip_blocks=True,  # so can indent control flow tags
-        trim_blocks=True)
-    jinja_env.filters.update({
-        'blink_capitalize': DartUtilities.capitalize,
-        'conditional': conditional_if_endif,
-        'runtime_enabled': runtime_enabled_if,
-        })
-    return jinja_env
-
-
-# [Conditional]
-def conditional_if_endif(code, conditional_string):
-    # Jinja2 filter to generate if/endif directive blocks
-    if not conditional_string:
-        return code
-    return ('#if %s\n' % conditional_string +
-            code +
-            '#endif // %s\n' % conditional_string)
-
-
-# [RuntimeEnabled]
-def runtime_enabled_if(code, runtime_enabled_function_name):
-    if not runtime_enabled_function_name:
-        return code
-    # Indent if statement to level of original code
-    indent = re.match(' *', code).group(0)
-    return ('%sif (%s())\n' % (indent, runtime_enabled_function_name) +
-            '    %s' % code)
-
-
-def split_path(path):
-    path_list = []
-    while os.path.basename(path):
-        path_list.append(os.path.basename(path))
-        path = os.path.dirname(path)
-    path_list.reverse()
-    return path_list
-
-
-################################################################################
-
-def main(argv):
-    # If file itself executed, cache templates
-    try:
-        cache_dir = argv[1]
-        dummy_filename = argv[2]
-    except IndexError as err:
-        print 'Usage: %s OUTPUT_DIR DUMMY_FILENAME' % argv[0]
-        return 1
-
-    # Cache templates
-    jinja_env = initialize_jinja_env(cache_dir)
-    template_filenames = [filename for filename in os.listdir(templates_dir)
-                          # Skip .svn, directories, etc.
-                          if filename.endswith(('.cpp', '.h', '.template'))]
-    for template_filename in template_filenames:
-        jinja_env.get_template(template_filename)
-
-    # Create a dummy file as output for the build system,
-    # since filenames of individual cache files are unpredictable and opaque
-    # (they are hashes of the template path, which varies based on environment)
-    with open(dummy_filename, 'w') as dummy_file:
-        pass  # |open| creates or touches the file
-
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/bindings/dart/scripts/compiler.py b/bindings/dart/scripts/compiler.py
deleted file mode 100755
index 6dbe8f2..0000000
--- a/bindings/dart/scripts/compiler.py
+++ /dev/null
@@ -1,148 +0,0 @@
-#!/usr/bin/python
-# Copyright (C) 2014 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Compile an .idl file to Dart bindings (.h and .cpp files).
-
-Design doc: ??????
-"""
-
-from optparse import OptionParser
-import os
-import sys
-
-dart_script_path = os.path.dirname(os.path.abspath(__file__))
-script_path = os.path.join(os.path.dirname(os.path.dirname(dart_script_path)),
-                          'scripts')
-sys.path.extend([script_path])
-
-from dart_compiler import IdlCompiler
-from code_generator_dart import CodeGeneratorDart
-
-
-def parse_options():
-    parser = OptionParser()
-    parser.add_option('--output-directory')
-    parser.add_option('--interfaces-info-file')
-    parser.add_option('--write-file-only-if-changed', type='int', default='1')
-    parser.add_option('--generate-dart-blink',
-                      action='append',
-                      type='string',
-                      dest='blink_global_entries',
-                      nargs=3,
-                      help="Pickle file directory, idl file list, idl dictionaries list")
-
-    parser.add_option('--generate-globals',
-                      action='append',
-                      type='string',
-                      dest='global_entries',
-                      nargs=2,
-                      help="Pickle file directory and idl file list (global class table)")
-
-    # ensure output comes last, so command line easy to parse via regexes
-    parser.disable_interspersed_args()
-
-    options, args = parser.parse_args()
-    if options.output_directory is None:
-        parser.error('Must specify output directory using --output-directory.')
-    options.write_file_only_if_changed = bool(options.write_file_only_if_changed)
-    if bool(options.global_entries) or bool(options.blink_global_entries):
-        return options, None
-    if len(args) != 1:
-        parser.error('Must specify exactly 1 input file as argument, but %d given.' % len(args))
-    filename = os.path.realpath(args[0])
-    return options, filename
-
-
-def idl_filename_to_interface_name(idl_filename):
-    basename = os.path.basename(idl_filename)
-    interface_name, _ = os.path.splitext(basename)
-    return interface_name
-
-
-class IdlCompilerDart(IdlCompiler):
-    def __init__(self, *args, **kwargs):
-        IdlCompiler.__init__(self, *args, **kwargs)
-
-        interfaces_info = self.interfaces_info
-        self.output_directory = self.output_directory
-
-        self.code_generator = CodeGeneratorDart(interfaces_info, self.output_directory)
-
-    def compile_file(self, idl_filename):
-        interface_name = idl_filename_to_interface_name(idl_filename)
-        header_filename = os.path.join(self.output_directory,
-                                       'Dart%s.h' % interface_name)
-        cpp_filename = os.path.join(self.output_directory,
-                                    'Dart%s.cpp' % interface_name)
-        self.compile_and_write(idl_filename, (header_filename, cpp_filename))
-
-    def generate_global(self, global_entries):
-        expanded_global_entries = []
-        for (directory, file_list_file) in global_entries:
-            with open(file_list_file) as input_file:
-                idl_file_list = sorted([line.rstrip('\n')
-                                        for line in input_file])
-            expanded_global_entries.append((directory, idl_file_list))
-        global_header_filename = os.path.join(self.output_directory, 'DartWebkitClassIds.h')
-        global_cpp_filename = os.path.join(self.output_directory, 'DartWebkitClassIds.cpp')
-        self.generate_global_and_write(expanded_global_entries,
-                                       (global_header_filename, global_cpp_filename))
-
-    def generate_dart_blink(self, global_entries):
-        global_dart_blink_filename = os.path.join(self.output_directory,
-                                                  '_blink_dartium.dart')
-        expanded_global_entries = []
-        for (directory, file_list_file, file_list_dictionary) in global_entries:
-            with open(file_list_file) as input_file:
-                idl_file_list = sorted([line.rstrip('\n')
-                                        for line in input_file])
-            with open(file_list_dictionary) as input_file:
-                dictionary_file_list = sorted([line.rstrip('\n')
-                                               for line in input_file])
-            expanded_global_entries.append((directory, idl_file_list))
-            expanded_global_entries.append((directory, dictionary_file_list))
-        self.generate_dart_blink_and_write(expanded_global_entries,
-                                           global_dart_blink_filename)
-
-
-def main():
-    options, filename = parse_options()
-    idl_compiler = IdlCompilerDart(options.output_directory,
-                                   interfaces_info_filename=options.interfaces_info_file,
-                                   only_if_changed=options.write_file_only_if_changed)
-    if bool(options.global_entries):
-        idl_compiler.generate_global(options.global_entries)
-    elif bool(options.blink_global_entries):
-        idl_compiler.generate_dart_blink(options.blink_global_entries)
-    else:
-        idl_compiler.compile_file(filename)
-
-
-if __name__ == '__main__':
-    sys.exit(main())
diff --git a/bindings/dart/scripts/dart_attributes.py b/bindings/dart/scripts/dart_attributes.py
deleted file mode 100644
index 4559a66..0000000
--- a/bindings/dart/scripts/dart_attributes.py
+++ /dev/null
@@ -1,300 +0,0 @@
-# Copyright (C) 2013 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Generate template values for attributes.
-
-Extends IdlType with property |constructor_type_name|.
-
-Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
-"""
-
-import idl_types
-from dart_interface import suppress_getter, suppress_setter
-import dart_types
-from dart_utilities import DartUtilities
-from v8_globals import interfaces
-
-import v8_attributes
-
-
-def attribute_context(interface, attribute):
-    # Call v8's implementation.
-    context = v8_attributes.attribute_context(interface, attribute)
-
-    extended_attributes = attribute.extended_attributes
-
-    # Augment's Dart's information to context.
-    idl_type = attribute.idl_type
-    base_idl_type = idl_type.base_type
-    # TODO(terry): Work around for DOMString[] base should be IDLTypeArray
-    if base_idl_type == None:
-        # Returns Array or Sequence.
-        base_idl_type = idl_type.name
-
-    # [Custom]
-    has_custom_getter = (('Custom' in extended_attributes and
-                          extended_attributes['Custom'] in [None, 'Getter']) or
-                         ('DartCustom' in extended_attributes and
-                          extended_attributes['DartCustom'] in [None, 'Getter', 'New']))
-    has_custom_setter = (not attribute.is_read_only and
-                         (('Custom' in extended_attributes and
-                          extended_attributes['Custom'] in [None, 'Setter']) or
-                         ('DartCustom' in extended_attributes and
-                          extended_attributes['DartCustom'] in [None, 'Setter', 'New'])))
-
-    is_call_with_script_state = DartUtilities.has_extended_attribute_value(attribute, 'CallWith', 'ScriptState')
-
-    is_auto_scope = not 'DartNoAutoScope' in extended_attributes
-
-    context.update({
-      'activity_logging_world_list_for_getter': DartUtilities.activity_logging_world_list(attribute, 'Getter'),  # [ActivityLogging]
-      'activity_logging_world_list_for_setter': DartUtilities.activity_logging_world_list(attribute, 'Setter'),  # [ActivityLogging]
-      'deprecate_as': DartUtilities.deprecate_as(attribute),  # [DeprecateAs]
-      'has_custom_getter': has_custom_getter,
-      'has_custom_setter': has_custom_setter,
-      'is_auto_scope': is_auto_scope,   # Used internally (outside of templates).
-      'is_call_with_script_state': is_call_with_script_state,
-      'auto_scope': DartUtilities.bool_to_cpp(is_auto_scope),
-      'measure_as': DartUtilities.measure_as(attribute),  # [MeasureAs]
-      'v8_type': dart_types.v8_type(base_idl_type),
-    })
-
-    if v8_attributes.is_constructor_attribute(attribute):
-        v8_attributes.constructor_getter_context(interface, attribute, context)
-        return context
-    if not v8_attributes.has_custom_getter(attribute):
-        getter_context(interface, attribute, context)
-    if (not attribute.is_read_only):
-        # FIXME: We did not previously support the PutForwards attribute, so I am
-        # disabling it here for now to get things compiling.
-        # We may wish to revisit this.
-        # if (not has_custom_setter(attribute) and
-        # (not attribute.is_read_only or 'PutForwards' in extended_attributes)):
-        setter_context(interface, attribute, context)
-
-    native_entry_getter = \
-        DartUtilities.generate_native_entry(
-            interface.name, attribute.name, 'Getter', attribute.is_static, 0)
-    native_entry_setter = \
-        DartUtilities.generate_native_entry(
-            interface.name, attribute.name, 'Setter', attribute.is_static, 1)
-    context.update({
-        'native_entry_getter': native_entry_getter,
-        'native_entry_setter': native_entry_setter,
-    })
-
-    return context
-
-
-################################################################################
-# Getter
-################################################################################
-
-def getter_context(interface, attribute, context):
-    v8_attributes.getter_context(interface, attribute, context)
-
-    idl_type = attribute.idl_type
-    base_idl_type = idl_type.base_type
-    extended_attributes = attribute.extended_attributes
-
-    cpp_value = getter_expression(interface, attribute, context)
-    # Normally we can inline the function call into the return statement to
-    # avoid the overhead of using a Ref<> temporary, but for some cases
-    # (nullable types, EventHandler, [CachedAttribute], or if there are
-    # exceptions), we need to use a local variable.
-    # FIXME: check if compilers are smart enough to inline this, and if so,
-    # always use a local variable (for readability and CG simplicity).
-    release = False
-    if (idl_type.is_nullable or
-        base_idl_type == 'EventHandler' or
-        'CachedAttribute' in extended_attributes or
-        'ReflectOnly' in extended_attributes or
-        context['is_getter_raises_exception']):
-        context['cpp_value_original'] = cpp_value
-        cpp_value = 'result'
-        # EventHandler has special handling
-        if base_idl_type != 'EventHandler' and idl_type.is_interface_type:
-            release = True
-
-    dart_set_return_value = \
-        idl_type.dart_set_return_value(cpp_value,
-                                       extended_attributes=extended_attributes,
-                                       script_wrappable='impl',
-                                       release=release,
-                                       for_main_world=False,
-                                       auto_scope=context['is_auto_scope'])
-
-    # TODO(terry): Should be able to eliminate suppress_getter as we move from
-    #              IGNORE_MEMBERS to DartSuppress in the IDL.
-    suppress = (suppress_getter(interface.name, attribute.name) or
-                DartUtilities.has_extended_attribute_value(attribute, 'DartSuppress', 'Getter'))
-
-    context.update({
-        'cpp_value': cpp_value,
-        'dart_set_return_value': dart_set_return_value,
-        'is_getter_suppressed': suppress,
-    })
-
-
-def getter_expression(interface, attribute, context):
-    v8_attributes.getter_expression(interface, attribute, context)
-
-    arguments = []
-    this_getter_base_name = v8_attributes.getter_base_name(interface, attribute, arguments)
-    getter_name = DartUtilities.scoped_name(interface, attribute, this_getter_base_name)
-
-    arguments.extend(DartUtilities.call_with_arguments(
-        attribute.extended_attributes.get('CallWith')))
-    if ('PartialInterfaceImplementedAs' in attribute.extended_attributes and
-        not attribute.is_static):
-        # Pass by reference.
-        arguments.append('*receiver')
-
-    if attribute.idl_type.is_explicit_nullable:
-        arguments.append('isNull')
-    if context['is_getter_raises_exception']:
-        arguments.append('es')
-    return '%s(%s)' % (getter_name, ', '.join(arguments))
-
-
-################################################################################
-# Setter
-################################################################################
-
-def setter_context(interface, attribute, context):
-    v8_attributes.setter_context(interface, attribute, context)
-
-    def target_attribute():
-        target_interface_name = attribute.idl_type.base_type
-        target_attribute_name = extended_attributes['PutForwards']
-        target_interface = interfaces[target_interface_name]
-        try:
-            return next(attribute
-                        for attribute in target_interface.attributes
-                        if attribute.name == target_attribute_name)
-        except StopIteration:
-            raise Exception('[PutForward] target not found:\n'
-                            'Attribute "%s" is not present in interface "%s"' %
-                            (target_attribute_name, target_interface_name))
-
-    extended_attributes = attribute.extended_attributes
-
-    if 'PutForwards' in extended_attributes:
-        # Use target attribute in place of original attribute
-        attribute = target_attribute()
-        this_cpp_type = 'DartStringAdapter'
-    else:
-        this_cpp_type = context['cpp_type']
-
-    idl_type = attribute.idl_type
-
-    # TODO(terry): Should be able to eliminate suppress_setter as we move from
-    #              IGNORE_MEMBERS to DartSuppress in the IDL.
-    suppress = (suppress_setter(interface.name, attribute.name) or
-                DartUtilities.has_extended_attribute_value(attribute, 'DartSuppress', 'Setter'))
-    context.update({
-        'has_setter_exception_state': (
-            context['is_setter_raises_exception'] or context['has_type_checking_interface'] or
-            idl_type.is_integer_type),
-        'is_setter_suppressed':  suppress,
-        'setter_lvalue': dart_types.check_reserved_name(attribute.name),
-        'cpp_type': this_cpp_type,
-        'local_cpp_type': idl_type.cpp_type_args(attribute.extended_attributes, raw_type=True),
-        'dart_value_to_local_cpp_value':
-            attribute.idl_type.dart_value_to_local_cpp_value(
-                extended_attributes, attribute.name, False,
-                context['has_type_checking_interface'], 1,
-                context['is_auto_scope']),
-    })
-
-    # setter_expression() depends on context values we set above.
-    context['cpp_setter'] = setter_expression(interface, attribute, context)
-
-
-def setter_expression(interface, attribute, context):
-    extended_attributes = attribute.extended_attributes
-    arguments = DartUtilities.call_with_arguments(
-        extended_attributes.get('SetterCallWith') or
-        extended_attributes.get('CallWith'))
-
-    this_setter_base_name = v8_attributes.setter_base_name(interface, attribute, arguments)
-    setter_name = DartUtilities.scoped_name(interface, attribute, this_setter_base_name)
-
-    if ('PartialInterfaceImplementedAs' in extended_attributes and
-        not attribute.is_static):
-        arguments.append('*receiver')
-    idl_type = attribute.idl_type
-    if idl_type.base_type == 'EventHandler':
-        getter_name = DartUtilities.scoped_name(interface, attribute, DartUtilities.cpp_name(attribute))
-        context['event_handler_getter_expression'] = '%s(%s)' % (
-            getter_name, ', '.join(arguments))
-        # FIXME(vsm): Do we need to support this? If so, what's our analogue of
-        # V8EventListenerList?
-        arguments.append('nullptr')
-        # if (interface.name in ['Window', 'WorkerGlobalScope'] and
-        #    attribute.name == 'onerror'):
-        #    includes.add('bindings/core/v8/V8ErrorHandler.h')
-        #    arguments.append('V8EventListenerList::findOrCreateWrapper<V8ErrorHandler>(jsValue, true, info.GetIsolate())')
-        # else:
-        #    arguments.append('V8EventListenerList::getEventListener(jsValue, true, ListenerFindOrCreate)')
-    else:
-        attribute_name = dart_types.check_reserved_name(attribute.name)
-        arguments.append(attribute_name)
-    if context['is_setter_raises_exception']:
-        arguments.append('es')
-
-    return '%s(%s)' % (setter_name, ', '.join(arguments))
-
-
-################################################################################
-# Attribute configuration
-################################################################################
-
-# [Replaceable]
-def setter_callback_name(interface, attribute):
-    cpp_class_name = DartUtilities.cpp_name(interface)
-    extended_attributes = attribute.extended_attributes
-    if (('Replaceable' in extended_attributes and
-         'PutForwards' not in extended_attributes) or
-        v8_attributes.is_constructor_attribute(attribute)):
-        # FIXME: rename to ForceSetAttributeOnThisCallback, since also used for Constructors
-        return '{0}V8Internal::{0}ReplaceableAttributeSetterCallback'.format(cpp_class_name)
-    # FIXME:disabling PutForwards for now since we didn't support it before
-    #    if attribute.is_read_only and 'PutForwards' not in extended_attributes:
-    if attribute.is_read_only:
-        return '0'
-    return '%sV8Internal::%sAttributeSetterCallback' % (cpp_class_name, attribute.name)
-
-
-################################################################################
-# Constructors
-################################################################################
-
-idl_types.IdlType.constructor_type_name = property(
-    # FIXME: replace this with a [ConstructorAttribute] extended attribute
-    lambda self: DartUtilities.strip_suffix(self.base_type, 'Constructor'))
diff --git a/bindings/dart/scripts/dart_callback_interface.py b/bindings/dart/scripts/dart_callback_interface.py
deleted file mode 100644
index 266fb31..0000000
--- a/bindings/dart/scripts/dart_callback_interface.py
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright (C) 2013 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Generate template values for a callback interface.
-
-Extends IdlType with property |callback_cpp_type|.
-
-Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
-"""
-
-from idl_types import IdlType, IdlTypeBase
-import dart_types
-from dart_utilities import DartUtilities
-from v8_globals import includes
-
-CALLBACK_INTERFACE_H_INCLUDES = frozenset([
-    'bindings/core/dart/DartCallback.h',
-    'bindings/core/dart/DartDOMWrapper.h',
-    'bindings/core/v8/ActiveDOMCallback.h',
-])
-CALLBACK_INTERFACE_CPP_INCLUDES = frozenset([
-    'bindings/core/dart/DartBindingsCommonIncludes.h',
-    'wtf/GetPtr.h',
-    'wtf/RefPtr.h',
-])
-
-def cpp_type(idl_type):
-    # FIXME: remove this function by making callback types consistent
-    # (always use usual v8_types.cpp_type)
-    idl_type_name = idl_type.name
-    if idl_type_name == 'String':
-        return 'const String&'
-    if idl_type_name == 'void':
-        return 'void'
-    # Callbacks use raw pointers, so raw_type=True
-    usual_cpp_type = idl_type.cpp_type_args(raw_type=True)
-    if usual_cpp_type.startswith(('Vector', 'HeapVector', 'WillBeHeapVector')):
-        return 'const %s&' % usual_cpp_type
-    return usual_cpp_type
-
-IdlTypeBase.callback_cpp_type = property(cpp_type)
-
-
-def generate_callback_interface(callback_interface):
-    includes.clear()
-    includes.update(CALLBACK_INTERFACE_CPP_INCLUDES)
-    name = callback_interface.name
-
-    methods = [generate_method(operation)
-               for operation in callback_interface.operations]
-    template_contents = {
-        'conditional_string': DartUtilities.conditional_string(callback_interface),
-        'cpp_class': name,
-        'dart_class': dart_types.dart_type(callback_interface.name),
-        'v8_class': DartUtilities.v8_class_name(callback_interface),
-        'header_includes': set(CALLBACK_INTERFACE_H_INCLUDES),
-        'methods': methods,
-    }
-    return template_contents
-
-
-def add_includes_for_operation(operation):
-    operation.idl_type.add_includes_for_type()
-    for argument in operation.arguments:
-        argument.idl_type.add_includes_for_type()
-
-
-def generate_method(operation):
-    extended_attributes = operation.extended_attributes
-    idl_type = operation.idl_type
-    idl_type_str = str(idl_type)
-    if idl_type_str not in ['boolean', 'void']:
-        raise Exception('We only support callbacks that return boolean or void values.')
-    is_custom = 'Custom' in extended_attributes
-    if not is_custom:
-        add_includes_for_operation(operation)
-    call_with = extended_attributes.get('CallWith')
-    call_with_this_handle = DartUtilities.extended_attribute_value_contains(call_with, 'ThisValue')
-    contents = {
-        'call_with_this_handle': call_with_this_handle,
-        'cpp_type': idl_type.callback_cpp_type,
-        'custom': is_custom,
-        'idl_type': idl_type_str,
-        'name': operation.name,
-    }
-    contents.update(generate_arguments_contents(operation.arguments, call_with_this_handle))
-    return contents
-
-
-def generate_arguments_contents(arguments, call_with_this_handle):
-    def generate_argument(argument):
-        creation_context = ''
-        if argument.idl_type.native_array_element_type is not None:
-            creation_context = '<Dart%s>' % argument.idl_type.native_array_element_type
-        return {
-            'handle': '%sHandle' % argument.name,
-            'cpp_value_to_dart_value': argument.idl_type.cpp_value_to_dart_value(argument.name,
-                                                                                 creation_context=creation_context),
-        }
-
-    argument_declarations = [
-            '%s %s' % (argument.idl_type.callback_cpp_type, argument.name)
-            for argument in arguments]
-    if call_with_this_handle:
-        argument_declarations.insert(0, 'ScriptValue thisValue')
-    return  {
-        'argument_declarations': argument_declarations,
-        'arguments': [generate_argument(argument) for argument in arguments],
-    }
diff --git a/bindings/dart/scripts/dart_compiler.py b/bindings/dart/scripts/dart_compiler.py
deleted file mode 100755
index 84eb655..0000000
--- a/bindings/dart/scripts/dart_compiler.py
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/python
-# Copyright (C) 2013 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Compile an .idl file to Blink C++ bindings (.h and .cpp files) for Dart:HTML.
-
-Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
-"""
-
-import abc
-from optparse import OptionParser
-import os
-import cPickle as pickle
-
-from idl_reader import IdlReader
-from utilities import write_file, idl_filename_to_component
-
-
-# TODO(terry): Temporary whitelist of IDL files to skip code generating. e.g.,
-#              adding 'Animation.idl' to this list will skip that IDL file.
-SKIP_IDL_FILES = ['']
-
-
-def parse_options():
-    parser = OptionParser()
-    parser.add_option('--idl-attributes-file',
-                      help="location of bindings/IDLExtendedAttributes.txt")
-    parser.add_option('--output-directory')
-    parser.add_option('--interfaces-info-file')
-    parser.add_option('--write-file-only-if-changed', type='int')
-    # ensure output comes last, so command line easy to parse via regexes
-    parser.disable_interspersed_args()
-
-    options, args = parser.parse_args()
-    if options.output_directory is None:
-        parser.error('Must specify output directory using --output-directory.')
-    options.write_file_only_if_changed = bool(options.write_file_only_if_changed)
-    if len(args) != 1:
-        parser.error('Must specify exactly 1 input file as argument, but %d given.' % len(args))
-    idl_filename = os.path.realpath(args[0])
-    return options, idl_filename
-
-
-def idl_filename_to_interface_name(idl_filename):
-    basename = os.path.basename(idl_filename)
-    interface_name, _ = os.path.splitext(basename)
-    return interface_name
-
-
-class IdlCompiler(object):
-    """Abstract Base Class for IDL compilers.
-
-    In concrete classes:
-    * self.code_generator must be set, implementing generate_code()
-      (returning a list of output code), and
-    * compile_file() must be implemented (handling output filenames).
-    """
-    __metaclass__ = abc.ABCMeta
-
-    def __init__(self, output_directory, code_generator=None,
-                 interfaces_info=None, interfaces_info_filename='',
-                 only_if_changed=False):
-        """
-        Args:
-            interfaces_info:
-                interfaces_info dict
-                (avoids auxiliary file in run-bindings-tests)
-            interfaces_info_file: filename of pickled interfaces_info
-        """
-        self.code_generator = code_generator
-        if interfaces_info_filename:
-            with open(interfaces_info_filename) as interfaces_info_file:
-                interfaces_info = pickle.load(interfaces_info_file)
-        self.interfaces_info = interfaces_info
-
-        self.only_if_changed = only_if_changed
-        self.output_directory = output_directory
-        self.reader = IdlReader(interfaces_info, output_directory)
-
-    def compile_and_write(self, idl_filename, output_filenames):
-        interface_name = idl_filename_to_interface_name(idl_filename)
-        idl_pickle_filename = os.path.join(self.output_directory,
-                                           '%s_globals.pickle' % interface_name)
-        definitions = self.reader.read_idl_definitions(idl_filename)
-        component = idl_filename_to_component(idl_filename)
-
-        output_code_list = self.code_generator.generate_code(definitions[component],
-                                                             interface_name,
-                                                             idl_pickle_filename,
-                                                             self.only_if_changed)
-
-        # TODO(terry): Temporary to disable code generating an IDL.
-        base_idl_filename = os.path.basename(idl_filename)
-        if base_idl_filename in SKIP_IDL_FILES:
-            print "----- Skipping %s -----" % base_idl_filename
-        else:
-            for output_code, output_filename in zip(output_code_list, output_filenames):
-                write_file(output_code, output_filename, self.only_if_changed)
-
-    def generate_global_and_write(self, global_entries, output_filenames):
-        output_code_list = self.code_generator.generate_globals(global_entries)
-        for output_code, output_filename in zip(output_code_list, output_filenames):
-            write_file(output_code, output_filename, self.only_if_changed)
-
-    def generate_dart_blink_and_write(self, global_entries, output_filename):
-        output_code = self.code_generator.generate_dart_blink(global_entries)
-        write_file(output_code, output_filename, self.only_if_changed)
-
-    @abc.abstractmethod
-    def compile_file(self, idl_filename):
-        pass
diff --git a/bindings/dart/scripts/dart_dictionary.py b/bindings/dart/scripts/dart_dictionary.py
deleted file mode 100644
index 42a21ba..0000000
--- a/bindings/dart/scripts/dart_dictionary.py
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Generate template contexts of dictionaries for both v8 bindings and
-implementation classes that are used by blink's core/modules.
-"""
-
-import operator
-from v8_globals import includes
-import dart_types
-from dart_utilities import DartUtilities
-
-
-DICTIONARY_H_INCLUDES = frozenset([
-    'bindings/core/v8/V8Binding.h',
-    'platform/heap/Handle.h',
-])
-
-DICTIONARY_CPP_INCLUDES = frozenset([
-    'bindings/common/ExceptionState.h',
-    # FIXME: Remove this, http://crbug.com/321462
-    'bindings/core/v8/Dictionary.h',
-])
-
-
-def setter_name_for_dictionary_member(member):
-    return 'set%s' % DartUtilities.capitalize(member.name)
-
-
-def has_method_name_for_dictionary_member(member):
-    return 'has%s' % DartUtilities.capitalize(member.name)
-
-
-def unwrap_nullable_if_needed(idl_type):
-    if idl_type.is_nullable:
-        return idl_type.inner_type
-    return idl_type
-
-
-# Context for Dart bindings
-
-def dictionary_context(dictionary):
-    includes.clear()
-    includes.update(DICTIONARY_CPP_INCLUDES)
-    return {
-        'cpp_class': DartUtilities.cpp_name(dictionary),
-        'header_includes': set(DICTIONARY_H_INCLUDES),
-        'members': [member_context(member)
-                    for member in sorted(dictionary.members,
-                                         key=operator.attrgetter('name'))],
-        'dart_class': dart_types.dart_type(dictionary.name),
-
-    }
-
-
-def member_context(member):
-    idl_type = member.idl_type
-    idl_type.add_includes_for_type()
-    idl_type = unwrap_nullable_if_needed(idl_type)
-
-    def default_values():
-        if not member.default_value:
-            return None, None
-        if member.default_value.is_null:
-            return None, 'v8::Null(isolate)'
-        cpp_default_value = str(member.default_value)
-        v8_default_value = idl_type.cpp_value_to_v8_value(
-            cpp_value=cpp_default_value, isolate='isolate',
-            creation_context='creationContext')
-        return cpp_default_value, v8_default_value
-
-    cpp_default_value, dart_default_value = default_values()
-
-    dart_enum_expression = idl_type.enum_validation_expression
-    if dart_enum_expression:
-        dart_enum_expression = dart_enum_expression.format(param_name='string')
-
-    return {
-        'cpp_default_value': cpp_default_value,
-        'cpp_type': idl_type.cpp_type,
-        'cpp_value_to_dart_value': idl_type.cpp_value_to_dart_value(
-            cpp_value='impl->%s()' % member.name,
-            creation_context='creationContext',
-            extended_attributes=member.extended_attributes),
-        'enum_validation_expression': dart_enum_expression,
-        'has_method_name': has_method_name_for_dictionary_member(member),
-        'is_object': idl_type.name == 'Object',
-        'name': member.name,
-        'setter_name': setter_name_for_dictionary_member(member),
-        'dart_default_value': dart_default_value,
-    }
-
-
-# Context for implementation classes
-
-def dictionary_impl_context(dictionary, interfaces_info):
-    includes.clear()
-    header_includes = set(['platform/heap/Handle.h'])
-    return {
-        'header_includes': header_includes,
-        'cpp_class': DartUtilities.cpp_name(dictionary),
-        'members': [member_impl_context(member, interfaces_info,
-                                        header_includes)
-                    for member in dictionary.members],
-    }
-
-
-def member_impl_context(member, interfaces_info, header_includes):
-    idl_type = unwrap_nullable_if_needed(member.idl_type)
-    is_object = idl_type.name == 'Object'
-
-    def getter_expression():
-        if idl_type.impl_should_use_nullable_container:
-            return 'm_%s.get()' % member.name
-        return 'm_%s' % member.name
-
-    def has_method_expression():
-        if idl_type.impl_should_use_nullable_container or idl_type.is_enum or idl_type.is_string_type:
-            return '!m_%s.isNull()' % member.name
-        elif is_object:
-            return '!(m_{0}.isEmpty() || m_{0}.isNull() || m_{0}.isUndefined())'.format(member.name)
-        else:
-            return 'm_%s' % member.name
-
-    def member_cpp_type():
-        member_cpp_type = idl_type.cpp_type_args(used_in_cpp_sequence=True)
-        if idl_type.impl_should_use_nullable_container:
-            return dart_types.cpp_template_type('Nullable', member_cpp_type)
-        return member_cpp_type
-
-    cpp_default_value = None
-    if member.default_value and not member.default_value.is_null:
-        cpp_default_value = str(member.default_value)
-
-    header_includes.update(idl_type.impl_includes_for_type(interfaces_info))
-    return {
-        'cpp_default_value': cpp_default_value,
-        'getter_expression': getter_expression(),
-        'has_method_expression': has_method_expression(),
-        'has_method_name': has_method_name_for_dictionary_member(member),
-        'is_object': is_object,
-        'is_traceable': (idl_type.is_garbage_collected or
-                         idl_type.is_will_be_garbage_collected),
-        'member_cpp_type': member_cpp_type(),
-        'name': member.name,
-        'rvalue_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True),
-        'setter_name': setter_name_for_dictionary_member(member),
-    }
diff --git a/bindings/dart/scripts/dart_interface.py b/bindings/dart/scripts/dart_interface.py
deleted file mode 100644
index 1ab889b..0000000
--- a/bindings/dart/scripts/dart_interface.py
+++ /dev/null
@@ -1,1142 +0,0 @@
-# Copyright (C) 2013 Google Inc. All rights reserved.
-# coding=utf-8
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Generate template values for an interface.
-
-Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
-"""
-
-from collections import defaultdict
-import itertools
-from operator import itemgetter
-
-import idl_types
-from idl_types import IdlType, inherits_interface, IdlArrayOrSequenceType, IdlArrayType
-import dart_attributes
-import dart_methods
-import dart_types
-from dart_utilities import DartUtilities
-from v8_globals import includes
-import v8_attributes
-import v8_interface
-
-
-INTERFACE_H_INCLUDES = frozenset([
-    'bindings/core/dart/DartDOMWrapper.h',
-    'platform/heap/Handle.h',
-])
-
-INTERFACE_CPP_INCLUDES = frozenset([
-
-    'bindings/core/dart/DartUtilities.h',
-    'wtf/GetPtr.h',
-    'wtf/RefPtr.h',
-])
-
-
-# TODO(terry): Temporary to not generate a method, getter/setter. Format is:
-#
-#               interface_name.method_name
-#               interface_name.get:attribute_name
-#               interface_name.set:attribute_name
-#
-#               Ultimate solution add a special attribute flag to IDL to signal
-#               don't generate IDL entry in Dart (e.g., DartNoGenerate)?
-IGNORE_MEMBERS = frozenset([
-    'AudioBufferSourceNode.looping',  # TODO(vsm): Use deprecated IDL annotation
-    'CSSStyleDeclaration.getPropertyCSSValue',
-    'CanvasRenderingContext2D.clearShadow',
-    'CanvasRenderingContext2D.drawImageFromRect',
-    'CanvasRenderingContext2D.setAlpha',
-    'CanvasRenderingContext2D.setCompositeOperation',
-    'CanvasRenderingContext2D.setFillColor',
-    'CanvasRenderingContext2D.setLineCap',
-    'CanvasRenderingContext2D.setLineJoin',
-    'CanvasRenderingContext2D.setLineWidth',
-    'CanvasRenderingContext2D.setMiterLimit',
-    'CanvasRenderingContext2D.setShadow',
-    'CanvasRenderingContext2D.setStrokeColor',
-    'CharacterData.remove',
-    'Window.call:blur',
-    'Window.call:focus',
-    'Window.clientInformation',
-    'Window.createImageBitmap',
-    'Window.get:frames',
-    'Window.get:length',
-    'Window.on:beforeUnload',
-    'Window.on:webkitTransitionEnd',
-    'Window.pagePopupController',
-    'Window.prompt',
-    'Window.webkitCancelAnimationFrame',
-    'Window.webkitCancelRequestAnimationFrame',
-    'Window.webkitIndexedDB',
-    'Window.webkitRequestAnimationFrame',
-    'Document.alinkColor',
-    'HTMLDocument.all',
-    'Document.applets',
-    'Document.bgColor',
-    'Document.clear',
-    'Document.createAttribute',
-    'Document.createAttributeNS',
-    'Document.createComment',
-    'Document.createExpression',
-    'Document.createNSResolver',
-    'Document.createProcessingInstruction',
-    'Document.designMode',
-    'Document.dir',
-    'Document.evaluate',
-    'Document.fgColor',
-    'Document.get:URL',
-    'Document.get:anchors',
-    'Document.get:characterSet',
-    'Document.get:compatMode',
-    'Document.get:defaultCharset',
-    'Document.get:doctype',
-    'Document.get:documentURI',
-    'Document.get:embeds',
-    'Document.get:forms',
-    'Document.get:inputEncoding',
-    'Document.get:links',
-    'Document.get:plugins',
-    'Document.get:scripts',
-    'Document.get:xmlEncoding',
-    'Document.getElementsByTagNameNS',
-    'Document.getOverrideStyle',
-    'Document.getSelection',
-    'Document.images',
-    'Document.linkColor',
-    'Document.location',
-    'Document.on:wheel',
-    'Document.open',
-    'Document.register',
-    'Document.set:domain',
-    'Document.vlinkColor',
-    'Document.webkitCurrentFullScreenElement',
-    'Document.webkitFullScreenKeyboardInputAllowed',
-    'Document.write',
-    'Document.writeln',
-    'Document.xmlStandalone',
-    'Document.xmlVersion',
-    'DocumentFragment.children',
-    'DocumentType.*',
-    'DOMException.code',
-    'DOMException.ABORT_ERR',
-    'DOMException.DATA_CLONE_ERR',
-    'DOMException.DOMSTRING_SIZE_ERR',
-    'DOMException.HIERARCHY_REQUEST_ERR',
-    'DOMException.INDEX_SIZE_ERR',
-    'DOMException.INUSE_ATTRIBUTE_ERR',
-    'DOMException.INVALID_ACCESS_ERR',
-    'DOMException.INVALID_CHARACTER_ERR',
-    'DOMException.INVALID_MODIFICATION_ERR',
-    'DOMException.INVALID_NODE_TYPE_ERR',
-    'DOMException.INVALID_STATE_ERR',
-    'DOMException.NAMESPACE_ERR',
-    'DOMException.NETWORK_ERR',
-    'DOMException.NOT_FOUND_ERR',
-    'DOMException.NOT_SUPPORTED_ERR',
-    'DOMException.NO_DATA_ALLOWED_ERR',
-    'DOMException.NO_MODIFICATION_ALLOWED_ERR',
-    'DOMException.QUOTA_EXCEEDED_ERR',
-    'DOMException.SECURITY_ERR',
-    'DOMException.SYNTAX_ERR',
-    'DOMException.TIMEOUT_ERR',
-    'DOMException.TYPE_MISMATCH_ERR',
-    'DOMException.URL_MISMATCH_ERR',
-    'DOMException.VALIDATION_ERR',
-    'DOMException.WRONG_DOCUMENT_ERR',
-    'Element.accessKey',
-    'Element.dataset',
-    'Element.get:classList',
-    'Element.getAttributeNode',
-    'Element.getAttributeNodeNS',
-    'Element.getElementsByTagNameNS',
-    'Element.innerText',
-    'Element.on:wheel',
-    'Element.outerText',
-    'Element.removeAttributeNode',
-    'Element.set:outerHTML',
-    'Element.setAttributeNode',
-    'Element.setAttributeNodeNS',
-    'Element.webkitCreateShadowRoot',
-    'Element.webkitMatchesSelector',
-    'Element.webkitPseudo',
-    'Element.webkitShadowRoot',
-    '=Event.returnValue',  # Only suppress on Event, allow for BeforeUnloadEvent.
-    'Event.srcElement',
-    'EventSource.URL',
-    'FontFace.ready',
-    'FontFaceSet.load',
-    'FontFaceSet.ready',
-    'HTMLAnchorElement.charset',
-    'HTMLAnchorElement.coords',
-    'HTMLAnchorElement.rev',
-    'HTMLAnchorElement.shape',
-    'HTMLAnchorElement.text',
-    'HTMLAppletElement.*',
-    'HTMLAreaElement.noHref',
-    'HTMLBRElement.clear',
-    'HTMLBaseFontElement.*',
-    'HTMLBodyElement.aLink',
-    'HTMLBodyElement.background',
-    'HTMLBodyElement.bgColor',
-    'HTMLBodyElement.link',
-    'HTMLBodyElement.on:beforeUnload',
-    'HTMLBodyElement.text',
-    'HTMLBodyElement.vLink',
-    'HTMLDListElement.compact',
-    'HTMLDirectoryElement.*',
-    'HTMLDivElement.align',
-    'HTMLFontElement.*',
-    'HTMLFormControlsCollection.__getter__',
-    'HTMLFormElement.get:elements',
-    'HTMLFrameElement.*',
-    'HTMLFrameSetElement.*',
-    'HTMLHRElement.align',
-    'HTMLHRElement.noShade',
-    'HTMLHRElement.size',
-    'HTMLHRElement.width',
-    'HTMLHeadElement.profile',
-    'HTMLHeadingElement.align',
-    'HTMLHtmlElement.manifest',
-    'HTMLHtmlElement.version',
-    'HTMLIFrameElement.align',
-    'HTMLIFrameElement.frameBorder',
-    'HTMLIFrameElement.longDesc',
-    'HTMLIFrameElement.marginHeight',
-    'HTMLIFrameElement.marginWidth',
-    'HTMLIFrameElement.scrolling',
-    'HTMLImageElement.align',
-    'HTMLImageElement.hspace',
-    'HTMLImageElement.longDesc',
-    'HTMLImageElement.name',
-    'HTMLImageElement.vspace',
-    'HTMLInputElement.align',
-    'HTMLLegendElement.align',
-    'HTMLLinkElement.charset',
-    'HTMLLinkElement.rev',
-    'HTMLLinkElement.target',
-    'HTMLMarqueeElement.*',
-    'HTMLMenuElement.compact',
-    'HTMLMetaElement.scheme',
-    'HTMLOListElement.compact',
-    'HTMLObjectElement.align',
-    'HTMLObjectElement.archive',
-    'HTMLObjectElement.border',
-    'HTMLObjectElement.codeBase',
-    'HTMLObjectElement.codeType',
-    'HTMLObjectElement.declare',
-    'HTMLObjectElement.hspace',
-    'HTMLObjectElement.standby',
-    'HTMLObjectElement.vspace',
-    'HTMLOptionElement.text',
-    'HTMLOptionsCollection.*',
-    'HTMLParagraphElement.align',
-    'HTMLParamElement.type',
-    'HTMLParamElement.valueType',
-    'HTMLPreElement.width',
-    'HTMLScriptElement.text',
-    'HTMLSelectElement.options',
-    'HTMLSelectElement.selectedOptions',
-    'HTMLTableCaptionElement.align',
-    'HTMLTableCellElement.abbr',
-    'HTMLTableCellElement.align',
-    'HTMLTableCellElement.axis',
-    'HTMLTableCellElement.bgColor',
-    'HTMLTableCellElement.ch',
-    'HTMLTableCellElement.chOff',
-    'HTMLTableCellElement.height',
-    'HTMLTableCellElement.noWrap',
-    'HTMLTableCellElement.scope',
-    'HTMLTableCellElement.vAlign',
-    'HTMLTableCellElement.width',
-    'HTMLTableColElement.align',
-    'HTMLTableColElement.ch',
-    'HTMLTableColElement.chOff',
-    'HTMLTableColElement.vAlign',
-    'HTMLTableColElement.width',
-    'HTMLTableElement.align',
-    'HTMLTableElement.bgColor',
-    'HTMLTableElement.cellPadding',
-    'HTMLTableElement.cellSpacing',
-    'HTMLTableElement.frame',
-    'HTMLTableElement.rules',
-    'HTMLTableElement.summary',
-    'HTMLTableElement.width',
-    'HTMLTableRowElement.align',
-    'HTMLTableRowElement.bgColor',
-    'HTMLTableRowElement.ch',
-    'HTMLTableRowElement.chOff',
-    'HTMLTableRowElement.vAlign',
-    'HTMLTableSectionElement.align',
-    'HTMLTableSectionElement.ch',
-    'HTMLTableSectionElement.chOff',
-    'HTMLTableSectionElement.vAlign',
-    'HTMLTitleElement.text',
-    'HTMLUListElement.compact',
-    'HTMLUListElement.type',
-    'Location.valueOf',
-    'MessageEvent.ports',
-    'MessageEvent.webkitInitMessageEvent',
-    'MouseEvent.x',
-    'MouseEvent.y',
-    'Navigator.registerServiceWorker',
-    'Navigator.unregisterServiceWorker',
-    'Node.compareDocumentPosition',
-    'Node.get:DOCUMENT_POSITION_CONTAINED_BY',
-    'Node.get:DOCUMENT_POSITION_CONTAINS',
-    'Node.get:DOCUMENT_POSITION_DISCONNECTED',
-    'Node.get:DOCUMENT_POSITION_FOLLOWING',
-    'Node.get:DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC',
-    'Node.get:DOCUMENT_POSITION_PRECEDING',
-    'Node.get:prefix',
-    'Node.hasAttributes',
-    'Node.isDefaultNamespace',
-    'Node.isEqualNode',
-    'Node.isSameNode',
-    'Node.isSupported',
-    'Node.lookupNamespaceURI',
-    'Node.lookupPrefix',
-    'Node.normalize',
-    'Node.set:nodeValue',
-    'NodeFilter.acceptNode',
-    'NodeIterator.expandEntityReferences',
-    'NodeIterator.filter',
-    'Performance.webkitClearMarks',
-    'Performance.webkitClearMeasures',
-    'Performance.webkitGetEntries',
-    'Performance.webkitGetEntriesByName',
-    'Performance.webkitGetEntriesByType',
-    'Performance.webkitMark',
-    'Performance.webkitMeasure',
-    'ShadowRoot.getElementsByTagNameNS',
-    'SVGElement.getPresentationAttribute',
-    'SVGElementInstance.on:wheel',
-    'WheelEvent.wheelDelta',
-    'Window.on:wheel',
-    'WindowEventHandlers.on:beforeUnload',
-    'WorkerGlobalScope.webkitIndexedDB',
-# TODO(jacobr): should these be removed?
-    'Document.close',
-    'Document.hasFocus',
-])
-
-
-def _suppress_method(interface_name, name):
-    name_to_find = '%s.%s' % (interface_name, name)
-    wildcard_name_to_find = '%s.*' % interface_name
-    return name_to_find in IGNORE_MEMBERS or wildcard_name_to_find in IGNORE_MEMBERS
-
-
-# Both getter and setter are to be suppressed then the attribute is completely
-# disappear.
-def _suppress_attribute(interface_name, name):
-    return (suppress_getter(interface_name, name) and suppress_setter(interface_name, name))
-
-
-def suppress_getter(interface_name, name):
-    name_to_find = '%s.get:%s' % (interface_name, name)
-    wildcard_getter_to_find = '%s.get:*' % interface_name
-    return (name_to_find in IGNORE_MEMBERS or
-            _suppress_method(interface_name, name) or
-            wildcard_getter_to_find in IGNORE_MEMBERS)
-
-
-def suppress_setter(interface_name, name):
-    name_to_find = '%s.set:%s' % (interface_name, name)
-    wildcard_setter_to_find = '%s.set:*' % interface_name
-    return (name_to_find in IGNORE_MEMBERS or
-            _suppress_method(interface_name, name) or
-            wildcard_setter_to_find in IGNORE_MEMBERS)
-
-
-# To suppress an IDL method or attribute with a particular Extended Attribute
-# w/o a value e.g, DartStrictTypeChecking would be an empty set
-#   'DartStrictTypeChecking': frozenset([]),
-IGNORE_EXTENDED_ATTRIBUTES = {
-#    'RuntimeEnabled': frozenset(['ExperimentalCanvasFeatures']),
-}
-
-
-# Return True if the method / attribute should be suppressed.
-def _suppress_extended_attributes(extended_attributes):
-    if 'DartSuppress' in extended_attributes and extended_attributes.get('DartSuppress') == None:
-        return True
-
-    # TODO(terry): Eliminate this using DartSuppress extended attribute in the
-    #              IDL files instead of the IGNORE_EXTENDED_ATTRIBUTES list.
-    for extended_attribute_name in extended_attributes:
-        ignore_extended_values = IGNORE_EXTENDED_ATTRIBUTES.get(extended_attribute_name)
-        if ignore_extended_values != None:
-            extended_attribute_value = extended_attributes.get(extended_attribute_name)
-            if ((not ignore_extended_values and extended_attribute_value == None) or
-                extended_attribute_value in ignore_extended_values):
-                return True
-    return False
-
-
-# TODO(terry): Rename genenerate_interface to interface_context.
-def interface_context(interface):
-    context = v8_interface.interface_context(interface)
-
-    includes.clear()
-
-    includes.update(INTERFACE_CPP_INCLUDES)
-    header_includes = set(INTERFACE_H_INCLUDES)
-
-    parent_interface = interface.parent
-    if parent_interface:
-        header_includes.update(dart_types.includes_for_interface(parent_interface))
-    extended_attributes = interface.extended_attributes
-
-    is_document = inherits_interface(interface.name, 'Document')
-    if is_document:
-        # FIXME(vsm): We probably need bindings/dart/DartController and
-        # core/frame/LocalFrame.h here.
-        includes.update(['DartDocument.h'])
-
-    if inherits_interface(interface.name, 'DataTransferItemList'):
-        # FIXME(jacobr): this is a hack.
-        includes.update(['core/html/HTMLCollection.h'])
-
-
-    if inherits_interface(interface.name, 'EventTarget'):
-        includes.update(['bindings/core/dart/DartEventListener.h'])
-
-    # [SetWrapperReferenceTo]
-    set_wrapper_reference_to_list = [{
-        'name': argument.name,
-        # FIXME: properly should be:
-        # 'cpp_type': argument.idl_type.cpp_type_args(used_as_rvalue_type=True),
-        # (if type is non-wrapper type like NodeFilter, normally RefPtr)
-        # Raw pointers faster though, and NodeFilter hacky anyway.
-        'cpp_type': argument.idl_type.implemented_as + '*',
-        'idl_type': argument.idl_type,
-        'v8_type': dart_types.v8_type(argument.idl_type.name),
-    } for argument in extended_attributes.get('SetWrapperReferenceTo', [])]
-    for set_wrapper_reference_to in set_wrapper_reference_to_list:
-        set_wrapper_reference_to['idl_type'].add_includes_for_type()
-
-    context.update({
-        'conditional_string': DartUtilities.conditional_string(interface),  # [Conditional]
-        'cpp_class': DartUtilities.cpp_name(interface),
-        'header_includes': header_includes,
-        'is_garbage_collected': context['gc_type'] == 'GarbageCollectedObject',
-        'is_will_be_garbage_collected': context['gc_type'] == 'WillBeGarbageCollectedObject',
-        'measure_as': DartUtilities.measure_as(interface),  # [MeasureAs]
-        'pass_cpp_type': dart_types.cpp_template_type(
-            dart_types.cpp_ptr_type('PassRefPtr', 'RawPtr', context['gc_type']),
-            DartUtilities.cpp_name(interface)),
-        'runtime_enabled_function': DartUtilities.runtime_enabled_function_name(interface),  # [RuntimeEnabled]
-         'set_wrapper_reference_to_list': set_wrapper_reference_to_list,
-        'dart_class': dart_types.dart_type(interface.name),
-        'v8_class': DartUtilities.v8_class_name(interface),
-    })
-
-    # Constructors
-    constructors = [constructor_context(interface, constructor)
-                    for constructor in interface.constructors
-                    # FIXME: shouldn't put named constructors with constructors
-                    # (currently needed for Perl compatibility)
-                    # Handle named constructors separately
-                    if constructor.name == 'Constructor']
-    if len(constructors) > 1:
-        context.update({'constructor_overloads': overloads_context(constructors)})
-
-    # [CustomConstructor]
-    custom_constructors = [custom_constructor_context(interface, constructor)
-                           for constructor in interface.custom_constructors]
-
-    # [NamedConstructor]
-    named_constructor = generate_named_constructor(interface)
-
-    generate_method_native_entries(interface, constructors, 'Constructor')
-    generate_method_native_entries(interface, custom_constructors, 'Constructor')
-    if named_constructor:
-        generate_method_native_entries(interface, [named_constructor],
-                                       'Constructor')
-    event_constructor = None
-    if context['has_event_constructor']:
-        event_constructor = {
-            'native_entries': [
-                DartUtilities.generate_native_entry(
-                    interface.name, None, 'Constructor', False, 2)],
-        }
-
-    if (context['constructors'] or custom_constructors or context['has_event_constructor'] or
-        named_constructor):
-        includes.add('core/frame/LocalDOMWindow.h')
-
-    context.update({
-        'constructors': constructors,
-        'custom_constructors': custom_constructors,
-        'event_constructor': event_constructor,
-        'has_custom_constructor': bool(custom_constructors),
-        'interface_length':
-            v8_interface.interface_length(interface, constructors + custom_constructors),
-        'is_constructor_call_with_document': DartUtilities.has_extended_attribute_value(
-            interface, 'ConstructorCallWith', 'Document'),  # [ConstructorCallWith=Document]
-        'is_constructor_call_with_execution_context': DartUtilities.has_extended_attribute_value(
-            interface, 'ConstructorCallWith', 'ExecutionContext'),  # [ConstructorCallWith=ExeuctionContext]
-        'named_constructor': named_constructor,
-    })
-
-    # Attributes
-    attributes = [dart_attributes.attribute_context(interface, attribute)
-                  for attribute in interface.attributes
-                      # Skip attributes in the IGNORE_MEMBERS list or if an
-                      # extended attribute is in the IGNORE_EXTENDED_ATTRIBUTES.
-                      if (not _suppress_attribute(interface.name, attribute.name) and
-                          not v8_attributes.is_constructor_attribute(attribute) and
-                          not _suppress_extended_attributes(attribute.extended_attributes) and
-                          not ('DartSuppress' in attribute.extended_attributes and
-                           attribute.extended_attributes.get('DartSuppress') == None))]
-    context.update({
-        'attributes': attributes,
-        'has_accessors': any(attribute['is_expose_js_accessors'] for attribute in attributes),
-        'has_attribute_configuration': any(
-             not (attribute['is_expose_js_accessors'] or
-                  attribute['is_static'] or
-                  attribute['runtime_enabled_function'] or
-                  attribute['per_context_enabled_function'])
-             for attribute in attributes),
-        'has_constructor_attributes': any(attribute['constructor_type'] for attribute in attributes),
-        'has_per_context_enabled_attributes': any(attribute['per_context_enabled_function'] for attribute in attributes),
-        'has_replaceable_attributes': any(attribute['is_replaceable'] for attribute in attributes),
-    })
-
-    # Methods
-    methods = [dart_methods.method_context(interface, method)
-               for method in interface.operations
-               # Skip anonymous special operations (methods name empty).
-               # Skip methods in our IGNORE_MEMBERS list.
-               # Skip methods w/ extended attributes in IGNORE_EXTENDED_ATTRIBUTES list.
-               if (method.name and
-                   # detect unnamed getters from v8_interface.
-                   method.name != 'anonymousNamedGetter' and
-                   # TODO(terry): Eventual eliminate the IGNORE_MEMBERS in favor of DartSupress.
-                   not _suppress_method(interface.name, method.name) and
-                   not _suppress_extended_attributes(method.extended_attributes) and
-                   not 'DartSuppress' in method.extended_attributes)]
-    compute_method_overloads_context(methods)
-    for method in methods:
-        method['do_generate_method_configuration'] = (
-            method['do_not_check_signature'] and
-            not method['per_context_enabled_function'] and
-            # For overloaded methods, only generate one accessor
-            ('overload_index' not in method or method['overload_index'] == 1))
-
-    generate_method_native_entries(interface, methods, 'Method')
-
-    context.update({
-        'has_origin_safe_method_setter': any(
-            method['is_check_security_for_frame'] and not method['is_read_only']
-            for method in methods),
-        'has_method_configuration': any(method['do_generate_method_configuration'] for method in methods),
-        'has_per_context_enabled_methods': any(method['per_context_enabled_function'] for method in methods),
-        'methods': methods,
-    })
-
-    context.update({
-        'indexed_property_getter': indexed_property_getter(interface),
-        'indexed_property_setter': indexed_property_setter(interface),
-        'indexed_property_deleter': v8_interface.indexed_property_deleter(interface),
-        'is_override_builtins': 'OverrideBuiltins' in extended_attributes,
-        'named_property_getter': named_property_getter(interface),
-        'named_property_setter': named_property_setter(interface),
-        'named_property_deleter': v8_interface.named_property_deleter(interface),
-    })
-
-    generate_native_entries_for_specials(interface, context)
-
-    native_entries = generate_interface_native_entries(context)
-
-    context.update({
-        'native_entries': native_entries,
-    })
-
-    return context
-
-
-def generate_interface_native_entries(context):
-    entries = {}
-
-    def add(ne):
-        entries[ne['blink_entry']] = ne
-
-    def addAll(nes):
-        for ne in nes:
-            add(ne)
-
-    for constructor in context['constructors']:
-        addAll(constructor['native_entries'])
-    for constructor in context['custom_constructors']:
-        addAll(constructor['native_entries'])
-    if context['named_constructor']:
-        addAll(context['named_constructor']['native_entries'])
-    if context['event_constructor']:
-        addAll(context['event_constructor']['native_entries'])
-    for method in context['methods']:
-        addAll(method['native_entries'])
-    for attribute in context['attributes']:
-        add(attribute['native_entry_getter'])
-        if not attribute['is_read_only'] or attribute['put_forwards']:
-            add(attribute['native_entry_setter'])
-    if context['indexed_property_getter']:
-        addAll(context['indexed_property_getter']['native_entries'])
-    if context['indexed_property_setter']:
-        addAll(context['indexed_property_setter']['native_entries'])
-    if context['indexed_property_deleter']:
-        addAll(context['indexed_property_deleter']['native_entries'])
-    if context['named_property_getter']:
-        addAll(context['named_property_getter']['native_entries'])
-    if context['named_property_setter']:
-        addAll(context['named_property_setter']['native_entries'])
-    if context['named_property_deleter']:
-        addAll(context['named_property_deleter']['native_entries'])
-    return list(entries.values())
-
-
-def generate_method_native_entry(interface, method, count, kind):
-    name = method.get('name')
-    is_static = bool(method.get('is_static'))
-    native_entry = \
-        DartUtilities.generate_native_entry(interface.name, name,
-                                            kind, is_static, count)
-    return native_entry
-
-
-def generate_method_native_entries(interface, methods, kind):
-    for method in methods:
-        native_entries = []
-        arg_count = method['number_of_arguments']
-        min_arg_count = method['number_of_required_arguments']
-        lb = min_arg_count - 2 if min_arg_count > 2 else 0
-        for x in range(lb, arg_count + 3):
-            native_entry = \
-                generate_method_native_entry(interface, method, x, kind)
-            native_entries.append(native_entry)
-
-        method.update({'native_entries': native_entries})
-
-
-################################################################################
-# Overloads
-################################################################################
-
-def compute_method_overloads_context(methods):
-    # Regular methods
-    compute_method_overloads_context_by_type([method for method in methods
-                                              if not method['is_static']])
-    # Static methods
-    compute_method_overloads_context_by_type([method for method in methods
-                                              if method['is_static']])
-
-
-def compute_method_overloads_context_by_type(methods):
-    """Computes |method.overload*| template values.
-
-    Called separately for static and non-static (regular) methods,
-    as these are overloaded separately.
-    Modifies |method| in place for |method| in |methods|.
-    Doesn't change the |methods| list itself (only the values, i.e. individual
-    methods), so ok to treat these separately.
-    """
-    # Add overload information only to overloaded methods, so template code can
-    # easily verify if a function is overloaded
-    for name, overloads in v8_interface.method_overloads_by_name(methods):
-        # Resolution function is generated after last overloaded function;
-        # package necessary information into |method.overloads| for that method.
-        overloads[-1]['overloads'] = overloads_context(overloads)
-        overloads[-1]['overloads']['name'] = name
-
-
-def overloads_context(overloads):
-    """Returns |overloads| template values for a single name.
-
-    Sets |method.overload_index| in place for |method| in |overloads|
-    and returns dict of overall overload template values.
-    """
-    assert len(overloads) > 1  # only apply to overloaded names
-    for index, method in enumerate(overloads, 1):
-        method['overload_index'] = index
-
-    effective_overloads_by_length = v8_interface.effective_overload_set_by_length(overloads)
-    lengths = [length for length, _ in effective_overloads_by_length]
-    name = overloads[0].get('name', '<constructor>')
-
-    # Check and fail if all overloads with the shortest acceptable arguments
-    # list are runtime enabled, since we would otherwise set 'length' on the
-    # function object to an incorrect value when none of those overloads were
-    # actually enabled at runtime. The exception is if all overloads are
-    # controlled by the same runtime enabled feature, in which case there would
-    # be no function object at all if it is not enabled.
-    shortest_overloads = effective_overloads_by_length[0][1]
-    if (all(method.get('runtime_enabled_function')
-            for method, _, _ in shortest_overloads) and
-        not v8_interface.common_value(overloads, 'runtime_enabled_function')):
-        raise ValueError('Function.length of %s depends on runtime enabled features' % name)
-
-    return {
-        'deprecate_all_as': v8_interface.common_value(overloads, 'deprecate_as'),  # [DeprecateAs]
-        'exposed_test_all': v8_interface.common_value(overloads, 'exposed_test'),  # [Exposed]
-        'length_tests_methods': length_tests_methods(effective_overloads_by_length),
-        # 1. Let maxarg be the length of the longest type list of the
-        # entries in S.
-        'maxarg': lengths[-1],
-        'measure_all_as': v8_interface.common_value(overloads, 'measure_as'),  # [MeasureAs]
-        'minarg': lengths[0],
-        'per_context_enabled_function_all': v8_interface.common_value(overloads, 'per_context_enabled_function'),  # [PerContextEnabled]
-        'runtime_enabled_function_all': v8_interface.common_value(overloads, 'runtime_enabled_function'),  # [RuntimeEnabled]
-        'valid_arities': lengths
-            # Only need to report valid arities if there is a gap in the
-            # sequence of possible lengths, otherwise invalid length means
-            # "not enough arguments".
-            if lengths[-1] - lengths[0] != len(lengths) - 1 else None,
-    }
-
-
-def length_tests_methods(effective_overloads_by_length):
-    """Returns sorted list of resolution tests and associated methods, by length.
-
-    This builds the main data structure for the overload resolution loop.
-    For a given argument length, bindings test argument at distinguishing
-    argument index, in order given by spec: if it is compatible with
-    (optionality or) type required by an overloaded method, resolve to that
-    method.
-
-    Returns:
-        [(length, [(test, method)])]
-    """
-    return [(length, list(resolution_tests_methods(effective_overloads)))
-            for length, effective_overloads in effective_overloads_by_length]
-
-
-DART_CHECK_TYPE = {
-    'ArrayBufferView': 'Dart_IsTypedData({cpp_value})',
-    'ArrayBuffer': 'Dart_IsByteBuffer({cpp_value})',
-    'Uint8Array': 'DartUtilities::isUint8Array({cpp_value})',
-    'Uint8ClampedArray': 'DartUtilities::isUint8ClampedArray({cpp_value})',
-}
-
-
-def resolution_tests_methods(effective_overloads):
-    """Yields resolution test and associated method, in resolution order, for effective overloads of a given length.
-
-    This is the heart of the resolution algorithm.
-    http://heycam.github.io/webidl/#dfn-overload-resolution-algorithm
-
-    Note that a given method can be listed multiple times, with different tests!
-    This is to handle implicit type conversion.
-
-    Returns:
-        [(test, method)]
-    """
-    methods = [effective_overload[0]
-               for effective_overload in effective_overloads]
-    if len(methods) == 1:
-        # If only one method with a given length, no test needed
-        yield 'true', methods[0]
-        return
-
-    # 6. If there is more than one entry in S, then set d to be the
-    # distinguishing argument index for the entries of S.
-    index = v8_interface.distinguishing_argument_index(effective_overloads)
-    # (7-9 are for handling |undefined| values for optional arguments before
-    # the distinguishing argument (as "missing"), so you can specify only some
-    # optional arguments. We don't support this, so we skip these steps.)
-    # 10. If i = d, then:
-    # (d is the distinguishing argument index)
-    # 1. Let V be argi.
-    #     Note: This is the argument that will be used to resolve which
-    #           overload is selected.
-    cpp_value = 'Dart_GetNativeArgument(args, %s + argOffset)' % index
-
-    # Extract argument and IDL type to simplify accessing these in each loop.
-    arguments = [method['arguments'][index] for method in methods]
-    arguments_methods = zip(arguments, methods)
-    idl_types = [argument['idl_type_object'] for argument in arguments]
-    idl_types_methods = zip(idl_types, methods)
-
-    # We can't do a single loop through all methods or simply sort them, because
-    # a method may be listed in multiple steps of the resolution algorithm, and
-    # which test to apply differs depending on the step.
-    #
-    # Instead, we need to go through all methods at each step, either finding
-    # first match (if only one test is allowed) or filtering to matches (if
-    # multiple tests are allowed), and generating an appropriate tests.
-
-    # 2. If V is undefined, and there is an entry in S whose list of
-    # optionality values has "optional" at index i, then remove from S all
-    # other entries.
-    try:
-        method = next(method for argument, method in arguments_methods
-                      if argument['is_optional'])
-        test = 'Dart_IsNull(%s)' % cpp_value
-        yield test, method
-    except StopIteration:
-        pass
-
-    # 3. Otherwise: if V is null or undefined, and there is an entry in S that
-    # has one of the following types at position i of its type list,
-    # - a nullable type
-    try:
-        method = next(method for idl_type, method in idl_types_methods
-                      if idl_type.is_nullable)
-        test = 'Dart_IsNull(%s)' % cpp_value
-        yield test, method
-    except StopIteration:
-        pass
-
-    # 4. Otherwise: if V is a platform object - but not a platform array
-    # object - and there is an entry in S that has one of the following
-    # types at position i of its type list,
-    # - an interface type that V implements
-    # (Unlike most of these tests, this can return multiple methods, since we
-    #  test if it implements an interface. Thus we need a for loop, not a next.)
-    # (We distinguish wrapper types from built-in interface types.)
-    for idl_type, method in ((idl_type, method)
-                             for idl_type, method in idl_types_methods
-                             if idl_type.is_wrapper_type):
-        fmtstr = 'Dart{idl_type}::hasInstance({cpp_value})'
-        if idl_type.base_type in DART_CHECK_TYPE:
-            fmtstr = DART_CHECK_TYPE[idl_type.base_type]
-        test = fmtstr.format(idl_type=idl_type.base_type, cpp_value=cpp_value)
-        yield test, method
-
-    # 8. Otherwise: if V is any kind of object except for a native Date object,
-    # a native RegExp object, and there is an entry in S that has one of the
-    # following types at position i of its type list,
-    # - an array type
-    # - a sequence type
-    # ...
-    # - a dictionary
-    try:
-        # FIXME: IDL dictionary not implemented, so use Blink Dictionary
-        # http://crbug.com/321462
-        idl_type, method = next((idl_type, method)
-                                for idl_type, method in idl_types_methods
-                                if (idl_type.native_array_element_type or
-                                    idl_type.name == 'Dictionary'))
-        if idl_type.native_array_element_type:
-            # (We test for Array instead of generic Object to type-check.)
-            # FIXME: test for Object during resolution, then have type check for
-            # Array in overloaded method: http://crbug.com/262383
-            test = 'Dart_IsList(%s)' % cpp_value
-        else:
-            # FIXME: should be '{1}->IsObject() && !{1}->IsDate() && !{1}->IsRegExp()'.format(cpp_value)
-            # FIXME: the IsDate and IsRegExp checks can be skipped if we've
-            # already generated tests for them.
-            test = 'Dart_IsInstance(%s)' % cpp_value
-        yield test, method
-    except StopIteration:
-        pass
-
-    # (Check for exact type matches before performing automatic type conversion;
-    # only needed if distinguishing between primitive types.)
-    if len([idl_type.is_primitive_type for idl_type in idl_types]) > 1:
-        # (Only needed if match in step 11, otherwise redundant.)
-        if any(idl_type.is_string_type or idl_type.is_enum
-               for idl_type in idl_types):
-            # 10. Otherwise: if V is a Number value, and there is an entry in S
-            # that has one of the following types at position i of its type
-            # list,
-            # - a numeric type
-            try:
-                method = next(method for idl_type, method in idl_types_methods
-                              if idl_type.is_numeric_type)
-                test = 'Dart_IsNumber(%s)' % cpp_value
-                yield test, method
-            except StopIteration:
-                pass
-
-    # (Perform automatic type conversion, in order. If any of these match,
-    # that's the end, and no other tests are needed.) To keep this code simple,
-    # we rely on the C++ compiler's dead code elimination to deal with the
-    # redundancy if both cases below trigger.
-
-    # 11. Otherwise: if there is an entry in S that has one of the following
-    # types at position i of its type list,
-    # - DOMString
-    # - ByteString
-    # - ScalarValueString [a DOMString typedef, per definition.]
-    # - an enumeration type
-    try:
-        method = next(method for idl_type, method in idl_types_methods
-                      if idl_type.is_string_type or idl_type.is_enum)
-        yield 'true', method
-    except StopIteration:
-        pass
-
-    # 12. Otherwise: if there is an entry in S that has one of the following
-    # types at position i of its type list,
-    # - a numeric type
-    try:
-        method = next(method for idl_type, method in idl_types_methods
-                      if idl_type.is_numeric_type)
-        yield 'true', method
-    except StopIteration:
-        pass
-
-
-################################################################################
-# Constructors
-################################################################################
-
-# [Constructor]
-def custom_constructor_context(interface, constructor):
-    return {
-        'arguments': [custom_constructor_argument(argument, index)
-                      for index, argument in enumerate(constructor.arguments)],
-        'auto_scope': 'true',
-        'is_auto_scope': True,
-        'is_call_with_script_arguments': False,
-        'is_custom': True,
-        'number_of_arguments': len(constructor.arguments),
-        'number_of_required_arguments':
-            v8_interface.number_of_required_arguments(constructor),
-        }
-
-
-# We don't need much from this - just the idl_type_objects and preproceed_type
-# to use in generating the resolver strings.
-def custom_constructor_argument(argument, index):
-    return {
-        'idl_type_object': argument.idl_type,
-        'name': argument.name,
-        'preprocessed_type': str(argument.idl_type.preprocessed_type),
-    }
-
-
-# [Constructor]
-def constructor_context(interface, constructor):
-    return {
-        'arguments': [dart_methods.argument_context(interface, constructor, argument, index)
-                      for index, argument in enumerate(constructor.arguments)],
-        'auto_scope': 'true',
-        'cpp_value': dart_methods.cpp_value(
-            interface, constructor, len(constructor.arguments)),
-        'has_exception_state':
-            # [RaisesException=Constructor]
-            interface.extended_attributes.get('RaisesException') == 'Constructor' or
-            any(argument for argument in constructor.arguments
-                if argument.idl_type.name == 'SerializedScriptValue' or
-                   argument.idl_type.is_integer_type),
-        'is_auto_scope': True,
-        'is_call_with_script_arguments': False,
-        'is_constructor': True,
-        'is_custom': False,
-        'is_variadic': False,  # Required for overload resolution
-        'number_of_required_arguments':
-            v8_interface.number_of_required_arguments(constructor),
-        'number_of_arguments': len(constructor.arguments),
-    }
-
-
-# [NamedConstructor]
-def generate_named_constructor(interface):
-    extended_attributes = interface.extended_attributes
-    if 'NamedConstructor' not in extended_attributes:
-        return None
-    # FIXME: parser should return named constructor separately;
-    # included in constructors (and only name stored in extended attribute)
-    # for Perl compatibility
-    idl_constructor = interface.constructors[0]
-    constructor = constructor_context(interface, idl_constructor)
-    # FIXME(vsm): We drop the name. We don't use this in Dart APIs right now.
-    # We probably need to encode this somehow to deal with conflicts.
-    # constructor['name'] = extended_attributes['NamedConstructor']
-    return constructor
-
-
-################################################################################
-# Special operations (methods)
-# http://heycam.github.io/webidl/#idl-special-operations
-################################################################################
-
-def property_getter(getter, cpp_arguments):
-    def is_null_expression(idl_type):
-        if idl_type.is_union_type:
-            return ' && '.join('!result%sEnabled' % i
-                               for i, _ in enumerate(idl_type.member_types))
-        if idl_type.name == 'String':
-            # FIXME(vsm): This looks V8 specific.
-            return 'result.isNull()'
-        if idl_type.is_interface_type:
-            return '!result'
-        return ''
-
-    context = v8_interface.property_getter(getter, [])
-
-    idl_type = getter.idl_type
-    extended_attributes = getter.extended_attributes
-    is_raises_exception = 'RaisesException' in extended_attributes
-
-    # FIXME: make more generic, so can use dart_methods.cpp_value
-    cpp_method_name = 'receiver->%s' % DartUtilities.cpp_name(getter)
-
-    if is_raises_exception:
-        cpp_arguments.append('es')
-    union_arguments = idl_type.union_arguments
-    if union_arguments:
-        cpp_arguments.extend([member_argument['cpp_value']
-                              for member_argument in union_arguments])
-
-    cpp_value = '%s(%s)' % (cpp_method_name, ', '.join(cpp_arguments))
-
-    context.update({
-        'cpp_type': idl_type.cpp_type,
-        'cpp_value': cpp_value,
-        'is_null_expression': is_null_expression(idl_type),
-        'is_raises_exception': is_raises_exception,
-        'name': DartUtilities.cpp_name(getter),
-        'union_arguments': union_arguments,
-        'dart_set_return_value': idl_type.dart_set_return_value('result',
-                                                                extended_attributes=extended_attributes,
-                                                                script_wrappable='receiver',
-                                                                release=idl_type.release)})
-    return context
-
-
-def property_setter(setter):
-    context = v8_interface.property_setter(setter)
-
-    idl_type = setter.arguments[1].idl_type
-    extended_attributes = setter.extended_attributes
-
-    context.update({
-        'dart_value_to_local_cpp_value': idl_type.dart_value_to_local_cpp_value(
-            extended_attributes, 'propertyValue', False,
-            context['has_type_checking_interface']),
-    })
-
-    return context
-
-
-################################################################################
-# Indexed properties
-# http://heycam.github.io/webidl/#idl-indexed-properties
-################################################################################
-
-def indexed_property_getter(interface):
-    try:
-        # Find indexed property getter, if present; has form:
-        # getter TYPE [OPTIONAL_IDENTIFIER](unsigned long ARG1)
-        getter = next(
-            method
-            for method in interface.operations
-            if ('getter' in method.specials and
-                len(method.arguments) == 1 and
-                str(method.arguments[0].idl_type) == 'unsigned long'))
-    except StopIteration:
-        return None
-
-    getter.name = getter.name or 'anonymousIndexedGetter'
-
-    return property_getter(getter, ['index'])
-
-
-def indexed_property_setter(interface):
-    try:
-        # Find indexed property setter, if present; has form:
-        # setter RETURN_TYPE [OPTIONAL_IDENTIFIER](unsigned long ARG1, ARG_TYPE ARG2)
-        setter = next(
-            method
-            for method in interface.operations
-            if ('setter' in method.specials and
-                len(method.arguments) == 2 and
-                str(method.arguments[0].idl_type) == 'unsigned long'))
-    except StopIteration:
-        return None
-
-    return property_setter(setter)
-
-
-################################################################################
-# Named properties
-# http://heycam.github.io/webidl/#idl-named-properties
-################################################################################
-
-def named_property_getter(interface):
-    try:
-        # Find named property getter, if present; has form:
-        # getter TYPE [OPTIONAL_IDENTIFIER](DOMString ARG1)
-        getter = next(
-            method
-            for method in interface.operations
-            if ('getter' in method.specials and
-                len(method.arguments) == 1 and
-                str(method.arguments[0].idl_type) == 'DOMString'))
-    except StopIteration:
-        return None
-
-    getter.name = getter.name or 'anonymousNamedGetter'
-
-    return property_getter(getter, ['propertyName'])
-
-
-def named_property_setter(interface):
-    try:
-        # Find named property setter, if present; has form:
-        # setter RETURN_TYPE [OPTIONAL_IDENTIFIER](DOMString ARG1, ARG_TYPE ARG2)
-        setter = next(
-            method
-            for method in interface.operations
-            if ('setter' in method.specials and
-                len(method.arguments) == 2 and
-                str(method.arguments[0].idl_type) == 'DOMString'))
-    except StopIteration:
-        return None
-
-    return property_setter(setter)
-
-
-def generate_native_entries_for_specials(interface, context):
-    def add(prop, name, arity):
-        if context[prop]:
-            if 'native_entries' not in context[prop]:
-                context[prop].update({'native_entries': []})
-            context[prop]['native_entries'].append(
-                DartUtilities.generate_native_entry(
-                    interface.name, name, 'Method', False, arity))
-
-    pre = ['indexed_property', 'named_property']
-    post = [('setter', '__setter__', 2),
-            ('getter', '__getter__', 1),
-            ('deleter', '__delete__', 1),
-          ]
-    props = [(p1 + "_" + p2, name, arity)
-             for (p1, (p2, name, arity)) in itertools.product(pre, post)]
-    for t in props:
-        add(*t)
-
-    for (p, name, arity) in props:
-        if context[p]:
-            if context[p].get('is_custom_property_query'):
-                add(p, '__propertyQuery__', 1)
diff --git a/bindings/dart/scripts/dart_methods.py b/bindings/dart/scripts/dart_methods.py
deleted file mode 100644
index b700e89..0000000
--- a/bindings/dart/scripts/dart_methods.py
+++ /dev/null
@@ -1,286 +0,0 @@
-# Copyright (C) 2013 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Generate template values for methods.
-
-Extends IdlType and IdlUnionType with property |union_arguments|.
-
-Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
-"""
-
-from idl_types import inherits_interface
-import dart_types
-from dart_utilities import DartUtilities
-from v8_globals import includes
-
-import v8_methods
-
-
-def method_context(interface, method):
-    context = v8_methods.method_context(interface, method)
-
-    arguments = method.arguments
-    extended_attributes = method.extended_attributes
-    idl_type = method.idl_type
-
-#    idl_type.add_includes_for_type()
-    this_cpp_value = cpp_value(interface, method, len(arguments))
-
-    if context['is_call_with_script_state']:
-        includes.add('bindings/core/dart/DartScriptState.h')
-
-    if idl_type.union_arguments and len(idl_type.union_arguments) > 0:
-        this_cpp_type = []
-        for cpp_type in idl_type.member_types:
-            # FIXMEDART: we shouldn't just assume RefPtr. We should append
-            # WillBeGC as appropriate.
-            this_cpp_type.append("RefPtr<%s>" % cpp_type)
-    else:
-        this_cpp_type = idl_type.cpp_type
-
-    is_auto_scope = not 'DartNoAutoScope' in extended_attributes
-
-    arguments_data = [argument_context(interface, method, argument, index)
-                      for index, argument in enumerate(arguments)]
-
-    union_arguments = []
-    if idl_type.union_arguments:
-        union_arguments.extend([union_arg['cpp_value']
-                                for union_arg in idl_type.union_arguments])
-
-    is_custom = 'Custom' in extended_attributes or 'DartCustom' in extended_attributes
-
-    context.update({
-        'activity_logging_world_list': DartUtilities.activity_logging_world_list(method),  # [ActivityLogging]
-        'arguments': arguments_data,
-        'cpp_type': this_cpp_type,
-        'cpp_value': this_cpp_value,
-        'dart_name': extended_attributes.get('DartName'),
-        'deprecate_as': DartUtilities.deprecate_as(method),  # [DeprecateAs]
-        'do_not_check_signature': not(context['is_static'] or
-            DartUtilities.has_extended_attribute(method,
-                ['DoNotCheckSecurity', 'DoNotCheckSignature', 'NotEnumerable',
-                 'ReadOnly', 'RuntimeEnabled', 'Unforgeable'])),
-        'has_exception_state':
-            context['is_raises_exception'] or
-            context['is_check_security_for_frame'] or
-            any(argument for argument in arguments
-                if argument.idl_type.name == 'SerializedScriptValue' or
-                   argument.idl_type.is_integer_type),
-        'is_auto_scope': is_auto_scope,
-        'auto_scope': DartUtilities.bool_to_cpp(is_auto_scope),
-        'is_custom': is_custom,
-        'is_custom_dart': 'DartCustom' in extended_attributes,
-        'is_custom_dart_new': DartUtilities.has_extended_attribute_value(method, 'DartCustom', 'New'),
-        # FIXME(terry): DartStrictTypeChecking no longer supported; TypeChecking is
-        #               new extended attribute.
-        'is_strict_type_checking':
-            'DartStrictTypeChecking' in extended_attributes or
-            'DartStrictTypeChecking' in interface.extended_attributes,
-        'measure_as': DartUtilities.measure_as(method),  # [MeasureAs]
-        'suppressed': (arguments and arguments[-1].is_variadic),  # FIXME: implement variadic
-        'union_arguments': union_arguments,
-        'dart_set_return_value': dart_set_return_value(interface.name, method, this_cpp_value),
-    })
-    return context
-
-def argument_context(interface, method, argument, index):
-    context = v8_methods.argument_context(interface, method, argument, index)
-
-    extended_attributes = argument.extended_attributes
-    idl_type = argument.idl_type
-    this_cpp_value = cpp_value(interface, method, index)
-    use_heap_vector_type = context['is_variadic_wrapper_type'] and idl_type.is_will_be_garbage_collected
-    auto_scope = not 'DartNoAutoScope' in extended_attributes
-    arg_index = index + 1 if not (method.is_static or method.is_constructor) else index
-    preprocessed_type = str(idl_type.preprocessed_type)
-    local_cpp_type = idl_type.cpp_type_args(argument.extended_attributes, raw_type=True)
-    default_value = argument.default_cpp_value
-    if context['has_default']:
-        default_value = (argument.default_cpp_value or
-            dart_types.default_cpp_value_for_cpp_type(idl_type))
-    # FIXMEDART: handle the drift between preprocessed type names in 1847 and
-    # 1985 dartium builds in a more generic way.
-    if preprocessed_type == 'unrestricted float':
-        preprocessed_type = 'float'
-    if preprocessed_type == 'unrestricted double':
-        preprocessed_type = 'double'
-
-    dart_enum_expression = idl_type.enum_validation_expression
-    if dart_enum_expression:
-        dart_enum_expression = dart_enum_expression.format(param_name=argument.name)
-    context.update({
-        'cpp_type': idl_type.cpp_type_args(extended_attributes=extended_attributes,
-                                           raw_type=True,
-                                           used_in_cpp_sequence=use_heap_vector_type),
-        'cpp_value': this_cpp_value,
-        'local_cpp_type': local_cpp_type,
-        # FIXME: check that the default value's type is compatible with the argument's
-        'default_value': default_value,
-        'enum_validation_expression': dart_enum_expression,
-        'preprocessed_type': preprocessed_type,
-        'is_array_or_sequence_type': not not idl_type.native_array_element_type,
-        'is_strict_type_checking': 'DartStrictTypeChecking' in extended_attributes,
-        'is_dictionary': idl_type.is_dictionary or idl_type.base_type == 'Dictionary',
-        'vector_type': 'WillBeHeapVector' if use_heap_vector_type else 'Vector',
-        'dart_set_return_value_for_main_world': dart_set_return_value(interface.name, method,
-                                                                      this_cpp_value, for_main_world=True),
-        'dart_set_return_value': dart_set_return_value(interface.name, method, this_cpp_value),
-        'arg_index': arg_index,
-        'dart_value_dictionary_cpp_value': dart_dictionary_value_argument(argument, arg_index),
-        'dart_value_to_local_cpp_value': dart_value_to_local_cpp_value(interface,
-                                                                       context['has_type_checking_interface'],
-                                                                       argument, arg_index, auto_scope),
-    })
-    return context
-
-
-################################################################################
-# Value handling
-################################################################################
-
-def cpp_value(interface, method, number_of_arguments):
-    def cpp_argument(argument):
-        argument_name = dart_types.check_reserved_name(argument.name)
-        idl_type = argument.idl_type
-
-        if idl_type.is_typed_array_type:
-            return '%s.get()' % argument_name
-
-        if idl_type.name == 'EventListener':
-            if (interface.name == 'EventTarget' and
-                method.name == 'removeEventListener'):
-                # FIXME: remove this special case by moving get() into
-                # EventTarget::removeEventListener
-                return '%s.get()' % argument_name
-            return argument.name
-        if (idl_type.name in ['NodeFilter', 'NodeFilterOrNull',
-                              'XPathNSResolver', 'XPathNSResolverOrNull']):
-            # FIXME: remove this special case
-            return '%s.release()' % argument_name
-        # Need to de-ref the generated dictionary class for create call.
-        if (idl_type.is_dictionary):
-            return '*%s' % argument_name
-        return argument_name
-
-    # Truncate omitted optional arguments
-    arguments = method.arguments[:number_of_arguments]
-    if method.is_constructor:
-        call_with_values = interface.extended_attributes.get('ConstructorCallWith')
-    else:
-        call_with_values = method.extended_attributes.get('CallWith')
-    cpp_arguments = DartUtilities.call_with_arguments(call_with_values)
-    if ('PartialInterfaceImplementedAs' in method.extended_attributes and not method.is_static):
-        cpp_arguments.append('*receiver')
-
-    cpp_arguments.extend(cpp_argument(argument) for argument in arguments)
-    this_union_arguments = method.idl_type and method.idl_type.union_arguments
-    if this_union_arguments:
-        cpp_arguments.extend([member_argument['cpp_value']
-                              for member_argument in this_union_arguments])
-
-    if ('RaisesException' in method.extended_attributes or
-        (method.is_constructor and
-         DartUtilities.has_extended_attribute_value(interface, 'RaisesException', 'Constructor'))):
-        cpp_arguments.append('es')
-
-    if method.name == 'Constructor':
-        base_name = 'create'
-    elif method.name == 'NamedConstructor':
-        base_name = 'createForJSConstructor'
-    else:
-        base_name = DartUtilities.cpp_name(method)
-    cpp_method_name = DartUtilities.scoped_name(interface, method, base_name)
-    return '%s(%s)' % (cpp_method_name, ', '.join(cpp_arguments))
-
-
-# Mapping of IDL type to DartUtilities helper types.
-def dart_arg_type(argument_type):
-    if (argument_type.cpp_type == 'String'):
-        return 'DartStringAdapter'
-
-    return argument_type.cpp_type
-
-
-def dart_set_return_value(interface_name, method, cpp_value, for_main_world=False):
-    idl_type = method.idl_type
-    extended_attributes = method.extended_attributes
-    if not idl_type or idl_type.name == 'void':
-        # Constructors and void methods don't have a return type
-        return None
-
-    release = False
-
-    if idl_type.is_union_type:
-        release = idl_type.release
-
-    # [CallWith=ScriptState], [RaisesException]
-# TODO(terry): Disable ScriptState temporarily need to handle.
-#    if (has_extended_attribute_value(method, 'CallWith', 'ScriptState') or
-#        'RaisesException' in extended_attributes or
-#        idl_type.is_union_type):
-#        cpp_value = 'result'  # use local variable for value
-#        release = idl_type.release
-
-    auto_scope = not 'DartNoAutoScope' in extended_attributes
-    script_wrappable = 'impl' if inherits_interface(interface_name, 'Node') else ''
-    return idl_type.dart_set_return_value(cpp_value, extended_attributes,
-                                          script_wrappable=script_wrappable,
-                                          release=release,
-                                          for_main_world=for_main_world,
-                                          auto_scope=auto_scope)
-
-
-def dart_dictionary_value_argument(argument, index):
-    idl_type = argument.idl_type
-    return idl_type.dart_dictionary_to_local_cpp_value(index=index)
-
-
-def dart_value_to_local_cpp_value(interface, has_type_checking_interface,
-                                  argument, index, auto_scope=True):
-    extended_attributes = argument.extended_attributes
-    idl_type = argument.idl_type
-    name = argument.name
-    # TODO(terry): Variadic arguments are not handled but treated as one argument.
-    #    if argument.is_variadic:
-    #        vector_type = 'WillBeHeapVector' if idl_type.is_will_be_garbage_collected else 'Vector'
-    #        return 'V8TRYCATCH_VOID({vector_type}<{cpp_type}>, {name}, toNativeArguments<{cpp_type}>(info, {index}))'.format(
-    #                cpp_type=idl_type.cpp_type, name=name, index=index, vector_type=vector_type)
-
-    # FIXME: V8 has some special logic around the addEventListener and
-    # removeEventListener methods that should be added in somewhere.
-    # There is also some logic in systemnative.py to force a null check
-    # for the useCapture argument of those same methods that we may need to
-    # pull over.
-    null_check = ((argument.is_optional and idl_type.is_callback_interface) or
-                  (idl_type.name == 'Dictionary') or
-                  (argument.default_value and argument.default_value.is_null))
-
-    return idl_type.dart_value_to_local_cpp_value(
-        extended_attributes, name, null_check, has_type_checking_interface,
-        index=index, auto_scope=auto_scope)
diff --git a/bindings/dart/scripts/dart_tests.py b/bindings/dart/scripts/dart_tests.py
deleted file mode 100644
index f0ad19b..0000000
--- a/bindings/dart/scripts/dart_tests.py
+++ /dev/null
@@ -1,278 +0,0 @@
-# Copyright (C) 2014 Google Inc.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-import fnmatch
-import os
-import shutil
-import sys
-import tempfile
-
-from webkitpy.common.checkout.scm.detection import detect_scm_system
-from webkitpy.common.system import executive
-from webkitpy.common.system.executive import ScriptError
-
-# Add Source path to PYTHONPATH to support function calls to bindings/scripts
-# for compute_dependencies and idl_compiler
-module_path = os.path.dirname(__file__)
-source_path = os.path.normpath(os.path.join(module_path, os.pardir,
-                                            os.pardir, os.pardir, os.pardir,
-                                            'Source'))
-sys.path.append(source_path)
-
-from bindings.scripts.compute_interfaces_info import compute_interfaces_info, interfaces_info
-from bindings.scripts.idl_compiler import IdlCompilerV8
-
-
-PASS_MESSAGE = 'All tests PASS!'
-FAIL_MESSAGE = """Some tests FAIL!
-To update the reference files, execute:
-    run-bindings-tests --reset-results
-
-If the failures are not due to your changes, test results may be out of sync;
-please rebaseline them in a separate CL, after checking that tests fail in ToT.
-In CL, please set:
-NOTRY=true
-TBR=(someone in Source/bindings/OWNERS or WATCHLISTS:bindings)
-"""
-
-DEPENDENCY_IDL_FILES = set([
-    'SupportTestPartialInterface.idl',
-    'TestImplements.idl',
-    'TestImplements2.idl',
-    'TestImplements3.idl',
-    'TestPartialInterface.idl',
-    'TestPartialInterfacePython.idl',
-    'TestPartialInterfacePython2.idl',
-])
-
-
-EXTENDED_ATTRIBUTES_FILE = 'bindings/IDLExtendedAttributes.txt'
-
-all_input_directory = '.'  # Relative to Source/
-test_input_directory = os.path.join('bindings', 'tests', 'idls')
-reference_directory = os.path.join('bindings', 'tests', 'results')
-
-
-class ScopedTempFileProvider(object):
-    def __init__(self):
-        self.file_handles = []
-        self.file_paths = []
-        self.dir_paths = []
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, exc_type, exc_value, traceback):
-        for file_handle in self.file_handles:
-            os.close(file_handle)
-        for file_path in self.file_paths:
-            os.remove(file_path)
-        for dir_path in self.dir_paths:
-            # Temporary directories are used as output directories, so they
-            # contains unknown files (they aren't empty), hence use rmtree
-            shutil.rmtree(dir_path)
-
-    def new_temp_file(self):
-        file_handle, file_path = tempfile.mkstemp()
-        self.file_handles.append(file_handle)
-        self.file_paths.append(file_path)
-        return file_handle, file_path
-
-    def new_temp_dir(self):
-        dir_path = tempfile.mkdtemp()
-        self.dir_paths.append(dir_path)
-        return dir_path
-
-
-class DartTests(object):
-    def __init__(self, reset_results, verbose, provider):
-        self.reset_results = reset_results
-        self.verbose = verbose
-        self.executive = executive.Executive()
-        self.provider = provider
-        self.idl_compiler = None
-        _, self.interfaces_info_filename = provider.new_temp_file()
-        # Generate output into the reference directory if resetting results, or
-        # a temp directory if not.
-        if reset_results:
-            self.output_directory = reference_directory
-        else:
-            self.output_directory = provider.new_temp_dir()
-
-    def run_command(self, cmd):
-        output = self.executive.run_command(cmd)
-        if output:
-            print output
-
-    def generate_from_idl(self, idl_file):
-        try:
-            idl_file_fullpath = os.path.realpath(idl_file)
-            self.idl_compiler.compile_file(idl_file_fullpath)
-        except ScriptError, e:
-            print 'ERROR: idl_compiler.py: ' + os.path.basename(idl_file)
-            print e.output
-            return e.exit_code
-
-        return 0
-
-    def generate_interface_dependencies(self):
-        def idl_paths(directory):
-            return [os.path.join(directory, input_file)
-                    for input_file in os.listdir(directory)
-                    if input_file.endswith('.idl')]
-
-        def idl_paths_recursive(directory):
-            idl_paths = []
-            for dirpath, _, files in os.walk(directory):
-                idl_paths.extend(os.path.join(dirpath, filename)
-                                 for filename in fnmatch.filter(files, '*.idl'))
-            return idl_paths
-
-        def write_list_file(idl_paths):
-            list_file, list_filename = self.provider.new_temp_file()
-            list_contents = ''.join(idl_path + '\n'
-                                    for idl_path in idl_paths)
-            os.write(list_file, list_contents)
-            return list_filename
-
-        # We compute interfaces info for *all* IDL files, not just test IDL
-        # files, as code generator output depends on inheritance (both ancestor
-        # chain and inherited extended attributes), and some real interfaces
-        # are special-cased, such as Node.
-        #
-        # For example, when testing the behavior of interfaces that inherit
-        # from Node, we also need to know that these inherit from EventTarget,
-        # since this is also special-cased and Node inherits from EventTarget,
-        # but this inheritance information requires computing dependencies for
-        # the real Node.idl file.
-        try:
-            compute_interfaces_info(idl_paths_recursive(all_input_directory))
-
-        except ScriptError, e:
-            print 'ERROR: compute_interfaces_info.py'
-            print e.output
-            return e.exit_code
-
-        return 0
-
-    def delete_cache_files(self):
-        # FIXME: Instead of deleting cache files, don't generate them.
-        cache_files = [os.path.join(self.output_directory, output_file)
-                       for output_file in os.listdir(self.output_directory)
-                       if (output_file in ('lextab.py',  # PLY lex
-                                           'lextab.pyc',
-                                           'parsetab.pickle') or  # PLY yacc
-                               output_file.endswith('.cache'))]  # Jinja
-        for cache_file in cache_files:
-            os.remove(cache_file)
-
-    def identical_file(self, reference_filename, output_filename):
-        reference_basename = os.path.basename(reference_filename)
-        cmd = ['diff',
-               '-u',
-               '-N',
-               reference_filename,
-               output_filename]
-        try:
-            self.run_command(cmd)
-        except ScriptError, e:
-            # run_command throws an exception on diff (b/c non-zero exit code)
-            print 'FAIL: %s' % reference_basename
-            print e.output
-            return False
-
-        if self.verbose:
-            print 'PASS: %s' % reference_basename
-        return True
-
-    def identical_output_files(self):
-        file_pairs = [(os.path.join(reference_directory, output_file),
-                       os.path.join(self.output_directory, output_file))
-                      for output_file in os.listdir(self.output_directory)]
-        return all([self.identical_file(reference_filename, output_filename)
-                    for (reference_filename, output_filename) in file_pairs])
-
-    def no_excess_files(self):
-        generated_files = set(os.listdir(self.output_directory))
-        generated_files.add('.svn')  # Subversion working copy directory
-        excess_files = [output_file
-                        for output_file in os.listdir(reference_directory)
-                        if output_file not in generated_files]
-        if excess_files:
-            print ('Excess reference files! '
-                  '(probably cruft from renaming or deleting):\n' +
-                  '\n'.join(excess_files))
-            return False
-        return True
-
-    def run_tests(self):
-        # Generate output, immediately dying on failure
-        if self.generate_interface_dependencies():
-            return False
-
-        self.idl_compiler = IdlCompilerV8(self.output_directory,
-                                          EXTENDED_ATTRIBUTES_FILE,
-                                          interfaces_info=interfaces_info,
-                                          only_if_changed=True)
-
-        for input_filename in os.listdir(test_input_directory):
-            if not input_filename.endswith('.idl'):
-                continue
-            if input_filename in DEPENDENCY_IDL_FILES:
-                # Dependencies aren't built (they are used by the dependent)
-                if self.verbose:
-                    print 'DEPENDENCY: %s' % input_filename
-                continue
-
-            idl_path = os.path.join(test_input_directory, input_filename)
-            if self.generate_from_idl(idl_path):
-                return False
-            if self.reset_results and self.verbose:
-                print 'Reset results: %s' % input_filename
-
-        self.delete_cache_files()
-
-        # Detect all changes
-        passed = self.identical_output_files()
-        passed &= self.no_excess_files()
-        return passed
-
-    def main(self):
-        current_scm = detect_scm_system(os.curdir)
-        os.chdir(os.path.join(current_scm.checkout_root, 'Source'))
-
-        all_tests_passed = self.run_tests()
-        if all_tests_passed:
-            if self.verbose:
-                print
-                print PASS_MESSAGE
-            return 0
-        print
-        print FAIL_MESSAGE
-        return -1
-
-
-def run_dart_tests(reset_results, verbose):
-    with ScopedTempFileProvider() as provider:
-        return DartTests(reset_results, verbose, provider).main()
diff --git a/bindings/dart/scripts/dart_types.py b/bindings/dart/scripts/dart_types.py
deleted file mode 100644
index 7ae64fc..0000000
--- a/bindings/dart/scripts/dart_types.py
+++ /dev/null
@@ -1,931 +0,0 @@
-# Copyright (C) 2013 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Functions for type handling and type conversion (Blink/C++ <-> Dart:HTML).
-
-Extends IdlType and IdlUnionType with C++-specific properties, methods, and
-class methods.
-
-Spec:
-http://www.w3.org/TR/WebIDL/#es-type-mapping
-
-Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
-"""
-
-import posixpath
-from idl_types import IdlTypeBase, IdlType, IdlUnionType, TYPE_NAMES, IdlArrayOrSequenceType, IdlSequenceType
-
-import dart_attributes
-from dart_utilities import DartUtilities
-from v8_globals import includes
-
-
-################################################################################
-# CPP -specific handling of IDL types for Dart:Blink
-################################################################################
-
-NON_WRAPPER_TYPES = frozenset([
-    'Dictionary',
-    'EventHandler',
-    'EventListener',
-    'NodeFilter',
-    'SerializedScriptValue',
-])
-TYPED_ARRAYS = {
-    # (cpp_type, dart_type), used by constructor templates
-    'ArrayBuffer': (None, 'ByteBuffer'),
-    'ArrayBufferView': (None, 'ByteData'),
-    'Float32Array': ('float', 'Float32List'),
-    'Float64Array': ('double', 'Float64List'),
-    'Int8Array': ('signed char', 'Int8List'),
-    'Int16Array': ('short', 'Int16List'),
-    'Int32Array': ('int', 'Int32List'),
-    'Uint8Array': ('unsigned char', 'Uint8List'),
-    'Uint8ClampedArray': ('unsigned char', 'Uint8ClampedList'),
-    'Uint16Array': ('unsigned short', 'Uint16List'),
-    'Uint32Array': ('unsigned int', 'Uint32List'),
-}
-
-
-IdlTypeBase.is_typed_array_type = property(
-    lambda self: self.base_type in TYPED_ARRAYS)
-
-
-IdlType.is_wrapper_type = property(
-    lambda self: (self.is_interface_type and
-                  self.base_type not in NON_WRAPPER_TYPES))
-
-
-################################################################################
-# C++ types
-################################################################################
-
-CPP_TYPE_SAME_AS_IDL_TYPE = set([
-    'double',
-    'float',
-    'long long',
-    'unsigned long long',
-])
-CPP_INT_TYPES = set([
-    'byte',
-    'long',
-    'short',
-])
-CPP_UNSIGNED_TYPES = set([
-    'octet',
-    'unsigned int',
-    'unsigned long',
-    'unsigned short',
-])
-CPP_SPECIAL_CONVERSION_RULES = {
-    'Date': 'double',
-    'Dictionary': 'Dictionary',
-    'EventHandler': 'EventListener*',
-    'NodeFilter': 'RefPtrWillBeRawPtr<NodeFilter>',
-    'Promise': 'ScriptPromise',
-    'ScriptValue': 'ScriptValue',
-    # FIXME: Eliminate custom bindings for XPathNSResolver  http://crbug.com/345529
-    'XPathNSResolver': 'RefPtrWillBeRawPtr<XPathNSResolver>',
-    'boolean': 'bool',
-    'unrestricted double': 'double',
-    'unrestricted float': 'float',
-}
-
-
-def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_rvalue_type=False, used_as_variadic_argument=False, used_in_cpp_sequence=False):
-    """Returns C++ type corresponding to IDL type.
-
-    |idl_type| argument is of type IdlType, while return value is a string
-
-    Args:
-        idl_type:
-            IdlType
-        raw_type:
-            bool, True if idl_type's raw/primitive C++ type should be returned.
-        used_as_rvalue_type:
-            bool, True if the C++ type is used as an argument or the return
-            type of a method.
-        used_as_variadic_argument:
-            bool, True if the C++ type is used as a variadic argument of a method.
-        used_in_cpp_sequence:
-            bool, True if the C++ type is used as an element of a container.
-            Containers can be an array, a sequence or a dictionary.
-    """
-    extended_attributes = extended_attributes or {}
-    idl_type = idl_type.preprocessed_type
-
-    # Composite types
-    native_array_element_type = idl_type.native_array_element_type
-    if native_array_element_type:
-        vector_type = cpp_ptr_type('Vector', 'HeapVector', native_array_element_type.gc_type)
-        return cpp_template_type(vector_type, native_array_element_type.cpp_type_args(used_in_cpp_sequence=True))
-
-    # Simple types
-    base_idl_type = idl_type.base_type
-
-    if base_idl_type in CPP_TYPE_SAME_AS_IDL_TYPE:
-        return base_idl_type
-    if base_idl_type in CPP_INT_TYPES:
-        return 'int'
-    if base_idl_type in CPP_UNSIGNED_TYPES:
-        return 'unsigned'
-    if base_idl_type in CPP_SPECIAL_CONVERSION_RULES:
-        return CPP_SPECIAL_CONVERSION_RULES[base_idl_type]
-
-    if base_idl_type in NON_WRAPPER_TYPES:
-        return ('PassRefPtr<%s>' if used_as_rvalue_type else 'RefPtr<%s>') % base_idl_type
-    if base_idl_type in ('DOMString', 'ByteString', 'ScalarValueString'):
-        if not raw_type:
-            return 'String'
-        return 'DartStringAdapter'
-
-    if idl_type.is_typed_array_type and raw_type:
-        return 'RefPtr<%s>' % base_idl_type
-    if idl_type.is_interface_type:
-        implemented_as_class = idl_type.implemented_as
-        if raw_type:
-            return implemented_as_class + '*'
-        new_type = 'Member' if used_in_cpp_sequence else 'RawPtr'
-        ptr_type = cpp_ptr_type(('PassRefPtr' if used_as_rvalue_type else 'RefPtr'), new_type, idl_type.gc_type)
-        return cpp_template_type(ptr_type, implemented_as_class)
-
-    # Default, assume native type is a pointer with same type name as idl type
-
-    # FIXME: How to handle sequence<WebGLShader>?
-    if base_idl_type is None:
-        base_idl_type = idl_type.inner_type.element_type.base_type
-
-    return base_idl_type + '*'
-
-
-def cpp_type_union(idl_type, extended_attributes=None, used_as_rvalue_type=False, will_be_in_heap_object=False):
-    return (member_type.cpp_type for member_type in idl_type.member_types)
-
-
-# Allow access as idl_type.cpp_type if no arguments
-IdlTypeBase.cpp_type = property(cpp_type)
-IdlTypeBase.cpp_type_args = cpp_type
-IdlUnionType.cpp_type = property(cpp_type_union)
-IdlUnionType.cpp_type_args = cpp_type_union
-
-
-IdlTypeBase.native_array_element_type = None
-IdlArrayOrSequenceType.native_array_element_type = property(
-    lambda self: self.element_type)
-
-IdlTypeBase.enum_validation_expression = property(DartUtilities.enum_validation_expression)
-
-
-def cpp_template_type(template, inner_type):
-    """Returns C++ template specialized to type, with space added if needed."""
-    if inner_type.endswith('>'):
-        format_string = '{template}<{inner_type} >'
-    else:
-        format_string = '{template}<{inner_type}>'
-    return format_string.format(template=template, inner_type=inner_type)
-
-
-def cpp_ptr_type(old_type, new_type, gc_type):
-    if gc_type == 'GarbageCollectedObject':
-        return new_type
-    if gc_type == 'WillBeGarbageCollectedObject':
-        if old_type == 'Vector':
-            return 'WillBe' + new_type
-        return old_type + 'WillBe' + new_type
-    return old_type
-
-
-def v8_type(interface_name):
-    return 'V8' + interface_name
-
-
-def dart_type(interface_name):
-    return 'Dart' + str(interface_name)
-
-
-# [ImplementedAs]
-# This handles [ImplementedAs] on interface types, not [ImplementedAs] in the
-# interface being generated. e.g., given:
-#   Foo.idl: interface Foo {attribute Bar bar};
-#   Bar.idl: [ImplementedAs=Zork] interface Bar {};
-# when generating bindings for Foo, the [ImplementedAs] on Bar is needed.
-# This data is external to Foo.idl, and hence computed as global information in
-# compute_interfaces_info.py to avoid having to parse IDLs of all used interfaces.
-IdlType.implemented_as_interfaces = {}
-
-
-def implemented_as(idl_type):
-    base_idl_type = idl_type.base_type
-    if base_idl_type in IdlType.implemented_as_interfaces:
-        return IdlType.implemented_as_interfaces[base_idl_type]
-    return base_idl_type
-
-
-IdlType.implemented_as = property(implemented_as)
-
-IdlType.set_implemented_as_interfaces = classmethod(
-    lambda cls, new_implemented_as_interfaces:
-        cls.implemented_as_interfaces.update(new_implemented_as_interfaces))
-
-
-# [GarbageCollected]
-IdlType.garbage_collected_types = set()
-
-IdlTypeBase.is_garbage_collected = False
-IdlType.is_garbage_collected = property(
-    lambda self: self.base_type in IdlType.garbage_collected_types)
-
-IdlType.set_garbage_collected_types = classmethod(
-    lambda cls, new_garbage_collected_types:
-        cls.garbage_collected_types.update(new_garbage_collected_types))
-
-
-# [WillBeGarbageCollected]
-IdlType.will_be_garbage_collected_types = set()
-
-IdlTypeBase.is_will_be_garbage_collected = False
-IdlType.is_will_be_garbage_collected = property(
-    lambda self: self.base_type in IdlType.will_be_garbage_collected_types)
-
-IdlType.set_will_be_garbage_collected_types = classmethod(
-    lambda cls, new_will_be_garbage_collected_types:
-        cls.will_be_garbage_collected_types.update(new_will_be_garbage_collected_types))
-
-
-def gc_type(idl_type):
-    if idl_type.is_garbage_collected:
-        return 'GarbageCollectedObject'
-    if idl_type.is_will_be_garbage_collected:
-        return 'WillBeGarbageCollectedObject'
-    return 'RefCountedObject'
-
-IdlTypeBase.gc_type = property(gc_type)
-
-
-################################################################################
-# Includes
-################################################################################
-
-def includes_for_cpp_class(class_name, relative_dir_posix):
-    return set([posixpath.join('bindings', relative_dir_posix, class_name + '.h')])
-
-# TODO(terry): Will we need this group header for dart:blink?
-INCLUDES_FOR_TYPE = {
-    'object': set(),
-    'Dictionary': set(['bindings/core/v8/Dictionary.h']),
-    'EventHandler': set(),
-    'EventListener': set(),
-    'HTMLCollection': set(['bindings/core/dart/DartHTMLCollection.h',
-                           'core/dom/ClassCollection.h',
-                           'core/dom/TagCollection.h',
-                           'core/html/HTMLCollection.h',
-                           'core/html/HTMLDataListOptionsCollection.h',
-                           'core/html/HTMLFormControlsCollection.h',
-                           'core/html/HTMLTableRowsCollection.h']),
-    'NodeList': set(['bindings/core/dart/DartNodeList.h',
-                     'core/dom/NameNodeList.h',
-                     'core/dom/NodeList.h',
-                     'core/dom/StaticNodeList.h',
-                     'core/html/LabelsNodeList.h']),
-    'Promise': set(['bindings/core/dart/DartScriptPromise.h']),
-    'SerializedScriptValue': set(),
-    'ScriptValue': set(['bindings/core/dart/DartScriptValue.h']),
-}
-
-
-def includes_for_type(idl_type):
-    idl_type = idl_type.preprocessed_type
-
-    # Composite types
-    if idl_type.native_array_element_type:
-        return includes_for_type(idl_type)
-
-    # Simple types
-    base_idl_type = idl_type.base_type
-    if base_idl_type in INCLUDES_FOR_TYPE:
-        return INCLUDES_FOR_TYPE[base_idl_type]
-    if idl_type.is_basic_type:
-        return set()
-    if idl_type.is_typed_array_type:
-        # Typed array factory methods are already provided by DartUtilities.h.
-        return set([])
-    if base_idl_type.endswith('ConstructorConstructor'):
-        # FIXME: rename to NamedConstructor
-        # FIXME: replace with a [NamedConstructorAttribute] extended attribute
-        # Ending with 'ConstructorConstructor' indicates a named constructor,
-        # and these do not have header files, as they are part of the generated
-        # bindings for the interface
-        return set()
-    if base_idl_type.endswith('Constructor'):
-        # FIXME: replace with a [ConstructorAttribute] extended attribute
-        base_idl_type = idl_type.constructor_type_name
-    if base_idl_type not in component_dir:
-        return set()
-    return set(['bindings/%s/dart/Dart%s.h' % (component_dir[base_idl_type],
-                                               base_idl_type)])
-
-IdlType.includes_for_type = property(includes_for_type)
-IdlUnionType.includes_for_type = property(
-    lambda self: set.union(*[includes_for_type(member_type)
-                             for member_type in self.member_types]))
-
-
-def add_includes_for_type(idl_type):
-    includes.update(idl_type.includes_for_type)
-
-IdlTypeBase.add_includes_for_type = add_includes_for_type
-IdlUnionType.add_includes_for_type = add_includes_for_type
-
-
-def includes_for_interface(interface_name):
-    return IdlType(interface_name).includes_for_type
-
-
-def add_includes_for_interface(interface_name):
-    includes.update(includes_for_interface(interface_name))
-
-
-component_dir = {}
-
-
-def set_component_dirs(new_component_dirs):
-    component_dir.update(new_component_dirs)
-
-
-################################################################################
-# Dart -> C++
-################################################################################
-
-# TODO(terry): Need to fix to handle getter/setters for onEvent.
-DART_FIX_ME = 'DART_UNIMPLEMENTED(/* Conversion unimplemented*/);'
-
-# For a given IDL type, the DartHandle to C++ conversion.
-DART_TO_CPP_VALUE = {
-    # Basic
-    'Date': 'DartUtilities::dartToDate(args, {index}, exception)',
-    'DOMString': 'DartUtilities::dartToString{null_check}(args, {index}, exception, {auto_scope})',
-    'ByteString': 'DartUtilities::dartToByteString{null_check}(args, {index}, exception, {auto_scope})',
-    'ScalarValueString': 'DartUtilities::dartToScalarValueString{null_check}(args, {index}, exception, {auto_scope})',
-    'boolean': 'DartUtilities::dartToBool{null_check}(args, {index}, exception)',
-    'float': 'static_cast<float>(DartUtilities::dartToDouble(args, {index}, exception))',
-    'unrestricted float': 'static_cast<float>(DartUtilities::dartToDouble(args, {index}, exception))',
-    'double': 'DartUtilities::dartToDouble(args, {index}, exception)',
-    'unrestricted double': 'DartUtilities::dartToDouble(args, {index}, exception)',
-    # FIXME(vsm): Inconsistent with V8.
-    'byte': 'DartUtilities::dartToUnsigned(args, {index}, exception)',
-    'octet': 'DartUtilities::dartToUnsigned(args, {index}, exception)',
-    'short': 'DartUtilities::dartToInt(args, {index}, exception)',
-    'unsigned short': 'DartUtilities::dartToUnsigned(args, {index}, exception)',
-    'long': 'DartUtilities::dartToInt(args, {index}, exception)',
-    'unsigned long': 'DartUtilities::dartToUnsignedLongLong(args, {index}, exception)',
-    'long long': 'DartUtilities::dartToLongLong(args, {index}, exception)',
-    'unsigned long long': 'DartUtilities::dartToUnsignedLongLong(args, {index}, exception)',
-    # Interface types
-    'Dictionary': 'DartUtilities::dartToDictionary{null_check}(args, {index}, exception)',
-    'EventTarget': '0 /* FIXME, DART_TO_CPP_VALUE[EventTarget] */',
-    'NodeFilter': 'nullptr /* FIXME, DART_TO_CPP_VALUE[NodeFilter] */',
-    'Promise': 'DartUtilities::dartToScriptPromise{null_check}(args, {index})',
-    'SerializedScriptValue': 'nullptr /* FIXME, DART_TO_CPP_VALUE[SerializedScriptValue] */',
-    'ScriptValue': 'DartUtilities::dartToScriptValue{null_check}(args, {index})',
-    # FIXME(vsm): Why don't we have an entry for Window? V8 does.
-    # I think I removed this as the Window object is more special in V8 - it's the
-    # global context as well.  Do we need to special case it?
-    'XPathNSResolver': 'nullptr /* FIXME, DART_TO_CPP_VALUE[XPathNSResolver] */',
-    # FIXME(vsm): This is an enum type (defined in StorageQuota.idl).
-    # We should handle it automatically, but map to a String for now.
-    'StorageType': 'DartUtilities::dartToString(args, {index}, exception, {auto_scope})',
-}
-
-
-def dart_dictionary_value_argument(idl_type, index):
-    if idl_type.is_dictionary:
-        argument_expression_format = 'DartUtilities::dartToDictionaryWithNullCheck(args, {index}, exception)'
-        return argument_expression_format.format(index=index)
-
-    return None
-
-
-def dart_dictionary_to_local_cpp_value(idl_type, index=None):
-    """Returns an expression that converts a Dictionary value as a local value."""
-    idl_type = idl_type.preprocessed_type
-
-    cpp_value = dart_dictionary_value_argument(idl_type, index)
-
-    return cpp_value
-
-IdlTypeBase.dart_dictionary_to_local_cpp_value = dart_dictionary_to_local_cpp_value
-
-
-def dart_value_to_cpp_value(idl_type, extended_attributes, variable_name,
-                            null_check, has_type_checking_interface,
-                            index, auto_scope=True):
-    # Composite types
-    native_array_element_type = idl_type.native_array_element_type
-    if native_array_element_type:
-        return dart_value_to_cpp_value_array_or_sequence(native_array_element_type, variable_name, index)
-
-    # Simple types
-    idl_type = idl_type.preprocessed_type
-    add_includes_for_type(idl_type)
-    base_idl_type = idl_type.base_type
-
-    if 'EnforceRange' in extended_attributes:
-        arguments = ', '.join([variable_name, 'EnforceRange', 'exceptionState'])
-    elif idl_type.is_integer_type:  # NormalConversion
-        arguments = ', '.join([variable_name, 'es'])
-    else:
-        arguments = variable_name
-
-    if base_idl_type in DART_TO_CPP_VALUE:
-        cpp_expression_format = DART_TO_CPP_VALUE[base_idl_type]
-    elif idl_type.is_typed_array_type:
-        # FIXME(vsm): V8 generates a type check here as well. Do we need one?
-        # FIXME(vsm): When do we call the externalized version? E.g., see
-        # bindings/dart/custom/DartWaveShaperNodeCustom.cpp - it calls
-        # DartUtilities::dartToExternalizedArrayBufferView instead.
-        # V8 always converts null here
-        cpp_expression_format = ('DartUtilities::dartTo{idl_type}WithNullCheck(args, {index}, exception)')
-    elif idl_type.is_callback_interface:
-        cpp_expression_format = ('Dart{idl_type}::create{null_check}(args, {index}, exception)')
-    elif idl_type.is_dictionary:
-        # Value of dictionary is defined in method dart_dictionary_value_argument.
-        cpp_expression_format = 'Dart{idl_type}::toImpl(dictionary, es)'
-    else:
-        cpp_expression_format = ('Dart{idl_type}::toNative{null_check}(args, {index}, exception)')
-
-    # We allow the calling context to force a null check to handle
-    # some cases that require calling context info.  V8 handles all
-    # of this differently, and we may wish to reconsider this approach
-    check_string = ''
-    if null_check or allow_null(idl_type, extended_attributes,
-                                has_type_checking_interface):
-        check_string = 'WithNullCheck'
-    elif allow_empty(idl_type, extended_attributes):
-        check_string = 'WithEmptyCheck'
-    return cpp_expression_format.format(null_check=check_string,
-                                        arguments=arguments,
-                                        index=index,
-                                        idl_type=base_idl_type,
-                                        auto_scope=DartUtilities.bool_to_cpp(auto_scope))
-
-
-def dart_value_to_cpp_value_array_or_sequence(native_array_element_type, variable_name, index):
-    # Index is None for setters, index (starting at 0) for method arguments,
-    # and is used to provide a human-readable exception message
-    if index is None:
-        index = 0  # special case, meaning "setter"
-#    else:
-#        index += 1  # human-readable index
-    if (native_array_element_type.is_interface_type and
-        native_array_element_type.name != 'Dictionary'):
-        this_cpp_type = None
-        ref_ptr_type = cpp_ptr_type('RefPtr', 'Member', native_array_element_type.gc_type)
-        # FIXME(vsm): We're not using ref_ptr_type....
-        expression_format = 'DartUtilities::toNativeVector<{native_array_element_type} >(args, {index}, {variable_name}, exception)'
-        add_includes_for_type(native_array_element_type)
-    else:
-        ref_ptr_type = None
-        this_cpp_type = native_array_element_type.cpp_type
-        expression_format = 'DartUtilities::toNativeVector<{cpp_type}>(args, {index}, {variable_name}, exception)'
-
-    expression = expression_format.format(native_array_element_type=native_array_element_type.name,
-                                          cpp_type=this_cpp_type, index=index, ref_ptr_type=ref_ptr_type,
-                                          variable_name=variable_name)
-    return expression
-
-
-def dart_value_to_local_cpp_value(idl_type, extended_attributes, variable_name,
-                                  null_check, has_type_checking_interface,
-                                  index=None, auto_scope=True):
-    """Returns an expression that converts a Dart value to a C++ value as a local value."""
-    idl_type = idl_type.preprocessed_type
-
-    cpp_value = dart_value_to_cpp_value(
-        idl_type, extended_attributes, variable_name,
-        null_check, has_type_checking_interface,
-        index, auto_scope)
-
-    return cpp_value
-
-IdlTypeBase.dart_value_to_local_cpp_value = dart_value_to_local_cpp_value
-#IdlUnionType.dart_value_to_local_cpp_value = dart_value_to_local_cpp_value
-
-
-# Insure that we don't use C++ reserved names.  Today on default is a problem.
-def check_reserved_name(name):
-    return 'default_value' if (name == 'default') else name
-
-
-################################################################################
-# C++ -> V8
-################################################################################
-
-def preprocess_idl_type(idl_type):
-    if idl_type.is_enum:
-        # Enumerations are internally DOMStrings
-        return IdlType('DOMString')
-    if (idl_type.name == 'Any' or idl_type.is_callback_function):
-        return IdlType('ScriptValue')
-    return idl_type
-
-IdlTypeBase.preprocessed_type = property(preprocess_idl_type)
-IdlUnionType.preprocessed_type = property(preprocess_idl_type)
-
-
-def preprocess_idl_type_and_value(idl_type, cpp_value, extended_attributes):
-    """Returns IDL type and value, with preliminary type conversions applied."""
-    idl_type = idl_type.preprocessed_type
-    if idl_type.name == 'Promise':
-        idl_type = IdlType('ScriptPromise')
-
-    # FIXME(vsm): V8 maps 'long long' and 'unsigned long long' to double
-    # as they are not representable in ECMAScript.  Should we do the same?
-
-    # HTML5 says that unsigned reflected attributes should be in the range
-    # [0, 2^31). When a value isn't in this range, a default value (or 0)
-    # should be returned instead.
-    extended_attributes = extended_attributes or {}
-    if ('Reflect' in extended_attributes and
-        idl_type.base_type in ['unsigned long', 'unsigned short']):
-        cpp_value = cpp_value.replace('getUnsignedIntegralAttribute',
-                                      'getIntegralAttribute')
-        cpp_value = 'std::max(0, %s)' % cpp_value
-    return idl_type, cpp_value
-
-
-def dart_conversion_type(idl_type, extended_attributes):
-    """Returns Dart conversion type, adding any additional includes.
-
-    The Dart conversion type is used to select the C++ -> Dart conversion function
-    or setDart*ReturnValue function; it can be an idl_type, a cpp_type, or a
-    separate name for the type of conversion (e.g., 'DOMWrapper').
-    """
-    extended_attributes = extended_attributes or {}
-
-    # Composite types
-    native_array_element_type = idl_type.native_array_element_type
-
-    # FIXME: Work around sequence behaving like an array.
-    if (not native_array_element_type) and type(idl_type.inner_type) is IdlSequenceType:
-        native_array_element_type = idl_type.inner_type.native_array_element_type
-
-    if native_array_element_type:
-        if native_array_element_type.is_interface_type:
-            add_includes_for_type(native_array_element_type)
-        return 'array'
-
-    # Simple types
-    base_idl_type = idl_type.base_type
-    # Basic types, without additional includes
-    if base_idl_type in CPP_INT_TYPES or base_idl_type == 'long long':
-        return 'int'
-    if base_idl_type in CPP_UNSIGNED_TYPES or base_idl_type == 'unsigned long long':
-        return 'unsigned'
-    if idl_type.is_string_type:
-        if idl_type.is_nullable:
-            return 'StringOrNull'
-        if 'TreatReturnedNullStringAs' not in extended_attributes:
-            return 'DOMString'
-        treat_returned_null_string_as = extended_attributes['TreatReturnedNullStringAs']
-        if treat_returned_null_string_as == 'Null':
-            return 'StringOrNull'
-        if treat_returned_null_string_as == 'Undefined':
-            return 'StringOrUndefined'
-        raise 'Unrecognized TreatReturnNullStringAs value: "%s"' % treat_returned_null_string_as
-    if idl_type.is_basic_type or base_idl_type == 'ScriptValue':
-        return base_idl_type
-
-    # Data type with potential additional includes
-    add_includes_for_type(idl_type)
-    if base_idl_type in DART_SET_RETURN_VALUE:  # Special dartSetReturnValue treatment
-        return base_idl_type
-
-    # Typed arrays don't have special Dart* classes for Dart.
-    if idl_type.is_typed_array_type:
-        if base_idl_type == 'ArrayBuffer':
-            return 'ArrayBuffer'
-        else:
-            return 'TypedList'
-
-    # Pointer type
-    return 'DOMWrapper'
-
-IdlTypeBase.dart_conversion_type = dart_conversion_type
-
-
-DART_SET_RETURN_VALUE = {
-    'boolean': 'Dart_SetBooleanReturnValue(args, {cpp_value})',
-    'int': 'DartUtilities::setDartIntegerReturnValue(args, {cpp_value})',
-    'unsigned': 'DartUtilities::setDartUnsignedLongLongReturnValue(args, {cpp_value})',
-    'DOMString': 'DartUtilities::setDartStringReturnValue(args, {cpp_value}, {auto_scope})',
-    # FIXME(terry): Need to handle checking to byte values > 255 throwing exception.
-    'ByteString': 'DartUtilities::setDartByteStringReturnValue(args, {cpp_value}, {auto_scope})',
-    # FIXME(terry):  Need to make valid unicode; match UTF-16 to U+FFFD REPLACEMENT CHARACTER.
-    'ScalarValueString': 'DartUtilities::setDartScalarValueStringReturnValue(args, {cpp_value}, {auto_scope})',
-    # [TreatNullReturnValueAs]
-    'StringOrNull': 'DartUtilities::setDartStringReturnValueWithNullCheck(args, {cpp_value}, {auto_scope})',
-    # FIXME(vsm): How should we handle undefined?
-    'StringOrUndefined': 'DartUtilities::setDartStringReturnValue(args, {cpp_value}, {auto_scope})',
-    'void': '',
-    # We specialize these as well in Dart.
-    'float': 'Dart_SetDoubleReturnValue(args, {cpp_value})',
-    'unrestricted float': 'Dart_SetDoubleReturnValue(args, {cpp_value})',
-    'double': 'Dart_SetDoubleReturnValue(args, {cpp_value})',
-    'unrestricted double': 'Dart_SetDoubleReturnValue(args, {cpp_value})',
-    # No special function, but instead convert value to Dart_Handle
-    # and then use general Dart_SetReturnValue.
-    'array': 'Dart_SetReturnValue(args, {cpp_value})',
-    'Date': 'Dart_SetReturnValue(args, {cpp_value})',
-    'EventHandler': DART_FIX_ME,
-    'ScriptPromise': 'Dart_SetReturnValue(args, {cpp_value})',
-    'ScriptValue': 'Dart_SetReturnValue(args, {cpp_value})',
-    'SerializedScriptValue': DART_FIX_ME,
-    # DOMWrapper
-    # TODO(terry): Remove ForMainWorld stuff.
-    'DOMWrapperForMainWorld': DART_FIX_ME,
-    # FIXME(vsm): V8 has a fast path. Do we?
-    'DOMWrapperFast': 'Dart{type_name}::returnToDart(args, WTF::getPtr({cpp_value}), {auto_scope})',
-    'DOMWrapperDefault': 'Dart{type_name}::returnToDart(args, {cpp_value}, {auto_scope})',
-    # Typed arrays don't have special Dart* classes for Dart.
-    'ArrayBuffer': 'Dart_SetReturnValue(args, DartUtilities::arrayBufferToDart({cpp_value}))',
-    'TypedList': 'Dart_SetReturnValue(args, DartUtilities::arrayBufferViewToDart({cpp_value}))',
-    'Dictionary': DART_FIX_ME,
-}
-
-
-def dart_set_return_value(idl_type, cpp_value,
-                          extended_attributes=None, script_wrappable='',
-                          release=False, for_main_world=False,
-                          auto_scope=True):
-    """Returns a statement that converts a C++ value to a Dart value and sets it as a return value.
-
-    """
-    def dom_wrapper_conversion_type():
-        if not script_wrappable:
-            return 'DOMWrapperDefault'
-        if for_main_world:
-            return 'DOMWrapperForMainWorld'
-        return 'DOMWrapperFast'
-
-    idl_type, cpp_value = preprocess_idl_type_and_value(idl_type, cpp_value, extended_attributes)
-    this_dart_conversion_type = idl_type.dart_conversion_type(extended_attributes)
-    # SetReturn-specific overrides
-    if this_dart_conversion_type in ['Date', 'EventHandler', 'ScriptPromise', 'ScriptValue', 'SerializedScriptValue', 'array']:
-        # Convert value to Dart and then use general Dart_SetReturnValue
-        # FIXME(vsm): Why do we differ from V8 here? It doesn't have a
-        # creation_context.
-        creation_context = ''
-        if this_dart_conversion_type == 'array':
-            # FIXME: This is not right if the base type is a primitive, DOMString, etc.
-            # What is the right check for base type?
-            base_type = str(idl_type.element_type)
-            if base_type not in DART_TO_CPP_VALUE:
-                if base_type == 'None':
-                    raise Exception('Unknown base type for ' + str(idl_type))
-                creation_context = '<Dart%s>' % base_type
-            if idl_type.is_nullable:
-                creation_context = 'Nullable' + creation_context
-
-        cpp_value = idl_type.cpp_value_to_dart_value(cpp_value, creation_context=creation_context,
-                                                     extended_attributes=extended_attributes)
-    if this_dart_conversion_type == 'DOMWrapper':
-        this_dart_conversion_type = dom_wrapper_conversion_type()
-
-    format_string = DART_SET_RETURN_VALUE[this_dart_conversion_type]
-
-    if release:
-        cpp_value = '%s.release()' % cpp_value
-    statement = format_string.format(cpp_value=cpp_value,
-                                     type_name=idl_type.name,
-                                     script_wrappable=script_wrappable,
-                                     auto_scope=DartUtilities.bool_to_cpp(auto_scope))
-    return statement
-
-
-def dart_set_return_value_union(idl_type, cpp_value, extended_attributes=None,
-                              script_wrappable='', release=False, for_main_world=False,
-                              auto_scope=True):
-    """
-    release: can be either False (False for all member types) or
-             a sequence (list or tuple) of booleans (if specified individually).
-    """
-    return [
-        # FIXME(vsm): Why do we use 'result' instead of cpp_value as V8?
-        member_type.dart_set_return_value('result' + str(i),
-                                        extended_attributes,
-                                        script_wrappable,
-                                        release and release[i],
-                                        for_main_world,
-                                        auto_scope)
-            for i, member_type in
-            enumerate(idl_type.member_types)]
-
-IdlTypeBase.dart_set_return_value = dart_set_return_value
-IdlUnionType.dart_set_return_value = dart_set_return_value_union
-
-IdlType.release = property(lambda self: self.is_interface_type)
-IdlUnionType.release = property(
-    lambda self: [member_type.is_interface_type
-                  for member_type in self.member_types])
-
-
-CPP_VALUE_TO_DART_VALUE = {
-    # Built-in types
-    # FIXME(vsm): V8 uses DateOrNull - do we need a null check?
-    'Date': 'DartUtilities::dateToDart({cpp_value})',
-    'DOMString': 'DartUtilities::stringToDartString({cpp_value})',
-    'boolean': 'DartUtilities::boolToDart({cpp_value})',
-    'int': 'DartUtilities::intToDart({cpp_value})',
-    'unsigned': 'DartUtilities::unsignedLongLongToDart({cpp_value})',
-    'float': 'DartUtilities::doubleToDart({cpp_value})',
-    'unrestricted float': 'DartUtilities::doubleToDart({cpp_value})',
-    'double': 'DartUtilities::doubleToDart({cpp_value})',
-    'unrestricted double': 'DartUtilities::doubleToDart({cpp_value})',
-    # FIXME(vsm): Dart_Null?
-    'void': '',
-    # Special cases
-    'EventHandler': '-----OOPS TO DART-EVENT---',
-    # We need to generate the NullCheck version in some cases.
-    'ScriptPromise': 'DartUtilities::scriptPromiseToDart({cpp_value})',
-    'ScriptValue': 'DartUtilities::scriptValueToDart({cpp_value})',
-    'SerializedScriptValue': 'DartUtilities::serializedScriptValueToDart({cpp_value})',
-    # General
-    'array': 'DartDOMWrapper::vectorToDart{creation_context}({cpp_value})',
-    'DOMWrapper': 'Dart{idl_type}::toDart({cpp_value})',
-}
-
-
-def cpp_value_to_dart_value(idl_type, cpp_value, creation_context='', extended_attributes=None):
-    """Returns an expression that converts a C++ value to a Dart value."""
-    # the isolate parameter is needed for callback interfaces
-    idl_type, cpp_value = preprocess_idl_type_and_value(idl_type, cpp_value, extended_attributes)
-    this_dart_conversion_type = idl_type.dart_conversion_type(extended_attributes)
-    format_string = CPP_VALUE_TO_DART_VALUE[this_dart_conversion_type]
-    statement = format_string.format(
-        cpp_value=cpp_value, creation_context=creation_context,
-        idl_type=idl_type.base_type)
-    return statement
-
-IdlTypeBase.cpp_value_to_dart_value = cpp_value_to_dart_value
-
-# FIXME(leafp) This is horrible, we should do better, but currently this is hard to do
-# in a nice way.  Best solution might be to extend DartStringAdapter to accomodate
-# initialization from constant strings, but better to do that once we're stable
-# on the bots so we can track any performance regression
-CPP_LITERAL_TO_DART_VALUE = {
-    'DOMString': {'nullptr': 'DartStringAdapter(DartStringPeer::nullString())',
-                  'String("")': 'DartStringAdapter(DartStringPeer::emptyString())',
-                  '*': 'DartUtilities::dartToString(DartUtilities::stringToDart({cpp_literal}), exception)'},
-    'ScalarValueString': {'nullptr': 'DartStringAdapter(DartStringPeer::nullString())',
-                          'String("")': 'DartStringAdapter(DartStringPeer::emptyString())',
-                          '*': 'DartUtilities::dartToScalarValueString(DartUtilities::stringToDart({cpp_literal}), exception)'},
-}
-
-
-def literal_cpp_value(idl_type, idl_literal):
-    """Converts an expression that is a valid C++ literal for this type."""
-    # FIXME: add validation that idl_type and idl_literal are compatible
-    literal_value = str(idl_literal)
-    base_type = idl_type.preprocessed_type.base_type
-    if base_type in CPP_UNSIGNED_TYPES:
-        return literal_value + 'u'
-    if base_type in CPP_LITERAL_TO_DART_VALUE:
-        if literal_value in CPP_LITERAL_TO_DART_VALUE[base_type]:
-            format_string = CPP_LITERAL_TO_DART_VALUE[base_type][literal_value]
-        else:
-            format_string = CPP_LITERAL_TO_DART_VALUE[base_type]['*']
-        return format_string.format(cpp_literal=literal_value)
-    return literal_value
-
-IdlType.literal_cpp_value = literal_cpp_value
-
-
-CPP_DEFAULT_VALUE_FOR_CPP_TYPE = {
-    'DOMString': 'DartStringAdapter(DartStringPeer::emptyString())',
-    'ByteString': 'DartStringAdapter(DartStringPeer::emptyString())',
-    'ScalarValueString': 'DartStringAdapter(DartStringPeer::emptyString())',
-    'boolean': 'false',
-    'float': '0.0f',
-    'unrestricted float': '0.0f',
-    'double': '0.0',
-    'unrestricted double': '0.0',
-    'byte': '0',
-    'octet': '0',
-    'short': '0',
-    'unsigned short': '0',
-    'long': '0',
-    'unsigned long': '0',
-    'long long': '0',
-    'unsigned long long': '0',
-    'Dictionary': 'Dictionary()',
-    'ScriptValue': 'DartUtilities::dartToScriptValueWithNullCheck(Dart_Null())',
-    'MediaQueryListListener': 'nullptr',
-    'NodeFilter': 'nullptr',
-    'SerializedScriptValue': 'nullptr',
-    'XPathNSResolver': 'nullptr',
-}
-
-
-def default_cpp_value_for_cpp_type(idl_type):
-    idl_type = idl_type.preprocessed_type
-    add_includes_for_type(idl_type)
-    base_idl_type = idl_type.base_type
-    if base_idl_type in CPP_DEFAULT_VALUE_FOR_CPP_TYPE:
-        return CPP_DEFAULT_VALUE_FOR_CPP_TYPE[base_idl_type]
-    if base_idl_type in NON_WRAPPER_TYPES:
-        return 'nullptr'
-    format_str = 'Dart{idl_type}::toNativeWithNullCheck(Dart_Null(), exception)'
-    return format_str.format(idl_type=idl_type)
-
-
-# Override idl_type.name to not suffix orNull to the name, in Dart we always
-# test for null e.g.,
-#
-#      bool isNull = false;
-#      TYPE* result = receiver->GETTER(isNull);
-#      if (isNull)
-#          return;
-#
-def dart_name(idl_type):
-    """Return type name.
-
-    http://heycam.github.io/webidl/#dfn-type-name
-    """
-    base_type = idl_type.base_type
-    base_type_name = TYPE_NAMES.get(base_type, base_type)
-    if idl_type.native_array_element_type:
-        return idl_type.inner_name()
-    return base_type_name
-
-IdlType.name = property(dart_name)
-IdlUnionType.name = property(dart_name)
-
-
-# If True use the WithNullCheck version when converting.
-def allow_null(idl_type, extended_attributes, has_type_checking_interface):
-    if idl_type.base_type in ('DOMString', 'ByteString', 'ScalarValueString'):
-        # This logic is in cpp_types in v8_types.py, since they handle
-        # this using the V8StringResource type.  We handle it here
-        if (extended_attributes.get('TreatNullAs') == 'NullString' or
-            extended_attributes.get('TreatUndefinedAs') == 'NullString'):
-            return True
-
-        if extended_attributes.get('Default') == 'NullString':
-            return True
-
-        if extended_attributes.get('Default') == 'Undefined':
-            return True
-
-        if idl_type.is_nullable:
-            return True
-
-        return False
-    else:
-        # This logic is implemented in the methods.cpp template in V8
-        if (idl_type.is_nullable or not has_type_checking_interface):
-            return True
-
-        if extended_attributes.get('Default') == 'Undefined':
-            return True
-
-        return False
-
-
-# If True use the WithEmptyCheck version when converting.
-def allow_empty(idl_type, extended_attributes):
-    if idl_type.base_type in ('DOMString', 'ByteString', 'ScalarValueString'):
-        # This logic is in cpp_types in v8_types.py, since they handle
-        # this using the V8StringResource type.  We handle it here
-        if (extended_attributes.get('TreatNullAs') == 'EmptyString' or
-            extended_attributes.get('TreatUndefinedAs') == 'EmptyString'):
-            return True
-
-        if extended_attributes.get('Default') == 'EmptyString':
-            return True
-
-    return False
diff --git a/bindings/dart/scripts/dart_utilities.py b/bindings/dart/scripts/dart_utilities.py
deleted file mode 100644
index c9f4fa5..0000000
--- a/bindings/dart/scripts/dart_utilities.py
+++ /dev/null
@@ -1,206 +0,0 @@
-# Copyright (C) 2013 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Functions shared by various parts of the code generator.
-
-Extends IdlType and IdlUnion type with |enum_validation_expression| property.
-
-Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
-"""
-
-
-################################################################################
-# Utility function exposed for Dart CodeGenerator. Only 6 methods are special
-# to Dart the rest delegate to the v8_utilities functions.
-################################################################################
-
-
-import v8_types  # Required
-import v8_utilities
-
-
-def _enum_validation_expression(idl_type):
-    # FIXME: Add IdlEnumType, move property to derived type, and remove this check
-    if not idl_type.is_enum:
-        return None
-    return ' || '.join(['((String){param_name}) == "%s"' % enum_value
-                        for enum_value in idl_type.enum_values])
-
-
-def _scoped_name(interface, definition, base_name):
-    # partial interfaces are implemented as separate classes, with their members
-    # implemented as static member functions
-    partial_interface_implemented_as = definition.extended_attributes.get('PartialInterfaceImplementedAs')
-    if partial_interface_implemented_as:
-        return '%s::%s' % (partial_interface_implemented_as, base_name)
-    if (definition.is_static or
-        definition.name in ('Constructor', 'NamedConstructor')):
-        return '%s::%s' % (v8_utilities.cpp_name(interface), base_name)
-    return 'receiver->%s' % base_name
-
-
-def _bool_to_cpp(tf):
-    return "true" if tf else "false"
-
-
-# [ActivityLogging]
-def _activity_logging_world_list(member, access_type=None):
-    """Returns a set of world suffixes for which a definition member has activity logging, for specified access type.
-
-    access_type can be 'Getter' or 'Setter' if only checking getting or setting.
-    """
-    if 'ActivityLogging' not in member.extended_attributes:
-        return set()
-    activity_logging = member.extended_attributes['ActivityLogging']
-    # [ActivityLogging=For*] (no prefix, starts with the worlds suffix) means
-    # "log for all use (method)/access (attribute)", otherwise check that value
-    # agrees with specified access_type (Getter/Setter).
-    has_logging = (activity_logging.startswith('For') or
-                   (access_type and activity_logging.startswith(access_type)))
-    if not has_logging:
-        return set()
-# TODO(terry): Remove Me?
-#    includes.add('bindings/core/v8/V8DOMActivityLogger.h')
-    if activity_logging.endswith('ForIsolatedWorlds'):
-        return set([''])
-    return set(['', 'ForMainWorld'])  # endswith('ForAllWorlds')
-
-
-# [CallWith]
-_CALL_WITH_ARGUMENTS = {
-    'ScriptState': 'state',
-    'ExecutionContext': 'context',
-    'ScriptArguments': 'scriptArguments.release()',
-    'ActiveWindow': 'DartUtilities::callingDomWindowForCurrentIsolate()',
-    'FirstWindow': 'DartUtilities::enteredDomWindowForCurrentIsolate()',
-    'Document': 'document',
-}
-
-# List because key order matters, as we want arguments in deterministic order
-_CALL_WITH_VALUES = [
-    'ScriptState',
-    'ExecutionContext',
-    'ScriptArguments',
-    'ActiveWindow',
-    'FirstWindow',
-    'Document',
-]
-
-
-def _call_with_arguments(call_with_values):
-    if not call_with_values:
-        return []
-    return [_CALL_WITH_ARGUMENTS[value]
-            for value in _CALL_WITH_VALUES
-            if v8_utilities.extended_attribute_value_contains(call_with_values, value)]
-
-
-# [DeprecateAs]
-def _deprecate_as(member):
-    extended_attributes = member.extended_attributes
-    if 'DeprecateAs' not in extended_attributes:
-        return None
-# TODO(terry): Remove me?
-#    includes.add('core/frame/UseCounter.h')
-    return extended_attributes['DeprecateAs']
-
-
-# [MeasureAs]
-def _measure_as(definition_or_member):
-    extended_attributes = definition_or_member.extended_attributes
-    if 'MeasureAs' not in extended_attributes:
-        return None
-# TODO(terry): Remove Me?
-#    includes.add('core/frame/UseCounter.h')
-    return extended_attributes['MeasureAs']
-
-
-def _generate_native_entry(interface_name, name, kind, is_static, arity):
-
-    def mkPublic(s):
-        if s.startswith("_") or s.startswith("$"):
-            return "$" + s
-        return s
-
-    arity_str = ""
-    if kind == 'Getter':
-        suffix = "_Getter"
-    elif kind == 'Setter':
-        suffix = "_Setter"
-    elif kind == 'Constructor':
-        name = "constructor"
-        suffix = "Callback"
-        arity_str = "_" + str(arity)
-    elif kind == 'Method':
-        suffix = "_Callback"
-        arity_str = "_" + str(arity)
-
-    tag = "%s%s" % (name, suffix)
-    blink_entry = mkPublic(tag + arity_str)
-    native_entry = "_".join([interface_name, tag])
-
-    argument_names = ['__arg_%d' % i for i in range(0, arity)]
-    if not is_static and kind != 'Constructor':
-        argument_names.insert(0, "mthis")
-
-    return {'blink_entry': blink_entry,
-            'argument_names': argument_names,
-            'resolver_string': native_entry}
-
-################################################################################
-# This is the monkey patched methods most delegate to v8_utilities but some are
-# overridden in dart_utilities.
-################################################################################
-
-
-class dart_utilities_monkey():
-    def __init__(self):
-        self.base_class_name = 'dart_utilities'
-
-DartUtilities = dart_utilities_monkey()
-
-DartUtilities.activity_logging_world_list = _activity_logging_world_list
-DartUtilities.bool_to_cpp = _bool_to_cpp
-DartUtilities.call_with_arguments = _call_with_arguments
-DartUtilities.capitalize = v8_utilities.capitalize
-DartUtilities.conditional_string = v8_utilities.conditional_string
-DartUtilities.cpp_name = v8_utilities.cpp_name
-DartUtilities.deprecate_as = _deprecate_as
-DartUtilities.extended_attribute_value_contains = v8_utilities.extended_attribute_value_contains
-DartUtilities.enum_validation_expression = _enum_validation_expression
-DartUtilities.gc_type = v8_utilities.gc_type
-DartUtilities.generate_native_entry = _generate_native_entry
-DartUtilities.has_extended_attribute = v8_utilities.has_extended_attribute
-DartUtilities.has_extended_attribute_value = v8_utilities.has_extended_attribute_value
-DartUtilities.measure_as = _measure_as
-DartUtilities.per_context_enabled_function_name = v8_utilities.per_context_enabled_function_name
-DartUtilities.runtime_enabled_function_name = v8_utilities.runtime_enabled_function_name
-DartUtilities.scoped_name = _scoped_name
-DartUtilities.strip_suffix = v8_utilities.strip_suffix
-DartUtilities.uncapitalize = v8_utilities.uncapitalize
-DartUtilities.v8_class_name = v8_utilities.v8_class_name
diff --git a/bindings/dart/scripts/idl_files.py b/bindings/dart/scripts/idl_files.py
deleted file mode 100644
index cbb4157..0000000
--- a/bindings/dart/scripts/idl_files.py
+++ /dev/null
@@ -1,800 +0,0 @@
-# Testing file for use to debug IDL parsing and code gen in Eclipse.
-# Update list of IDL files from Source/core/core.gypi and
-# Source/modules/modules.gypi
-
-import os
-
-
-def full_path(paths, files):
-    full_paths = []
-    for relative_file in files:
-        correct_relative_path = os.path.join(paths[0], paths[1], relative_file)
-        full_paths.append(os.path.realpath(correct_relative_path))
-    return full_paths
-
-
-# This list is copied from Source/core/core.gypi 'core_idl_files'
-# Core IDL files bindings (.dart, .cpp and .h files) will be generated
-core_idl_files = [
-            'animation/Animation.idl',
-            'animation/AnimationEffect.idl',
-            'animation/AnimationPlayer.idl',
-            'animation/AnimationNode.idl',
-            'animation/AnimationTimeline.idl',
-            'animation/Timing.idl',
-            'clipboard/DataTransfer.idl',
-            'clipboard/DataTransferItem.idl',
-            'clipboard/DataTransferItemList.idl',
-            'css/CSS.idl',
-            'css/CSSCharsetRule.idl',
-            'css/CSSFontFaceRule.idl',
-            'css/CSSImportRule.idl',
-            'css/CSSKeyframeRule.idl',
-            'css/CSSKeyframesRule.idl',
-            'css/CSSMediaRule.idl',
-            'css/CSSPageRule.idl',
-            'css/CSSPrimitiveValue.idl',
-            'css/CSSRule.idl',
-            'css/CSSRuleList.idl',
-            'css/CSSStyleDeclaration.idl',
-            'css/CSSStyleRule.idl',
-            'css/CSSStyleSheet.idl',
-            'css/CSSSupportsRule.idl',
-            'css/CSSUnknownRule.idl',
-            'css/CSSValue.idl',
-            'css/CSSValueList.idl',
-            'css/CSSViewportRule.idl',
-            'css/Counter.idl',
-            'css/FontFace.idl',
-            'css/FontFaceSet.idl',
-            'css/FontFaceSetForEachCallback.idl',
-            'css/FontFaceSetLoadEvent.idl',
-            'css/MediaList.idl',
-            'css/MediaQueryList.idl',
-            'css/MediaQueryListEvent.idl',
-            'css/RGBColor.idl',
-            'css/Rect.idl',
-            'css/StyleMedia.idl',
-            'css/StyleSheet.idl',
-            'css/StyleSheetList.idl',
-            'css/WebKitCSSFilterRule.idl',
-            'css/WebKitCSSFilterValue.idl',
-            'css/WebKitCSSMatrix.idl',
-            'css/WebKitCSSTransformValue.idl',
-            'dom/Attr.idl',
-            'dom/CDATASection.idl',
-            'dom/CharacterData.idl',
-            'dom/ClientRect.idl',
-            'dom/ClientRectList.idl',
-            'dom/Comment.idl',
-            'dom/DOMError.idl',
-            'dom/DOMException.idl',
-            'dom/DOMImplementation.idl',
-            'dom/DOMMatrix.idl',
-            'dom/DOMMatrixReadOnly.idl',
-            'dom/DOMPoint.idl',
-            'dom/DOMPointReadOnly.idl',
-            'dom/DOMRect.idl',
-            'dom/DOMRectReadOnly.idl',
-            'dom/DOMSettableTokenList.idl',
-            'dom/DOMStringList.idl',
-            'dom/DOMStringMap.idl',
-            'dom/DOMTokenList.idl',
-            'dom/Document.idl',
-            'dom/DocumentFragment.idl',
-            'dom/DocumentType.idl',
-            'dom/Element.idl',
-            'dom/Iterator.idl',
-            'dom/MessageChannel.idl',
-            'dom/MessagePort.idl',
-            'dom/MutationObserver.idl',
-            'dom/MutationRecord.idl',
-            'dom/NamedNodeMap.idl',
-            'dom/Node.idl',
-            'dom/NodeFilter.idl',
-            'dom/NodeIterator.idl',
-            'dom/NodeList.idl',
-            'dom/ProcessingInstruction.idl',
-            'dom/Range.idl',
-            'dom/RequestAnimationFrameCallback.idl',
-            'dom/StringCallback.idl',
-            'dom/Text.idl',
-            'dom/Touch.idl',
-            'dom/TouchList.idl',
-            'dom/TreeWalker.idl',
-            'dom/URL.idl',
-            'dom/XMLDocument.idl',
-            'dom/shadow/ShadowRoot.idl',
-            'editing/Selection.idl',
-            'events/AnimationPlayerEvent.idl',
-            'events/ApplicationCacheErrorEvent.idl',
-            'events/AutocompleteErrorEvent.idl',
-            'events/BeforeUnloadEvent.idl',
-            'events/CompositionEvent.idl',
-            'events/CustomEvent.idl',
-            'events/ErrorEvent.idl',
-            'events/Event.idl',
-            'events/EventTarget.idl',
-            'events/FocusEvent.idl',
-            'events/HashChangeEvent.idl',
-            'events/KeyboardEvent.idl',
-            'events/MessageEvent.idl',
-            'events/MouseEvent.idl',
-            'events/MutationEvent.idl',
-            'events/OverflowEvent.idl',
-            'events/PageTransitionEvent.idl',
-            'events/PopStateEvent.idl',
-            'events/ProgressEvent.idl',
-            'events/RelatedEvent.idl',
-            'events/ResourceProgressEvent.idl',
-            'events/SecurityPolicyViolationEvent.idl',
-            'events/TextEvent.idl',
-            'events/TouchEvent.idl',
-            'events/TransitionEvent.idl',
-            'events/UIEvent.idl',
-            'events/WebKitAnimationEvent.idl',
-            'events/WheelEvent.idl',
-            'fileapi/Blob.idl',
-            'fileapi/File.idl',
-            'fileapi/FileError.idl',
-            'fileapi/FileList.idl',
-            'fileapi/FileReader.idl',
-            'fileapi/FileReaderSync.idl',
-            'frame/BarProp.idl',
-            'frame/Console.idl',
-            'frame/ConsoleBase.idl',
-            'frame/History.idl',
-            'frame/ImageBitmap.idl',
-            'frame/Location.idl',
-            'frame/Navigator.idl',
-            'frame/Screen.idl',
-            'frame/Window.idl',
-            'html/FormData.idl',
-            'html/HTMLAllCollection.idl',
-            'html/HTMLAnchorElement.idl',
-            'html/HTMLAppletElement.idl',
-            'html/HTMLAreaElement.idl',
-            'html/HTMLAudioElement.idl',
-            'html/HTMLBRElement.idl',
-            'html/HTMLBaseElement.idl',
-            'html/HTMLBodyElement.idl',
-            'html/HTMLButtonElement.idl',
-            'html/HTMLCanvasElement.idl',
-            'html/HTMLCollection.idl',
-            'html/HTMLContentElement.idl',
-            'html/HTMLDListElement.idl',
-            'html/HTMLDataListElement.idl',
-            'html/HTMLDetailsElement.idl',
-            'html/HTMLDialogElement.idl',
-            'html/HTMLDirectoryElement.idl',
-            'html/HTMLDivElement.idl',
-            'html/HTMLDocument.idl',
-            'html/HTMLElement.idl',
-            'html/HTMLEmbedElement.idl',
-            'html/HTMLFieldSetElement.idl',
-            'html/HTMLFontElement.idl',
-            'html/HTMLFormControlsCollection.idl',
-            'html/HTMLFormElement.idl',
-            'html/HTMLFrameElement.idl',
-            'html/HTMLFrameSetElement.idl',
-            'html/HTMLHRElement.idl',
-            'html/HTMLHeadElement.idl',
-            'html/HTMLHeadingElement.idl',
-            'html/HTMLHtmlElement.idl',
-            'html/HTMLIFrameElement.idl',
-            'html/HTMLImageElement.idl',
-            'html/HTMLInputElement.idl',
-            'html/HTMLKeygenElement.idl',
-            'html/HTMLLIElement.idl',
-            'html/HTMLLabelElement.idl',
-            'html/HTMLLegendElement.idl',
-            'html/HTMLLinkElement.idl',
-            'html/HTMLMapElement.idl',
-            'html/HTMLMarqueeElement.idl',
-            'html/HTMLMediaElement.idl',
-            'html/HTMLMenuElement.idl',
-            'html/HTMLMenuItemElement.idl',
-            'html/HTMLMetaElement.idl',
-            'html/HTMLMeterElement.idl',
-            'html/HTMLModElement.idl',
-            'html/HTMLOListElement.idl',
-            'html/HTMLObjectElement.idl',
-            'html/HTMLOptGroupElement.idl',
-            'html/HTMLOptionElement.idl',
-            'html/HTMLOptionsCollection.idl',
-            'html/HTMLOutputElement.idl',
-            'html/HTMLParagraphElement.idl',
-            'html/HTMLParamElement.idl',
-            'html/HTMLPictureElement.idl',
-            'html/HTMLPreElement.idl',
-            'html/HTMLProgressElement.idl',
-            'html/HTMLQuoteElement.idl',
-            'html/HTMLScriptElement.idl',
-            'html/HTMLSelectElement.idl',
-            'html/HTMLShadowElement.idl',
-            'html/HTMLSourceElement.idl',
-            'html/HTMLSpanElement.idl',
-            'html/HTMLStyleElement.idl',
-            'html/HTMLTableCaptionElement.idl',
-            'html/HTMLTableCellElement.idl',
-            'html/HTMLTableColElement.idl',
-            'html/HTMLTableElement.idl',
-            'html/HTMLTableRowElement.idl',
-            'html/HTMLTableSectionElement.idl',
-            'html/HTMLTemplateElement.idl',
-            'html/HTMLTextAreaElement.idl',
-            'html/HTMLTitleElement.idl',
-            'html/HTMLTrackElement.idl',
-            'html/HTMLUListElement.idl',
-            'html/HTMLUnknownElement.idl',
-            'html/HTMLVideoElement.idl',
-            'html/ImageData.idl',
-            'html/MediaController.idl',
-            'html/MediaError.idl',
-            'html/MediaKeyError.idl',
-            'html/MediaKeyEvent.idl',
-            'html/RadioNodeList.idl',
-            'html/TextMetrics.idl',
-            'html/TimeRanges.idl',
-            'html/ValidityState.idl',
-            'html/VoidCallback.idl',
-            'html/canvas/ANGLEInstancedArrays.idl',
-            'html/canvas/Canvas2DContextAttributes.idl',
-            'html/canvas/CanvasGradient.idl',
-            'html/canvas/CanvasPattern.idl',
-            'html/canvas/CanvasRenderingContext2D.idl',
-            'html/canvas/EXTBlendMinMax.idl',
-            'html/canvas/EXTFragDepth.idl',
-            'html/canvas/EXTShaderTextureLOD.idl',
-            'html/canvas/EXTTextureFilterAnisotropic.idl',
-            'html/canvas/OESElementIndexUint.idl',
-            'html/canvas/OESStandardDerivatives.idl',
-            'html/canvas/OESTextureFloat.idl',
-            'html/canvas/OESTextureFloatLinear.idl',
-            'html/canvas/OESTextureHalfFloat.idl',
-            'html/canvas/OESTextureHalfFloatLinear.idl',
-            'html/canvas/OESVertexArrayObject.idl',
-            'html/canvas/Path2D.idl',
-            'html/canvas/WebGLActiveInfo.idl',
-            'html/canvas/WebGLBuffer.idl',
-            'html/canvas/WebGLCompressedTextureATC.idl',
-            'html/canvas/WebGLCompressedTextureETC1.idl',
-            'html/canvas/WebGLCompressedTexturePVRTC.idl',
-            'html/canvas/WebGLCompressedTextureS3TC.idl',
-            'html/canvas/WebGLContextAttributes.idl',
-            'html/canvas/WebGLContextEvent.idl',
-            'html/canvas/WebGLDebugRendererInfo.idl',
-            'html/canvas/WebGLDebugShaders.idl',
-            'html/canvas/WebGLDepthTexture.idl',
-            'html/canvas/WebGLDrawBuffers.idl',
-            'html/canvas/WebGLFramebuffer.idl',
-            'html/canvas/WebGLLoseContext.idl',
-            'html/canvas/WebGLProgram.idl',
-            'html/canvas/WebGLRenderbuffer.idl',
-            'html/canvas/WebGLRenderingContext.idl',
-            'html/canvas/WebGLShader.idl',
-            'html/canvas/WebGLShaderPrecisionFormat.idl',
-            'html/canvas/WebGLTexture.idl',
-            'html/canvas/WebGLUniformLocation.idl',
-            'html/canvas/WebGLVertexArrayObjectOES.idl',
-            'html/ime/InputMethodContext.idl',
-            'html/shadow/PluginPlaceholderElement.idl',
-            'html/track/AudioTrack.idl',
-            'html/track/AudioTrackList.idl',
-            'html/track/TextTrack.idl',
-            'html/track/TextTrackCue.idl',
-            'html/track/TextTrackCueList.idl',
-            'html/track/TextTrackList.idl',
-            'html/track/TrackEvent.idl',
-            'html/track/VideoTrack.idl',
-            'html/track/VideoTrackList.idl',
-            'html/track/vtt/VTTCue.idl',
-            'html/track/vtt/VTTRegion.idl',
-            'html/track/vtt/VTTRegionList.idl',
-            'inspector/InjectedScriptHost.idl',
-            'inspector/InspectorFrontendHost.idl',
-            'inspector/InspectorOverlayHost.idl',
-            'inspector/JavaScriptCallFrame.idl',
-            'loader/appcache/ApplicationCache.idl',
-            'page/EventSource.idl',
-            'page/PagePopupController.idl',
-            'plugins/MimeType.idl',
-            'plugins/MimeTypeArray.idl',
-            'plugins/Plugin.idl',
-            'plugins/PluginArray.idl',
-            'storage/Storage.idl',
-            'storage/StorageEvent.idl',
-            'streams/ReadableStream.idl',
-            'streams/Stream.idl',
-            'svg/SVGAElement.idl',
-            'svg/SVGAltGlyphDefElement.idl',
-            'svg/SVGAltGlyphElement.idl',
-            'svg/SVGAltGlyphItemElement.idl',
-            'svg/SVGAngle.idl',
-            'svg/SVGAnimateElement.idl',
-            'svg/SVGAnimateMotionElement.idl',
-            'svg/SVGAnimateTransformElement.idl',
-            'svg/SVGAnimatedAngle.idl',
-            'svg/SVGAnimatedBoolean.idl',
-            'svg/SVGAnimatedEnumeration.idl',
-            'svg/SVGAnimatedInteger.idl',
-            'svg/SVGAnimatedLength.idl',
-            'svg/SVGAnimatedLengthList.idl',
-            'svg/SVGAnimatedNumber.idl',
-            'svg/SVGAnimatedNumberList.idl',
-            'svg/SVGAnimatedPreserveAspectRatio.idl',
-            'svg/SVGAnimatedRect.idl',
-            'svg/SVGAnimatedString.idl',
-            'svg/SVGAnimatedTransformList.idl',
-            'svg/SVGAnimationElement.idl',
-            'svg/SVGCircleElement.idl',
-            'svg/SVGClipPathElement.idl',
-            'svg/SVGComponentTransferFunctionElement.idl',
-            'svg/SVGCursorElement.idl',
-            'svg/SVGDefsElement.idl',
-            'svg/SVGDescElement.idl',
-            'svg/SVGDiscardElement.idl',
-            'svg/SVGElement.idl',
-            'svg/SVGEllipseElement.idl',
-            'svg/SVGFEBlendElement.idl',
-            'svg/SVGFEColorMatrixElement.idl',
-            'svg/SVGFEComponentTransferElement.idl',
-            'svg/SVGFECompositeElement.idl',
-            'svg/SVGFEConvolveMatrixElement.idl',
-            'svg/SVGFEDiffuseLightingElement.idl',
-            'svg/SVGFEDisplacementMapElement.idl',
-            'svg/SVGFEDistantLightElement.idl',
-            'svg/SVGFEDropShadowElement.idl',
-            'svg/SVGFEFloodElement.idl',
-            'svg/SVGFEFuncAElement.idl',
-            'svg/SVGFEFuncBElement.idl',
-            'svg/SVGFEFuncGElement.idl',
-            'svg/SVGFEFuncRElement.idl',
-            'svg/SVGFEGaussianBlurElement.idl',
-            'svg/SVGFEImageElement.idl',
-            'svg/SVGFEMergeElement.idl',
-            'svg/SVGFEMergeNodeElement.idl',
-            'svg/SVGFEMorphologyElement.idl',
-            'svg/SVGFEOffsetElement.idl',
-            'svg/SVGFEPointLightElement.idl',
-            'svg/SVGFESpecularLightingElement.idl',
-            'svg/SVGFESpotLightElement.idl',
-            'svg/SVGFETileElement.idl',
-            'svg/SVGFETurbulenceElement.idl',
-            'svg/SVGFilterElement.idl',
-            'svg/SVGFontElement.idl',
-            'svg/SVGFontFaceElement.idl',
-            'svg/SVGFontFaceFormatElement.idl',
-            'svg/SVGFontFaceNameElement.idl',
-            'svg/SVGFontFaceSrcElement.idl',
-            'svg/SVGFontFaceUriElement.idl',
-            'svg/SVGForeignObjectElement.idl',
-            'svg/SVGGElement.idl',
-            'svg/SVGGeometryElement.idl',
-            'svg/SVGGlyphElement.idl',
-            'svg/SVGGlyphRefElement.idl',
-            'svg/SVGGradientElement.idl',
-            'svg/SVGGraphicsElement.idl',
-            'svg/SVGHKernElement.idl',
-            'svg/SVGImageElement.idl',
-            'svg/SVGLength.idl',
-            'svg/SVGLengthList.idl',
-            'svg/SVGLineElement.idl',
-            'svg/SVGLinearGradientElement.idl',
-            'svg/SVGMPathElement.idl',
-            'svg/SVGMarkerElement.idl',
-            'svg/SVGMaskElement.idl',
-            'svg/SVGMatrix.idl',
-            'svg/SVGMetadataElement.idl',
-            'svg/SVGMissingGlyphElement.idl',
-            'svg/SVGNumber.idl',
-            'svg/SVGNumberList.idl',
-            'svg/SVGPathElement.idl',
-            'svg/SVGPathSeg.idl',
-            'svg/SVGPathSegArcAbs.idl',
-            'svg/SVGPathSegArcRel.idl',
-            'svg/SVGPathSegClosePath.idl',
-            'svg/SVGPathSegCurvetoCubicAbs.idl',
-            'svg/SVGPathSegCurvetoCubicRel.idl',
-            'svg/SVGPathSegCurvetoCubicSmoothAbs.idl',
-            'svg/SVGPathSegCurvetoCubicSmoothRel.idl',
-            'svg/SVGPathSegCurvetoQuadraticAbs.idl',
-            'svg/SVGPathSegCurvetoQuadraticRel.idl',
-            'svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl',
-            'svg/SVGPathSegCurvetoQuadraticSmoothRel.idl',
-            'svg/SVGPathSegLinetoAbs.idl',
-            'svg/SVGPathSegLinetoHorizontalAbs.idl',
-            'svg/SVGPathSegLinetoHorizontalRel.idl',
-            'svg/SVGPathSegLinetoRel.idl',
-            'svg/SVGPathSegLinetoVerticalAbs.idl',
-            'svg/SVGPathSegLinetoVerticalRel.idl',
-            'svg/SVGPathSegList.idl',
-            'svg/SVGPathSegMovetoAbs.idl',
-            'svg/SVGPathSegMovetoRel.idl',
-            'svg/SVGPatternElement.idl',
-            'svg/SVGPoint.idl',
-            'svg/SVGPointList.idl',
-            'svg/SVGPolygonElement.idl',
-            'svg/SVGPolylineElement.idl',
-            'svg/SVGPreserveAspectRatio.idl',
-            'svg/SVGRadialGradientElement.idl',
-            'svg/SVGRect.idl',
-            'svg/SVGRectElement.idl',
-            'svg/SVGRenderingIntent.idl',
-            'svg/SVGSVGElement.idl',
-            'svg/SVGScriptElement.idl',
-            'svg/SVGSetElement.idl',
-            'svg/SVGStopElement.idl',
-            'svg/SVGStringList.idl',
-            'svg/SVGStyleElement.idl',
-            'svg/SVGSwitchElement.idl',
-            'svg/SVGSymbolElement.idl',
-            'svg/SVGTSpanElement.idl',
-            'svg/SVGTextContentElement.idl',
-            'svg/SVGTextElement.idl',
-            'svg/SVGTextPathElement.idl',
-            'svg/SVGTextPositioningElement.idl',
-            'svg/SVGTitleElement.idl',
-            'svg/SVGTransform.idl',
-            'svg/SVGTransformList.idl',
-            'svg/SVGUnitTypes.idl',
-            'svg/SVGUseElement.idl',
-            'svg/SVGVKernElement.idl',
-            'svg/SVGViewElement.idl',
-            'svg/SVGViewSpec.idl',
-            'svg/SVGZoomEvent.idl',
-            'timing/MemoryInfo.idl',
-            'timing/Performance.idl',
-            'timing/PerformanceEntry.idl',
-            'timing/PerformanceMark.idl',
-            'timing/PerformanceMeasure.idl',
-            'timing/PerformanceNavigation.idl',
-            'timing/PerformanceResourceTiming.idl',
-            'timing/PerformanceTiming.idl',
-            'workers/DedicatedWorkerGlobalScope.idl',
-            'workers/SharedWorker.idl',
-            'workers/SharedWorkerGlobalScope.idl',
-            'workers/Worker.idl',
-            'workers/WorkerConsole.idl',
-            'workers/WorkerGlobalScope.idl',
-            'workers/WorkerLocation.idl',
-            'workers/WorkerNavigator.idl',
-            'xml/DOMParser.idl',
-            'xml/XMLHttpRequest.idl',
-            'xml/XMLHttpRequestEventTarget.idl',
-            'xml/XMLHttpRequestProgressEvent.idl',
-            'xml/XMLHttpRequestUpload.idl',
-            'xml/XMLSerializer.idl',
-            'xml/XPathEvaluator.idl',
-            'xml/XPathExpression.idl',
-            'xml/XPathNSResolver.idl',
-            'xml/XPathResult.idl',
-            'xml/XSLTProcessor.idl',
-]
-
-
-def full_path_core_idl_files():
-    return full_path(['Source', 'core'], core_idl_files)
-
-
-# This list is copied from Source/core/core.gypi 'core_dependency_idl_files'
-# 'partial interface' or target (right side of) 'implements'
-core_dependency_idl_files = [
-            'animation/DocumentAnimation.idl',
-            'animation/ElementAnimation.idl',
-            'css/DocumentFontFaceSet.idl',
-            'dom/ChildNode.idl',
-            'dom/DocumentFullscreen.idl',
-            'dom/ElementFullscreen.idl',
-            'dom/GlobalEventHandlers.idl',
-            'dom/ParentNode.idl',
-            'dom/URLUtils.idl',
-            'dom/URLUtilsReadOnly.idl',
-            'events/EventListener.idl',
-            'events/NavigatorEvents.idl',
-            'frame/NavigatorCPU.idl',
-            'frame/NavigatorID.idl',
-            'frame/NavigatorLanguage.idl',
-            'frame/NavigatorOnLine.idl',
-            'frame/WindowBase64.idl',
-            'frame/WindowEventHandlers.idl',
-            'frame/WindowTimers.idl',
-            'html/canvas/CanvasPathMethods.idl',
-            'html/canvas/MouseEventHitRegion.idl',
-            'html/canvas/WebGLRenderingContextBase.idl',
-            'imagebitmap/ImageBitmapFactories.idl',
-            'imagebitmap/WindowImageBitmapFactories.idl',
-            'page/WindowPagePopup.idl',
-            'svg/SVGDocument.idl',
-            'svg/SVGFilterPrimitiveStandardAttributes.idl',
-            'svg/SVGFitToViewBox.idl',
-            'svg/SVGTests.idl',
-            'svg/SVGURIReference.idl',
-            'svg/SVGZoomAndPan.idl',
-            'workers/AbstractWorker.idl',
-            'xml/DocumentXMLTreeViewer.idl',
-            'xml/DocumentXPathEvaluator.idl',
-]
-
-
-def full_path_core_dependency_idl_files():
-    return full_path(['Source', 'core'], core_dependency_idl_files)
-
-
-# This list is copied from Source/modules/modules.gypi 'modules_idl_files'
-# Modules IDL files bindings (.dart, .cpp and .h files) will be generated
-modules_idl_files = [
-      'battery/BatteryManager.idl',
-      'credentialmanager/Credential.idl',
-      'credentialmanager/CredentialsContainer.idl',
-      'credentialmanager/FederatedCredential.idl',
-      'credentialmanager/LocalCredential.idl',
-      'crypto/Crypto.idl',
-      'crypto/CryptoKey.idl',
-      'crypto/SubtleCrypto.idl',
-      'device_light/DeviceLightEvent.idl',
-      'device_orientation/DeviceAcceleration.idl',
-      'device_orientation/DeviceMotionEvent.idl',
-      'device_orientation/DeviceOrientationEvent.idl',
-      'device_orientation/DeviceRotationRate.idl',
-      'encoding/TextDecoder.idl',
-      'encoding/TextEncoder.idl',
-      'encryptedmedia/MediaKeyMessageEvent.idl',
-      'encryptedmedia/MediaKeyNeededEvent.idl',
-      'encryptedmedia/MediaKeySession.idl',
-      'encryptedmedia/MediaKeys.idl',
-      'filesystem/DOMFileSystem.idl',
-      'filesystem/DOMFileSystemSync.idl',
-      'filesystem/DirectoryEntry.idl',
-      'filesystem/DirectoryEntrySync.idl',
-      'filesystem/DirectoryReader.idl',
-      'filesystem/DirectoryReaderSync.idl',
-      'filesystem/EntriesCallback.idl',
-      'filesystem/Entry.idl',
-      'filesystem/EntryCallback.idl',
-      'filesystem/EntrySync.idl',
-      'filesystem/ErrorCallback.idl',
-      'filesystem/FileCallback.idl',
-      'filesystem/FileEntry.idl',
-      'filesystem/FileEntrySync.idl',
-      'filesystem/FileSystemCallback.idl',
-      'filesystem/FileWriter.idl',
-      'filesystem/FileWriterCallback.idl',
-      'filesystem/FileWriterSync.idl',
-      'filesystem/Metadata.idl',
-      'filesystem/MetadataCallback.idl',
-      'gamepad/Gamepad.idl',
-      'gamepad/GamepadButton.idl',
-      'gamepad/GamepadEvent.idl',
-      'gamepad/GamepadList.idl',
-      'gamepad/WebKitGamepad.idl',
-      'gamepad/WebKitGamepadList.idl',
-      'geofencing/CircularGeofencingRegion.idl',
-      'geofencing/Geofencing.idl',
-      'geofencing/GeofencingRegion.idl',
-      'geolocation/Coordinates.idl',
-      'geolocation/Geolocation.idl',
-      'geolocation/Geoposition.idl',
-      'geolocation/PositionCallback.idl',
-      'geolocation/PositionError.idl',
-      'geolocation/PositionErrorCallback.idl',
-      'indexeddb/IDBCursor.idl',
-      'indexeddb/IDBCursorWithValue.idl',
-      'indexeddb/IDBDatabase.idl',
-      'indexeddb/IDBFactory.idl',
-      'indexeddb/IDBIndex.idl',
-      'indexeddb/IDBKeyRange.idl',
-      'indexeddb/IDBObjectStore.idl',
-      'indexeddb/IDBOpenDBRequest.idl',
-      'indexeddb/IDBRequest.idl',
-      'indexeddb/IDBTransaction.idl',
-      'indexeddb/IDBVersionChangeEvent.idl',
-      'mediasource/MediaSource.idl',
-      'mediasource/SourceBuffer.idl',
-      'mediasource/SourceBufferList.idl',
-      'mediasource/VideoPlaybackQuality.idl',
-      'mediastream/MediaDeviceInfo.idl',
-      'mediastream/MediaDeviceInfoCallback.idl',
-      'mediastream/MediaStream.idl',
-      'mediastream/MediaStreamEvent.idl',
-      'mediastream/MediaStreamTrack.idl',
-      'mediastream/MediaStreamTrackEvent.idl',
-      'mediastream/MediaStreamTrackSourcesCallback.idl',
-      'mediastream/NavigatorUserMediaError.idl',
-      'mediastream/NavigatorUserMediaErrorCallback.idl',
-      'mediastream/NavigatorUserMediaSuccessCallback.idl',
-      'mediastream/RTCDTMFSender.idl',
-      'mediastream/RTCDTMFToneChangeEvent.idl',
-      'mediastream/RTCDataChannel.idl',
-      'mediastream/RTCDataChannelEvent.idl',
-      'mediastream/RTCErrorCallback.idl',
-      'mediastream/RTCIceCandidate.idl',
-      'mediastream/RTCIceCandidateEvent.idl',
-      'mediastream/RTCPeerConnection.idl',
-      'mediastream/RTCSessionDescription.idl',
-      'mediastream/RTCSessionDescriptionCallback.idl',
-      'mediastream/RTCStatsCallback.idl',
-      'mediastream/RTCStatsReport.idl',
-      'mediastream/RTCStatsResponse.idl',
-      'mediastream/SourceInfo.idl',
-      'netinfo/NetworkInformation.idl',
-      'notifications/Notification.idl',
-      'notifications/NotificationPermissionCallback.idl',
-      'performance/WorkerPerformance.idl',
-      'presentation/Presentation.idl',
-      'push_messaging/PushEvent.idl',
-      'push_messaging/PushManager.idl',
-      'push_messaging/PushRegistration.idl',
-      'quota/DeprecatedStorageInfo.idl',
-      'quota/DeprecatedStorageQuota.idl',
-      'quota/StorageErrorCallback.idl',
-      'quota/StorageInfo.idl',
-      'quota/StorageQuota.idl',
-      'quota/StorageQuotaCallback.idl',
-      'quota/StorageUsageCallback.idl',
-      'screen_orientation/ScreenOrientation.idl',
-      'serviceworkers/Body.idl',
-      'serviceworkers/Cache.idl',
-      'serviceworkers/CacheStorage.idl',
-      'serviceworkers/ExtendableEvent.idl',
-      'serviceworkers/FetchEvent.idl',
-      'serviceworkers/Headers.idl',
-      'serviceworkers/HeadersForEachCallback.idl',
-      'serviceworkers/InstallEvent.idl',
-      'serviceworkers/Request.idl',
-      'serviceworkers/Response.idl',
-      'serviceworkers/ServiceWorker.idl',
-      'serviceworkers/ServiceWorkerClient.idl',
-      'serviceworkers/ServiceWorkerClients.idl',
-      'serviceworkers/ServiceWorkerContainer.idl',
-      'serviceworkers/ServiceWorkerGlobalScope.idl',
-      'serviceworkers/ServiceWorkerRegistration.idl',
-      'speech/SpeechGrammar.idl',
-      'speech/SpeechGrammarList.idl',
-      'speech/SpeechRecognition.idl',
-      'speech/SpeechRecognitionAlternative.idl',
-      'speech/SpeechRecognitionError.idl',
-      'speech/SpeechRecognitionEvent.idl',
-      'speech/SpeechRecognitionResult.idl',
-      'speech/SpeechRecognitionResultList.idl',
-      'speech/SpeechSynthesis.idl',
-      'speech/SpeechSynthesisEvent.idl',
-      'speech/SpeechSynthesisUtterance.idl',
-      'speech/SpeechSynthesisVoice.idl',
-      'webaudio/AnalyserNode.idl',
-      'webaudio/AudioBuffer.idl',
-      'webaudio/AudioBufferCallback.idl',
-      'webaudio/AudioBufferSourceNode.idl',
-      'webaudio/AudioContext.idl',
-      'webaudio/AudioDestinationNode.idl',
-      'webaudio/AudioListener.idl',
-      'webaudio/AudioNode.idl',
-      'webaudio/AudioParam.idl',
-      'webaudio/AudioProcessingEvent.idl',
-      'webaudio/AudioSourceNode.idl',
-      'webaudio/BiquadFilterNode.idl',
-      'webaudio/ChannelMergerNode.idl',
-      'webaudio/ChannelSplitterNode.idl',
-      'webaudio/ConvolverNode.idl',
-      'webaudio/DelayNode.idl',
-      'webaudio/DynamicsCompressorNode.idl',
-      'webaudio/GainNode.idl',
-      'webaudio/MediaElementAudioSourceNode.idl',
-      'webaudio/MediaStreamAudioDestinationNode.idl',
-      'webaudio/MediaStreamAudioSourceNode.idl',
-      'webaudio/OfflineAudioCompletionEvent.idl',
-      'webaudio/OfflineAudioContext.idl',
-      'webaudio/OscillatorNode.idl',
-      'webaudio/PannerNode.idl',
-      'webaudio/PeriodicWave.idl',
-      'webaudio/ScriptProcessorNode.idl',
-      'webaudio/WaveShaperNode.idl',
-      'webdatabase/Database.idl',
-      'webdatabase/DatabaseCallback.idl',
-      'webdatabase/SQLError.idl',
-      'webdatabase/SQLResultSet.idl',
-      'webdatabase/SQLResultSetRowList.idl',
-      'webdatabase/SQLStatementCallback.idl',
-      'webdatabase/SQLStatementErrorCallback.idl',
-      'webdatabase/SQLTransaction.idl',
-      'webdatabase/SQLTransactionCallback.idl',
-      'webdatabase/SQLTransactionErrorCallback.idl',
-      'webmidi/MIDIAccess.idl',
-      'webmidi/MIDIConnectionEvent.idl',
-      'webmidi/MIDIErrorCallback.idl',
-      'webmidi/MIDIInput.idl',
-      'webmidi/MIDIInputMap.idl',
-      'webmidi/MIDIMessageEvent.idl',
-      'webmidi/MIDIOutput.idl',
-      'webmidi/MIDIOutputMap.idl',
-      'webmidi/MIDIPort.idl',
-      'webmidi/MIDISuccessCallback.idl',
-      'websockets/CloseEvent.idl',
-      'websockets/WebSocket.idl',
-]
-
-
-def full_path_modules_idl_files():
-    return full_path(['Source', 'modules'], modules_idl_files)
-
-
-# This list is copied from Source/modules/modules.gypi
-# 'modules_dependency_idl_files'.
-# 'partial interface' or target (right side of) 'implements'
-modules_dependency_idl_files = [
-      'battery/NavigatorBattery.idl',
-      'beacon/NavigatorBeacon.idl',
-      'credentialmanager/NavigatorCredentials.idl',
-      'crypto/WindowCrypto.idl',
-      'crypto/WorkerGlobalScopeCrypto.idl',
-      'device_light/WindowDeviceLight.idl',
-      'device_orientation/WindowDeviceMotion.idl',
-      'device_orientation/WindowDeviceOrientation.idl',
-      'donottrack/NavigatorDoNotTrack.idl',
-      'encryptedmedia/HTMLMediaElementEncryptedMedia.idl',
-      'filesystem/DataTransferItemFileSystem.idl',
-      'filesystem/HTMLInputElementFileSystem.idl',
-      'filesystem/InspectorFrontendHostFileSystem.idl',
-      'filesystem/WindowFileSystem.idl',
-      'filesystem/WorkerGlobalScopeFileSystem.idl',
-      'gamepad/NavigatorGamepad.idl',
-      'geofencing/NavigatorGeofencing.idl',
-      'geofencing/WorkerNavigatorGeofencing.idl',
-      'geolocation/NavigatorGeolocation.idl',
-      'indexeddb/WindowIndexedDatabase.idl',
-      'indexeddb/WorkerGlobalScopeIndexedDatabase.idl',
-      'mediasource/HTMLVideoElementMediaSource.idl',
-      'mediasource/URLMediaSource.idl',
-      'mediastream/NavigatorMediaStream.idl',
-      'mediastream/URLMediaStream.idl',
-      'mediastream/WindowMediaStream.idl',
-      'navigatorcontentutils/NavigatorContentUtils.idl',
-      'netinfo/NavigatorNetworkInformation.idl',
-      'netinfo/WorkerNavigatorNetworkInformation.idl',
-      'performance/SharedWorkerPerformance.idl',
-      'performance/WorkerGlobalScopePerformance.idl',
-      'presentation/NavigatorPresentation.idl',
-      'push_messaging/NavigatorPushManager.idl',
-      'push_messaging/ServiceWorkerGlobalScopePush.idl',
-      'quota/NavigatorStorageQuota.idl',
-      'quota/WindowQuota.idl',
-      'quota/WorkerNavigatorStorageQuota.idl',
-      'screen_orientation/ScreenScreenOrientation.idl',
-      'serviceworkers/NavigatorServiceWorker.idl',
-      'speech/WindowSpeech.idl',
-      'speech/WindowSpeechSynthesis.idl',
-      'vibration/NavigatorVibration.idl',
-      'webaudio/WindowWebAudio.idl',
-      'webdatabase/WindowWebDatabase.idl',
-      'webmidi/NavigatorWebMIDI.idl',
-]
-
-def full_path_modules_dependency_idl_files():
-    return full_path(['Source', 'modules'], modules_dependency_idl_files)
-
-
-core_dictionary_idl_files = [
-          'css/FontFaceDescriptors.idl',
-          'dom/DOMPointInit.idl',
-          'dom/MutationObserverInit.idl',
-          'frame/ScrollOptions.idl',
-          'html/canvas/HitRegionOptions.idl',
-          'page/EventSourceInit.idl',
-]
-def full_path_core_dictionary_idl_files():
-    return full_path(['Source', 'core'], core_dictionary_idl_files)
-
-
-modules_dictionary_idl_files = [
-      'encoding/TextDecodeOptions.idl',
-      'encoding/TextDecoderOptions.idl',
-      'indexeddb/IDBIndexParameters.idl',
-      'notifications/NotificationOptions.idl',
-      'serviceworkers/QueryParams.idl',
-      'serviceworkers/RegistrationOptionList.idl',
-      'serviceworkers/ServiceWorkerClientQueryParams.idl',
-      'webmidi/MIDIOptions.idl',
-]
-
-def full_path_modules_dictionary_idl_files():
-    return full_path(['Source', 'modules'], modules_dictionary_idl_files)
diff --git a/bindings/dart/scripts/test/__init__.py b/bindings/dart/scripts/test/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/bindings/dart/scripts/test/__init__.py
+++ /dev/null
diff --git a/bindings/dart/scripts/test/main.py b/bindings/dart/scripts/test/main.py
deleted file mode 100755
index 659fd86..0000000
--- a/bindings/dart/scripts/test/main.py
+++ /dev/null
@@ -1,255 +0,0 @@
-#!/usr/bin/python
-# Copyright (C) 2010 Google Inc.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-import traceback
-
-import fnmatch
-from optparse import OptionParser
-import os
-import shutil
-import sys
-import tempfile
-
-import compute_interfaces_info_individual
-from compute_interfaces_info_individual import compute_info_individual, info_individual
-import compute_interfaces_info_overall
-from compute_interfaces_info_overall import compute_interfaces_info_overall, interfaces_info
-from compiler import IdlCompilerDart
-
-# TODO(terry): Temporary solution list of IDLs to parse and IDL as dependencies.
-from idl_files import full_path_core_idl_files,\
-                      full_path_core_dependency_idl_files,\
-                      full_path_modules_idl_files,\
-                      full_path_modules_dependency_idl_files,\
-                      full_path_core_dictionary_idl_files,\
-                      full_path_modules_dictionary_idl_files
-
-#from dart_tests import run_dart_tests
-
-
-EXTENDED_ATTRIBUTES_FILE = 'bindings/IDLExtendedAttributes.txt'
-
-idl_compiler = None
-
-
-def parse_options():
-    parser = OptionParser()
-
-    parser.add_option("--output-directory",
-                      action="store",
-                      type="string",
-                      dest="output_directory",
-                      help="Generate output to a known directory")
-    parser.add_option("-v", "--verbose",
-                      action="store_true",
-                      dest="verbose",
-                      default=False,
-                      help="Show all information messages")
-    parser.add_option("-k", "--keep",
-                      action="store_true",
-                      dest="keep",
-                      default=False,
-                      help="Don't delete the temporary directory on exit")
-    parser.add_option("--compute-idls", type='int', help="Compile IDLs interfaces and dependencies (GYP)")
-    parser.add_option('--globals-only', type='int', help="Generate the globals")
-
-    options, args = parser.parse_args()
-
-    options.compute_idls = bool(options.compute_idls)
-    options.globals_only = bool(options.globals_only)
-
-    return options
-
-
-class ScopedTempFileProvider(object):
-    def __init__(self, keep=False):
-        self.keep = keep
-        self.dir_paths = []
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, exc_type, exc_value, traceback):
-        if not self.keep:
-            for dir_path in self.dir_paths:
-                # Temporary directories are used as output directories, so they
-                # contains unknown files (they aren't empty), hence use rmtree
-                shutil.rmtree(dir_path)
-
-    def new_temp_dir(self):
-        dir_path = tempfile.mkdtemp()
-        self.dir_paths.append(dir_path)
-        return dir_path
-
-
-class DirectoryProvider(object):
-    def __init__(self, path=""):
-        self.dir_path = path
-
-    def __enter__(self):
-        return self
-
-    def new_temp_dir(self):
-        return self.dir_path
-
-
-def idl_paths_recursive(directory):
-    idl_paths = []
-    for dirpath, _, files in os.walk(directory):
-        idl_paths.extend(os.path.join(dirpath, filename)
-                         for filename in fnmatch.filter(files, '*.idl'))
-    return idl_paths
-
-
-class Build():
-    def __init__(self, provider):
-        self.output_directory = provider.new_temp_dir()
-
-        attrib_file = os.path.join('Source', EXTENDED_ATTRIBUTES_FILE)
-        # Create compiler.
-        self.idl_compiler = IdlCompilerDart(self.output_directory,
-                                            attrib_file,
-                                            interfaces_info=interfaces_info,
-                                            only_if_changed=True)
-
-    def format_exception(self, e):
-        exception_list = traceback.format_stack()
-        exception_list = exception_list[:-2]
-        exception_list.extend(traceback.format_tb(sys.exc_info()[2]))
-        exception_list.extend(traceback.format_exception_only(sys.exc_info()[0], sys.exc_info()[1]))
-
-        exception_str = "Traceback (most recent call last):\n"
-        exception_str += "".join(exception_list)
-        # Removing the last \n
-        exception_str = exception_str[:-1]
-
-        return exception_str
-
-    def generate_from_idl(self, idl_file):
-        try:
-            idl_file_fullpath = os.path.realpath(idl_file)
-            self.idl_compiler.compile_file(idl_file_fullpath)
-        except Exception as err:
-            print 'ERROR: idl_compiler.py: ' + os.path.basename(idl_file)
-            print err
-            print
-            print 'Stack Dump:'
-            print self.format_exception(err)
-
-            return 1
-
-    def generate_global(self):
-        try:
-            self.idl_compiler.generate_global()
-        except Exception as err:
-            print 'ERROR: idl_compiler.py generate global'
-            print err
-            print
-            print 'Stack Dump:'
-            print self.format_exception(err)
-
-            return 1
-
-        return 0
-
-
-def main(argv):
-    '''
-    Runs Dart IDL code generator; IDL files.  IDL files same as GYP files in
-    Source/bindings/core/core.gypi and Source/bindings/modules/modules.gypi (see
-    idl_files.py on list of files).
-
-    To run the PYTHONPATH should have the directories:
-
-        Source/bindings/scripts
-        Source/bindings/scripts/dart
-    '''
-
-    options = parse_options()
-
-    if options.compute_idls:
-        # TODO(terry): Assumes CWD is third_party/WebKit so any call to
-        # full_path_NNNN is prefixing 'Source/core' to path.
-        core_idls = full_path_core_idl_files()
-        core_dependency_idls = full_path_core_dependency_idl_files()
-        modules_idls = full_path_modules_idl_files()
-        modules_dependency_idls = full_path_modules_dependency_idl_files()
-        core_dictionary_idls = full_path_core_dictionary_idl_files()
-        modules_dictionary_idls = full_path_modules_dictionary_idl_files()
-
-        all_interfaces = core_idls + modules_idls
-        all_dependencies = core_dependency_idls + modules_dependency_idls
-        all_dictionaries = core_dictionary_idls + modules_dictionary_idls
-        all_files = all_interfaces + all_dependencies + all_dictionaries
-
-        # 2-stage computation: individual, then overall
-        for idl_filename in all_files:
-            compute_info_individual(idl_filename)
-        info_individuals = [info_individual()]
-        compute_interfaces_info_overall(info_individuals)
-
-        # Compile just IDLs with interfaces (no dependencies).
-        if (options.output_directory == None):
-            with ScopedTempFileProvider(keep=options.keep) as provider:
-                build = Build(provider)
-        else:
-            provider = DirectoryProvider(path=options.output_directory)
-            build = Build(provider)
-
-        if options.verbose and options.keep:
-            print 'Output directory %s created' % build.output_directory
-
-        # Compile IDLs
-        for filename in (all_dictionaries + all_interfaces):
-            if not filename.endswith('.idl'):
-                continue
-            if build.generate_from_idl(filename):
-                return False
-
-        if options.verbose:
-            print '%s IDLs with interfaces processed' % len(all_interfaces)
-
-        if options.verbose and not options.keep:
-            print 'Output directory %s deleted' % build.output_directory
-
-    if options.globals_only:
-        if (options.output_directory == None):
-            with ScopedTempFileProvider(keep=options.keep) as provider:
-                build = Build(provider)
-        else:
-            provider = DirectoryProvider(path=options.output_directory)
-            build = Build(provider)
-
-        if options.verbose:
-            print 'Generating global...'
-
-        build.generate_global()
-
-        if options.verbose:
-            print 'Created DartWebkitClassIds .h/.cpp'
-
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/bindings/scripts/aggregate_generated_bindings.py b/bindings/scripts/aggregate_generated_bindings.py
index 050c93a..05e9ffd 100755
--- a/bindings/scripts/aggregate_generated_bindings.py
+++ b/bindings/scripts/aggregate_generated_bindings.py
@@ -53,7 +53,7 @@
 import re
 import sys
 
-from utilities import idl_filename_to_interface_name, read_idl_files_list_from_file
+from utilities import should_generate_impl_file_from_idl, get_file_contents, idl_filename_to_component, idl_filename_to_interface_name, read_idl_files_list_from_file
 
 # A regexp for finding Conditional attributes in interface definitions.
 CONDITIONAL_PATTERN = re.compile(
@@ -100,10 +100,8 @@
 """
 
 
-def extract_conditional(idl_file_path):
+def extract_conditional(idl_contents):
     """Find [Conditional] interface extended attribute."""
-    with open(idl_file_path) as idl_file:
-        idl_contents = idl_file.read()
 
     match = CONDITIONAL_PATTERN.search(idl_contents)
     if not match:
@@ -123,11 +121,15 @@
             print 'WARNING: file not found: "%s"' % file_path
             continue
 
+        idl_file_contents = get_file_contents(file_path)
+        if not should_generate_impl_file_from_idl(idl_file_contents):
+            continue
+
         # Extract interface name from file name
         interface_name = idl_filename_to_interface_name(file_path)
 
         meta_data = {
-            'conditional': extract_conditional(file_path),
+            'conditional': extract_conditional(idl_file_contents),
             'name': interface_name,
         }
         meta_data_list.append(meta_data)
@@ -135,7 +137,7 @@
     return meta_data_list
 
 
-def generate_content(component_dir, files_meta_data_this_partition, prefix):
+def generate_content(component_dir, aggregate_partial_interfaces, files_meta_data_this_partition):
     # Add fixed content.
     output = [COPYRIGHT_TEMPLATE,
               '#define NO_IMPLICIT_ATOMICSTRING\n\n']
@@ -152,8 +154,13 @@
                 output.append('\n#if ENABLE(%s)\n' % conditional)
         prev_conditional = conditional
 
-        output.append('#include "bindings/%s/%s/%s%s.cpp"\n' %
-                      (component_dir, prefix.lower(), prefix, meta_data['name']))
+        if aggregate_partial_interfaces:
+            cpp_filename = 'V8%sPartial.cpp' % meta_data['name']
+        else:
+            cpp_filename = 'V8%s.cpp' % meta_data['name']
+
+        output.append('#include "bindings/%s/v8/%s"\n' %
+                      (component_dir, cpp_filename))
 
     if prev_conditional:
         output.append('#endif\n')
@@ -173,18 +180,18 @@
 def main(args):
     if len(args) <= 4:
         raise Exception('Expected at least 5 arguments.')
-    if (args[1] == '--dart'):
-        component_dir = args[2]
-        input_file_name = args[3]
-        prefix = 'Dart'
-    else:
-        component_dir = args[1]
-        input_file_name = args[2]
-        prefix = 'V8'
+    component_dir = args[1]
+    input_file_name = args[2]
     in_out_break_index = args.index('--')
     output_file_names = args[in_out_break_index + 1:]
 
     idl_file_names = read_idl_files_list_from_file(input_file_name)
+    components = set([idl_filename_to_component(filename)
+                      for filename in idl_file_names])
+    if len(components) != 1:
+        raise Exception('Cannot aggregate generated codes in different components')
+    aggregate_partial_interfaces = component_dir not in components
+
     files_meta_data = extract_meta_data(idl_file_names)
     total_partitions = len(output_file_names)
     for partition, file_name in enumerate(output_file_names):
@@ -192,8 +199,8 @@
                 meta_data for meta_data in files_meta_data
                 if hash(meta_data['name']) % total_partitions == partition]
         file_contents = generate_content(component_dir,
-                                         files_meta_data_this_partition,
-                                         prefix)
+                                         aggregate_partial_interfaces,
+                                         files_meta_data_this_partition)
         write_content(file_contents, file_name)
 
 
diff --git a/bindings/scripts/blink_idl_lexer.py b/bindings/scripts/blink_idl_lexer.py
index ba68c6c..31a71ff 100644
--- a/bindings/scripts/blink_idl_lexer.py
+++ b/bindings/scripts/blink_idl_lexer.py
@@ -110,6 +110,10 @@
                     except OSError:
                         pass
 
+            lextab = LEXTAB
+        else:
+            lextab = None
+
         IDLLexer.__init__(self)
         # Overrides to parent class
         self._RemoveTokens(REMOVE_TOKENS)
@@ -120,7 +124,7 @@
         self._lexobj = lex.lex(object=self,
                                debug=debug,
                                optimize=optimize,
-                               lextab=LEXTAB,
+                               lextab=lextab,
                                outputdir=outputdir)
 
 
diff --git a/bindings/scripts/blink_idl_parser.py b/bindings/scripts/blink_idl_parser.py
index 592bf91..55c3e5f 100644
--- a/bindings/scripts/blink_idl_parser.py
+++ b/bindings/scripts/blink_idl_parser.py
@@ -254,7 +254,13 @@
         # ExceptionFields, and Attribute removed from this rule.
         p[0] = p[1]
 
-    # [b47.1]
+    # [b47.1] FIXME: rename to ExceptionAttribute
+    def p_Attribute(self, p):
+        """Attribute : ReadOnly ATTRIBUTE Type identifier ';'"""
+        p[0] = self.BuildNamed('Attribute', p, 4,
+                               ListFromConcat(p[1], p[3]))
+
+    # [b47.2]
     def p_ExceptionOperation(self, p):
         """ExceptionOperation : Type identifier '(' ')' ';'"""
         # Needed to handle one case in DOMException.idl:
@@ -275,6 +281,12 @@
             items = ListFromConcat(p[2], p[3])
             p[0] = self.BuildProduction('ExtAttributes', p, 1, items)
 
+    # Error handling for ExtendedAttributeList.
+    # We can't upstream this because we override ExtendedAttributeList.
+    def p_ExtendedAttributeListError(self, p):
+        """ExtendedAttributeList : '[' ExtendedAttribute ',' error"""
+        p[0] = self.BuildError(p, "ExtendedAttributeList")
+
     # [b50] Allow optional trailing comma
     # Blink-only, marked as WONTFIX in Web IDL spec:
     # https://www.w3.org/Bugs/Public/show_bug.cgi?id=22156
diff --git a/bindings/scripts/code_generator_v8.py b/bindings/scripts/code_generator_v8.py
index 065873d..4169c23 100644
--- a/bindings/scripts/code_generator_v8.py
+++ b/bindings/scripts/code_generator_v8.py
@@ -70,6 +70,7 @@
 sys.path.insert(1, third_party_dir)
 import jinja2
 
+from idl_definitions import Visitor
 import idl_types
 from idl_types import IdlType
 import v8_callback_interface
@@ -77,18 +78,25 @@
 from v8_globals import includes, interfaces
 import v8_interface
 import v8_types
+import v8_union
 from v8_utilities import capitalize, cpp_name, conditional_string, v8_class_name
-from utilities import KNOWN_COMPONENTS
+from utilities import KNOWN_COMPONENTS, idl_filename_to_component, is_valid_component_dependency, is_testing_target
 
 
-def render_template(interface_info, header_template, cpp_template,
-                    template_context):
+def render_template(include_paths, header_template, cpp_template,
+                    template_context, component=None):
     template_context['code_generator'] = module_pyname
 
     # Add includes for any dependencies
     template_context['header_includes'] = sorted(
         template_context['header_includes'])
-    includes.update(interface_info.get('dependencies_include_paths', []))
+
+    for include_path in include_paths:
+        if component:
+            dependency = idl_filename_to_component(include_path)
+            assert is_valid_component_dependency(component, dependency)
+        includes.add(include_path)
+
     template_context['cpp_includes'] = sorted(includes)
 
     header_text = header_template.render(template_context)
@@ -96,30 +104,93 @@
     return header_text, cpp_text
 
 
+def set_global_type_info(info_provider):
+    interfaces_info = info_provider.interfaces_info
+    idl_types.set_ancestors(interfaces_info['ancestors'])
+    IdlType.set_callback_interfaces(interfaces_info['callback_interfaces'])
+    IdlType.set_dictionaries(interfaces_info['dictionaries'])
+    IdlType.set_enums(info_provider.enumerations)
+    IdlType.set_implemented_as_interfaces(interfaces_info['implemented_as_interfaces'])
+    IdlType.set_garbage_collected_types(interfaces_info['garbage_collected_interfaces'])
+    IdlType.set_will_be_garbage_collected_types(interfaces_info['will_be_garbage_collected_interfaces'])
+    v8_types.set_component_dirs(interfaces_info['component_dirs'])
+
+
+def should_generate_code(definitions):
+    return definitions.interfaces or definitions.dictionaries
+
+
+def depends_on_union_types(idl_type):
+    """Returns true when a given idl_type depends on union containers
+    directly.
+    """
+    if idl_type.is_union_type:
+        return True
+    if idl_type.is_array_or_sequence_type:
+        return idl_type.element_type.is_union_type
+    return False
+
+
+class TypedefResolver(Visitor):
+    def __init__(self, info_provider):
+        self.info_provider = info_provider
+
+    def resolve(self, definitions, definition_name):
+        """Traverse definitions and resolves typedefs with the actual types."""
+        self.typedefs = {}
+        for name, typedef in self.info_provider.typedefs.iteritems():
+            self.typedefs[name] = typedef.idl_type
+        self.additional_includes = set()
+        definitions.accept(self)
+        self._update_dependencies_include_paths(definition_name)
+
+    def _update_dependencies_include_paths(self, definition_name):
+        interface_info = self.info_provider.interfaces_info[definition_name]
+        dependencies_include_paths = interface_info['dependencies_include_paths']
+        for include_path in self.additional_includes:
+            if include_path not in dependencies_include_paths:
+                dependencies_include_paths.append(include_path)
+
+    def _resolve_typedefs(self, typed_object):
+        """Resolve typedefs to actual types in the object."""
+        for attribute_name in typed_object.idl_type_attributes:
+            try:
+                idl_type = getattr(typed_object, attribute_name)
+            except AttributeError:
+                continue
+            if not idl_type:
+                continue
+            resolved_idl_type = idl_type.resolve_typedefs(self.typedefs)
+            if depends_on_union_types(resolved_idl_type):
+                self.additional_includes.add(
+                    self.info_provider.include_path_for_union_types)
+            # Need to re-assign the attribute, not just mutate idl_type, since
+            # type(idl_type) may change.
+            setattr(typed_object, attribute_name, resolved_idl_type)
+
+    def visit_typed_object(self, typed_object):
+        self._resolve_typedefs(typed_object)
+
+
 class CodeGeneratorBase(object):
     """Base class for v8 bindings generator and IDL dictionary impl generator"""
 
-    def __init__(self, interfaces_info, cache_dir, output_dir):
-        interfaces_info = interfaces_info or {}
-        self.interfaces_info = interfaces_info
+    def __init__(self, info_provider, cache_dir, output_dir):
+        self.info_provider = info_provider
         self.jinja_env = initialize_jinja_env(cache_dir)
         self.output_dir = output_dir
-
-        # Set global type info
-        idl_types.set_ancestors(interfaces_info['ancestors'])
-        IdlType.set_callback_interfaces(interfaces_info['callback_interfaces'])
-        IdlType.set_dictionaries(interfaces_info['dictionaries'])
-        IdlType.set_implemented_as_interfaces(interfaces_info['implemented_as_interfaces'])
-        IdlType.set_garbage_collected_types(interfaces_info['garbage_collected_interfaces'])
-        IdlType.set_will_be_garbage_collected_types(interfaces_info['will_be_garbage_collected_interfaces'])
-        v8_types.set_component_dirs(interfaces_info['component_dirs'])
+        self.typedef_resolver = TypedefResolver(info_provider)
+        set_global_type_info(info_provider)
 
     def generate_code(self, definitions, definition_name):
         """Returns .h/.cpp code as ((path, content)...)."""
         # Set local type info
+        if not should_generate_code(definitions):
+            return set()
+
         IdlType.set_callback_functions(definitions.callback_functions.keys())
-        IdlType.set_enums((enum.name, enum.values)
-                          for enum in definitions.enumerations.values())
+        # Resolve typedefs
+        self.typedef_resolver.resolve(definitions, definition_name)
         return self.generate_code_internal(definitions, definition_name)
 
     def generate_code_internal(self, definitions, definition_name):
@@ -128,8 +199,8 @@
 
 
 class CodeGeneratorV8(CodeGeneratorBase):
-    def __init__(self, interfaces_info, cache_dir, output_dir):
-        CodeGeneratorBase.__init__(self, interfaces_info, cache_dir, output_dir)
+    def __init__(self, info_provider, cache_dir, output_dir):
+        CodeGeneratorBase.__init__(self, info_provider, cache_dir, output_dir)
 
     def output_paths(self, definition_name):
         header_path = posixpath.join(self.output_dir,
@@ -152,11 +223,24 @@
         # Store other interfaces for introspection
         interfaces.update(definitions.interfaces)
 
+        interface_info = self.info_provider.interfaces_info[interface_name]
+        full_path = interface_info.get('full_path')
+        component = idl_filename_to_component(full_path)
+        include_paths = interface_info.get('dependencies_include_paths')
+
         # Select appropriate Jinja template and contents function
         if interface.is_callback:
             header_template_filename = 'callback_interface.h'
             cpp_template_filename = 'callback_interface.cpp'
             interface_context = v8_callback_interface.callback_interface_context
+        elif interface.is_partial:
+            interface_context = v8_interface.interface_context
+            header_template_filename = 'partial_interface.h'
+            cpp_template_filename = 'partial_interface.cpp'
+            interface_name += 'Partial'
+            assert component == 'core'
+            component = 'modules'
+            include_paths = interface_info.get('dependencies_other_component_include_paths')
         else:
             header_template_filename = 'interface.h'
             cpp_template_filename = 'interface.cpp'
@@ -164,13 +248,18 @@
         header_template = self.jinja_env.get_template(header_template_filename)
         cpp_template = self.jinja_env.get_template(cpp_template_filename)
 
-        interface_info = self.interfaces_info[interface_name]
-
         template_context = interface_context(interface)
+        if not interface.is_partial and not is_testing_target(full_path):
+            template_context['header_includes'].add(self.info_provider.include_path_for_export)
+            template_context['exported'] = self.info_provider.specifier_for_export
         # Add the include for interface itself
-        template_context['header_includes'].add(interface_info['include_path'])
+        if IdlType(interface_name).is_typed_array:
+            template_context['header_includes'].add('core/dom/DOMTypedArray.h')
+        elif interface_info['include_path']:
+            template_context['header_includes'].add(interface_info['include_path'])
         header_text, cpp_text = render_template(
-            interface_info, header_template, cpp_template, template_context)
+            include_paths, header_template, cpp_template, template_context,
+            component)
         header_path, cpp_path = self.output_paths(interface_name)
         return (
             (header_path, header_text),
@@ -179,14 +268,21 @@
 
     def generate_dictionary_code(self, definitions, dictionary_name,
                                  dictionary):
+        interfaces_info = self.info_provider.interfaces_info
         header_template = self.jinja_env.get_template('dictionary_v8.h')
         cpp_template = self.jinja_env.get_template('dictionary_v8.cpp')
-        template_context = v8_dictionary.dictionary_context(dictionary)
-        interface_info = self.interfaces_info[dictionary_name]
+        interface_info = interfaces_info[dictionary_name]
+        template_context = v8_dictionary.dictionary_context(
+            dictionary, interfaces_info)
+        include_paths = interface_info.get('dependencies_include_paths')
         # Add the include for interface itself
-        template_context['header_includes'].add(interface_info['include_path'])
+        if interface_info['include_path']:
+            template_context['header_includes'].add(interface_info['include_path'])
+        if not is_testing_target(interface_info.get('full_path')):
+            template_context['header_includes'].add(self.info_provider.include_path_for_export)
+            template_context['exported'] = self.info_provider.specifier_for_export
         header_text, cpp_text = render_template(
-            interface_info, header_template, cpp_template, template_context)
+            include_paths, header_template, cpp_template, template_context)
         header_path, cpp_path = self.output_paths(dictionary_name)
         return (
             (header_path, header_text),
@@ -195,8 +291,8 @@
 
 
 class CodeGeneratorDictionaryImpl(CodeGeneratorBase):
-    def __init__(self, interfaces_info, cache_dir, output_dir):
-        CodeGeneratorBase.__init__(self, interfaces_info, cache_dir, output_dir)
+    def __init__(self, info_provider, cache_dir, output_dir):
+        CodeGeneratorBase.__init__(self, info_provider, cache_dir, output_dir)
 
     def output_paths(self, definition_name, interface_info):
         output_dir = posixpath.join(self.output_dir,
@@ -208,16 +304,81 @@
     def generate_code_internal(self, definitions, definition_name):
         if not definition_name in definitions.dictionaries:
             raise ValueError('%s is not an IDL dictionary')
+        interfaces_info = self.info_provider.interfaces_info
         dictionary = definitions.dictionaries[definition_name]
-        interface_info = self.interfaces_info[definition_name]
+        interface_info = interfaces_info[definition_name]
         header_template = self.jinja_env.get_template('dictionary_impl.h')
         cpp_template = self.jinja_env.get_template('dictionary_impl.cpp')
         template_context = v8_dictionary.dictionary_impl_context(
-            dictionary, self.interfaces_info)
+            dictionary, interfaces_info)
+        include_paths = interface_info.get('dependencies_include_paths')
+        # Add union containers header file to header_includes rather than
+        # cpp file so that union containers can be used in dictionary headers.
+        union_container_headers = [header for header in include_paths
+                                   if header.find('UnionTypes') > 0]
+        include_paths = [header for header in include_paths
+                         if header not in union_container_headers]
+        template_context['header_includes'].update(union_container_headers)
+        if not is_testing_target(interface_info.get('full_path')):
+            template_context['exported'] = self.info_provider.specifier_for_export
+            template_context['header_includes'].add(self.info_provider.include_path_for_export)
         header_text, cpp_text = render_template(
-            interface_info, header_template, cpp_template, template_context)
+            include_paths, header_template, cpp_template, template_context)
         header_path, cpp_path = self.output_paths(
-            definition_name, interface_info)
+            cpp_name(dictionary), interface_info)
+        return (
+            (header_path, header_text),
+            (cpp_path, cpp_text),
+        )
+
+
+class CodeGeneratorUnionType(object):
+    """Generates union type container classes.
+    This generator is different from CodeGeneratorV8 and
+    CodeGeneratorDictionaryImpl. It assumes that all union types are already
+    collected. It doesn't process idl files directly.
+    """
+    def __init__(self, info_provider, cache_dir, output_dir, target_component):
+        self.info_provider = info_provider
+        self.jinja_env = initialize_jinja_env(cache_dir)
+        self.output_dir = output_dir
+        self.target_component = target_component
+        set_global_type_info(info_provider)
+
+    def generate_code(self):
+        union_types = self.info_provider.union_types
+        if not union_types:
+            return ()
+        header_template = self.jinja_env.get_template('union.h')
+        cpp_template = self.jinja_env.get_template('union.cpp')
+        template_context = v8_union.union_context(
+            union_types, self.info_provider.interfaces_info)
+        template_context['code_generator'] = module_pyname
+        capitalized_component = self.target_component.capitalize()
+        template_context['exported'] = self.info_provider.specifier_for_export
+        template_context['header_filename'] = 'bindings/%s/v8/UnionTypes%s.h' % (
+            self.target_component, capitalized_component)
+        template_context['macro_guard'] = 'UnionType%s_h' % capitalized_component
+        additional_header_includes = [self.info_provider.include_path_for_export]
+
+        # Add UnionTypesCore.h as a dependency when we generate modules union types
+        # because we only generate union type containers which are used by both
+        # core and modules in UnionTypesCore.h.
+        # FIXME: This is an ad hoc workaround and we need a general way to
+        # handle core <-> modules dependency.
+        if self.target_component == 'modules':
+            additional_header_includes.append(
+                'bindings/core/v8/UnionTypesCore.h')
+
+        template_context['header_includes'] = sorted(
+            template_context['header_includes'] + additional_header_includes)
+
+        header_text = header_template.render(template_context)
+        cpp_text = cpp_template.render(template_context)
+        header_path = posixpath.join(self.output_dir,
+                                     'UnionTypes%s.h' % capitalized_component)
+        cpp_path = posixpath.join(self.output_dir,
+                                  'UnionTypes%s.cpp' % capitalized_component)
         return (
             (header_path, header_text),
             (cpp_path, cpp_text),
@@ -237,7 +398,6 @@
         'blink_capitalize': capitalize,
         'conditional': conditional_if_endif,
         'exposed': exposed_if,
-        'per_context_enabled': per_context_enabled_if,
         'runtime_enabled': runtime_enabled_if,
         })
     return jinja_env
@@ -268,13 +428,6 @@
     return generate_indented_conditional(code, 'context && (%s)' % exposed_test)
 
 
-# [PerContextEnabled]
-def per_context_enabled_if(code, per_context_enabled_function):
-    if not per_context_enabled_function:
-        return code
-    return generate_indented_conditional(code, 'context && context->isDocument() && %s(toDocument(context))' % per_context_enabled_function)
-
-
 # [RuntimeEnabled]
 def runtime_enabled_if(code, runtime_enabled_function_name):
     if not runtime_enabled_function_name:
diff --git a/bindings/scripts/compute_interfaces_info_individual.py b/bindings/scripts/compute_interfaces_info_individual.py
index 58f6790..b052e14 100755
--- a/bindings/scripts/compute_interfaces_info_individual.py
+++ b/bindings/scripts/compute_interfaces_info_individual.py
@@ -47,24 +47,26 @@
 import posixpath
 import sys
 
-from utilities import get_file_contents, read_file_to_list, idl_filename_to_interface_name, idl_filename_to_component, write_pickle_file, get_interface_extended_attributes_from_idl, is_callback_interface_from_idl, is_dictionary_from_idl, get_partial_interface_name_from_idl, get_implements_from_idl, get_parent_interface, get_put_forward_interfaces_from_idl
+from idl_definitions import Visitor
+from idl_reader import IdlReader
+from utilities import get_file_contents, read_file_to_list, idl_filename_to_interface_name, idl_filename_to_component, write_pickle_file, get_interface_extended_attributes_from_idl, is_callback_interface_from_idl
 
 module_path = os.path.dirname(__file__)
 source_path = os.path.normpath(os.path.join(module_path, os.pardir, os.pardir))
 
-# Global variables (filled in and exported)
-interfaces_info = {}
-partial_interface_files = defaultdict(lambda: {
-    'full_paths': [],
-    'include_paths': [],
-})
+
+class IdlBadFilenameError(Exception):
+    """Raised if an IDL filename disagrees with the interface name in the file."""
+    pass
 
 
 def parse_options():
     usage = 'Usage: %prog [options] [generated1.idl]...'
     parser = optparse.OptionParser(usage=usage)
+    parser.add_option('--cache-directory', help='cache directory')
     parser.add_option('--idl-files-list', help='file listing IDL files')
-    parser.add_option('--interfaces-info-file', help='output pickle file')
+    parser.add_option('--interfaces-info-file', help='interface info pickle file')
+    parser.add_option('--component-info-file', help='component wide info pickle file')
     parser.add_option('--write-file-only-if-changed', type='int', help='if true, do not write an output file if it would be identical to the existing one, which avoids unnecessary rebuilds in ninja')
 
     options, args = parser.parse_args()
@@ -104,68 +106,165 @@
     return posixpath.join(relative_dir, cpp_class_name + '.h')
 
 
-def add_paths_to_partials_dict(partial_interface_name, full_path, this_include_path=None):
-    paths_dict = partial_interface_files[partial_interface_name]
-    paths_dict['full_paths'].append(full_path)
-    if this_include_path:
-        paths_dict['include_paths'].append(this_include_path)
+def get_implements_from_definitions(definitions, definition_name):
+    left_interfaces = []
+    right_interfaces = []
+    for implement in definitions.implements:
+        if definition_name == implement.left_interface:
+            right_interfaces.append(implement.right_interface)
+        elif definition_name == implement.right_interface:
+            left_interfaces.append(implement.left_interface)
+        else:
+            raise IdlBadFilenameError(
+                'implements statement found in unrelated IDL file.\n'
+                'Statement is:\n'
+                '    %s implements %s;\n'
+                'but filename is unrelated "%s.idl"' %
+                (implement.left_interface, implement.right_interface, definition_name))
+    return left_interfaces, right_interfaces
 
 
-def compute_info_individual(idl_filename):
-    full_path = os.path.realpath(idl_filename)
-    idl_file_contents = get_file_contents(full_path)
-
-    extended_attributes = get_interface_extended_attributes_from_idl(idl_file_contents)
-    implemented_as = extended_attributes.get('ImplementedAs')
-    relative_dir = relative_dir_posix(idl_filename)
-    this_include_path = None if 'NoImplHeader' in extended_attributes else include_path(idl_filename, implemented_as)
-
-    # Handle partial interfaces
-    partial_interface_name = get_partial_interface_name_from_idl(idl_file_contents)
-    if partial_interface_name:
-        add_paths_to_partials_dict(partial_interface_name, full_path, this_include_path)
-        return
-
-    # If not a partial interface, the basename is the interface name
-    interface_name = idl_filename_to_interface_name(idl_filename)
-
-    # 'implements' statements can be included in either the file for the
-    # implement*ing* interface (lhs of 'implements') or implement*ed* interface
-    # (rhs of 'implements'). Store both for now, then merge to implement*ing*
-    # interface later.
-    left_interfaces, right_interfaces = get_implements_from_idl(idl_file_contents, interface_name)
-
-    interfaces_info[interface_name] = {
-        'extended_attributes': extended_attributes,
-        'full_path': full_path,
-        'implemented_as': implemented_as,
-        'implemented_by_interfaces': left_interfaces,  # private, merged to next
-        'implements_interfaces': right_interfaces,
-        'include_path': this_include_path,
-        'is_callback_interface': is_callback_interface_from_idl(idl_file_contents),
-        'is_dictionary': is_dictionary_from_idl(idl_file_contents),
-        # FIXME: temporary private field, while removing old treatement of
-        # 'implements': http://crbug.com/360435
-        'is_legacy_treat_as_partial_interface': 'LegacyTreatAsPartialInterface' in extended_attributes,
-        'parent': get_parent_interface(idl_file_contents),
-        # Interfaces that are referenced (used as types) and that we introspect
-        # during code generation (beyond interface-level data ([ImplementedAs],
-        # is_callback_interface, ancestors, and inherited extended attributes):
-        # deep dependencies.
-        # These cause rebuilds of referrers, due to the dependency, so these
-        # should be minimized; currently only targets of [PutForwards].
-        'referenced_interfaces': get_put_forward_interfaces_from_idl(idl_file_contents),
-        'relative_dir': relative_dir,
-    }
+def get_put_forward_interfaces_from_definition(definition):
+    return sorted(set(attribute.idl_type.base_type
+                      for attribute in definition.attributes
+                      if 'PutForwards' in attribute.extended_attributes))
 
 
-def info_individual():
-    """Returns info packaged as a dict."""
-    return {
-        'interfaces_info': interfaces_info,
-        # Can't pickle defaultdict, convert to dict
-        'partial_interface_files': dict(partial_interface_files),
-    }
+def collect_union_types_from_definitions(definitions):
+    """Traverse definitions and collect all union types."""
+    class UnionTypeCollector(Visitor):
+        def collect(self, definitions):
+            self._union_types = set()
+            definitions.accept(self)
+            return self._union_types
+
+        def visit_typed_object(self, typed_object):
+            for attribute_name in typed_object.idl_type_attributes:
+                attribute = getattr(typed_object, attribute_name, None)
+                if not attribute:
+                    continue
+                for idl_type in attribute.idl_types():
+                    if idl_type.is_union_type:
+                        self._union_types.add(idl_type)
+
+    return UnionTypeCollector().collect(definitions)
+
+
+class InterfaceInfoCollector(object):
+    """A class that collects interface information from idl files."""
+    def __init__(self, cache_directory=None):
+        self.reader = IdlReader(interfaces_info=None, outputdir=cache_directory)
+        self.interfaces_info = {}
+        self.partial_interface_files = defaultdict(lambda: {
+            'full_paths': [],
+            'include_paths': [],
+        })
+        self.enumerations = set()
+        self.union_types = set()
+        self.typedefs = {}
+
+    def add_paths_to_partials_dict(self, partial_interface_name, full_path,
+                                   include_paths):
+        paths_dict = self.partial_interface_files[partial_interface_name]
+        paths_dict['full_paths'].append(full_path)
+        paths_dict['include_paths'].extend(include_paths)
+
+    def collect_info(self, idl_filename):
+        """Reads an idl file and collects information which is required by the
+        binding code generation."""
+        definitions = self.reader.read_idl_file(idl_filename)
+
+        this_union_types = collect_union_types_from_definitions(definitions)
+        self.union_types.update(this_union_types)
+        self.typedefs.update(definitions.typedefs)
+        # Check enum duplication.
+        for enum_name in definitions.enumerations.keys():
+            for defined_enum in self.enumerations:
+                if defined_enum.name == enum_name:
+                    raise Exception('Enumeration %s has multiple definitions' % enum_name)
+        self.enumerations.update(definitions.enumerations.values())
+
+        if definitions.interfaces:
+            definition = next(definitions.interfaces.itervalues())
+            interface_info = {
+                'is_callback_interface': definition.is_callback,
+                'is_dictionary': False,
+                # Interfaces that are referenced (used as types) and that we
+                # introspect during code generation (beyond interface-level
+                # data ([ImplementedAs], is_callback_interface, ancestors, and
+                # inherited extended attributes): deep dependencies.
+                # These cause rebuilds of referrers, due to the dependency,
+                # so these should be minimized; currently only targets of
+                # [PutForwards].
+                'referenced_interfaces': get_put_forward_interfaces_from_definition(definition),
+            }
+        elif definitions.dictionaries:
+            definition = next(definitions.dictionaries.itervalues())
+            interface_info = {
+                'is_callback_interface': False,
+                'is_dictionary': True,
+                'referenced_interfaces': None,
+            }
+        else:
+            return
+
+        extended_attributes = definition.extended_attributes
+        implemented_as = extended_attributes.get('ImplementedAs')
+        full_path = os.path.realpath(idl_filename)
+        this_include_path = None if 'NoImplHeader' in extended_attributes else include_path(idl_filename, implemented_as)
+        if definition.is_partial:
+            # We don't create interface_info for partial interfaces, but
+            # adds paths to another dict.
+            partial_include_paths = []
+            if this_include_path:
+                partial_include_paths.append(this_include_path)
+            if this_union_types:
+                component = idl_filename_to_component(idl_filename)
+                partial_include_paths.append(
+                    'bindings/%s/v8/UnionTypes%s.h' % (component, component.capitalize()))
+            self.add_paths_to_partials_dict(definition.name, full_path, partial_include_paths)
+            return
+
+        # 'implements' statements can be included in either the file for the
+        # implement*ing* interface (lhs of 'implements') or implement*ed* interface
+        # (rhs of 'implements'). Store both for now, then merge to implement*ing*
+        # interface later.
+        left_interfaces, right_interfaces = get_implements_from_definitions(
+            definitions, definition.name)
+
+        interface_info.update({
+            'extended_attributes': extended_attributes,
+            'full_path': full_path,
+            'has_union_types': bool(this_union_types),
+            'implemented_as': implemented_as,
+            'implemented_by_interfaces': left_interfaces,
+            'implements_interfaces': right_interfaces,
+            'include_path': this_include_path,
+            # FIXME: temporary private field, while removing old treatement of
+            # 'implements': http://crbug.com/360435
+            'is_legacy_treat_as_partial_interface': 'LegacyTreatAsPartialInterface' in extended_attributes,
+            'parent': definition.parent,
+            'relative_dir': relative_dir_posix(idl_filename),
+        })
+        self.interfaces_info[definition.name] = interface_info
+
+    def get_info_as_dict(self):
+        """Returns info packaged as a dict."""
+        return {
+            'interfaces_info': self.interfaces_info,
+            # Can't pickle defaultdict, convert to dict
+            # FIXME: this should be included in get_component_info.
+            'partial_interface_files': dict(self.partial_interface_files),
+        }
+
+    def get_component_info_as_dict(self):
+        """Returns component wide information as a dict."""
+        return {
+            'enumerations': dict((enum.name, enum.values)
+                                 for enum in self.enumerations),
+            'typedefs': self.typedefs,
+            'union_types': self.union_types,
+        }
 
 
 ################################################################################
@@ -184,13 +283,16 @@
     # Compute information for individual files
     # Information is stored in global variables interfaces_info and
     # partial_interface_files.
+    info_collector = InterfaceInfoCollector(options.cache_directory)
     for idl_filename in idl_files:
-        compute_info_individual(idl_filename)
+        info_collector.collect_info(idl_filename)
 
     write_pickle_file(options.interfaces_info_file,
-                      info_individual(),
+                      info_collector.get_info_as_dict(),
                       options.write_file_only_if_changed)
-
+    write_pickle_file(options.component_info_file,
+                      info_collector.get_component_info_as_dict(),
+                      options.write_file_only_if_changed)
 
 if __name__ == '__main__':
     sys.exit(main())
diff --git a/bindings/scripts/compute_interfaces_info_overall.py b/bindings/scripts/compute_interfaces_info_overall.py
index 6e31121..928a911 100755
--- a/bindings/scripts/compute_interfaces_info_overall.py
+++ b/bindings/scripts/compute_interfaces_info_overall.py
@@ -68,6 +68,11 @@
     'include_path': path for use in C++ #include directives
     'dependencies_full_paths': paths to dependencies (for merging into main)
     'dependencies_include_paths': paths for use in C++ #include directives
+    'dependencies_other_component_full_paths':
+        paths to dependencies (cannot merge because of other component)
+    'dependencies_other_component_include_paths':
+        paths for use in C++ #include directives because of dependencies in
+        other component
 
 Note that all of these are stable information, unlikely to change without
 moving or deleting files (hence requiring a full rebuild anyway) or significant
@@ -86,8 +91,9 @@
 INHERITED_EXTENDED_ATTRIBUTES = set([
     'ActiveDOMObject',
     'DependentLifetime',
+    'DoNotExposeJSAccessors',
+    'ExposeJSAccessors',
     'GarbageCollected',
-    'NotScriptWrappable',
     'WillBeGarbageCollected',
 ])
 
@@ -268,18 +274,46 @@
         for implemented_interface_info in implemented_interfaces_info:
             if (implemented_interface_info['is_legacy_treat_as_partial_interface'] and
                 implemented_interface_info['include_path']):
-                implemented_interfaces_include_paths.append(implemented_interface_info['include_path'])
+                implemented_interfaces_include_paths.append(
+                    implemented_interface_info['include_path'])
+
+        dependencies_full_paths = implemented_interfaces_full_paths
+        dependencies_include_paths = implemented_interfaces_include_paths
+        dependencies_other_component_full_paths = []
+        dependencies_other_component_include_paths = []
+
+        component = idl_filename_to_component(interface_info['full_path'])
+        for full_path in partial_interfaces_full_paths:
+            partial_interface_component = idl_filename_to_component(full_path)
+            if component == partial_interface_component:
+                dependencies_full_paths.append(full_path)
+            else:
+                dependencies_other_component_full_paths.append(full_path)
+
+        for include_path in partial_interfaces_include_paths:
+            partial_interface_component = idl_filename_to_component(include_path)
+            if component == partial_interface_component:
+                dependencies_include_paths.append(include_path)
+            else:
+                dependencies_other_component_include_paths.append(include_path)
+
+        if interface_info['has_union_types']:
+            dependencies_include_paths.append(
+                'bindings/%s/v8/UnionTypes%s.h' % (component, component.capitalize()))
 
         interface_info.update({
-            'dependencies_full_paths': (partial_interfaces_full_paths +
-                                        implemented_interfaces_full_paths),
-            'dependencies_include_paths': (partial_interfaces_include_paths +
-                                           implemented_interfaces_include_paths),
+            'dependencies_full_paths': dependencies_full_paths,
+            'dependencies_include_paths': dependencies_include_paths,
+            'dependencies_other_component_full_paths':
+                dependencies_other_component_full_paths,
+            'dependencies_other_component_include_paths':
+                dependencies_other_component_include_paths,
         })
 
     # Clean up temporary private information
     for interface_info in interfaces_info.itervalues():
         del interface_info['extended_attributes']
+        del interface_info['has_union_types']
         del interface_info['is_legacy_treat_as_partial_interface']
         del interface_info['parent']
 
diff --git a/bindings/scripts/generate_event_interfaces.py b/bindings/scripts/generate_event_interfaces.py
index b222cb4..e6ed37e 100755
--- a/bindings/scripts/generate_event_interfaces.py
+++ b/bindings/scripts/generate_event_interfaces.py
@@ -99,6 +99,9 @@
     lines = ['namespace="Event"\n']
     if suffix:
         lines.append('suffix="' + suffix + '"\n')
+        lines.append('export=%s_EXPORT\n' % suffix.upper())
+    else:
+        lines.append('export=CORE_EXPORT\n')
     lines.append('\n')
     interface_lines = [interface_line(event_idl_file)
                        for event_idl_file in event_idl_files]
diff --git a/bindings/scripts/generate_global_constructors.py b/bindings/scripts/generate_global_constructors.py
index 1be2ac3..5ad7ff6 100755
--- a/bindings/scripts/generate_global_constructors.py
+++ b/bindings/scripts/generate_global_constructors.py
@@ -24,8 +24,10 @@
 import re
 import sys
 
+from v8_utilities import EXPOSED_EXECUTION_CONTEXT_METHOD
+
 from collections import defaultdict
-from utilities import get_file_contents, idl_filename_to_interface_name, read_file_to_list, write_file, get_interface_extended_attributes_from_idl, is_callback_interface_from_idl
+from utilities import should_generate_impl_file_from_idl, get_file_contents, idl_filename_to_interface_name, read_file_to_list, write_file, get_interface_extended_attributes_from_idl, get_interface_exposed_arguments, is_callback_interface_from_idl
 
 interface_name_to_global_names = {}
 global_name_to_constructors = defaultdict(list)
@@ -77,25 +79,33 @@
     # Callback interfaces with constants also have interface properties,
     # but there are none of these in Blink.
     # http://heycam.github.io/webidl/#es-interfaces
-    if (is_callback_interface_from_idl(idl_file_contents) or
+    if ((not should_generate_impl_file_from_idl(idl_file_contents)) or
+        is_callback_interface_from_idl(idl_file_contents) or
         'NoInterfaceObject' in extended_attributes):
         return
 
-    # The [Exposed] extended attribute MUST take an identifier list. Each
-    # identifier in the list MUST be a global name. An interface or interface
-    # member the extended attribute applies to will be exposed only on objects
-    # associated with ECMAScript global environments whose global object
-    # implements an interface that has a matching global name.
-    exposed_global_names = extended_attributes.get('Exposed', 'Window').strip('()').split(',')
-    new_constructors_list = generate_global_constructors_list(interface_name, extended_attributes)
-    for exposed_global_name in exposed_global_names:
-        global_name_to_constructors[exposed_global_name].extend(new_constructors_list)
+    exposed_arguments = get_interface_exposed_arguments(idl_file_contents)
+    if exposed_arguments:
+        # Exposed(Arguments) case
+        for argument in exposed_arguments:
+            if 'RuntimeEnabled' in extended_attributes:
+                raise ValueError('RuntimeEnabled should not be used with Exposed(Arguments)')
+            attributes = extended_attributes.copy()
+            attributes['RuntimeEnabled'] = argument['runtime_enabled']
+            new_constructors_list = generate_global_constructors_list(interface_name, attributes)
+            global_name_to_constructors[argument['exposed']].extend(new_constructors_list)
+    else:
+        # Exposed=env or Exposed=(env1,...) case
+        exposed_global_names = extended_attributes.get('Exposed', 'Window').strip('()').split(',')
+        new_constructors_list = generate_global_constructors_list(interface_name, extended_attributes)
+        for name in exposed_global_names:
+            global_name_to_constructors[name].extend(new_constructors_list)
 
 
 def generate_global_constructors_list(interface_name, extended_attributes):
     extended_attributes_list = [
             name + '=' + extended_attributes[name]
-            for name in 'Conditional', 'PerContextEnabled', 'RuntimeEnabled'
+            for name in 'Conditional', 'RuntimeEnabled'
             if name in extended_attributes]
     if extended_attributes_list:
         extended_string = '[%s] ' % ', '.join(extended_attributes_list)
@@ -158,7 +168,7 @@
         record_global_constructors(idl_filename)
 
     # Check for [Exposed] / [Global] mismatch.
-    known_global_names = frozenset(itertools.chain.from_iterable(interface_name_to_global_names.values()))
+    known_global_names = EXPOSED_EXECUTION_CONTEXT_METHOD.keys()
     exposed_global_names = frozenset(global_name_to_constructors)
     if not exposed_global_names.issubset(known_global_names):
         unknown_global_names = exposed_global_names.difference(known_global_names)
diff --git a/bindings/scripts/generate_init_partial_interfaces.py b/bindings/scripts/generate_init_partial_interfaces.py
new file mode 100755
index 0000000..25a97f8
--- /dev/null
+++ b/bindings/scripts/generate_init_partial_interfaces.py
@@ -0,0 +1,84 @@
+#!/usr/bin/python
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Generate initPartialInterfacesInModules(), which registers partial interfaces in modules to core interfaces."""
+
+import cPickle as pickle
+from optparse import OptionParser
+import os
+import posixpath
+import sys
+from utilities import write_file
+
+from aggregate_generated_bindings import extract_meta_data
+from utilities import read_idl_files_list_from_file
+
+
+_COPYRIGHT = """// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+"""
+
+_INIT_PARTIAL_INTERFACE = """%s
+#include "config.h"
+
+%s
+
+namespace blink {
+
+void initPartialInterfacesInModules()
+{
+%s
+}
+
+} // namespace blink
+"""
+
+
+def parse_options():
+    usage = 'Usage: %prog [options]'
+    parser = OptionParser(usage=usage)
+    parser.add_option('--idl-files-list', help="a text file containing the IDL file paths, so the command line doesn't exceed OS length limits.")
+    parser.add_option('--write-file-only-if-changed', type='int', help='if true, do not write an output file if it would be identical to the existing one, which avoids unnecessary rebuilds in ninja')
+    parser.add_option('--output')
+
+    options, args = parser.parse_args()
+    if options.output is None:
+        parser.error('Must specify output file using --output.')
+    if options.idl_files_list is None:
+        parser.error('Must specify a list of IDL files using --idl-files-list.')
+    if options.write_file_only_if_changed is None:
+        parser.error('Must specify whether file is only written if changed using --write-file-only-if-changed.')
+    options.write_file_only_if_changed = bool(options.write_file_only_if_changed)
+    return options
+
+
+def main():
+    options = parse_options()
+
+    idl_file_names = read_idl_files_list_from_file(options.idl_files_list)
+
+    meta_data_list = extract_meta_data(idl_file_names)
+    interface_names = ['V8%sPartial' % meta_data['name']
+                       for meta_data in meta_data_list]
+    interface_names.sort()
+
+    includes = ['#include "bindings/modules/v8/%s.h"' % interface_name
+                for interface_name in interface_names]
+    initialize_calls = ['    %s::initialize();' % interface_name
+                        for interface_name in interface_names]
+
+    content = _INIT_PARTIAL_INTERFACE % (
+        _COPYRIGHT,
+        '\n'.join(includes),
+        '\n'.join(initialize_calls))
+
+    write_file(content, options.output,
+               only_if_changed=options.write_file_only_if_changed)
+
+
+if __name__ == '__main__':
+    sys.exit(main())
diff --git a/bindings/scripts/idl_compiler.py b/bindings/scripts/idl_compiler.py
index 3721e12..7734def 100755
--- a/bindings/scripts/idl_compiler.py
+++ b/bindings/scripts/idl_compiler.py
@@ -38,20 +38,26 @@
 import cPickle as pickle
 import sys
 
-from code_generator_v8 import CodeGeneratorDictionaryImpl, CodeGeneratorV8
+from code_generator_v8 import CodeGeneratorDictionaryImpl, CodeGeneratorV8, CodeGeneratorUnionType
 from idl_reader import IdlReader
-from utilities import read_idl_files_list_from_file, write_file, idl_filename_to_component
+from utilities import create_component_info_provider, read_idl_files_list_from_file, write_file, idl_filename_to_component
 
 
 def parse_options():
     parser = OptionParser()
     parser.add_option('--cache-directory',
                       help='cache directory, defaults to output directory')
-    parser.add_option('--generate-dictionary-impl',
+    parser.add_option('--generate-impl',
                       action="store_true", default=False)
     parser.add_option('--output-directory')
-    parser.add_option('--interfaces-info-file')
+    parser.add_option('--impl-output-directory')
+    parser.add_option('--info-dir')
     parser.add_option('--write-file-only-if-changed', type='int')
+    # FIXME: We should always explicitly specify --target-component and
+    # remove the default behavior.
+    parser.add_option('--target-component',
+                      help='target component to generate code, defaults to '
+                      'component of input idl file')
     # ensure output comes last, so command line easy to parse via regexes
     parser.disable_interspersed_args()
 
@@ -81,33 +87,34 @@
     """
     __metaclass__ = abc.ABCMeta
 
-    def __init__(self, output_directory, cache_directory='',
-                 code_generator=None, interfaces_info=None,
-                 interfaces_info_filename='', only_if_changed=False):
+    def __init__(self, output_directory, cache_directory=None,
+                 code_generator=None, info_provider=None,
+                 only_if_changed=False, target_component=None):
         """
         Args:
-            interfaces_info:
-                interfaces_info dict
-                (avoids auxiliary file in run-bindings-tests)
-            interfaces_info_file: filename of pickled interfaces_info
+          output_directory: directory to put output files.
+          cache_directory: directory which contains PLY caches.
+          code_generator: code generator to be used.
+          info_provider: component-specific information provider.
+          only_if_changed: True when the compiler should only write output files
+            when the contents are changed.
+          target_component: component to be processed.
         """
-        cache_directory = cache_directory or output_directory
         self.cache_directory = cache_directory
         self.code_generator = code_generator
-        if interfaces_info_filename:
-            with open(interfaces_info_filename) as interfaces_info_file:
-                interfaces_info = pickle.load(interfaces_info_file)
-        self.interfaces_info = interfaces_info
+        self.info_provider = info_provider
         self.only_if_changed = only_if_changed
         self.output_directory = output_directory
-        self.reader = IdlReader(interfaces_info, cache_directory)
+        self.target_component = target_component
+        self.reader = IdlReader(info_provider.interfaces_info, cache_directory)
 
     def compile_and_write(self, idl_filename):
         interface_name = idl_filename_to_interface_name(idl_filename)
-        component = idl_filename_to_component(idl_filename)
         definitions = self.reader.read_idl_definitions(idl_filename)
+        target_component = self.target_component or idl_filename_to_component(idl_filename)
+        target_definitions = definitions[target_component]
         output_code_list = self.code_generator.generate_code(
-            definitions[component], interface_name)
+            target_definitions, interface_name)
         for output_path, output_code in output_code_list:
             write_file(output_code, output_path, self.only_if_changed)
 
@@ -119,7 +126,7 @@
 class IdlCompilerV8(IdlCompiler):
     def __init__(self, *args, **kwargs):
         IdlCompiler.__init__(self, *args, **kwargs)
-        self.code_generator = CodeGeneratorV8(self.interfaces_info,
+        self.code_generator = CodeGeneratorV8(self.info_provider,
                                               self.cache_directory,
                                               self.output_directory)
 
@@ -131,26 +138,31 @@
     def __init__(self, *args, **kwargs):
         IdlCompiler.__init__(self, *args, **kwargs)
         self.code_generator = CodeGeneratorDictionaryImpl(
-            self.interfaces_info, self.cache_directory, self.output_directory)
+            self.info_provider, self.cache_directory, self.output_directory)
 
     def compile_file(self, idl_filename):
         self.compile_and_write(idl_filename)
 
 
 def generate_bindings(options, input_filename):
+    info_provider = create_component_info_provider(
+        options.info_dir, options.target_component)
     idl_compiler = IdlCompilerV8(
         options.output_directory,
         cache_directory=options.cache_directory,
-        interfaces_info_filename=options.interfaces_info_file,
-        only_if_changed=options.write_file_only_if_changed)
+        info_provider=info_provider,
+        only_if_changed=options.write_file_only_if_changed,
+        target_component=options.target_component)
     idl_compiler.compile_file(input_filename)
 
 
 def generate_dictionary_impl(options, input_filename):
+    info_provider = create_component_info_provider(
+        options.info_dir, options.target_component)
     idl_compiler = IdlCompilerDictionaryImpl(
-        options.output_directory,
+        options.impl_output_directory,
         cache_directory=options.cache_directory,
-        interfaces_info_filename=options.interfaces_info_file,
+        info_provider=info_provider,
         only_if_changed=options.write_file_only_if_changed)
 
     idl_filenames = read_idl_files_list_from_file(input_filename)
@@ -158,12 +170,29 @@
         idl_compiler.compile_file(idl_filename)
 
 
+def generate_union_type_containers(options):
+    info_provider = create_component_info_provider(
+        options.info_dir, options.target_component)
+    if not info_provider.interfaces_info:
+        raise Exception('Interfaces info is required to generate '
+                        'union types containers')
+    generator = CodeGeneratorUnionType(
+        info_provider,
+        options.cache_directory,
+        options.output_directory,
+        options.target_component)
+    output_code_list = generator.generate_code()
+    for output_path, output_code in output_code_list:
+        write_file(output_code, output_path, options.write_file_only_if_changed)
+
+
 def main():
     options, input_filename = parse_options()
-    if options.generate_dictionary_impl:
+    if options.generate_impl:
         # |input_filename| should be a file which contains a list of IDL
         # dictionary paths.
         generate_dictionary_impl(options, input_filename)
+        generate_union_type_containers(options)
     else:
         # |input_filename| should be a path of an IDL file.
         generate_bindings(options, input_filename)
diff --git a/bindings/scripts/idl_definitions.py b/bindings/scripts/idl_definitions.py
index ee7158a..59c0475 100644
--- a/bindings/scripts/idl_definitions.py
+++ b/bindings/scripts/idl_definitions.py
@@ -31,14 +31,10 @@
 Classes are primarily constructors, which build an IdlDefinitions object
 (and various contained objects) from an AST (produced by blink_idl_parser).
 
-This is in two steps:
-* Constructors walk the AST, creating objects.
-* Typedef resolution.
-
-Typedefs are all resolved here, and not stored in IR.
+IR stores typedefs and they are resolved by the code generator.
 
 Typedef resolution uses some auxiliary classes and OOP techniques to make this
-a generic call, via the resolve_typedefs() method.
+a generic call. See TypedefResolver class in code_generator_v8.py.
 
 Class hierarchy (mostly containment, '<' for inheritance):
 
@@ -51,11 +47,17 @@
         IdlLiteral
         IdlOperation < TypedObject
             IdlArgument < TypedObject
+        IdlSerializer
         IdlStringifier
+        IdlIterable < IdlIterableOrMaplikeOrSetlike
+        IdlMaplike < IdlIterableOrMaplikeOrSetlike
+        IdlSetlike < IdlIterableOrMaplikeOrSetlike
     IdlException < IdlInterface
         (same contents as IdlInterface)
 
-TypedObject :: mixin for typedef resolution
+TypedObject :: Object with one or more attributes that is a type.
+
+IdlArgument is 'picklable', as it is stored in interfaces_info.
 
 Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
 """
@@ -65,34 +67,20 @@
 from idl_types import IdlType, IdlUnionType, IdlArrayType, IdlSequenceType, IdlNullableType
 
 SPECIAL_KEYWORD_LIST = ['GETTER', 'SETTER', 'DELETER']
-STANDARD_TYPEDEFS = {
-    # http://www.w3.org/TR/WebIDL/#common-DOMTimeStamp
-    'DOMTimeStamp': 'unsigned long long',
-}
 
 
 ################################################################################
-# TypedObject (mixin for typedef resolution)
+# TypedObject
 ################################################################################
 
 class TypedObject(object):
     """Object with a type, such as an Attribute or Operation (return value).
 
     The type can be an actual type, or can be a typedef, which must be resolved
-    before passing data to the code generator.
+    by the TypedefResolver before passing data to the code generator.
     """
     __metaclass__ = abc.ABCMeta
-    idl_type = None
-
-    def resolve_typedefs(self, typedefs):
-        """Resolve typedefs to actual types in the object."""
-        # Constructors don't have their own return type, because it's the
-        # interface itself.
-        if not self.idl_type:
-            return
-        # Need to re-assign self.idl_type, not just mutate idl_type,
-        # since type(idl_type) may change.
-        self.idl_type = self.idl_type.resolve_typedefs(typedefs)
+    idl_type_attributes = ('idl_type',)
 
 
 ################################################################################
@@ -105,17 +93,15 @@
         self.callback_functions = {}
         self.dictionaries = {}
         self.enumerations = {}
+        self.implements = []
         self.interfaces = {}
         self.idl_name = idl_name
+        self.typedefs = {}
 
         node_class = node.GetClass()
         if node_class != 'File':
             raise ValueError('Unrecognized node class: %s' % node_class)
 
-        typedefs = dict((typedef_name, IdlType(type_name))
-                        for typedef_name, type_name in
-                        STANDARD_TYPEDEFS.iteritems())
-
         children = node.GetChildren()
         for child in children:
             child_class = child.GetClass()
@@ -127,8 +113,8 @@
                 # For simplicity, treat exceptions as interfaces
                 self.interfaces[exception.name] = exception
             elif child_class == 'Typedef':
-                type_name = child.GetName()
-                typedefs[type_name] = typedef_node_to_type(child)
+                typedef = IdlTypedef(child)
+                self.typedefs[typedef.name] = typedef
             elif child_class == 'Enum':
                 enumeration = IdlEnum(idl_name, child)
                 self.enumerations[enumeration.name] = enumeration
@@ -136,24 +122,23 @@
                 callback_function = IdlCallbackFunction(idl_name, child)
                 self.callback_functions[callback_function.name] = callback_function
             elif child_class == 'Implements':
-                # Implements is handled at the interface merging step
-                pass
+                self.implements.append(IdlImplement(child))
             elif child_class == 'Dictionary':
                 dictionary = IdlDictionary(idl_name, child)
                 self.dictionaries[dictionary.name] = dictionary
             else:
                 raise ValueError('Unrecognized node class: %s' % child_class)
 
-        # Typedefs are not stored in IR:
-        # Resolve typedefs with the actual types and then discard the Typedefs.
-        # http://www.w3.org/TR/WebIDL/#idl-typedefs
-        self.resolve_typedefs(typedefs)
-
-    def resolve_typedefs(self, typedefs):
-        for callback_function in self.callback_functions.itervalues():
-            callback_function.resolve_typedefs(typedefs)
+    def accept(self, visitor):
+        visitor.visit_definitions(self)
         for interface in self.interfaces.itervalues():
-            interface.resolve_typedefs(typedefs)
+            interface.accept(visitor)
+        for callback_function in self.callback_functions.itervalues():
+            callback_function.accept(visitor)
+        for dictionary in self.dictionaries.itervalues():
+            dictionary.accept(visitor)
+        for typedef in self.typedefs.itervalues():
+            typedef.accept(visitor)
 
     def update(self, other):
         """Update with additional IdlDefinitions."""
@@ -196,10 +181,10 @@
         self.idl_type = type_node_to_type(type_node)
         self.arguments = arguments_node_to_arguments(idl_name, arguments_node)
 
-    def resolve_typedefs(self, typedefs):
-        TypedObject.resolve_typedefs(self, typedefs)
+    def accept(self, visitor):
+        visitor.visit_callback_function(self)
         for argument in self.arguments:
-            argument.resolve_typedefs(typedefs)
+            argument.accept(visitor)
 
 
 ################################################################################
@@ -209,7 +194,7 @@
 class IdlDictionary(object):
     def __init__(self, idl_name, node):
         self.extended_attributes = {}
-        self.is_partial = node.GetProperty('Partial') or False
+        self.is_partial = bool(node.GetProperty('Partial'))
         self.idl_name = idl_name
         self.name = node.GetName()
         self.members = []
@@ -226,13 +211,19 @@
             else:
                 raise ValueError('Unrecognized node class: %s' % child_class)
 
+    def accept(self, visitor):
+        visitor.visit_dictionary(self)
+        for member in self.members:
+            member.accept(visitor)
 
-class IdlDictionaryMember(object):
+
+class IdlDictionaryMember(TypedObject):
     def __init__(self, idl_name, node):
         self.default_value = None
         self.extended_attributes = {}
         self.idl_type = None
         self.idl_name = idl_name
+        self.is_required = bool(node.GetProperty('REQUIRED'))
         self.name = node.GetName()
         for child in node.GetChildren():
             child_class = child.GetClass()
@@ -246,6 +237,9 @@
             else:
                 raise ValueError('Unrecognized node class: %s' % child_class)
 
+    def accept(self, visitor):
+        visitor.visit_dictionary_member(self)
+
 
 ################################################################################
 # Enumerations
@@ -262,6 +256,21 @@
 
 
 ################################################################################
+# Typedefs
+################################################################################
+
+class IdlTypedef(object):
+    idl_type_attributes = ('idl_type',)
+
+    def __init__(self, node):
+        self.name = node.GetName()
+        self.idl_type = typedef_node_to_type(node)
+
+    def accept(self, visitor):
+        visitor.visit_typedef(self)
+
+
+################################################################################
 # Interfaces and Exceptions
 ################################################################################
 
@@ -274,16 +283,23 @@
         self.extended_attributes = {}
         self.operations = []
         self.parent = None
+        self.serializer = None
         self.stringifier = None
+        self.iterable = None
+        self.maplike = None
+        self.setlike = None
+        self.original_interface = None
+        self.partial_interfaces = []
         if not node:  # Early exit for IdlException.__init__
             return
 
-        self.is_callback = node.GetProperty('CALLBACK') or False
+        self.is_callback = bool(node.GetProperty('CALLBACK'))
         self.is_exception = False
         # FIXME: uppercase 'Partial' => 'PARTIAL' in base IDL parser
-        self.is_partial = node.GetProperty('Partial') or False
+        self.is_partial = bool(node.GetProperty('Partial'))
         self.idl_name = idl_name
         self.name = node.GetName()
+        self.idl_type = IdlType(self.name)
 
         children = node.GetChildren()
         for child in children:
@@ -302,23 +318,48 @@
                 self.operations.append(IdlOperation(idl_name, child))
             elif child_class == 'Inherit':
                 self.parent = child.GetName()
+            elif child_class == 'Serializer':
+                self.serializer = IdlSerializer(idl_name, child)
+                self.process_serializer()
             elif child_class == 'Stringifier':
                 self.stringifier = IdlStringifier(idl_name, child)
                 self.process_stringifier()
+            elif child_class == 'Iterable':
+                self.iterable = IdlIterable(idl_name, child)
+            elif child_class == 'Maplike':
+                self.maplike = IdlMaplike(idl_name, child)
+            elif child_class == 'Setlike':
+                self.setlike = IdlSetlike(idl_name, child)
             else:
                 raise ValueError('Unrecognized node class: %s' % child_class)
 
-    def resolve_typedefs(self, typedefs):
+        if len(filter(None, [self.iterable, self.maplike, self.setlike])) > 1:
+            raise ValueError('Interface can only have one of iterable<>, maplike<> and setlike<>.')
+
+    def accept(self, visitor):
+        visitor.visit_interface(self)
         for attribute in self.attributes:
-            attribute.resolve_typedefs(typedefs)
+            attribute.accept(visitor)
         for constant in self.constants:
-            constant.resolve_typedefs(typedefs)
+            constant.accept(visitor)
         for constructor in self.constructors:
-            constructor.resolve_typedefs(typedefs)
+            constructor.accept(visitor)
         for custom_constructor in self.custom_constructors:
-            custom_constructor.resolve_typedefs(typedefs)
+            custom_constructor.accept(visitor)
         for operation in self.operations:
-            operation.resolve_typedefs(typedefs)
+            operation.accept(visitor)
+        if self.iterable:
+            self.iterable.accept(visitor)
+        elif self.maplike:
+            self.maplike.accept(visitor)
+        elif self.setlike:
+            self.setlike.accept(visitor)
+
+    def process_serializer(self):
+        """Add the serializer's named operation child, if it has one, as a regular
+        operation of this interface."""
+        if self.serializer.operation:
+            self.operations.append(self.serializer.operation)
 
     def process_stringifier(self):
         """Add the stringifier's attribute or named operation child, if it has
@@ -350,6 +391,7 @@
         self.is_partial = False
         self.idl_name = idl_name
         self.name = node.GetName()
+        self.idl_type = IdlType(self.name)
 
         children = node.GetChildren()
         for child in children:
@@ -373,8 +415,8 @@
 
 class IdlAttribute(TypedObject):
     def __init__(self, idl_name, node):
-        self.is_read_only = node.GetProperty('READONLY') or False
-        self.is_static = node.GetProperty('STATIC') or False
+        self.is_read_only = bool(node.GetProperty('READONLY'))
+        self.is_static = bool(node.GetProperty('STATIC'))
         self.idl_name = idl_name
         self.name = node.GetName()
         # Defaults, overridden below
@@ -391,6 +433,9 @@
             else:
                 raise ValueError('Unrecognized node class: %s' % child_class)
 
+    def accept(self, visitor):
+        visitor.visit_attribute(self)
+
 
 ################################################################################
 # Constants
@@ -427,6 +472,9 @@
         else:
             self.extended_attributes = {}
 
+    def accept(self, visitor):
+        visitor.visit_constant(self)
+
 
 ################################################################################
 # Literals
@@ -474,7 +522,7 @@
         return IdlLiteral(idl_type, int(node.GetProperty('NAME'), base=0))
     if idl_type == 'float':
         return IdlLiteral(idl_type, float(node.GetProperty('VALUE')))
-    if idl_type == 'boolean':
+    if idl_type in ['boolean', 'sequence']:
         return IdlLiteral(idl_type, node.GetProperty('VALUE'))
     if idl_type == 'NULL':
         return IdlLiteralNull()
@@ -491,23 +539,24 @@
         self.extended_attributes = {}
         self.specials = []
         self.is_constructor = False
+        self.idl_name = idl_name
+        self.idl_type = None
+        self.is_static = False
 
         if not node:
-            self.is_static = False
             return
-        self.idl_name = idl_name
+
         self.name = node.GetName()  # FIXME: should just be: or ''
         # FIXME: AST should use None internally
         if self.name == '_unnamed_':
             self.name = ''
 
-        self.is_static = node.GetProperty('STATIC') or False
+        self.is_static = bool(node.GetProperty('STATIC'))
         property_dictionary = node.GetProperties()
         for special_keyword in SPECIAL_KEYWORD_LIST:
             if special_keyword in property_dictionary:
                 self.specials.append(special_keyword.lower())
 
-        self.idl_type = None
         children = node.GetChildren()
         for child in children:
             child_class = child.GetClass()
@@ -549,10 +598,10 @@
         constructor.is_constructor = True
         return constructor
 
-    def resolve_typedefs(self, typedefs):
-        TypedObject.resolve_typedefs(self, typedefs)
+    def accept(self, visitor):
+        visitor.visit_operation(self)
         for argument in self.arguments:
-            argument.resolve_typedefs(typedefs)
+            argument.accept(visitor)
 
 
 ################################################################################
@@ -560,15 +609,20 @@
 ################################################################################
 
 class IdlArgument(TypedObject):
-    def __init__(self, idl_name, node):
+    def __init__(self, idl_name, node=None):
         self.extended_attributes = {}
         self.idl_type = None
-        self.is_optional = node.GetProperty('OPTIONAL')  # syntax: (optional T)
+        self.is_optional = False  # syntax: (optional T)
         self.is_variadic = False  # syntax: (T...)
         self.idl_name = idl_name
-        self.name = node.GetName()
         self.default_value = None
 
+        if not node:
+            return
+
+        self.is_optional = node.GetProperty('OPTIONAL')
+        self.name = node.GetName()
+
         children = node.GetChildren()
         for child in children:
             child_class = child.GetClass()
@@ -580,12 +634,23 @@
                 child_name = child.GetName()
                 if child_name != '...':
                     raise ValueError('Unrecognized Argument node; expected "...", got "%s"' % child_name)
-                self.is_variadic = child.GetProperty('ELLIPSIS') or False
+                self.is_variadic = bool(child.GetProperty('ELLIPSIS'))
             elif child_class == 'Default':
                 self.default_value = default_node_to_idl_literal(child)
             else:
                 raise ValueError('Unrecognized node class: %s' % child_class)
 
+    def __getstate__(self):
+        # FIXME: Return a picklable object which has enough information to
+        # unpickle.
+        return {}
+
+    def __setstate__(self, state):
+        pass
+
+    def accept(self, visitor):
+        visitor.visit_argument(self)
+
 
 def arguments_node_to_arguments(idl_name, node):
     # [Constructor] and [CustomConstructor] without arguments (the bare form)
@@ -599,6 +664,43 @@
 
 
 ################################################################################
+# Serializers
+################################################################################
+
+class IdlSerializer(object):
+    def __init__(self, idl_name, node):
+        self.attribute_name = node.GetProperty('ATTRIBUTE')
+        self.attribute_names = None
+        self.operation = None
+        self.extended_attributes = {}
+        self.is_attribute = False
+        self.is_getter = False
+        self.is_inherit = False
+        self.is_list = False
+        self.is_map = False
+        self.idl_name = idl_name
+
+        for child in node.GetChildren():
+            child_class = child.GetClass()
+            if child_class == 'Operation':
+                self.operation = IdlOperation(idl_name, child)
+            elif child_class == 'List':
+                self.is_list = True
+                self.is_getter = bool(child.GetProperty('GETTER'))
+                self.attributes = child.GetProperty('ATTRIBUTES')
+            elif child_class == 'Map':
+                self.is_map = True
+                self.is_attribute = bool(child.GetProperty('ATTRIBUTE'))
+                self.is_getter = bool(child.GetProperty('GETTER'))
+                self.is_inherit = bool(child.GetProperty('INHERIT'))
+                self.attributes = child.GetProperty('ATTRIBUTES')
+            elif child_class == 'ExtAttributes':
+                self.extended_attributes = ext_attributes_node_to_extended_attributes(idl_name, child)
+            else:
+                raise ValueError('Unrecognized node class: %s' % child_class)
+
+
+################################################################################
 # Stringifiers
 ################################################################################
 
@@ -630,9 +732,106 @@
 
 
 ################################################################################
+# Iterable, Maplike, Setlike
+################################################################################
+
+class IdlIterableOrMaplikeOrSetlike(TypedObject):
+    def __init__(self, idl_name, node):
+        self.extended_attributes = {}
+        self.type_children = []
+
+        for child in node.GetChildren():
+            child_class = child.GetClass()
+            if child_class == 'ExtAttributes':
+                self.extended_attributes = ext_attributes_node_to_extended_attributes(idl_name, child)
+            elif child_class == 'Type':
+                self.type_children.append(child)
+            else:
+                raise ValueError('Unrecognized node class: %s' % child_class)
+
+
+class IdlIterable(IdlIterableOrMaplikeOrSetlike):
+    idl_type_attributes = ('key_type', 'value_type')
+
+    def __init__(self, idl_name, node):
+        super(IdlIterable, self).__init__(idl_name, node)
+
+        if len(self.type_children) == 1:
+            self.key_type = None
+            self.value_type = type_node_to_type(self.type_children[0])
+        elif len(self.type_children) == 2:
+            self.key_type = type_node_to_type(self.type_children[0])
+            self.value_type = type_node_to_type(self.type_children[1])
+        else:
+            raise ValueError('Unexpected number of type children: %d' % len(self.type_children))
+        del self.type_children
+
+    def accept(self, visitor):
+        visitor.visit_iterable(self)
+
+
+class IdlMaplike(IdlIterableOrMaplikeOrSetlike):
+    idl_type_attributes = ('key_type', 'value_type')
+
+    def __init__(self, idl_name, node):
+        super(IdlMaplike, self).__init__(idl_name, node)
+
+        self.is_read_only = bool(node.GetProperty('READONLY'))
+
+        if len(self.type_children) == 2:
+            self.key_type = type_node_to_type(self.type_children[0])
+            self.value_type = type_node_to_type(self.type_children[1])
+        else:
+            raise ValueError('Unexpected number of children: %d' % len(self.type_children))
+        del self.type_children
+
+    def accept(self, visitor):
+        visitor.visit_maplike(self)
+
+
+class IdlSetlike(IdlIterableOrMaplikeOrSetlike):
+    idl_type_attributes = ('value_type',)
+
+    def __init__(self, idl_name, node):
+        super(IdlSetlike, self).__init__(idl_name, node)
+
+        self.is_read_only = bool(node.GetProperty('READONLY'))
+
+        if len(self.type_children) == 1:
+            self.value_type = type_node_to_type(self.type_children[0])
+        else:
+            raise ValueError('Unexpected number of children: %d' % len(self.type_children))
+        del self.type_children
+
+    def accept(self, visitor):
+        visitor.visit_setlike(self)
+
+
+################################################################################
+# Implement statements
+################################################################################
+
+class IdlImplement(object):
+    def __init__(self, node):
+        self.left_interface = node.GetName()
+        self.right_interface = node.GetProperty('REFERENCE')
+
+
+################################################################################
 # Extended attributes
 ################################################################################
 
+class Exposure:
+    """An Exposure holds one Exposed or RuntimeEnabled condition.
+    Each exposure has two properties: exposed and runtime_enabled.
+    Exposure(e, r) corresponds to [Exposed(e r)]. Exposure(e) corresponds to
+    [Exposed=e].
+    """
+    def __init__(self, exposed, runtime_enabled=None):
+        self.exposed = exposed
+        self.runtime_enabled = runtime_enabled
+
+
 def ext_attributes_node_to_extended_attributes(idl_name, node):
     """
     Returns:
@@ -686,9 +885,27 @@
         elif name == 'SetWrapperReferenceTo':
             if not child:
                 raise ValueError('[SetWrapperReferenceTo] requires a child, but has none.')
+            children = child.GetChildren()
+            if len(children) != 1:
+                raise ValueError('[SetWrapperReferenceTo] supports only one child.')
             if child_class != 'Arguments':
                 raise ValueError('[SetWrapperReferenceTo] only supports Arguments as child, but has child of class: %s' % child_class)
-            extended_attributes[name] = arguments_node_to_arguments(idl_name, child)
+            extended_attributes[name] = IdlArgument(idl_name, children[0])
+        elif name == 'Exposed':
+            if child_class and child_class != 'Arguments':
+                raise ValueError('[Exposed] only supports Arguments as child, but has child of class: %s' % child_class)
+            exposures = []
+            if child_class == 'Arguments':
+                exposures = [Exposure(exposed=str(arg.idl_type),
+                                      runtime_enabled=arg.name)
+                             for arg in arguments_node_to_arguments('*', child)]
+            else:
+                value = extended_attribute_node.GetProperty('VALUE')
+                if type(value) is str:
+                    exposures = [Exposure(exposed=value)]
+                else:
+                    exposures = [Exposure(exposed=v) for v in value]
+            extended_attributes[name] = exposures
         elif child:
             raise ValueError('ExtAttributes node with unexpected children: %s' % name)
         else:
@@ -781,7 +998,7 @@
     # interface type. We do not distinguish these, and just use the type name.
     if node_class in ['PrimitiveType', 'Typeref']:
         # unrestricted syntax: unrestricted double | unrestricted float
-        is_unrestricted = node.GetProperty('UNRESTRICTED') or False
+        is_unrestricted = bool(node.GetProperty('UNRESTRICTED'))
         return IdlType(node.GetName(), is_unrestricted=is_unrestricted)
     elif node_class == 'Any':
         return IdlType('any')
@@ -789,6 +1006,8 @@
         return sequence_node_to_type(node)
     elif node_class == 'UnionType':
         return union_type_node_to_idl_union_type(node)
+    elif node_class == 'Promise':
+        return IdlType('Promise')
     raise ValueError('Unrecognized node class: %s' % node_class)
 
 
@@ -822,3 +1041,53 @@
     member_types = [type_node_to_type(member_type_node)
                     for member_type_node in node.GetChildren()]
     return IdlUnionType(member_types)
+
+
+################################################################################
+# Visitor
+################################################################################
+
+class Visitor(object):
+    """Abstract visitor class for IDL definitions traverse."""
+
+    def visit_definitions(self, definitions):
+        pass
+
+    def visit_typed_object(self, typed_object):
+        pass
+
+    def visit_callback_function(self, callback_function):
+        self.visit_typed_object(callback_function)
+
+    def visit_dictionary(self, dictionary):
+        pass
+
+    def visit_dictionary_member(self, member):
+        self.visit_typed_object(member)
+
+    def visit_interface(self, interface):
+        pass
+
+    def visit_typedef(self, typedef):
+        self.visit_typed_object(typedef)
+
+    def visit_attribute(self, attribute):
+        self.visit_typed_object(attribute)
+
+    def visit_constant(self, constant):
+        self.visit_typed_object(constant)
+
+    def visit_operation(self, operation):
+        self.visit_typed_object(operation)
+
+    def visit_argument(self, argument):
+        self.visit_typed_object(argument)
+
+    def visit_iterable(self, iterable):
+        self.visit_typed_object(iterable)
+
+    def visit_maplike(self, maplike):
+        self.visit_typed_object(maplike)
+
+    def visit_setlike(self, setlike):
+        self.visit_typed_object(setlike)
diff --git a/bindings/scripts/idl_reader.py b/bindings/scripts/idl_reader.py
index 7c7f5e5..f0952f0 100644
--- a/bindings/scripts/idl_reader.py
+++ b/bindings/scripts/idl_reader.py
@@ -42,6 +42,38 @@
 from utilities import idl_filename_to_component
 
 
+def validate_blink_idl_definitions(idl_filename, idl_file_basename,
+                                   definitions):
+    """Validate file contents with filename convention.
+
+       The Blink IDL conventions are:
+       - If an IDL file defines an interface, a dictionary, or an exception,
+         the IDL file must contain exactly one definition. The definition
+         name must agree with the file's basename, unless it is a partial
+         definition. (e.g., 'partial interface Foo' can be in FooBar.idl).
+       - An IDL file can contain typedefs and enums without having other
+         definitions. There is no filename convention in this case.
+       - Otherwise, an IDL file is invalid.
+    """
+    targets = (definitions.interfaces.values() +
+               definitions.dictionaries.values())
+    number_of_targets = len(targets)
+    if number_of_targets > 1:
+        raise Exception(
+            'Expected exactly 1 definition in file {0}, but found {1}'
+            .format(idl_filename, number_of_targets))
+    if number_of_targets == 0:
+        if not (definitions.enumerations or definitions.typedefs):
+            raise Exception(
+                'No definition found in %s' % idl_filename)
+        return
+    target = targets[0]
+    if not target.is_partial and target.name != idl_file_basename:
+        raise Exception(
+            'Definition name "{0}" disagrees with IDL file basename "{1}".'
+            .format(target.name, idl_file_basename))
+
+
 class IdlReader(object):
     def __init__(self, interfaces_info=None, outputdir='', multi_interface=False):
         self.multi_interface = multi_interface
@@ -83,24 +115,7 @@
         definitions = IdlDefinitions(idl_file_basename, ast)
 
         if not self.multi_interface:
-            # Validate file contents with filename convention
-            # The Blink IDL filenaming convention is that the file
-            # <definition_name>.idl MUST contain exactly 1 definition
-            # (interface, dictionary or exception), and the definition name must
-            # agree with the file's basename, unless it is a partial definition.
-            # (e.g., 'partial interface Foo' can be in FooBar.idl).
-            targets = (definitions.interfaces.values() +
-                       definitions.dictionaries.values())
-            number_of_targets = len(targets)
-            if number_of_targets != 1:
-                raise Exception(
-                    'Expected exactly 1 definition in file {0}, but found {1}'
-                    .format(idl_filename, number_of_targets))
-            target = targets[0]
-            if not target.is_partial and target.name != idl_file_basename:
-                raise Exception(
-                    'Definition name "{0}" disagrees with IDL file basename "{1}".'
-                    .format(target.name, idl_file_basename))
+            validate_blink_idl_definitions(idl_filename, idl_file_basename, definitions)
         else:
             if len(definitions.interfaces) > 1:
                 print '----- Supplemental interfaces %s' % len(definitions.interfaces)
diff --git a/bindings/scripts/idl_types.py b/bindings/scripts/idl_types.py
index 7be4b7d..5d776a7 100644
--- a/bindings/scripts/idl_types.py
+++ b/bindings/scripts/idl_types.py
@@ -11,6 +11,8 @@
   IdlArrayType
   IdlSequenceType
  IdlNullableType
+
+IdlTypes are picklable because we store them in interfaces_info.
 """
 
 from collections import defaultdict
@@ -46,11 +48,10 @@
     # http://heycam.github.io/webidl/#idl-types
     'DOMString',
     'ByteString',
+    'USVString',
     'Date',
-    # http://heycam.github.io/webidl/#es-type-mapping
+    # http://heycam.github.io/webidl/#idl-types
     'void',
-    # http://encoding.spec.whatwg.org/#type-scalarvaluestring
-    'ScalarValueString',
 ]))
 TYPE_NAMES = {
     # http://heycam.github.io/webidl/#dfn-type-name
@@ -70,7 +71,7 @@
     'unrestricted double': 'UnrestrictedDouble',
     'DOMString': 'String',
     'ByteString': 'ByteString',
-    'ScalarValueString': 'ScalarValueString',
+    'USVString': 'USVString',
     'object': 'Object',
     'Date': 'Date',
 }
@@ -80,7 +81,14 @@
     # (Interface object [[Call]] method's string types.)
     'String',
     'ByteString',
-    'ScalarValueString',
+    'USVString',
+])
+
+STANDARD_CALLBACK_FUNCTIONS = frozenset([
+    # http://heycam.github.io/webidl/#common-Function
+    'Function',
+    # http://heycam.github.io/webidl/#common-VoidFunction
+    'VoidFunction',
 ])
 
 
@@ -116,6 +124,11 @@
         raise NotImplementedError(
             'resolve_typedefs should be defined in subclasses')
 
+    def idl_types(self):
+        """A generator which yields IdlTypes which are referenced from |self|,
+        including itself."""
+        yield self
+
 
 ################################################################################
 # IdlType
@@ -125,7 +138,7 @@
     # FIXME: incorporate Nullable, etc.
     # to support types like short?[] vs. short[]?, instead of treating these
     # as orthogonal properties (via flags).
-    callback_functions = set()
+    callback_functions = set(STANDARD_CALLBACK_FUNCTIONS)
     callback_interfaces = set()
     dictionaries = set()
     enums = {}  # name -> values
@@ -140,6 +153,14 @@
     def __str__(self):
         return self.base_type
 
+    def __getstate__(self):
+        return {
+            'base_type': self.base_type,
+        }
+
+    def __setstate__(self, state):
+        self.base_type = state['base_type']
+
     @property
     def is_basic_type(self):
         return self.base_type in BASIC_TYPES
@@ -164,7 +185,11 @@
 
     @property
     def enum_values(self):
-        return IdlType.enums[self.name]
+        return IdlType.enums.get(self.name)
+
+    @property
+    def enum_type(self):
+        return self.name if self.is_enum else None
 
     @property
     def is_integer_type(self):
@@ -197,10 +222,6 @@
         return self.name in STRING_TYPES
 
     @property
-    def is_union_type(self):
-        return isinstance(self, IdlUnionType)
-
-    @property
     def name(self):
         """Return type name
 
@@ -237,14 +258,60 @@
 
 class IdlUnionType(IdlTypeBase):
     # http://heycam.github.io/webidl/#idl-union
+    # IdlUnionType has __hash__() and __eq__() methods because they are stored
+    # in sets.
     def __init__(self, member_types):
         super(IdlUnionType, self).__init__()
         self.member_types = member_types
 
+    def __str__(self):
+        return '(' + ' or '.join(str(member_type) for member_type in self.member_types) + ')'
+
+    def __hash__(self):
+        return hash(self.name)
+
+    def __eq__(self, rhs):
+        return self.name == rhs.name
+
+    def __getstate__(self):
+        return {
+            'member_types': self.member_types,
+        }
+
+    def __setstate__(self, state):
+        self.member_types = state['member_types']
+
     @property
     def is_union_type(self):
         return True
 
+    def single_matching_member_type(self, predicate):
+        matching_types = filter(predicate, self.member_types)
+        if len(matching_types) > 1:
+            raise "%s is ambigious." % self.name
+        return matching_types[0] if matching_types else None
+
+    @property
+    def string_member_type(self):
+        return self.single_matching_member_type(
+            lambda member_type: (member_type.is_string_type or
+                                 member_type.is_enum))
+
+    @property
+    def numeric_member_type(self):
+        return self.single_matching_member_type(
+            lambda member_type: member_type.is_numeric_type)
+
+    @property
+    def boolean_member_type(self):
+        return self.single_matching_member_type(
+            lambda member_type: member_type.base_type == 'boolean')
+
+    @property
+    def as_union_type(self):
+        # Note: Use this to "look through" a possible IdlNullableType wrapper.
+        return self
+
     @property
     def name(self):
         """Return type name (or inner type name if nullable)
@@ -259,6 +326,12 @@
             for member_type in self.member_types]
         return self
 
+    def idl_types(self):
+        yield self
+        for member_type in self.member_types:
+            for idl_type in member_type.idl_types():
+                yield idl_type
+
 
 ################################################################################
 # IdlArrayOrSequenceType, IdlArrayType, IdlSequenceType
@@ -271,10 +344,35 @@
         super(IdlArrayOrSequenceType, self).__init__()
         self.element_type = element_type
 
+    def __getstate__(self):
+        return {
+            'element_type': self.element_type,
+        }
+
+    def __setstate__(self, state):
+        self.element_type = state['element_type']
+
     def resolve_typedefs(self, typedefs):
         self.element_type = self.element_type.resolve_typedefs(typedefs)
         return self
 
+    @property
+    def is_array_or_sequence_type(self):
+        return True
+
+    @property
+    def enum_values(self):
+        return self.element_type.enum_values
+
+    @property
+    def enum_type(self):
+        return self.element_type.enum_type
+
+    def idl_types(self):
+        yield self
+        for idl_type in self.element_type.idl_types():
+            yield idl_type
+
 
 class IdlArrayType(IdlArrayOrSequenceType):
     def __init__(self, element_type):
@@ -320,17 +418,27 @@
     def __getattr__(self, name):
         return getattr(self.inner_type, name)
 
+    def __getstate__(self):
+        return {
+            'inner_type': self.inner_type,
+        }
+
+    def __setstate__(self, state):
+        self.inner_type = state['inner_type']
+
     @property
     def is_nullable(self):
         return True
 
     @property
     def name(self):
-        # DartFix: Don't handle OrNull all classes generated are same regardless
-        #          of nullable type.
-        # return self.inner_type.name + 'OrNull'
-        return self.inner_type.name
+        return self.inner_type.name + 'OrNull'
 
     def resolve_typedefs(self, typedefs):
         self.inner_type = self.inner_type.resolve_typedefs(typedefs)
         return self
+
+    def idl_types(self):
+        yield self
+        for idl_type in self.inner_type.idl_types():
+            yield idl_type
diff --git a/bindings/scripts/interface_dependency_resolver.py b/bindings/scripts/interface_dependency_resolver.py
index 7bf3b05..79b28ea 100644
--- a/bindings/scripts/interface_dependency_resolver.py
+++ b/bindings/scripts/interface_dependency_resolver.py
@@ -37,16 +37,17 @@
 """
 
 import os.path
+from utilities import idl_filename_to_component, is_valid_component_dependency
 
 # The following extended attributes can be applied to a dependency interface,
 # and are then applied to the individual members when merging.
 # Note that this moves the extended attribute from the interface to the member,
 # which changes the semantics and yields different code than the same extended
 # attribute on the main interface.
-DEPENDENCY_EXTENDED_ATTRIBUTES = set([
+DEPENDENCY_EXTENDED_ATTRIBUTES = frozenset([
     'Conditional',
-    'PerContextEnabled',
     'RuntimeEnabled',
+    'TypeChecking',
 ])
 
 
@@ -114,52 +115,134 @@
             definitions,
             component,
             target_interface,
-            interface_info['dependencies_full_paths'],
+            interface_info['dependencies_full_paths'] +
+            interface_info['dependencies_other_component_full_paths'],
             self.reader)
 
         for referenced_interface_name in interface_info['referenced_interfaces']:
             referenced_definitions = self.reader.read_idl_definitions(
                 self.interfaces_info[referenced_interface_name]['full_path'])
 
-            if component not in referenced_definitions:
-                raise Exception('This definitions: %s is defined in %s '
-                                'but reference interface:%s is not defined '
-                                'in %s' % (definitions.idl_name,
-                                           component,
-                                           referenced_interface_name,
-                                           component))
+            for referenced_component in referenced_definitions:
+                if not is_valid_component_dependency(component, referenced_component):
+                    raise Exception('This definitions: %s is defined in %s '
+                                    'but reference interface:%s is defined '
+                                    'in %s' % (definitions.idl_name,
+                                               component,
+                                               referenced_interface_name,
+                                               referenced_component))
 
-            resolved_definitions[component].update(referenced_definitions[component])
+                resolved_definitions[component].update(referenced_definitions[component])
+
         return resolved_definitions
 
 
 def merge_interface_dependencies(definitions, component, target_interface, dependency_idl_filenames, reader):
     """Merge dependencies ('partial interface' and 'implements') in dependency_idl_filenames into target_interface.
 
-    No return: modifies target_interface in place.
+    Args:
+        definitions: IdlDefinitions object, modified in place
+        component:
+            string, describing where the above definitions are defined,
+            'core' or 'modules'. See KNOWN_COMPONENTS in utilities.py
+        target_interface: IdlInterface object, modified in place
+        dependency_idl_filenames:
+            Idl filenames which depend on the above definitions.
+        reader: IdlReader object.
+    Returns:
+        A dictionary whose key is component and value is IdlDefinitions
+        object whose dependency is resolved.
     """
+    resolved_definitions = {component: definitions}
     # Sort so order consistent, so can compare output from run to run.
     for dependency_idl_filename in sorted(dependency_idl_filenames):
         dependency_definitions = reader.read_idl_file(dependency_idl_filename)
-        # FIXME(crbug.com/358074): should not merge core definitions with
-        # modules definitions.
+        dependency_component = idl_filename_to_component(dependency_idl_filename)
+
         dependency_interface = next(dependency_definitions.interfaces.itervalues())
         dependency_interface_basename, _ = os.path.splitext(os.path.basename(dependency_idl_filename))
 
         transfer_extended_attributes(dependency_interface,
                                      dependency_interface_basename)
-        definitions.update(dependency_definitions)  # merges partial interfaces
-        if not dependency_interface.is_partial:
+
+        # We need to use different checkdeps here for partial interface and
+        # inheritance.
+        if dependency_interface.is_partial:
+            # Case: dependency_interface is a partial interface of
+            # target_interface.
+            # So,
+            # - A partial interface defined in modules can update
+            #   the original interface defined in core.
+            # However,
+            # - A partial interface defined in core cannot update
+            #   the original interface defined in modules.
+            if not is_valid_component_dependency(dependency_component, component):
+                raise Exception('The partial interface:%s in %s cannot update '
+                                'the original interface:%s in %s' % (dependency_interface.name,
+                                                                     dependency_component,
+                                                                     target_interface.name,
+                                                                     component))
+
+            if dependency_component in resolved_definitions:
+                # When merging a new partial interfaces, should not overwrite
+                # ImpelemntedAs extended attributes in merged partial
+                # interface.
+                # See also the below "if 'ImplementedAs' not in ... " line's
+                # comment.
+                dependency_interface.extended_attributes.pop('ImplementedAs', None)
+                resolved_definitions[dependency_component].update(dependency_definitions)
+                continue
+
+            dependency_interface.extended_attributes.update(target_interface.extended_attributes)
+            assert target_interface == definitions.interfaces[dependency_interface.name]
+            # A partial interface should use its original interface's
+            # ImplementedAs. If the original interface doesn't have,
+            # remove ImplementedAs defined in the partial interface.
+            # Because partial interface needs the original interface's
+            # cpp class to obtain partial interface's cpp class.
+            # e.g.. V8WindowPartial.cpp:
+            #   DOMWindow* impl = V8Window::toImpl(holder);
+            #   RawPtr<...> cppValue(DOMWindowQuota::webkitStorageInfo(impl));
+            # TODO(tasak): remove ImplementedAs extended attributes
+            # from all partial interfaces. Instead, rename all cpp/header
+            # files correctly. ImplementedAs should not be allowed in
+            # partial interfaces.
+            if 'ImplementedAs' not in target_interface.extended_attributes:
+                dependency_interface.extended_attributes.pop('ImplementedAs', None)
+            dependency_interface.original_interface = target_interface
+            target_interface.partial_interfaces.append(dependency_interface)
+            resolved_definitions[dependency_component] = dependency_definitions
+        else:
+            # Case: target_interface implements dependency_interface.
+            # So,
+            # - An interface defined in modules can implement some interface
+            #   defined in core.
+            #   In this case, we need "NoInterfaceObject" extended attribute.
+            # However,
+            # - An interface defined in core cannot implement any interface
+            #   defined in modules.
+            if not is_valid_component_dependency(component, dependency_component):
+                raise Exception('The interface:%s in %s cannot implement '
+                                'the interface:%s in %s.' % (dependency_interface.name,
+                                                             dependency_component,
+                                                             target_interface.name,
+                                                             component))
+
+            if component != dependency_component and 'NoInterfaceObject' not in dependency_interface.extended_attributes:
+                raise Exception('The interface:%s in %s cannot implement '
+                                'the interface:%s in %s because of '
+                                'missing NoInterfaceObject.' % (dependency_interface.name,
+                                                                dependency_component,
+                                                                target_interface.name,
+                                                                component))
+
+            resolved_definitions[component].update(dependency_definitions)  # merges partial interfaces
             # Implemented interfaces (non-partial dependencies) are also merged
             # into the target interface, so Code Generator can just iterate
             # over one list (and not need to handle 'implements' itself).
             target_interface.merge(dependency_interface)
 
-    # FIXME: Currently, this function just returns one IdlDefinitions
-    # instance. However, for partial interface modularization, we need to
-    # make this function return multiple definitions, i.e.
-    # { 'core': ..., 'modules': ... }.
-    return {component: definitions}
+    return resolved_definitions
 
 
 def transfer_extended_attributes(dependency_interface, dependency_interface_basename):
@@ -211,9 +294,14 @@
             dependency_interface.extended_attributes.get(
                 'ImplementedAs', dependency_interface_basename))
 
+    def update_attributes(attributes, extras):
+        for key, value in extras.items():
+            if key not in attributes:
+                attributes[key] = value
+
     for attribute in dependency_interface.attributes:
-        attribute.extended_attributes.update(merged_extended_attributes)
+        update_attributes(attribute.extended_attributes, merged_extended_attributes)
     for constant in dependency_interface.constants:
-        constant.extended_attributes.update(merged_extended_attributes)
+        update_attributes(constant.extended_attributes, merged_extended_attributes)
     for operation in dependency_interface.operations:
-        operation.extended_attributes.update(merged_extended_attributes)
+        update_attributes(operation.extended_attributes, merged_extended_attributes)
diff --git a/bindings/scripts/utilities.py b/bindings/scripts/utilities.py
index 4d80ca7..8bd8555 100644
--- a/bindings/scripts/utilities.py
+++ b/bindings/scripts/utilities.py
@@ -15,11 +15,7 @@
 
 
 KNOWN_COMPONENTS = frozenset(['core', 'modules'])
-
-
-class IdlBadFilenameError(Exception):
-    """Raised if an IDL filename disagrees with the interface name in the file."""
-    pass
+KNOWN_COMPONENTS_WITH_TESTING = frozenset(['core', 'modules', 'testing'])
 
 
 def idl_filename_to_interface_name(idl_filename):
@@ -27,14 +23,189 @@
     return os.path.splitext(os.path.basename(idl_filename))[0]
 
 
-def idl_filename_to_component(idl_filename):
+def idl_filename_to_component_with_known_components(idl_filename, known_components):
     path = os.path.dirname(os.path.realpath(idl_filename))
     while path:
         dirname, basename = os.path.split(path)
-        if basename.lower() in KNOWN_COMPONENTS:
+        if not basename:
+            break
+        if basename.lower() in known_components:
             return basename.lower()
         path = dirname
-    raise 'Unknown component type for %s' % idl_filename
+    raise Exception('Unknown component type for %s' % idl_filename)
+
+
+def idl_filename_to_component(idl_filename):
+    return idl_filename_to_component_with_known_components(idl_filename, KNOWN_COMPONENTS)
+
+
+def is_testing_target(idl_filename):
+    component = idl_filename_to_component_with_known_components(idl_filename, KNOWN_COMPONENTS_WITH_TESTING)
+    return component == 'testing'
+
+
+# See whether "component" can depend on "dependency" or not:
+# Suppose that we have interface X and Y:
+# - if X is a partial interface and Y is the original interface,
+#   use is_valid_component_dependency(X, Y).
+# - if X implements Y, use is_valid_component_dependency(X, Y)
+# Suppose that X is a cpp file and Y is a header file:
+# - if X includes Y, use is_valid_component_dependency(X, Y)
+def is_valid_component_dependency(component, dependency):
+    assert component in KNOWN_COMPONENTS
+    assert dependency in KNOWN_COMPONENTS
+    if component == 'core' and dependency == 'modules':
+        return False
+    return True
+
+
+class ComponentInfoProvider(object):
+    """Base class of information provider which provides component-specific
+    information.
+    """
+    def __init__(self):
+        pass
+
+    @property
+    def interfaces_info(self):
+        return {}
+
+    @property
+    def component_info(self):
+        return {}
+
+    @property
+    def enumerations(self):
+        return {}
+
+    @property
+    def typedefs(self):
+        return {}
+
+    @property
+    def union_types(self):
+        return set()
+
+    @property
+    def include_path_for_union_types(self):
+        return None
+
+
+class ComponentInfoProviderCore(ComponentInfoProvider):
+    def __init__(self, interfaces_info, component_info):
+        super(ComponentInfoProviderCore, self).__init__()
+        self._interfaces_info = interfaces_info
+        self._component_info = component_info
+
+    @property
+    def interfaces_info(self):
+        return self._interfaces_info
+
+    @property
+    def component_info(self):
+        return self._component_info
+
+    @property
+    def enumerations(self):
+        return self._component_info['enumerations']
+
+    @property
+    def typedefs(self):
+        return self._component_info['typedefs']
+
+    @property
+    def union_types(self):
+        return self._component_info['union_types']
+
+    @property
+    def include_path_for_union_types(self):
+        return 'bindings/core/v8/UnionTypesCore.h'
+
+    @property
+    def specifier_for_export(self):
+        return 'CORE_EXPORT '
+
+    @property
+    def include_path_for_export(self):
+        return 'core/CoreExport.h'
+
+
+class ComponentInfoProviderModules(ComponentInfoProvider):
+    def __init__(self, interfaces_info, component_info_core,
+                 component_info_modules):
+        super(ComponentInfoProviderModules, self).__init__()
+        self._interfaces_info = interfaces_info
+        self._component_info_core = component_info_core
+        self._component_info_modules = component_info_modules
+
+    @property
+    def interfaces_info(self):
+        return self._interfaces_info
+
+    @property
+    def component_info(self):
+        return self._component_info_modules
+
+    @property
+    def enumerations(self):
+        enums = self._component_info_core['enumerations'].copy()
+        enums.update(self._component_info_modules['enumerations'])
+        return enums
+
+    @property
+    def typedefs(self):
+        typedefs = self._component_info_core['typedefs'].copy()
+        typedefs.update(self._component_info_modules['typedefs'])
+        return typedefs
+
+    @property
+    def union_types(self):
+        # Remove duplicate union types from component_info_modules to avoid
+        # generating multiple container generation.
+        return self._component_info_modules['union_types'] - self._component_info_core['union_types']
+
+    @property
+    def include_path_for_union_types(self):
+        return 'bindings/modules/v8/UnionTypesModules.h'
+
+    @property
+    def specifier_for_export(self):
+        return 'MODULES_EXPORT '
+
+    @property
+    def include_path_for_export(self):
+        return 'modules/ModulesExport.h'
+
+
+def load_interfaces_info_overall_pickle(info_dir):
+    with open(os.path.join(info_dir, 'modules', 'InterfacesInfoOverall.pickle')) as interface_info_file:
+        return pickle.load(interface_info_file)
+
+
+def create_component_info_provider_core(info_dir):
+    interfaces_info = load_interfaces_info_overall_pickle(info_dir)
+    with open(os.path.join(info_dir, 'core', 'ComponentInfoCore.pickle')) as component_info_file:
+        component_info = pickle.load(component_info_file)
+    return ComponentInfoProviderCore(interfaces_info, component_info)
+
+
+def create_component_info_provider_modules(info_dir):
+    interfaces_info = load_interfaces_info_overall_pickle(info_dir)
+    with open(os.path.join(info_dir, 'core', 'ComponentInfoCore.pickle')) as component_info_file:
+        component_info_core = pickle.load(component_info_file)
+    with open(os.path.join(info_dir, 'modules', 'ComponentInfoModules.pickle')) as component_info_file:
+        component_info_modules = pickle.load(component_info_file)
+    return ComponentInfoProviderModules(
+        interfaces_info, component_info_core, component_info_modules)
+
+
+def create_component_info_provider(info_dir, component):
+    if component == 'core':
+        return create_component_info_provider_core(info_dir)
+    elif component == 'modules':
+        return create_component_info_provider_modules(info_dir)
+    else:
+        return ComponentInfoProvider()
 
 
 ################################################################################
@@ -104,7 +275,7 @@
             try:
                 if pickle.load(pickle_file) == data:
                     return
-            except (EOFError, pickle.UnpicklingError):
+            except Exception:
                 # If trouble unpickling, overwrite
                 pass
     with open(pickle_filename, 'w') as pickle_file:
@@ -119,66 +290,20 @@
 # Leading and trailing context (e.g. following '{') used to avoid false matches.
 ################################################################################
 
-def get_partial_interface_name_from_idl(file_contents):
-    match = re.search(r'partial\s+interface\s+(\w+)\s*{', file_contents)
-    return match and match.group(1)
-
-
-def get_implements_from_idl(file_contents, interface_name):
-    """Returns lists of implementing and implemented interfaces.
-
-    Rule is: identifier-A implements identifier-B;
-    i.e., implement*ing* implements implement*ed*;
-    http://www.w3.org/TR/WebIDL/#idl-implements-statements
-
-    Returns two lists of interfaces: identifier-As and identifier-Bs.
-    An 'implements' statements can be present in the IDL file for either the
-    implementing or the implemented interface, but not other files.
-    """
-    implements_re = (r'^\s*'
-                     r'(\w+)\s+'
-                     r'implements\s+'
-                     r'(\w+)\s*'
-                     r';')
-    implements_matches = re.finditer(implements_re, file_contents, re.MULTILINE)
-    implements_pairs = [match.groups() for match in implements_matches]
-
-    foreign_implements = [pair for pair in implements_pairs
-                          if interface_name not in pair]
-    if foreign_implements:
-        left, right = foreign_implements.pop()
-        raise IdlBadFilenameError(
-                'implements statement found in unrelated IDL file.\n'
-                'Statement is:\n'
-                '    %s implements %s;\n'
-                'but filename is unrelated "%s.idl"' %
-                (left, right, interface_name))
-
-    return (
-        [left for left, right in implements_pairs if right == interface_name],
-        [right for left, right in implements_pairs if left == interface_name])
-
-
 def is_callback_interface_from_idl(file_contents):
     match = re.search(r'callback\s+interface\s+\w+\s*{', file_contents)
     return bool(match)
 
 
-def is_dictionary_from_idl(file_contents):
-    match = re.search(r'dictionary\s+\w+\s*{', file_contents)
+def should_generate_impl_file_from_idl(file_contents):
+    """True when a given IDL file contents could generate .h/.cpp files."""
+    # FIXME: This would be error-prone and we should use AST rather than
+    # improving the regexp pattern.
+    match = re.search(r'(interface|dictionary|exception)\s+\w+', file_contents)
     return bool(match)
 
 
-def get_parent_interface(file_contents):
-    match = re.search(r'interface\s+'
-                      r'\w+\s*'
-                      r':\s*(\w+)\s*'
-                      r'{',
-                      file_contents)
-    return match and match.group(1)
-
-
-def get_interface_extended_attributes_from_idl(file_contents):
+def match_interface_extended_attributes_from_idl(file_contents):
     # Strip comments
     # re.compile needed b/c Python 2.6 doesn't support flags in re.sub
     single_line_comment_re = re.compile(r'//.*$', flags=re.MULTILINE)
@@ -193,6 +318,11 @@
                       r'(:\s*\w+\s*)?'
                       r'{',
                       file_contents, flags=re.DOTALL)
+    return match
+
+
+def get_interface_extended_attributes_from_idl(file_contents):
+    match = match_interface_extended_attributes_from_idl(file_contents)
     if not match:
         return {}
 
@@ -210,12 +340,18 @@
     return extended_attributes
 
 
-def get_put_forward_interfaces_from_idl(file_contents):
-    put_forwards_pattern = (r'\[[^\]]*PutForwards=[^\]]*\]\s+'
-                            r'readonly\s+'
-                            r'attribute\s+'
-                            r'(\w+)')
-    return sorted(set(match.group(1)
-                      for match in re.finditer(put_forwards_pattern,
-                                               file_contents,
-                                               flags=re.DOTALL)))
+def get_interface_exposed_arguments(file_contents):
+    match = match_interface_extended_attributes_from_idl(file_contents)
+    if not match:
+        return None
+
+    extended_attributes_string = match.group(1)
+    match = re.search(r'[^=]\bExposed\(([^)]*)\)', file_contents)
+    if not match:
+        return None
+    arguments = []
+    for argument in map(string.strip, match.group(1).split(',')):
+        exposed, runtime_enabled = argument.split()
+        arguments.append({'exposed': exposed, 'runtime_enabled': runtime_enabled})
+
+    return arguments
diff --git a/bindings/scripts/v8_attributes.py b/bindings/scripts/v8_attributes.py
index 2a09c88..b1f72a0 100644
--- a/bindings/scripts/v8_attributes.py
+++ b/bindings/scripts/v8_attributes.py
@@ -38,9 +38,10 @@
 from v8_globals import includes, interfaces
 import v8_types
 import v8_utilities
-from v8_utilities import (capitalize, cpp_name, has_extended_attribute,
+from v8_utilities import (cpp_name_or_partial, capitalize, cpp_name, has_extended_attribute,
                           has_extended_attribute_value, scoped_name, strip_suffix,
-                          uncapitalize, extended_attribute_value_as_list)
+                          uncapitalize, extended_attribute_value_as_list, is_unforgeable,
+                          is_legacy_interface_type_checking)
 
 
 def attribute_context(interface, attribute):
@@ -48,47 +49,56 @@
     base_idl_type = idl_type.base_type
     extended_attributes = attribute.extended_attributes
 
-    idl_type.add_includes_for_type()
+    idl_type.add_includes_for_type(extended_attributes)
+    if idl_type.enum_values:
+        includes.add('core/inspector/ConsoleMessage.h')
 
     # [CheckSecurity]
-    is_check_security_for_node = 'CheckSecurity' in extended_attributes
-    if is_check_security_for_node:
-        includes.add('bindings/common/BindingSecurity.h')
+    is_do_not_check_security = 'DoNotCheckSecurity' in extended_attributes
+    is_check_security_for_frame = (
+        has_extended_attribute_value(interface, 'CheckSecurity', 'Frame') and
+        not is_do_not_check_security)
+    is_check_security_for_node = (
+        has_extended_attribute_value(attribute, 'CheckSecurity', 'Node'))
+    is_check_security_for_window = (
+        has_extended_attribute_value(interface, 'CheckSecurity', 'Window') and
+        not is_do_not_check_security)
+    if is_check_security_for_frame or is_check_security_for_node or is_check_security_for_window:
+        includes.add('bindings/core/v8/BindingSecurity.h')
     # [CustomElementCallbacks], [Reflect]
     is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attributes
     is_reflect = 'Reflect' in extended_attributes
     if is_custom_element_callbacks or is_reflect:
         includes.add('core/dom/custom/CustomElementProcessingStack.h')
-    # [PerWorldBindings]
-    if 'PerWorldBindings' in extended_attributes:
-        assert idl_type.is_wrapper_type or 'LogActivity' in extended_attributes, '[PerWorldBindings] should only be used with wrapper types: %s.%s' % (interface.name, attribute.name)
-    # [TypeChecking]
-    has_type_checking_unrestricted = (
-        (has_extended_attribute_value(interface, 'TypeChecking', 'Unrestricted') or
-         has_extended_attribute_value(attribute, 'TypeChecking', 'Unrestricted')) and
-         idl_type.name in ('Float', 'Double'))
     # [ImplementedInPrivateScript]
     is_implemented_in_private_script = 'ImplementedInPrivateScript' in extended_attributes
     if is_implemented_in_private_script:
         includes.add('bindings/core/v8/PrivateScriptRunner.h')
         includes.add('core/frame/LocalFrame.h')
         includes.add('platform/ScriptForbiddenScope.h')
-
     # [OnlyExposedToPrivateScript]
     is_only_exposed_to_private_script = 'OnlyExposedToPrivateScript' in extended_attributes
+    # [PerWorldBindings]
+    if 'PerWorldBindings' in extended_attributes:
+        assert idl_type.is_wrapper_type or 'LogActivity' in extended_attributes, '[PerWorldBindings] should only be used with wrapper types: %s.%s' % (interface.name, attribute.name)
 
     if (base_idl_type == 'EventHandler' and
         interface.name in ['Window', 'WorkerGlobalScope'] and
         attribute.name == 'onerror'):
         includes.add('bindings/core/v8/V8ErrorHandler.h')
 
+    cached_attribute_validation_method = extended_attributes.get('CachedAttribute')
+    keep_alive_for_gc = is_keep_alive_for_gc(interface, attribute)
+    if cached_attribute_validation_method or keep_alive_for_gc:
+        includes.add('bindings/core/v8/V8HiddenValue.h')
+
     context = {
-        'access_control_list': access_control_list(attribute),
+        'access_control_list': access_control_list(interface, attribute),
         'activity_logging_world_list_for_getter': v8_utilities.activity_logging_world_list(attribute, 'Getter'),  # [ActivityLogging]
         'activity_logging_world_list_for_setter': v8_utilities.activity_logging_world_list(attribute, 'Setter'),  # [ActivityLogging]
         'activity_logging_world_check': v8_utilities.activity_logging_world_check(attribute),  # [ActivityLogging]
         'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True),
-        'cached_attribute_validation_method': extended_attributes.get('CachedAttribute'),
+        'cached_attribute_validation_method': cached_attribute_validation_method,
         'conditional_string': v8_utilities.conditional_string(attribute),
         'constructor_type': idl_type.constructor_type_name
                             if is_constructor_attribute(attribute) else None,
@@ -96,49 +106,53 @@
         'cpp_type': idl_type.cpp_type,
         'cpp_type_initializer': idl_type.cpp_type_initializer,
         'deprecate_as': v8_utilities.deprecate_as(attribute),  # [DeprecateAs]
-        'enum_validation_expression': idl_type.enum_validation_expression,
+        'enum_type': idl_type.enum_type,
+        'enum_values': idl_type.enum_values,
         'exposed_test': v8_utilities.exposed(attribute, interface),  # [Exposed]
         'has_custom_getter': has_custom_getter(attribute),
         'has_custom_setter': has_custom_setter(attribute),
-        'has_type_checking_unrestricted': has_type_checking_unrestricted,
+        'has_setter': has_setter(attribute),
         'idl_type': str(idl_type),  # need trailing [] on array for Dictionary::ConversionContext::setConversionType
-        'is_call_with_execution_context': v8_utilities.has_extended_attribute_value(attribute, 'CallWith', 'ExecutionContext'),
-        'is_call_with_script_state': v8_utilities.has_extended_attribute_value(attribute, 'CallWith', 'ScriptState'),
+        'is_call_with_execution_context': has_extended_attribute_value(attribute, 'CallWith', 'ExecutionContext'),
+        'is_call_with_script_state': has_extended_attribute_value(attribute, 'CallWith', 'ScriptState'),
+        'is_check_security_for_frame': is_check_security_for_frame,
         'is_check_security_for_node': is_check_security_for_node,
+        'is_check_security_for_window': is_check_security_for_window,
         'is_custom_element_callbacks': is_custom_element_callbacks,
-        'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes,
+        'is_expose_js_accessors': is_expose_js_accessors(interface, attribute),
         'is_getter_raises_exception':  # [RaisesException]
             'RaisesException' in extended_attributes and
             extended_attributes['RaisesException'] in (None, 'Getter'),
         'is_implemented_in_private_script': is_implemented_in_private_script,
-        'is_initialized_by_event_constructor':
-            'InitializedByEventConstructor' in extended_attributes,
-        'is_keep_alive_for_gc': is_keep_alive_for_gc(interface, attribute),
+        'is_keep_alive_for_gc': keep_alive_for_gc,
+        'is_lenient_this': 'LenientThis' in extended_attributes,
         'is_nullable': idl_type.is_nullable,
         'is_explicit_nullable': idl_type.is_explicit_nullable,
         'is_partial_interface_member':
             'PartialInterfaceImplementedAs' in extended_attributes,
         'is_per_world_bindings': 'PerWorldBindings' in extended_attributes,
+        'is_put_forwards': 'PutForwards' in extended_attributes,
         'is_read_only': attribute.is_read_only,
         'is_reflect': is_reflect,
         'is_replaceable': 'Replaceable' in attribute.extended_attributes,
         'is_static': attribute.is_static,
         'is_url': 'URL' in extended_attributes,
-        'is_unforgeable': 'Unforgeable' in extended_attributes,
-        'measure_as': v8_utilities.measure_as(attribute),  # [MeasureAs]
+        'is_unforgeable': is_unforgeable(interface, attribute),
+        'on_instance': v8_utilities.on_instance(interface, attribute),
+        'on_interface': v8_utilities.on_interface(interface, attribute),
+        'on_prototype': v8_utilities.on_prototype(interface, attribute),
+        'use_output_parameter_for_result': idl_type.use_output_parameter_for_result,
+        'measure_as': v8_utilities.measure_as(attribute, interface),  # [MeasureAs]
         'name': attribute.name,
         'only_exposed_to_private_script': is_only_exposed_to_private_script,
-        'per_context_enabled_function': v8_utilities.per_context_enabled_function_name(attribute),  # [PerContextEnabled]
         'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value(
-            extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->isolate()', used_in_private_script=True),
-        'property_attributes': property_attributes(attribute),
-        'put_forwards': 'PutForwards' in extended_attributes,
+            extended_attributes, 'v8Value', 'cppValue', bailout_return_value='false', isolate='scriptState->isolate()'),
+        'property_attributes': property_attributes(interface, attribute),
         'reflect_empty': extended_attributes.get('ReflectEmpty'),
         'reflect_invalid': extended_attributes.get('ReflectInvalid', ''),
         'reflect_missing': extended_attributes.get('ReflectMissing'),
         'reflect_only': extended_attribute_value_as_list(attribute, 'ReflectOnly'),
         'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(attribute),  # [RuntimeEnabled]
-        'setter_callback': setter_callback_name(interface, attribute),
         'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script),
         'world_suffixes': ['', 'ForMainWorld']
                           if 'PerWorldBindings' in extended_attributes
@@ -146,12 +160,10 @@
     }
 
     if is_constructor_attribute(attribute):
-        constructor_getter_context(interface, attribute, context)
-        return context
+        update_constructor_attribute_context(interface, attribute, context)
     if not has_custom_getter(attribute):
         getter_context(interface, attribute, context)
-    if (not has_custom_setter(attribute) and
-        (not attribute.is_read_only or 'PutForwards' in extended_attributes)):
+    if not has_custom_setter(attribute) and has_setter(attribute):
         setter_context(interface, attribute, context)
 
     return context
@@ -198,27 +210,28 @@
             release = idl_type.release
 
     def v8_set_return_value_statement(for_main_world=False):
-        if context['is_keep_alive_for_gc']:
-            return 'v8SetReturnValue(info, wrapper)'
-        return idl_type.v8_set_return_value(cpp_value, extended_attributes=extended_attributes, script_wrappable='impl', release=release, for_main_world=for_main_world)
+        if context['is_keep_alive_for_gc'] or 'CachedAttribute' in extended_attributes:
+            return 'v8SetReturnValue(info, v8Value)'
+        return idl_type.v8_set_return_value(
+            cpp_value, extended_attributes=extended_attributes, script_wrappable='impl',
+            release=release, for_main_world=for_main_world, is_static=attribute.is_static)
 
     context.update({
         'cpp_value': cpp_value,
         'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(
-            cpp_value=cpp_value, creation_context='info.Holder()',
+            cpp_value=cpp_value, creation_context='holder',
             extended_attributes=extended_attributes),
         'v8_set_return_value_for_main_world': v8_set_return_value_statement(for_main_world=True),
         'v8_set_return_value': v8_set_return_value_statement(),
     })
 
-
 def getter_expression(interface, attribute, context):
     arguments = []
     this_getter_base_name = getter_base_name(interface, attribute, arguments)
     getter_name = scoped_name(interface, attribute, this_getter_base_name)
 
     if 'ImplementedInPrivateScript' in attribute.extended_attributes:
-        arguments.append('toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())')
+        arguments.append('toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()))')
         arguments.append('impl')
         arguments.append('&result')
     arguments.extend(v8_utilities.call_with_arguments(
@@ -234,6 +247,8 @@
         arguments.append('isNull')
     if context['is_getter_raises_exception']:
         arguments.append('exceptionState')
+    if attribute.idl_type.use_output_parameter_for_result:
+        arguments.append('result')
     return '%s(%s)' % (getter_name, ', '.join(arguments))
 
 
@@ -310,6 +325,11 @@
                             'Attribute "%s" is not present in interface "%s"' %
                             (target_attribute_name, target_interface_name))
 
+    if ('Replaceable' in attribute.extended_attributes or
+            is_constructor_attribute(attribute)):
+        context['cpp_setter'] = '%sCreateDataProperty(propertyName, v8Value, info)' % cpp_name(interface)
+        return
+
     extended_attributes = attribute.extended_attributes
     idl_type = attribute.idl_type
 
@@ -317,19 +337,17 @@
     is_setter_raises_exception = (
         'RaisesException' in extended_attributes and
         extended_attributes['RaisesException'] in [None, 'Setter'])
-    # [TypeChecking=Interface]
+    # [TypeChecking=Interface] / [LegacyInterfaceTypeChecking]
     has_type_checking_interface = (
-        (has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or
-         has_extended_attribute_value(attribute, 'TypeChecking', 'Interface')) and
+        not is_legacy_interface_type_checking(interface, attribute) and
         idl_type.is_wrapper_type)
 
     context.update({
         'has_setter_exception_state':
             is_setter_raises_exception or has_type_checking_interface or
-            context['has_type_checking_unrestricted'] or
             idl_type.v8_conversion_needs_exception_state,
         'has_type_checking_interface': has_type_checking_interface,
-        'is_setter_call_with_execution_context': v8_utilities.has_extended_attribute_value(
+        'is_setter_call_with_execution_context': has_extended_attribute_value(
             attribute, 'SetterCallWith', 'ExecutionContext'),
         'is_setter_raises_exception': is_setter_raises_exception,
         'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(
@@ -361,7 +379,7 @@
         arguments.append('*impl')
     idl_type = attribute.idl_type
     if 'ImplementedInPrivateScript' in extended_attributes:
-        arguments.append('toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())')
+        arguments.append('toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()))')
         arguments.append('impl')
         arguments.append('cppValue')
     elif idl_type.base_type == 'EventHandler':
@@ -371,9 +389,9 @@
         if (interface.name in ['Window', 'WorkerGlobalScope'] and
             attribute.name == 'onerror'):
             includes.add('bindings/core/v8/V8ErrorHandler.h')
-            arguments.append('V8EventListenerList::findOrCreateWrapper<V8ErrorHandler>(v8Value, true, V8ScriptState::current(info.GetIsolate()))')
+            arguments.append('V8EventListenerList::findOrCreateWrapper<V8ErrorHandler>(v8Value, true, ScriptState::current(info.GetIsolate()))')
         else:
-            arguments.append('V8EventListenerList::getEventListener(V8ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)')
+            arguments.append('V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)')
     elif idl_type.is_interface_type:
         # FIXME: should be able to eliminate WTF::getPtr in most or all cases
         arguments.append('WTF::getPtr(cppValue)')
@@ -409,13 +427,7 @@
 def scoped_content_attribute_name(interface, attribute):
     content_attribute_name = attribute.extended_attributes['Reflect'] or attribute.name.lower()
     if interface.name.startswith('SVG'):
-        # SVG's xmlbase/xmlspace/xmllang need special behavior, i.e.
-        # it is in XMLNames namespace and the generated attribute has no xml prefix.
-        if attribute.name.startswith('xml'):
-            namespace = 'XMLNames'
-            content_attribute_name = content_attribute_name[3:]
-        else:
-            namespace = 'SVGNames'
+        namespace = 'SVGNames'
     else:
         namespace = 'HTMLNames'
     includes.add('core/%s.h' % namespace)
@@ -426,21 +438,15 @@
 # Attribute configuration
 ################################################################################
 
-# [Replaceable]
-def setter_callback_name(interface, attribute):
-    cpp_class_name = cpp_name(interface)
-    extended_attributes = attribute.extended_attributes
-    if (('Replaceable' in extended_attributes and
-         'PutForwards' not in extended_attributes) or
-        is_constructor_attribute(attribute)):
-        return '{0}V8Internal::{0}ForceSetAttributeOnThisCallback'.format(cpp_class_name)
-    if attribute.is_read_only and 'PutForwards' not in extended_attributes:
-        return '0'
-    return '%sV8Internal::%sAttributeSetterCallback' % (cpp_class_name, attribute.name)
+# [PutForwards], [Replaceable]
+def has_setter(attribute):
+    return (not attribute.is_read_only or
+            'PutForwards' in attribute.extended_attributes or
+            'Replaceable' in attribute.extended_attributes)
 
 
 # [DoNotCheckSecurity], [Unforgeable]
-def access_control_list(attribute):
+def access_control_list(interface, attribute):
     extended_attributes = attribute.extended_attributes
     access_control = []
     if 'DoNotCheckSecurity' in extended_attributes:
@@ -449,22 +455,21 @@
             access_control.append('v8::ALL_CAN_WRITE')
         else:
             access_control.append('v8::ALL_CAN_READ')
-            if (not attribute.is_read_only or
-                'Replaceable' in extended_attributes):
+            if has_setter(attribute):
                 access_control.append('v8::ALL_CAN_WRITE')
-    if 'Unforgeable' in extended_attributes:
+    if is_unforgeable(interface, attribute):
         access_control.append('v8::PROHIBITS_OVERWRITING')
     return access_control or ['v8::DEFAULT']
 
 
 # [NotEnumerable], [Unforgeable]
-def property_attributes(attribute):
+def property_attributes(interface, attribute):
     extended_attributes = attribute.extended_attributes
     property_attributes_list = []
     if ('NotEnumerable' in extended_attributes or
         is_constructor_attribute(attribute)):
         property_attributes_list.append('v8::DontEnum')
-    if 'Unforgeable' in extended_attributes:
+    if is_unforgeable(interface, attribute):
         property_attributes_list.append('v8::DontDelete')
     return property_attributes_list or ['v8::None']
 
@@ -484,6 +489,43 @@
             extended_attributes['Custom'] in [None, 'Setter'])
 
 
+# [ExposeJSAccessors]
+def is_expose_js_accessors(interface, attribute):
+    # Default behavior
+    is_accessor = True
+
+    if ('ExposeJSAccessors' in interface.extended_attributes and
+            'DoNotExposeJSAccessors' in interface.extended_attributes):
+        raise Exception('Both of ExposeJSAccessors and DoNotExposeJSAccessors are specified at a time in an interface: ' + interface.name)
+    if 'ExposeJSAccessors' in interface.extended_attributes:
+        is_accessor = True
+    if 'DoNotExposeJSAccessors' in interface.extended_attributes:
+        is_accessor = False
+
+    # Note that ExposeJSAccessors and DoNotExposeJSAccessors are more powerful
+    # than 'static', [Unforgeable] and [OverrideBuiltins].
+    if ('ExposeJSAccessors' in attribute.extended_attributes and
+            'DoNotExposeJSAccessors' in attribute.extended_attributes):
+        raise Exception('Both of ExposeJSAccessors and DoNotExposeJSAccessors are specified at a time on an attribute: ' + attribute.name + ' in an interface: ' + interface.name)
+    if 'ExposeJSAccessors' in attribute.extended_attributes:
+        return True
+    if 'DoNotExposeJSAccessors' in attribute.extended_attributes:
+        return False
+
+    # These attributes must not be accessors on prototype chains.
+    if (is_constructor_attribute(attribute) or
+            attribute.is_static or
+            is_unforgeable(interface, attribute) or
+            'OverrideBuiltins' in interface.extended_attributes):
+        return False
+
+    # The members of Window interface must be placed on the instance object.
+    if interface.name == 'Window':
+        return False
+
+    return is_accessor
+
+
 ################################################################################
 # Constructors
 ################################################################################
@@ -498,5 +540,10 @@
     return attribute.idl_type.name.endswith('Constructor')
 
 
-def constructor_getter_context(interface, attribute, context):
+def update_constructor_attribute_context(interface, attribute, context):
     context['needs_constructor_getter_callback'] = context['measure_as'] or context['deprecate_as']
+    # When the attribute name is the same as the interface name, do not generate
+    # callback functions for each attribute and use
+    # {{cpp_class}}ConstructorAttributeSetterCallback.  Otherwise, generate
+    # a callback function in order to hard-code the attribute name.
+    context['needs_constructor_setter_callback'] = context['name'] != context['constructor_type']
diff --git a/bindings/scripts/v8_callback_interface.py b/bindings/scripts/v8_callback_interface.py
index eafdba8..8ceeb9a 100644
--- a/bindings/scripts/v8_callback_interface.py
+++ b/bindings/scripts/v8_callback_interface.py
@@ -79,8 +79,7 @@
         'v8_class': v8_utilities.v8_class_name(callback_interface),
         'header_includes': set(CALLBACK_INTERFACE_H_INCLUDES),
         'methods': [method_context(operation)
-                    for operation in callback_interface.operations
-                    if not v8_utilities.dart_custom_method(operation.extended_attributes)],
+                    for operation in callback_interface.operations],
     }
 
 
diff --git a/bindings/scripts/v8_dictionary.py b/bindings/scripts/v8_dictionary.py
index a5be6c8..36129b5 100644
--- a/bindings/scripts/v8_dictionary.py
+++ b/bindings/scripts/v8_dictionary.py
@@ -7,29 +7,39 @@
 """
 
 import operator
+from idl_types import IdlType
 from v8_globals import includes
 import v8_types
 import v8_utilities
+from v8_utilities import has_extended_attribute_value
 
 
 DICTIONARY_H_INCLUDES = frozenset([
+    'bindings/core/v8/ToV8.h',
     'bindings/core/v8/V8Binding.h',
     'platform/heap/Handle.h',
 ])
 
 DICTIONARY_CPP_INCLUDES = frozenset([
-    'bindings/common/ExceptionState.h',
-    # FIXME: Remove this, http://crbug.com/321462
-    'bindings/core/v8/Dictionary.h',
+    'bindings/core/v8/ExceptionState.h',
 ])
 
 
 def setter_name_for_dictionary_member(member):
-    return 'set%s' % v8_utilities.capitalize(member.name)
+    name = v8_utilities.cpp_name(member)
+    return 'set%s' % v8_utilities.capitalize(name)
+
+
+def null_setter_name_for_dictionary_member(member):
+    if member.idl_type.is_nullable:
+        name = v8_utilities.cpp_name(member)
+        return 'set%sToNull' % v8_utilities.capitalize(name)
+    return None
 
 
 def has_method_name_for_dictionary_member(member):
-    return 'has%s' % v8_utilities.capitalize(member.name)
+    name = v8_utilities.cpp_name(member)
+    return 'has%s' % v8_utilities.capitalize(name)
 
 
 def unwrap_nullable_if_needed(idl_type):
@@ -40,83 +50,135 @@
 
 # Context for V8 bindings
 
-def dictionary_context(dictionary):
+def dictionary_context(dictionary, interfaces_info):
     includes.clear()
     includes.update(DICTIONARY_CPP_INCLUDES)
-    return {
-        'cpp_class': v8_utilities.cpp_name(dictionary),
+    cpp_class = v8_utilities.cpp_name(dictionary)
+    context = {
+        'cpp_class': cpp_class,
         'header_includes': set(DICTIONARY_H_INCLUDES),
-        'members': [member_context(member)
+        'members': [member_context(dictionary, member)
                     for member in sorted(dictionary.members,
                                          key=operator.attrgetter('name'))],
-        'v8_class': v8_utilities.v8_class_name(dictionary),
+        'use_permissive_dictionary_conversion': 'PermissiveDictionaryConversion' in dictionary.extended_attributes,
+        'v8_class': v8_types.v8_type(cpp_class),
+        'v8_original_class': v8_types.v8_type(dictionary.name),
     }
+    if dictionary.parent:
+        IdlType(dictionary.parent).add_includes_for_type()
+        parent_cpp_class = v8_utilities.cpp_name_from_interfaces_info(
+            dictionary.parent, interfaces_info)
+        context.update({
+            'parent_cpp_class': parent_cpp_class,
+            'parent_v8_class': v8_types.v8_type(parent_cpp_class),
+        })
+    return context
 
 
-def member_context(member):
+def member_context(dictionary, member):
+    extended_attributes = member.extended_attributes
     idl_type = member.idl_type
-    idl_type.add_includes_for_type()
-    idl_type = unwrap_nullable_if_needed(idl_type)
+    idl_type.add_includes_for_type(extended_attributes)
+    unwrapped_idl_type = unwrap_nullable_if_needed(idl_type)
+
+    if member.is_required and member.default_value:
+        raise Exception(
+            'Required member %s must not have a default value.' % member.name)
 
     def default_values():
         if not member.default_value:
             return None, None
         if member.default_value.is_null:
             return None, 'v8::Null(isolate)'
-        cpp_default_value = str(member.default_value)
-        v8_default_value = idl_type.cpp_value_to_v8_value(
+        cpp_default_value = unwrapped_idl_type.literal_cpp_value(
+            member.default_value)
+        v8_default_value = unwrapped_idl_type.cpp_value_to_v8_value(
             cpp_value=cpp_default_value, isolate='isolate',
             creation_context='creationContext')
         return cpp_default_value, v8_default_value
 
     cpp_default_value, v8_default_value = default_values()
+    cpp_name = v8_utilities.cpp_name(member)
 
     return {
         'cpp_default_value': cpp_default_value,
-        'cpp_type': idl_type.cpp_type,
-        'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(
-            cpp_value='impl->%s()' % member.name, isolate='isolate',
+        'cpp_name': cpp_name,
+        'cpp_type': unwrapped_idl_type.cpp_type,
+        'cpp_value_to_v8_value': unwrapped_idl_type.cpp_value_to_v8_value(
+            cpp_value='impl.%s()' % cpp_name, isolate='isolate',
             creation_context='creationContext',
-            extended_attributes=member.extended_attributes),
-        'enum_validation_expression': idl_type.enum_validation_expression,
+            extended_attributes=extended_attributes),
+        'deprecate_as': v8_utilities.deprecate_as(member),
+        'enum_type': idl_type.enum_type,
+        'enum_values': unwrapped_idl_type.enum_values,
         'has_method_name': has_method_name_for_dictionary_member(member),
-        'is_object': idl_type.name == 'Object',
+        'idl_type': idl_type.base_type,
+        'is_interface_type': idl_type.is_interface_type and not idl_type.is_dictionary,
+        'is_nullable': idl_type.is_nullable,
+        'is_object': unwrapped_idl_type.name == 'Object',
+        'is_required': member.is_required,
         'name': member.name,
         'setter_name': setter_name_for_dictionary_member(member),
+        'null_setter_name': null_setter_name_for_dictionary_member(member),
         'v8_default_value': v8_default_value,
+        'v8_value_to_local_cpp_value': unwrapped_idl_type.v8_value_to_local_cpp_value(
+            extended_attributes, member.name + 'Value',
+            member.name, isolate='isolate', use_exception_state=True),
     }
 
 
 # Context for implementation classes
 
 def dictionary_impl_context(dictionary, interfaces_info):
+    def remove_duplicate_members(members):
+        # When [ImplementedAs] is used, cpp_name can conflict. For example,
+        # dictionary D { long foo; [ImplementedAs=foo, DeprecateAs=Foo] long oldFoo; };
+        # This function removes such duplications, checking they have the same type.
+        members_dict = {}
+        for member in members:
+            cpp_name = member['cpp_name']
+            duplicated_member = members_dict.get(cpp_name)
+            if duplicated_member and duplicated_member != member:
+                raise Exception('Member name conflict: %s' % cpp_name)
+            members_dict[cpp_name] = member
+        return sorted(members_dict.values(), key=lambda member: member['cpp_name'])
+
     includes.clear()
     header_includes = set(['platform/heap/Handle.h'])
-    return {
+    members = [member_impl_context(member, interfaces_info, header_includes)
+               for member in dictionary.members]
+    members = remove_duplicate_members(members)
+    context = {
         'header_includes': header_includes,
         'cpp_class': v8_utilities.cpp_name(dictionary),
-        'members': [member_impl_context(member, interfaces_info,
-                                        header_includes)
-                    for member in dictionary.members],
+        'members': members,
     }
+    if dictionary.parent:
+        context['parent_cpp_class'] = v8_utilities.cpp_name_from_interfaces_info(
+            dictionary.parent, interfaces_info)
+        parent_interface_info = interfaces_info.get(dictionary.parent)
+        if parent_interface_info:
+            context['header_includes'].add(
+                parent_interface_info['include_path'])
+    return context
 
 
 def member_impl_context(member, interfaces_info, header_includes):
     idl_type = unwrap_nullable_if_needed(member.idl_type)
-    is_object = idl_type.name == 'Object'
+    cpp_name = v8_utilities.cpp_name(member)
 
     def getter_expression():
         if idl_type.impl_should_use_nullable_container:
-            return 'm_%s.get()' % member.name
-        return 'm_%s' % member.name
+            return 'm_%s.get()' % cpp_name
+        return 'm_%s' % cpp_name
 
     def has_method_expression():
-        if idl_type.impl_should_use_nullable_container or idl_type.is_enum or idl_type.is_string_type:
-            return '!m_%s.isNull()' % member.name
-        elif is_object:
-            return '!(m_{0}.isEmpty() || m_{0}.isNull() || m_{0}.isUndefined())'.format(member.name)
+        if idl_type.impl_should_use_nullable_container or idl_type.is_enum or idl_type.is_string_type or idl_type.is_union_type:
+            return '!m_%s.isNull()' % cpp_name
+        elif idl_type.name in ['Any', 'Object']:
+            return '!(m_{0}.isEmpty() || m_{0}.isNull() || m_{0}.isUndefined())'.format(cpp_name)
         else:
-            return 'm_%s' % member.name
+            return 'm_%s' % cpp_name
 
     def member_cpp_type():
         member_cpp_type = idl_type.cpp_type_args(used_in_cpp_sequence=True)
@@ -126,19 +188,19 @@
 
     cpp_default_value = None
     if member.default_value and not member.default_value.is_null:
-        cpp_default_value = str(member.default_value)
+        cpp_default_value = idl_type.literal_cpp_value(member.default_value)
 
     header_includes.update(idl_type.impl_includes_for_type(interfaces_info))
     return {
         'cpp_default_value': cpp_default_value,
+        'cpp_name': cpp_name,
         'getter_expression': getter_expression(),
         'has_method_expression': has_method_expression(),
         'has_method_name': has_method_name_for_dictionary_member(member),
-        'is_object': is_object,
-        'is_traceable': (idl_type.is_garbage_collected or
-                         idl_type.is_will_be_garbage_collected),
+        'is_nullable': idl_type.is_nullable,
+        'is_traceable': idl_type.is_traceable,
         'member_cpp_type': member_cpp_type(),
-        'name': member.name,
+        'null_setter_name': null_setter_name_for_dictionary_member(member),
         'rvalue_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True),
         'setter_name': setter_name_for_dictionary_member(member),
     }
diff --git a/bindings/scripts/v8_interface.py b/bindings/scripts/v8_interface.py
index bf63e61..406fee3 100644
--- a/bindings/scripts/v8_interface.py
+++ b/bindings/scripts/v8_interface.py
@@ -37,7 +37,7 @@
 from operator import itemgetter
 
 import idl_definitions
-from idl_definitions import IdlOperation
+from idl_definitions import IdlOperation, IdlArgument
 import idl_types
 from idl_types import IdlType, inherits_interface
 import v8_attributes
@@ -46,22 +46,22 @@
 import v8_types
 from v8_types import cpp_ptr_type, cpp_template_type
 import v8_utilities
-from v8_utilities import (capitalize, conditional_string, cpp_name, gc_type,
+from v8_utilities import (cpp_name_or_partial, capitalize, conditional_string, cpp_name, gc_type,
                           has_extended_attribute_value, runtime_enabled_function_name,
-                          extended_attribute_value_as_list)
+                          extended_attribute_value_as_list, is_legacy_interface_type_checking)
 
 
 INTERFACE_H_INCLUDES = frozenset([
-    'bindings/common/ScriptWrappable.h',
+    'bindings/core/v8/ScriptWrappable.h',
+    'bindings/core/v8/ToV8.h',
     'bindings/core/v8/V8Binding.h',
     'bindings/core/v8/V8DOMWrapper.h',
     'bindings/core/v8/WrapperTypeInfo.h',
     'platform/heap/Handle.h',
 ])
 INTERFACE_CPP_INCLUDES = frozenset([
-    'bindings/core/v8/V8ExceptionState.h',
+    'bindings/core/v8/ExceptionState.h',
     'bindings/core/v8/V8DOMConfiguration.h',
-    'bindings/core/v8/V8HiddenValue.h',
     'bindings/core/v8/V8ObjectConstructor.h',
     'core/dom/ContextFeatures.h',
     'core/dom/Document.h',
@@ -77,20 +77,38 @@
     includes.update(INTERFACE_CPP_INCLUDES)
     header_includes = set(INTERFACE_H_INCLUDES)
 
-    parent_interface = interface.parent
-    if parent_interface:
-        header_includes.update(v8_types.includes_for_interface(parent_interface))
+    if interface.is_partial:
+        # A partial interface definition cannot specify that the interface
+        # inherits from another interface. Inheritance must be specified on
+        # the original interface definition.
+        parent_interface = None
+        is_event_target = False
+        # partial interface needs the definition of its original interface.
+        includes.add('bindings/core/v8/V8%s.h' % interface.name)
+    else:
+        parent_interface = interface.parent
+        if parent_interface:
+            header_includes.update(v8_types.includes_for_interface(parent_interface))
+        is_event_target = inherits_interface(interface.name, 'EventTarget')
+
     extended_attributes = interface.extended_attributes
 
-    is_audio_buffer = inherits_interface(interface.name, 'AudioBuffer')
-    if is_audio_buffer:
-        includes.add('modules/webaudio/AudioBuffer.h')
-
-    is_document = inherits_interface(interface.name, 'Document')
-    if is_document:
-        includes.update(['bindings/core/v8/ScriptController.h',
-                         'bindings/core/v8/WindowProxy.h',
-                         'core/frame/LocalFrame.h'])
+    is_array_buffer_or_view = interface.idl_type.is_array_buffer_or_view
+    is_typed_array_type = interface.idl_type.is_typed_array
+    if is_array_buffer_or_view:
+        includes.add('bindings/core/v8/V8ArrayBuffer.h')
+    if interface.name == 'ArrayBufferView':
+        includes.update((
+            'bindings/core/v8/V8Int8Array.h',
+            'bindings/core/v8/V8Int16Array.h',
+            'bindings/core/v8/V8Int32Array.h',
+            'bindings/core/v8/V8Uint8Array.h',
+            'bindings/core/v8/V8Uint8ClampedArray.h',
+            'bindings/core/v8/V8Uint16Array.h',
+            'bindings/core/v8/V8Uint32Array.h',
+            'bindings/core/v8/V8Float32Array.h',
+            'bindings/core/v8/V8Float64Array.h',
+            'bindings/core/v8/V8DataView.h'))
 
     # [ActiveDOMObject]
     is_active_dom_object = 'ActiveDOMObject' in extended_attributes
@@ -98,107 +116,90 @@
     # [CheckSecurity]
     is_check_security = 'CheckSecurity' in extended_attributes
     if is_check_security:
-        includes.add('bindings/common/BindingSecurity.h')
+        includes.add('bindings/core/v8/BindingSecurity.h')
 
     # [DependentLifetime]
     is_dependent_lifetime = 'DependentLifetime' in extended_attributes
 
-    # [Iterable]
-    iterator_method = None
-    if 'Iterable' in extended_attributes:
-        iterator_operation = IdlOperation(interface.idl_name)
-        iterator_operation.name = 'iterator'
-        iterator_operation.idl_type = IdlType('Iterator')
-        iterator_operation.extended_attributes['RaisesException'] = None
-        iterator_operation.extended_attributes['CallWith'] = 'ScriptState'
-        iterator_method = v8_methods.method_context(interface,
-                                                    iterator_operation)
-
     # [MeasureAs]
     is_measure_as = 'MeasureAs' in extended_attributes
     if is_measure_as:
         includes.add('core/frame/UseCounter.h')
 
     # [SetWrapperReferenceFrom]
-    reachable_node_function = extended_attributes.get('SetWrapperReferenceFrom')
-    if reachable_node_function:
+    set_wrapper_reference_from = extended_attributes.get('SetWrapperReferenceFrom')
+    if set_wrapper_reference_from:
         includes.update(['bindings/core/v8/V8GCController.h',
                          'core/dom/Element.h'])
 
     # [SetWrapperReferenceTo]
-    set_wrapper_reference_to_list = [{
-        'name': argument.name,
-        # FIXME: properly should be:
-        # 'cpp_type': argument.idl_type.cpp_type_args(raw_type=True),
-        # (if type is non-wrapper type like NodeFilter, normally RefPtr)
-        # Raw pointers faster though, and NodeFilter hacky anyway.
-        'cpp_type': argument.idl_type.implemented_as + '*',
-        'idl_type': argument.idl_type,
-        'v8_type': v8_types.v8_type(argument.idl_type.name),
-    } for argument in extended_attributes.get('SetWrapperReferenceTo', [])]
-    for set_wrapper_reference_to in set_wrapper_reference_to_list:
+    set_wrapper_reference_to_argument = extended_attributes.get('SetWrapperReferenceTo')
+    set_wrapper_reference_to = None
+    if set_wrapper_reference_to_argument:
+        set_wrapper_reference_to = {
+            'name': set_wrapper_reference_to_argument.name,
+            # FIXME: properly should be:
+            # 'cpp_type': set_wrapper_reference_to_argument.idl_type.cpp_type_args(raw_type=True),
+            # (if type is non-wrapper type like NodeFilter, normally RefPtr)
+            # Raw pointers faster though, and NodeFilter hacky anyway.
+            'cpp_type': set_wrapper_reference_to_argument.idl_type.implemented_as + '*',
+            'idl_type': set_wrapper_reference_to_argument.idl_type,
+            'v8_type': v8_types.v8_type(set_wrapper_reference_to_argument.idl_type.name),
+        }
         set_wrapper_reference_to['idl_type'].add_includes_for_type()
 
-    # [NotScriptWrappable]
-    is_script_wrappable = 'NotScriptWrappable' not in extended_attributes
-
-    # [SpecialWrapFor]
-    if 'SpecialWrapFor' in extended_attributes:
-        special_wrap_for = extended_attribute_value_as_list(interface, 'SpecialWrapFor')
-    else:
-        special_wrap_for = []
-    for special_wrap_interface in special_wrap_for:
-        v8_types.add_includes_for_interface(special_wrap_interface)
-
-    # [Custom=Wrap], [SetWrapperReferenceFrom]
+    # [SetWrapperReferenceFrom]
     has_visit_dom_wrapper = (
         has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or
-        reachable_node_function or
-        set_wrapper_reference_to_list)
+        set_wrapper_reference_from or set_wrapper_reference_to)
 
     this_gc_type = gc_type(interface)
 
     wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Node') else 'ObjectClassId')
 
+    v8_class_name = v8_utilities.v8_class_name(interface)
+    cpp_class_name = cpp_name(interface)
+    cpp_class_name_or_partial = cpp_name_or_partial(interface)
+    v8_class_name_or_partial = v8_utilities.v8_class_name_or_partial(interface)
+
     context = {
         'conditional_string': conditional_string(interface),  # [Conditional]
-        'cpp_class': cpp_name(interface),
+        'cpp_class': cpp_class_name,
+        'cpp_class_or_partial': cpp_class_name_or_partial,
+        'event_target_inheritance': 'InheritFromEventTarget' if is_event_target else 'NotInheritFromEventTarget',
         'gc_type': this_gc_type,
         # FIXME: Remove 'EventTarget' special handling, http://crbug.com/383699
         'has_access_check_callbacks': (is_check_security and
                                        interface.name != 'Window' and
                                        interface.name != 'EventTarget'),
         'has_custom_legacy_call_as_function': has_extended_attribute_value(interface, 'Custom', 'LegacyCallAsFunction'),  # [Custom=LegacyCallAsFunction]
-        'has_custom_to_v8': has_extended_attribute_value(interface, 'Custom', 'ToV8'),  # [Custom=ToV8]
-        'has_custom_wrap': has_extended_attribute_value(interface, 'Custom', 'Wrap'),  # [Custom=Wrap]
+        'has_partial_interface': len(interface.partial_interfaces) > 0,
         'has_visit_dom_wrapper': has_visit_dom_wrapper,
         'header_includes': header_includes,
         'interface_name': interface.name,
         'is_active_dom_object': is_active_dom_object,
-        'is_audio_buffer': is_audio_buffer,
+        'is_array_buffer_or_view': is_array_buffer_or_view,
         'is_check_security': is_check_security,
-        'is_dependent_lifetime': is_dependent_lifetime,
-        'is_document': is_document,
-        'is_event_target': inherits_interface(interface.name, 'EventTarget'),
+        'is_event_target': is_event_target,
         'is_exception': interface.is_exception,
         'is_node': inherits_interface(interface.name, 'Node'),
-        'is_script_wrappable': is_script_wrappable,
-        'iterator_method': iterator_method,
+        'is_partial': interface.is_partial,
+        'is_typed_array_type': is_typed_array_type,
         'lifetime': 'Dependent'
             if (has_visit_dom_wrapper or
                 is_active_dom_object or
                 is_dependent_lifetime)
             else 'Independent',
-        'measure_as': v8_utilities.measure_as(interface),  # [MeasureAs]
+        'measure_as': v8_utilities.measure_as(interface, None),  # [MeasureAs]
         'parent_interface': parent_interface,
         'pass_cpp_type': cpp_template_type(
             cpp_ptr_type('PassRefPtr', 'RawPtr', this_gc_type),
             cpp_name(interface)),
-        'reachable_node_function': reachable_node_function,
         'runtime_enabled_function': runtime_enabled_function_name(interface),  # [RuntimeEnabled]
-        'set_wrapper_reference_to_list': set_wrapper_reference_to_list,
-        'special_wrap_for': special_wrap_for,
-        'v8_class': v8_utilities.v8_class_name(interface),
+        'set_wrapper_reference_from': set_wrapper_reference_from,
+        'set_wrapper_reference_to': set_wrapper_reference_to,
+        'v8_class': v8_class_name,
+        'v8_class_or_partial': v8_class_name_or_partial,
         'wrapper_class_id': wrapper_class_id,
     }
 
@@ -210,7 +211,7 @@
                     # Handle named constructors separately
                     if constructor.name == 'Constructor']
     if len(constructors) > 1:
-        context['constructor_overloads'] = overloads_context(constructors)
+        context['constructor_overloads'] = overloads_context(interface, constructors)
 
     # [CustomConstructor]
     custom_constructors = [{  # Only needed for computing interface length
@@ -218,35 +219,38 @@
             number_of_required_arguments(constructor),
     } for constructor in interface.custom_constructors]
 
-    # [EventConstructor]
-    has_event_constructor = 'EventConstructor' in extended_attributes
-    any_type_attributes = [attribute for attribute in interface.attributes
-                           if attribute.idl_type.name == 'Any']
-    if has_event_constructor:
-        includes.add('bindings/core/v8/Dictionary.h')
-        if any_type_attributes:
-            includes.add('bindings/core/v8/SerializedScriptValue.h')
-
     # [NamedConstructor]
     named_constructor = named_constructor_context(interface)
 
-    if (constructors or custom_constructors or has_event_constructor or
-        named_constructor):
+    if constructors or custom_constructors or named_constructor:
+        if interface.is_partial:
+            raise Exception('[Constructor] and [NamedConstructor] MUST NOT be'
+                            ' specified on partial interface definitions:'
+                            '%s' % interface.name)
+
         includes.add('bindings/core/v8/V8ObjectConstructor.h')
         includes.add('core/frame/LocalDOMWindow.h')
 
+    # [Unscopeable] attributes and methods
+    unscopeables = []
+    for attribute in interface.attributes:
+        if 'Unscopeable' in attribute.extended_attributes:
+            unscopeables.append((attribute.name, v8_utilities.runtime_enabled_function_name(attribute)))
+    for method in interface.operations:
+        if 'Unscopeable' in method.extended_attributes:
+            unscopeables.append((method.name, v8_utilities.runtime_enabled_function_name(method)))
+
     context.update({
-        'any_type_attributes': any_type_attributes,
         'constructors': constructors,
         'has_custom_constructor': bool(custom_constructors),
-        'has_event_constructor': has_event_constructor,
         'interface_length':
             interface_length(interface, constructors + custom_constructors),
         'is_constructor_raises_exception': extended_attributes.get('RaisesException') == 'Constructor',  # [RaisesException=Constructor]
         'named_constructor': named_constructor,
+        'unscopeables': sorted(unscopeables),
     })
 
-    constants = [constant_context(constant) for constant in interface.constants]
+    constants = [constant_context(constant, interface) for constant in interface.constants]
 
     special_getter_constants = []
     runtime_enabled_constants = []
@@ -275,42 +279,219 @@
 
     # Attributes
     attributes = [v8_attributes.attribute_context(interface, attribute)
-                  for attribute in interface.attributes
-                  if not v8_utilities.dart_custom_method(attribute.extended_attributes)]
+                  for attribute in interface.attributes]
+
+    has_conditional_attributes = any(attribute['exposed_test'] for attribute in attributes)
+    if has_conditional_attributes and interface.is_partial:
+        raise Exception('Conditional attributes between partial interfaces in modules and the original interfaces(%s) in core are not allowed.' % interface.name)
+
     context.update({
         'attributes': attributes,
-        'has_accessors': any(attribute['is_expose_js_accessors'] and attribute['should_be_exposed_to_script'] for attribute in attributes),
+        'has_accessor_configuration': any(
+            attribute['is_expose_js_accessors'] and
+            not (attribute['is_static'] or
+                 attribute['runtime_enabled_function']) and
+            attribute['should_be_exposed_to_script']
+            for attribute in attributes),
         'has_attribute_configuration': any(
              not (attribute['is_expose_js_accessors'] or
                   attribute['is_static'] or
-                  attribute['runtime_enabled_function'] or
-                  attribute['per_context_enabled_function'])
+                  attribute['runtime_enabled_function'])
              and attribute['should_be_exposed_to_script']
              for attribute in attributes),
-        'has_conditional_attributes': any(attribute['per_context_enabled_function'] or attribute['exposed_test'] for attribute in attributes),
         'has_constructor_attributes': any(attribute['constructor_type'] for attribute in attributes),
         'has_replaceable_attributes': any(attribute['is_replaceable'] for attribute in attributes),
     })
 
     # Methods
-    methods = [v8_methods.method_context(interface, method)
-               for method in interface.operations
-               if (method.name and  # Skip anonymous special operations (methods)
-                   not v8_utilities.dart_custom_method(method.extended_attributes))]
-    compute_method_overloads_context(methods)
+    methods = []
+    if interface.original_interface:
+        methods.extend([v8_methods.method_context(interface, operation, is_visible=False)
+                        for operation in interface.original_interface.operations
+                        if operation.name])
+    methods.extend([v8_methods.method_context(interface, method)
+                    for method in interface.operations
+                    if method.name])  # Skip anonymous special operations (methods)
+    if interface.partial_interfaces:
+        assert len(interface.partial_interfaces) == len(set(interface.partial_interfaces))
+        for partial_interface in interface.partial_interfaces:
+            methods.extend([v8_methods.method_context(interface, operation, is_visible=False)
+                            for operation in partial_interface.operations
+                            if operation.name])
+    compute_method_overloads_context(interface, methods)
+
+    def generated_method(return_type, name, arguments=None, extended_attributes=None, implemented_as=None):
+        operation = IdlOperation(interface.idl_name)
+        operation.idl_type = return_type
+        operation.name = name
+        if arguments:
+            operation.arguments = arguments
+        if extended_attributes:
+            operation.extended_attributes.update(extended_attributes)
+        if implemented_as is None:
+            implemented_as = name + 'ForBinding'
+        operation.extended_attributes['ImplementedAs'] = implemented_as
+        return v8_methods.method_context(interface, operation)
+
+    def generated_argument(idl_type, name, is_optional=False, extended_attributes=None):
+        argument = IdlArgument(interface.idl_name)
+        argument.idl_type = idl_type
+        argument.name = name
+        argument.is_optional = is_optional
+        if extended_attributes:
+            argument.extended_attributes.update(extended_attributes)
+        return argument
+
+    # [Iterable], iterable<>, maplike<> and setlike<>
+    iterator_method = None
+    # FIXME: support Iterable in partial interfaces. However, we don't
+    # need to support iterator overloads between interface and
+    # partial interface definitions.
+    # http://heycam.github.io/webidl/#idl-overloading
+    if (not interface.is_partial
+        and (interface.iterable or interface.maplike or interface.setlike
+             or 'Iterable' in extended_attributes)):
+
+        used_extended_attributes = {}
+
+        if interface.iterable:
+            used_extended_attributes.update(interface.iterable.extended_attributes)
+        elif interface.maplike:
+            used_extended_attributes.update(interface.maplike.extended_attributes)
+        elif interface.setlike:
+            used_extended_attributes.update(interface.setlike.extended_attributes)
+
+        if 'RaisesException' in used_extended_attributes:
+            raise ValueError('[RaisesException] is implied for iterable<>/maplike<>/setlike<>')
+        if 'CallWith' in used_extended_attributes:
+            raise ValueError('[CallWith=ScriptState] is implied for iterable<>/maplike<>/setlike<>')
+
+        used_extended_attributes.update({
+            'RaisesException': None,
+            'CallWith': 'ScriptState',
+        })
+
+        forEach_extended_attributes = used_extended_attributes.copy()
+        forEach_extended_attributes.update({
+            'CallWith': ['ScriptState', 'ThisValue'],
+        })
+
+        def generated_iterator_method(name, implemented_as=None):
+            return generated_method(
+                return_type=IdlType('Iterator'),
+                name=name,
+                extended_attributes=used_extended_attributes,
+                implemented_as=implemented_as)
+
+        iterator_method = generated_iterator_method('iterator', implemented_as='iterator')
+
+        if interface.iterable or interface.maplike or interface.setlike:
+            implicit_methods = [
+                generated_iterator_method('keys'),
+                generated_iterator_method('values'),
+                generated_iterator_method('entries'),
+
+                # void forEach(Function callback, [Default=Undefined] optional any thisArg)
+                generated_method(IdlType('void'), 'forEach',
+                                 arguments=[generated_argument(IdlType('Function'), 'callback'),
+                                            generated_argument(IdlType('any'), 'thisArg',
+                                                               is_optional=True,
+                                                               extended_attributes={'Default': 'Undefined'})],
+                                 extended_attributes=forEach_extended_attributes),
+            ]
+
+            if interface.maplike:
+                key_argument = generated_argument(interface.maplike.key_type, 'key')
+                value_argument = generated_argument(interface.maplike.value_type, 'value')
+
+                implicit_methods.extend([
+                    generated_method(IdlType('boolean'), 'has',
+                                     arguments=[key_argument],
+                                     extended_attributes=used_extended_attributes),
+                    generated_method(IdlType('any'), 'get',
+                                     arguments=[key_argument],
+                                     extended_attributes=used_extended_attributes),
+                ])
+
+                if not interface.maplike.is_read_only:
+                    implicit_methods.extend([
+                        generated_method(IdlType('void'), 'clear',
+                                         extended_attributes=used_extended_attributes),
+                        generated_method(IdlType('boolean'), 'delete',
+                                         arguments=[key_argument],
+                                         extended_attributes=used_extended_attributes),
+                        generated_method(IdlType(interface.name), 'set',
+                                         arguments=[key_argument, value_argument],
+                                         extended_attributes=used_extended_attributes),
+                    ])
+
+            if interface.setlike:
+                value_argument = generated_argument(interface.setlike.value_type, 'value')
+
+                implicit_methods.extend([
+                    generated_method(IdlType('boolean'), 'has',
+                                     arguments=[value_argument],
+                                     extended_attributes=used_extended_attributes),
+                ])
+
+                if not interface.setlike.is_read_only:
+                    implicit_methods.extend([
+                        generated_method(IdlType(interface.name), 'add',
+                                         arguments=[value_argument],
+                                         extended_attributes=used_extended_attributes),
+                        generated_method(IdlType('void'), 'clear',
+                                         extended_attributes=used_extended_attributes),
+                        generated_method(IdlType('boolean'), 'delete',
+                                         arguments=[value_argument],
+                                         extended_attributes=used_extended_attributes),
+                    ])
+
+            methods_by_name = {}
+            for method in methods:
+                methods_by_name.setdefault(method['name'], []).append(method)
+
+            for implicit_method in implicit_methods:
+                if implicit_method['name'] in methods_by_name:
+                    # FIXME: Check that the existing method is compatible.
+                    continue
+                methods.append(implicit_method)
+
+        # FIXME: maplike<> and setlike<> should also imply the presence of a
+        # 'size' attribute.
+
+    # Serializer
+    if interface.serializer:
+        serializer = interface.serializer
+        serializer_ext_attrs = serializer.extended_attributes.copy()
+        if serializer.operation:
+            return_type = serializer.operation.idl_type
+            implemented_as = serializer.operation.name
+        else:
+            return_type = IdlType('any')
+            implemented_as = None
+            if 'CallWith' not in serializer_ext_attrs:
+                serializer_ext_attrs['CallWith'] = 'ScriptState'
+        methods.append(generated_method(
+            return_type=return_type,
+            name='toJSON',
+            extended_attributes=serializer_ext_attrs,
+            implemented_as=implemented_as))
 
     # Stringifier
     if interface.stringifier:
         stringifier = interface.stringifier
-        method = IdlOperation(interface.idl_name)
-        method.name = 'toString'
-        method.idl_type = IdlType('DOMString')
-        method.extended_attributes.update(stringifier.extended_attributes)
+        stringifier_ext_attrs = stringifier.extended_attributes.copy()
         if stringifier.attribute:
-            method.extended_attributes['ImplementedAs'] = stringifier.attribute.name
+            implemented_as = stringifier.attribute.name
         elif stringifier.operation:
-            method.extended_attributes['ImplementedAs'] = stringifier.operation.name
-        methods.append(v8_methods.method_context(interface, method))
+            implemented_as = stringifier.operation.name
+        else:
+            implemented_as = 'toString'
+        methods.append(generated_method(
+            return_type=IdlType('DOMString'),
+            name='toString',
+            extended_attributes=stringifier_ext_attrs,
+            implemented_as=implemented_as))
 
     conditionally_enabled_methods = []
     custom_registration_methods = []
@@ -323,20 +504,29 @@
 
         if 'overloads' in method:
             overloads = method['overloads']
-            per_context_enabled_function = overloads['per_context_enabled_function_all']
+            if not overloads['visible']:
+                continue
+            # original interface will register instead of partial interface.
+            if overloads['has_partial_overloads'] and interface.is_partial:
+                continue
             conditionally_exposed_function = overloads['exposed_test_all']
             runtime_enabled_function = overloads['runtime_enabled_function_all']
-            has_custom_registration = overloads['has_custom_registration_all']
+            has_custom_registration = (overloads['has_custom_registration_all'] or
+                                       overloads['runtime_determined_lengths'])
         else:
-            per_context_enabled_function = method['per_context_enabled_function']
+            if not method['visible']:
+                continue
             conditionally_exposed_function = method['exposed_test']
             runtime_enabled_function = method['runtime_enabled_function']
             has_custom_registration = method['has_custom_registration']
 
-        if per_context_enabled_function or conditionally_exposed_function:
+        if has_custom_registration:
+            custom_registration_methods.append(method)
+            continue
+        if conditionally_exposed_function:
             conditionally_enabled_methods.append(method)
             continue
-        if runtime_enabled_function or has_custom_registration:
+        if runtime_enabled_function:
             custom_registration_methods.append(method)
             continue
         if method['should_be_exposed_to_script']:
@@ -354,7 +544,7 @@
         # enabled overloads are actually enabled, so length may be incorrect.
         # E.g., [RuntimeEnabled=Foo] void f(); void f(long x);
         # should have length 1 if Foo is not enabled, but length 0 if it is.
-        method['length'] = (method['overloads']['minarg'] if 'overloads' in method else
+        method['length'] = (method['overloads']['length'] if 'overloads' in method else
                             method['number_of_required_arguments'])
 
     context.update({
@@ -365,31 +555,46 @@
             for method in methods),
         'has_private_script': any(attribute['is_implemented_in_private_script'] for attribute in attributes) or
             any(method['is_implemented_in_private_script'] for method in methods),
+        'iterator_method': iterator_method,
         'method_configuration_methods': method_configuration_methods,
         'methods': methods,
     })
 
+    # Conditionally enabled members
+    has_conditional_attributes_on_instance = any(
+        attribute['exposed_test'] and attribute['on_instance']
+        for attribute in attributes)
+    has_conditional_attributes_on_prototype = any(
+        attribute['exposed_test'] and attribute['on_prototype']
+        for attribute in attributes)
     context.update({
-        'indexed_property_getter': indexed_property_getter(interface),
-        'indexed_property_setter': indexed_property_setter(interface),
-        'indexed_property_deleter': indexed_property_deleter(interface),
+        'has_conditional_attributes_on_instance':
+            has_conditional_attributes_on_instance,
+        'has_conditional_attributes_on_prototype':
+            has_conditional_attributes_on_prototype,
+    })
+
+    context.update({
+        'indexed_property_getter': property_getter(interface.indexed_property_getter, ['index']),
+        'indexed_property_setter': property_setter(interface.indexed_property_setter, interface),
+        'indexed_property_deleter': property_deleter(interface.indexed_property_deleter),
         'is_override_builtins': 'OverrideBuiltins' in extended_attributes,
-        'named_property_getter': named_property_getter(interface),
-        'named_property_setter': named_property_setter(interface),
-        'named_property_deleter': named_property_deleter(interface),
+        'named_property_getter': property_getter(interface.named_property_getter, ['propertyName']),
+        'named_property_setter': property_setter(interface.named_property_setter, interface),
+        'named_property_deleter': property_deleter(interface.named_property_deleter),
     })
 
     return context
 
 
 # [DeprecateAs], [Reflect], [RuntimeEnabled]
-def constant_context(constant):
+def constant_context(constant, interface):
     extended_attributes = constant.extended_attributes
     return {
         'cpp_class': extended_attributes.get('PartialInterfaceImplementedAs'),
         'deprecate_as': v8_utilities.deprecate_as(constant),  # [DeprecateAs]
         'idl_type': constant.idl_type.name,
-        'measure_as': v8_utilities.measure_as(constant),  # [MeasureAs]
+        'measure_as': v8_utilities.measure_as(constant, interface),  # [MeasureAs]
         'name': constant.name,
         # FIXME: use 'reflected_name' as correct 'name'
         'reflected_name': extended_attributes.get('Reflect', constant.name),
@@ -402,16 +607,16 @@
 # Overloads
 ################################################################################
 
-def compute_method_overloads_context(methods):
+def compute_method_overloads_context(interface, methods):
     # Regular methods
-    compute_method_overloads_context_by_type([method for method in methods
-                                              if not method['is_static']])
+    compute_method_overloads_context_by_type(
+        interface, [method for method in methods if not method['is_static']])
     # Static methods
-    compute_method_overloads_context_by_type([method for method in methods
-                                              if method['is_static']])
+    compute_method_overloads_context_by_type(
+        interface, [method for method in methods if method['is_static']])
 
 
-def compute_method_overloads_context_by_type(methods):
+def compute_method_overloads_context_by_type(interface, methods):
     """Computes |method.overload*| template values.
 
     Called separately for static and non-static (regular) methods,
@@ -425,7 +630,7 @@
     for name, overloads in method_overloads_by_name(methods):
         # Resolution function is generated after last overloaded function;
         # package necessary information into |method.overloads| for that method.
-        overloads[-1]['overloads'] = overloads_context(overloads)
+        overloads[-1]['overloads'] = overloads_context(interface, overloads)
         overloads[-1]['overloads']['name'] = name
 
 
@@ -443,7 +648,7 @@
     return sort_and_groupby(overloaded_methods, itemgetter('name'))
 
 
-def overloads_context(overloads):
+def overloads_context(interface, overloads):
     """Returns |overloads| template values for a single name.
 
     Sets |method.overload_index| in place for |method| in |overloads|
@@ -457,17 +662,58 @@
     lengths = [length for length, _ in effective_overloads_by_length]
     name = overloads[0].get('name', '<constructor>')
 
-    # Check and fail if all overloads with the shortest acceptable arguments
-    # list are runtime enabled, since we would otherwise set 'length' on the
-    # function object to an incorrect value when none of those overloads were
-    # actually enabled at runtime. The exception is if all overloads are
-    # controlled by the same runtime enabled feature, in which case there would
-    # be no function object at all if it is not enabled.
-    shortest_overloads = effective_overloads_by_length[0][1]
-    if (all(method.get('runtime_enabled_function')
-            for method, _, _ in shortest_overloads) and
-        not common_value(overloads, 'runtime_enabled_function')):
-        raise ValueError('Function.length of %s depends on runtime enabled features' % name)
+    runtime_determined_lengths = None
+    function_length = lengths[0]
+    runtime_determined_maxargs = None
+    maxarg = lengths[-1]
+
+    # The special case handling below is not needed if all overloads are
+    # runtime enabled by the same feature.
+    if not common_value(overloads, 'runtime_enabled_function'):
+        # Check if all overloads with the shortest acceptable arguments list are
+        # runtime enabled, in which case we need to have a runtime determined
+        # Function.length.
+        shortest_overloads = effective_overloads_by_length[0][1]
+        if (all(method.get('runtime_enabled_function')
+                for method, _, _ in shortest_overloads)):
+            # Generate a list of (length, runtime_enabled_functions) tuples.
+            runtime_determined_lengths = []
+            for length, effective_overloads in effective_overloads_by_length:
+                runtime_enabled_functions = set(
+                    method['runtime_enabled_function']
+                    for method, _, _ in effective_overloads
+                    if method.get('runtime_enabled_function'))
+                if not runtime_enabled_functions:
+                    # This "length" is unconditionally enabled, so stop here.
+                    runtime_determined_lengths.append((length, [None]))
+                    break
+                runtime_determined_lengths.append(
+                    (length, sorted(runtime_enabled_functions)))
+            function_length = ('%sV8Internal::%sMethodLength()'
+                               % (cpp_name_or_partial(interface), name))
+
+        # Check if all overloads with the longest required arguments list are
+        # runtime enabled, in which case we need to have a runtime determined
+        # maximum distinguishing argument index.
+        longest_overloads = effective_overloads_by_length[-1][1]
+        if (not common_value(overloads, 'runtime_enabled_function') and
+            all(method.get('runtime_enabled_function')
+                for method, _, _ in longest_overloads)):
+            # Generate a list of (length, runtime_enabled_functions) tuples.
+            runtime_determined_maxargs = []
+            for length, effective_overloads in reversed(effective_overloads_by_length):
+                runtime_enabled_functions = set(
+                    method['runtime_enabled_function']
+                    for method, _, _ in effective_overloads
+                    if method.get('runtime_enabled_function'))
+                if not runtime_enabled_functions:
+                    # This "length" is unconditionally enabled, so stop here.
+                    runtime_determined_maxargs.append((length, [None]))
+                    break
+                runtime_determined_maxargs.append(
+                    (length, sorted(runtime_enabled_functions)))
+            maxarg = ('%sV8Internal::%sMethodMaxArg()'
+                      % (cpp_name_or_partial(interface), name))
 
     # Check and fail if overloads disagree on any of the extended attributes
     # that affect how the method should be registered.
@@ -484,28 +730,46 @@
 
     # Check and fail if overloads disagree about whether the return type
     # is a Promise or not.
-    promise_overload_count = sum(1 for method in overloads if method.get('idl_type') == 'Promise')
+    promise_overload_count = sum(1 for method in overloads if method.get('returns_promise'))
     if promise_overload_count not in (0, len(overloads)):
         raise ValueError('Overloads of %s have conflicting Promise/non-Promise types'
                          % (name))
 
+    has_overload_visible = False
+    has_overload_not_visible = False
+    for overload in overloads:
+        if overload.get('visible', True):
+            # If there exists an overload which is visible, need to generate
+            # overload_resolution, i.e. overlods_visible should be True.
+            has_overload_visible = True
+        else:
+            has_overload_not_visible = True
+
+    # If some overloads are not visible and others are visible,
+    # the method is overloaded between core and modules.
+    has_partial_overloads = has_overload_visible and has_overload_not_visible
+
     return {
         'deprecate_all_as': common_value(overloads, 'deprecate_as'),  # [DeprecateAs]
         'exposed_test_all': common_value(overloads, 'exposed_test'),  # [Exposed]
         'has_custom_registration_all': common_value(overloads, 'has_custom_registration'),
+        'length': function_length,
         'length_tests_methods': length_tests_methods(effective_overloads_by_length),
         # 1. Let maxarg be the length of the longest type list of the
         # entries in S.
-        'maxarg': lengths[-1],
+        'maxarg': maxarg,
         'measure_all_as': common_value(overloads, 'measure_as'),  # [MeasureAs]
-        'minarg': lengths[0],
-        'per_context_enabled_function_all': common_value(overloads, 'per_context_enabled_function'),  # [PerContextEnabled]
+        'returns_promise_all': promise_overload_count > 0,
+        'runtime_determined_lengths': runtime_determined_lengths,
+        'runtime_determined_maxargs': runtime_determined_maxargs,
         'runtime_enabled_function_all': common_value(overloads, 'runtime_enabled_function'),  # [RuntimeEnabled]
         'valid_arities': lengths
             # Only need to report valid arities if there is a gap in the
             # sequence of possible lengths, otherwise invalid length means
             # "not enough arguments".
             if lengths[-1] - lengths[0] != len(lengths) - 1 else None,
+        'visible': has_overload_visible,
+        'has_partial_overloads': has_partial_overloads,
     }
 
 
@@ -570,8 +834,9 @@
         # if X’s argument at index i is a final, variadic argument, “optional”
         # if the argument is optional, and “required” otherwise.
         # (“optionality list”)
-        # (We’re just using a boolean for optional vs. required.)
-        o = tuple(argument['is_optional'] for argument in arguments)
+        # (We’re just using a boolean for optional/variadic vs. required.)
+        o = tuple(argument['is_optional'] or argument['is_variadic']
+                  for argument in arguments)
         # 4. Add to S the tuple <X, t0..n−1, o0..n−1>.
         S.append((X, t, o))
         # 5. If X is declared to be variadic, then:
@@ -776,11 +1041,32 @@
         test = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate())'.format(idl_type=idl_type.base_type, cpp_value=cpp_value)
         yield test, method
 
-    # 8. Otherwise: if V is any kind of object except for a native Date object,
+    # 13. Otherwise: if IsCallable(V) is true, and there is an entry in S that
+    # has one of the following types at position i of its type list,
+    # • a callback function type
+    # ...
+    #
+    # FIXME:
+    # We test for functions rather than callability, which isn't strictly the
+    # same thing.
+    try:
+        method = next(method for idl_type, method in idl_types_methods
+                      if idl_type.is_callback_function)
+        test = '%s->IsFunction()' % cpp_value
+        yield test, method
+    except StopIteration:
+        pass
+
+    # 14. Otherwise: if V is any kind of object except for a native Date object,
+    # a native RegExp object, and there is an entry in S that has one of the
+    # following types at position i of its type list,
+    # • a sequence type
+    # ...
+    #
+    # 15. Otherwise: if V is any kind of object except for a native Date object,
     # a native RegExp object, and there is an entry in S that has one of the
     # following types at position i of its type list,
     # • an array type
-    # • a sequence type
     # ...
     # • a dictionary
     #
@@ -831,7 +1117,7 @@
     # types at position i of its type list,
     # • DOMString
     # • ByteString
-    # • ScalarValueString [a DOMString typedef, per definition.]
+    # • USVString
     # • an enumeration type
     try:
         method = next(method for idl_type, method in idl_types_methods
@@ -930,6 +1216,10 @@
             # [ConstructorCallWith=ExecutionContext]
             has_extended_attribute_value(interface,
                 'ConstructorCallWith', 'ExecutionContext'),
+        'is_call_with_script_state':
+            # [ConstructorCallWith=ScriptState]
+            has_extended_attribute_value(
+                interface, 'ConstructorCallWith', 'ScriptState'),
         'is_constructor': True,
         'is_named_constructor': False,
         'is_raises_exception': is_constructor_raises_exception,
@@ -963,8 +1253,6 @@
 
 def interface_length(interface, constructors):
     # Docs: http://heycam.github.io/webidl/#es-interface-call
-    if 'EventConstructor' in interface.extended_attributes:
-        return 1
     if not constructors:
         return 0
     return min(constructor['number_of_required_arguments']
@@ -977,37 +1265,44 @@
 ################################################################################
 
 def property_getter(getter, cpp_arguments):
+    if not getter:
+        return None
+
     def is_null_expression(idl_type):
-        if idl_type.is_union_type:
-            notnull = ' || '.join([
-                    member_argument['null_check_value']
-                    for member_argument in idl_type.union_arguments])
-            return '!(%s)' % notnull
-        if idl_type.name == 'String':
+        if idl_type.use_output_parameter_for_result:
+            return 'result.isNull()'
+        if idl_type.is_string_type:
             return 'result.isNull()'
         if idl_type.is_interface_type:
             return '!result'
+        if idl_type.base_type in ('any', 'object'):
+            return 'result.isEmpty()'
         return ''
 
-    idl_type = getter.idl_type
     extended_attributes = getter.extended_attributes
+    idl_type = getter.idl_type
+    idl_type.add_includes_for_type(extended_attributes)
+    is_call_with_script_state = v8_utilities.has_extended_attribute_value(getter, 'CallWith', 'ScriptState')
     is_raises_exception = 'RaisesException' in extended_attributes
+    use_output_parameter_for_result = idl_type.use_output_parameter_for_result
 
     # FIXME: make more generic, so can use v8_methods.cpp_value
     cpp_method_name = 'impl->%s' % cpp_name(getter)
 
+    if is_call_with_script_state:
+        cpp_arguments.insert(0, 'scriptState')
     if is_raises_exception:
         cpp_arguments.append('exceptionState')
-    union_arguments = idl_type.union_arguments
-    if union_arguments:
-        cpp_arguments.extend([member_argument['cpp_value']
-                              for member_argument in union_arguments])
+    if use_output_parameter_for_result:
+        cpp_arguments.append('result')
 
     cpp_value = '%s(%s)' % (cpp_method_name, ', '.join(cpp_arguments))
 
     return {
         'cpp_type': idl_type.cpp_type,
         'cpp_value': cpp_value,
+        'do_not_check_security': 'DoNotCheckSecurity' in extended_attributes,
+        'is_call_with_script_state': is_call_with_script_state,
         'is_custom':
             'Custom' in extended_attributes and
             (not extended_attributes['Custom'] or
@@ -1020,23 +1315,34 @@
         'is_null_expression': is_null_expression(idl_type),
         'is_raises_exception': is_raises_exception,
         'name': cpp_name(getter),
-        'union_arguments': union_arguments,
+        'use_output_parameter_for_result': use_output_parameter_for_result,
         'v8_set_return_value': idl_type.v8_set_return_value('result', extended_attributes=extended_attributes, script_wrappable='impl', release=idl_type.release),
     }
 
 
-def property_setter(setter):
-    idl_type = setter.arguments[1].idl_type
+def property_setter(setter, interface):
+    if not setter:
+        return None
+
     extended_attributes = setter.extended_attributes
+    idl_type = setter.arguments[1].idl_type
+    idl_type.add_includes_for_type(extended_attributes)
+    is_call_with_script_state = v8_utilities.has_extended_attribute_value(setter, 'CallWith', 'ScriptState')
     is_raises_exception = 'RaisesException' in extended_attributes
+
+    # [TypeChecking=Interface] / [LegacyInterfaceTypeChecking]
+    has_type_checking_interface = (
+        not is_legacy_interface_type_checking(interface, setter) and
+        idl_type.is_wrapper_type)
+
     return {
-        'has_type_checking_interface':
-            has_extended_attribute_value(setter, 'TypeChecking', 'Interface') and
-            idl_type.is_wrapper_type,
-        'idl_type': idl_type.base_type,
-        'is_custom': 'Custom' in extended_attributes,
         'has_exception_state': (is_raises_exception or
                                 idl_type.v8_conversion_needs_exception_state),
+        'has_type_checking_interface': has_type_checking_interface,
+        'idl_type': idl_type.base_type,
+        'is_call_with_script_state': is_call_with_script_state,
+        'is_custom': 'Custom' in extended_attributes,
+        'is_nullable': idl_type.is_nullable,
         'is_raises_exception': is_raises_exception,
         'name': cpp_name(setter),
         'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value(
@@ -1045,121 +1351,15 @@
 
 
 def property_deleter(deleter):
-    idl_type = deleter.idl_type
-    if str(idl_type) != 'boolean':
-        raise Exception(
-            'Only deleters with boolean type are allowed, but type is "%s"' %
-            idl_type)
+    if not deleter:
+        return None
+
     extended_attributes = deleter.extended_attributes
+    idl_type = deleter.idl_type
+    is_call_with_script_state = v8_utilities.has_extended_attribute_value(deleter, 'CallWith', 'ScriptState')
     return {
+        'is_call_with_script_state': is_call_with_script_state,
         'is_custom': 'Custom' in extended_attributes,
         'is_raises_exception': 'RaisesException' in extended_attributes,
         'name': cpp_name(deleter),
     }
-
-
-################################################################################
-# Indexed properties
-# http://heycam.github.io/webidl/#idl-indexed-properties
-################################################################################
-
-def indexed_property_getter(interface):
-    try:
-        # Find indexed property getter, if present; has form:
-        # getter TYPE [OPTIONAL_IDENTIFIER](unsigned long ARG1)
-        getter = next(
-            method
-            for method in interface.operations
-            if ('getter' in method.specials and
-                len(method.arguments) == 1 and
-                str(method.arguments[0].idl_type) == 'unsigned long'))
-    except StopIteration:
-        return None
-
-    return property_getter(getter, ['index'])
-
-
-def indexed_property_setter(interface):
-    try:
-        # Find indexed property setter, if present; has form:
-        # setter RETURN_TYPE [OPTIONAL_IDENTIFIER](unsigned long ARG1, ARG_TYPE ARG2)
-        setter = next(
-            method
-            for method in interface.operations
-            if ('setter' in method.specials and
-                len(method.arguments) == 2 and
-                str(method.arguments[0].idl_type) == 'unsigned long'))
-    except StopIteration:
-        return None
-
-    return property_setter(setter)
-
-
-def indexed_property_deleter(interface):
-    try:
-        # Find indexed property deleter, if present; has form:
-        # deleter TYPE [OPTIONAL_IDENTIFIER](unsigned long ARG)
-        deleter = next(
-            method
-            for method in interface.operations
-            if ('deleter' in method.specials and
-                len(method.arguments) == 1 and
-                str(method.arguments[0].idl_type) == 'unsigned long'))
-    except StopIteration:
-        return None
-
-    return property_deleter(deleter)
-
-
-################################################################################
-# Named properties
-# http://heycam.github.io/webidl/#idl-named-properties
-################################################################################
-
-def named_property_getter(interface):
-    try:
-        # Find named property getter, if present; has form:
-        # getter TYPE [OPTIONAL_IDENTIFIER](DOMString ARG1)
-        getter = next(
-            method
-            for method in interface.operations
-            if ('getter' in method.specials and
-                len(method.arguments) == 1 and
-                str(method.arguments[0].idl_type) == 'DOMString'))
-    except StopIteration:
-        return None
-
-    getter.name = getter.name or 'anonymousNamedGetter'
-    return property_getter(getter, ['propertyName'])
-
-
-def named_property_setter(interface):
-    try:
-        # Find named property setter, if present; has form:
-        # setter RETURN_TYPE [OPTIONAL_IDENTIFIER](DOMString ARG1, ARG_TYPE ARG2)
-        setter = next(
-            method
-            for method in interface.operations
-            if ('setter' in method.specials and
-                len(method.arguments) == 2 and
-                str(method.arguments[0].idl_type) == 'DOMString'))
-    except StopIteration:
-        return None
-
-    return property_setter(setter)
-
-
-def named_property_deleter(interface):
-    try:
-        # Find named property deleter, if present; has form:
-        # deleter TYPE [OPTIONAL_IDENTIFIER](DOMString ARG)
-        deleter = next(
-            method
-            for method in interface.operations
-            if ('deleter' in method.specials and
-                len(method.arguments) == 1 and
-                str(method.arguments[0].idl_type) == 'DOMString'))
-    except StopIteration:
-        return None
-
-    return property_deleter(deleter)
diff --git a/bindings/scripts/v8_methods.py b/bindings/scripts/v8_methods.py
index d330712..7db6e4e 100644
--- a/bindings/scripts/v8_methods.py
+++ b/bindings/scripts/v8_methods.py
@@ -39,7 +39,8 @@
 from v8_globals import includes
 import v8_types
 import v8_utilities
-from v8_utilities import has_extended_attribute_value
+from v8_utilities import (has_extended_attribute_value, is_unforgeable,
+                          is_legacy_interface_type_checking)
 
 
 # Methods with any of these require custom method registration code in the
@@ -62,20 +63,22 @@
             idl_type.is_explicit_nullable)
 
 
-def method_context(interface, method):
+def method_context(interface, method, is_visible=True):
     arguments = method.arguments
     extended_attributes = method.extended_attributes
     idl_type = method.idl_type
     is_static = method.is_static
     name = method.name
 
-    idl_type.add_includes_for_type()
+    if is_visible:
+        idl_type.add_includes_for_type(extended_attributes)
+
     this_cpp_value = cpp_value(interface, method, len(arguments))
 
     def function_template():
         if is_static:
             return 'functionTemplate'
-        if 'Unforgeable' in extended_attributes:
+        if is_unforgeable(interface, method):
             return 'instanceTemplate'
         return 'prototypeTemplate'
 
@@ -93,11 +96,12 @@
         includes.update(['bindings/core/v8/ScriptCallStackFactory.h',
                          'core/inspector/ScriptArguments.h'])
     is_call_with_script_state = has_extended_attribute_value(method, 'CallWith', 'ScriptState')
-    if is_call_with_script_state:
-        includes.add('bindings/core/v8/V8ScriptState.h')
+    is_call_with_this_value = has_extended_attribute_value(method, 'CallWith', 'ThisValue')
+    if is_call_with_script_state or is_call_with_this_value:
+        includes.add('bindings/core/v8/ScriptState.h')
     is_check_security_for_node = 'CheckSecurity' in extended_attributes
     if is_check_security_for_node:
-        includes.add('bindings/common/BindingSecurity.h')
+        includes.add('bindings/core/v8/BindingSecurity.h')
     is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attributes
     if is_custom_element_callbacks:
         includes.add('core/dom/custom/CustomElementProcessingStack.h')
@@ -113,10 +117,20 @@
         not is_do_not_check_security)
 
     is_raises_exception = 'RaisesException' in extended_attributes
+    is_custom_call_prologue = has_extended_attribute_value(method, 'Custom', 'CallPrologue')
+    is_custom_call_epilogue = has_extended_attribute_value(method, 'Custom', 'CallEpilogue')
+    is_post_message = 'PostMessage' in extended_attributes
+    if is_post_message:
+        includes.add('bindings/core/v8/SerializedScriptValueFactory.h')
+        includes.add('core/dom/DOMArrayBuffer.h')
+        includes.add('core/dom/MessagePort.h')
+
+    if 'LenientThis' in extended_attributes:
+        raise Exception('[LenientThis] is not supported for operations.')
 
     return {
         'activity_logging_world_list': v8_utilities.activity_logging_world_list(method),  # [ActivityLogging]
-        'arguments': [argument_context(interface, method, argument, index)
+        'arguments': [argument_context(interface, method, argument, index, is_visible=is_visible)
                       for index, argument in enumerate(arguments)],
         'argument_declarations_for_private_script':
             argument_declarations_for_private_script(interface, method),
@@ -131,7 +145,9 @@
         'deprecate_as': v8_utilities.deprecate_as(method),  # [DeprecateAs]
         'exposed_test': v8_utilities.exposed(method, interface),  # [Exposed]
         'function_template': function_template(),
-        'has_custom_registration': is_static or
+        'has_custom_registration':
+            is_static or
+            is_unforgeable(interface, method) or
             v8_utilities.has_extended_attribute(
                 method, CUSTOM_REGISTRATION_EXTENDED_ATTRIBUTES),
         'has_exception_state':
@@ -145,10 +161,14 @@
         'is_call_with_execution_context': has_extended_attribute_value(method, 'CallWith', 'ExecutionContext'),
         'is_call_with_script_arguments': is_call_with_script_arguments,
         'is_call_with_script_state': is_call_with_script_state,
+        'is_call_with_this_value': is_call_with_this_value,
         'is_check_security_for_frame': is_check_security_for_frame,
         'is_check_security_for_node': is_check_security_for_node,
         'is_check_security_for_window': is_check_security_for_window,
-        'is_custom': 'Custom' in extended_attributes,
+        'is_custom': 'Custom' in extended_attributes and
+            not (is_custom_call_prologue or is_custom_call_epilogue),
+        'is_custom_call_prologue': is_custom_call_prologue,
+        'is_custom_call_epilogue': is_custom_call_epilogue,
         'is_custom_element_callbacks': is_custom_element_callbacks,
         'is_do_not_check_security': is_do_not_check_security,
         'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attributes,
@@ -157,11 +177,12 @@
         'is_partial_interface_member':
             'PartialInterfaceImplementedAs' in extended_attributes,
         'is_per_world_bindings': 'PerWorldBindings' in extended_attributes,
+        'is_post_message': is_post_message,
         'is_raises_exception': is_raises_exception,
-        'is_read_only': 'Unforgeable' in extended_attributes,
+        'is_read_only': is_unforgeable(interface, method),
         'is_static': is_static,
         'is_variadic': arguments and arguments[-1].is_variadic,
-        'measure_as': v8_utilities.measure_as(method),  # [MeasureAs]
+        'measure_as': v8_utilities.measure_as(method, interface),  # [MeasureAs]
         'name': name,
         'number_of_arguments': len(arguments),
         'number_of_required_arguments': len([
@@ -170,72 +191,84 @@
         'number_of_required_or_variadic_arguments': len([
             argument for argument in arguments
             if not argument.is_optional]),
+        'on_instance': v8_utilities.on_instance(interface, method),
+        'on_interface': v8_utilities.on_interface(interface, method),
+        'on_prototype': v8_utilities.on_prototype(interface, method),
         'only_exposed_to_private_script': is_only_exposed_to_private_script,
-        'per_context_enabled_function': v8_utilities.per_context_enabled_function_name(method),  # [PerContextEnabled]
         'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value(
-            extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->isolate()', used_in_private_script=True),
-        'property_attributes': property_attributes(method),
+            extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->isolate()', bailout_return_value='false'),
+        'property_attributes': property_attributes(interface, method),
+        'returns_promise': method.returns_promise,
         'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(method),  # [RuntimeEnabled]
         'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script),
         'signature': 'v8::Local<v8::Signature>()' if is_static or 'DoNotCheckSignature' in extended_attributes else 'defaultSignature',
-        'union_arguments': idl_type.union_arguments,
+        'use_output_parameter_for_result': idl_type.use_output_parameter_for_result,
         'use_local_result': use_local_result(method),
         'v8_set_return_value': v8_set_return_value(interface.name, method, this_cpp_value),
         'v8_set_return_value_for_main_world': v8_set_return_value(interface.name, method, this_cpp_value, for_main_world=True),
+        'visible': is_visible,
         'world_suffixes': ['', 'ForMainWorld'] if 'PerWorldBindings' in extended_attributes else [''],  # [PerWorldBindings],
     }
 
 
-def argument_context(interface, method, argument, index):
+def argument_context(interface, method, argument, index, is_visible=True):
     extended_attributes = argument.extended_attributes
     idl_type = argument.idl_type
+    if is_visible:
+        idl_type.add_includes_for_type(extended_attributes)
     this_cpp_value = cpp_value(interface, method, index)
     is_variadic_wrapper_type = argument.is_variadic and idl_type.is_wrapper_type
 
+    # [TypeChecking=Interface] / [LegacyInterfaceTypeChecking]
+    has_type_checking_interface = (
+        not is_legacy_interface_type_checking(interface, method) and
+        idl_type.is_wrapper_type)
+
     if ('ImplementedInPrivateScript' in extended_attributes and
         not idl_type.is_wrapper_type and
         not idl_type.is_basic_type):
         raise Exception('Private scripts supports only primitive types and DOM wrappers.')
 
-    default_cpp_value = argument.default_cpp_value
-    return {
-        'cpp_type': idl_type.cpp_type_args(extended_attributes=extended_attributes,
+    set_default_value = argument.set_default_value
+    this_cpp_type = idl_type.cpp_type_args(extended_attributes=extended_attributes,
                                            raw_type=True,
-                                           used_as_variadic_argument=argument.is_variadic),
+                                           used_as_variadic_argument=argument.is_variadic)
+    return {
+        'cpp_type': (
+            v8_types.cpp_template_type('Nullable', this_cpp_type)
+            if idl_type.is_explicit_nullable and not argument.is_variadic
+            else this_cpp_type),
         'cpp_value': this_cpp_value,
         # FIXME: check that the default value's type is compatible with the argument's
-        'default_value': default_cpp_value,
-        'enum_validation_expression': idl_type.enum_validation_expression,
+        'set_default_value': set_default_value,
+        'enum_type': idl_type.enum_type,
+        'enum_values': idl_type.enum_values,
         'handle': '%sHandle' % argument.name,
         # FIXME: remove once [Default] removed and just use argument.default_value
-        'has_default': 'Default' in extended_attributes or default_cpp_value,
-        'has_type_checking_interface':
-            (has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or
-             has_extended_attribute_value(method, 'TypeChecking', 'Interface')) and
-            idl_type.is_wrapper_type,
-        'has_type_checking_unrestricted':
-            (has_extended_attribute_value(interface, 'TypeChecking', 'Unrestricted') or
-             has_extended_attribute_value(method, 'TypeChecking', 'Unrestricted')) and
-            idl_type.name in ('Float', 'Double'),
+        'has_default': 'Default' in extended_attributes or set_default_value,
+        'has_type_checking_interface': has_type_checking_interface,
         # Dictionary is special-cased, but arrays and sequences shouldn't be
         'idl_type': idl_type.base_type,
         'idl_type_object': idl_type,
         'index': index,
+        'is_callback_function': idl_type.is_callback_function,
         'is_callback_interface': idl_type.is_callback_interface,
         # FIXME: Remove generic 'Dictionary' special-casing
         'is_dictionary': idl_type.is_dictionary or idl_type.base_type == 'Dictionary',
+        'is_explicit_nullable': idl_type.is_explicit_nullable,
         'is_nullable': idl_type.is_nullable,
         'is_optional': argument.is_optional,
+        'is_variadic': argument.is_variadic,
         'is_variadic_wrapper_type': is_variadic_wrapper_type,
         'is_wrapper_type': idl_type.is_wrapper_type,
         'name': argument.name,
         'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(
             argument.name, isolate='scriptState->isolate()',
             creation_context='scriptState->context()->Global()'),
+        'use_permissive_dictionary_conversion': 'PermissiveDictionaryConversion' in extended_attributes,
         'v8_set_return_value': v8_set_return_value(interface.name, method, this_cpp_value),
         'v8_set_return_value_for_main_world': v8_set_return_value(interface.name, method, this_cpp_value, for_main_world=True),
-        'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, index, return_promise=method.returns_promise),
-        'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc_type),
+        'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(method, argument, index),
     }
 
 
@@ -258,8 +291,6 @@
         idl_type = argument.idl_type
         if idl_type.name == 'EventListener':
             return argument.name
-        if idl_type.is_dictionary:
-            return '*%s' % argument.name
         if (idl_type.name in ['NodeFilter', 'NodeFilterOrNull',
                               'XPathNSResolver', 'XPathNSResolverOrNull']):
             # FIXME: remove this special case
@@ -270,7 +301,7 @@
     arguments = method.arguments[:number_of_arguments]
     cpp_arguments = []
     if 'ImplementedInPrivateScript' in method.extended_attributes:
-        cpp_arguments.append('toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())')
+        cpp_arguments.append('toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()))')
         cpp_arguments.append('impl')
 
     if method.is_constructor:
@@ -288,11 +319,6 @@
         cpp_arguments.append('*impl')
     cpp_arguments.extend(cpp_argument(argument) for argument in arguments)
 
-    this_union_arguments = method.idl_type and method.idl_type.union_arguments
-    if this_union_arguments:
-        cpp_arguments.extend([member_argument['cpp_value']
-                              for member_argument in this_union_arguments])
-
     if 'ImplementedInPrivateScript' in method.extended_attributes:
         if method.idl_type.name != 'void':
             cpp_arguments.append('&result')
@@ -301,6 +327,12 @@
          has_extended_attribute_value(interface, 'RaisesException', 'Constructor'))):
         cpp_arguments.append('exceptionState')
 
+    # If a method returns an IDL dictionary or union type, the return value is
+    # passed as an argument to impl classes.
+    idl_type = method.idl_type
+    if idl_type and idl_type.use_output_parameter_for_result:
+        cpp_arguments.append('result')
+
     if method.name == 'Constructor':
         base_name = 'create'
     elif method.name == 'NamedConstructor':
@@ -337,39 +369,43 @@
         release = idl_type.release
 
     script_wrappable = 'impl' if inherits_interface(interface_name, 'Node') else ''
-    return idl_type.v8_set_return_value(cpp_value, extended_attributes, script_wrappable=script_wrappable, release=release, for_main_world=for_main_world)
+    return idl_type.v8_set_return_value(cpp_value, extended_attributes, script_wrappable=script_wrappable, release=release, for_main_world=for_main_world, is_static=method.is_static)
 
 
-def v8_value_to_local_cpp_variadic_value(argument, index, return_promise):
+def v8_value_to_local_cpp_variadic_value(method, argument, index, return_promise):
     assert argument.is_variadic
     idl_type = argument.idl_type
+    this_cpp_type = idl_type.cpp_type
 
-    suffix = ''
+    if method.returns_promise:
+        check_expression = 'exceptionState.hadException()'
+    else:
+        check_expression = 'exceptionState.throwIfNeeded()'
 
-    macro = 'TONATIVE_VOID_EXCEPTIONSTATE'
-    macro_args = [
-        argument.name,
-        'toImplArguments<%s>(info, %s, exceptionState)' % (idl_type.cpp_type, index),
-        'exceptionState',
-    ]
+    if idl_type.is_dictionary or idl_type.is_union_type:
+        vector_type = 'HeapVector'
+    else:
+        vector_type = 'Vector'
 
-    if return_promise:
-        suffix += '_PROMISE'
-        macro_args.extend(['info', 'V8ScriptState::current(info.GetIsolate())'])
-
-    suffix += '_INTERNAL'
-
-    return '%s%s(%s)' % (macro, suffix, ', '.join(macro_args))
+    return {
+        'assign_expression': 'toImplArguments<%s<%s>>(info, %s, exceptionState)' % (vector_type, this_cpp_type, index),
+        'check_expression': check_expression,
+        'cpp_type': this_cpp_type,
+        'cpp_name': argument.name,
+        'declare_variable': False,
+    }
 
 
-def v8_value_to_local_cpp_value(argument, index, return_promise=False):
+def v8_value_to_local_cpp_value(method, argument, index, return_promise=False, restricted_float=False):
     extended_attributes = argument.extended_attributes
     idl_type = argument.idl_type
     name = argument.name
     if argument.is_variadic:
-        return v8_value_to_local_cpp_variadic_value(argument, index, return_promise)
+        return v8_value_to_local_cpp_variadic_value(method, argument, index, return_promise)
     return idl_type.v8_value_to_local_cpp_value(extended_attributes, 'info[%s]' % index,
-                                                name, index=index, declare_variable=False, return_promise=return_promise)
+                                                name, index=index, declare_variable=False,
+                                                use_exception_state=method.returns_promise,
+                                                restricted_float=restricted_float)
 
 
 ################################################################################
@@ -377,63 +413,61 @@
 ################################################################################
 
 # [NotEnumerable]
-def property_attributes(method):
+def property_attributes(interface, method):
     extended_attributes = method.extended_attributes
     property_attributes_list = []
     if 'NotEnumerable' in extended_attributes:
         property_attributes_list.append('v8::DontEnum')
-    if 'Unforgeable' in extended_attributes:
+    if is_unforgeable(interface, method):
         property_attributes_list.append('v8::ReadOnly')
     if property_attributes_list:
         property_attributes_list.insert(0, 'v8::DontDelete')
     return property_attributes_list
 
 
-def union_member_argument_context(idl_type, index):
-    """Returns a context of union member for argument."""
-    this_cpp_value = 'result%d' % index
-    this_cpp_type = idl_type.cpp_type
-    this_cpp_type_initializer = idl_type.cpp_type_initializer
-    cpp_return_value = this_cpp_value
-
-    if not idl_type.cpp_type_has_null_value:
-        this_cpp_type = v8_types.cpp_template_type('Nullable', this_cpp_type)
-        this_cpp_type_initializer = ''
-        cpp_return_value = '%s.get()' % this_cpp_value
-
-    if idl_type.is_string_type:
-        null_check_value = '!%s.isNull()' % this_cpp_value
-    else:
-        null_check_value = this_cpp_value
-
-    return {
-        'cpp_type': this_cpp_type,
-        'cpp_type_initializer': this_cpp_type_initializer,
-        'cpp_value': this_cpp_value,
-        'null_check_value': null_check_value,
-        'v8_set_return_value': idl_type.v8_set_return_value(
-            cpp_value=cpp_return_value,
-            release=idl_type.release),
-    }
-
-
-def union_arguments(idl_type):
-    return [union_member_argument_context(member_idl_type, index)
-            for index, member_idl_type
-            in enumerate(idl_type.member_types)]
-
-
-def argument_default_cpp_value(argument):
-    if argument.idl_type.is_dictionary:
-        # We always create impl objects for IDL dictionaries.
-        return '%s::create()' % argument.idl_type.base_type
-    if not argument.default_value:
+def argument_set_default_value(argument):
+    idl_type = argument.idl_type
+    default_value = argument.default_value
+    if not default_value:
         return None
-    return argument.idl_type.literal_cpp_value(argument.default_value)
+    if idl_type.is_dictionary:
+        if not argument.default_value.is_null:
+            raise Exception('invalid default value for dictionary type')
+        return None
+    if idl_type.is_array_or_sequence_type:
+        if default_value.value != '[]':
+            raise Exception('invalid default value for sequence type: %s' % default_value.value)
+        # Nothing to do when we set an empty sequence as default value, but we
+        # need to return non-empty value so that we don't generate method calls
+        # without this argument.
+        return '/* Nothing to do */'
+    if idl_type.is_union_type:
+        if argument.default_value.is_null:
+            if not idl_type.includes_nullable_type:
+                raise Exception('invalid default value for union type: null for %s'
+                                % idl_type.name)
+            # Union container objects are "null" initially.
+            return '/* null default value */'
+        if isinstance(default_value.value, basestring):
+            member_type = idl_type.string_member_type
+        elif isinstance(default_value.value, (int, float)):
+            member_type = idl_type.numeric_member_type
+        elif isinstance(default_value.value, bool):
+            member_type = idl_type.boolean_member_type
+        else:
+            member_type = None
+        if member_type is None:
+            raise Exception('invalid default value for union type: %r for %s'
+                            % (default_value.value, idl_type.name))
+        member_type_name = (member_type.inner_type.name
+                            if member_type.is_nullable else
+                            member_type.name)
+        return '%s.set%s(%s)' % (argument.name, member_type_name,
+                                 member_type.literal_cpp_value(default_value))
+    return '%s = %s' % (argument.name,
+                        idl_type.literal_cpp_value(default_value))
 
-IdlTypeBase.union_arguments = None
-IdlUnionType.union_arguments = property(union_arguments)
-IdlArgument.default_cpp_value = property(argument_default_cpp_value)
+IdlArgument.set_default_value = property(argument_set_default_value)
 
 
 def method_returns_promise(method):
@@ -446,5 +480,4 @@
     idl_type = argument.idl_type
     return (idl_type.v8_conversion_needs_exception_state or
             argument.is_variadic or
-            (method.returns_promise and (idl_type.is_string_type or
-                                         idl_type.is_enum)))
+            (method.returns_promise and idl_type.is_string_type))
diff --git a/bindings/scripts/v8_types.py b/bindings/scripts/v8_types.py
index a332f4a..f5c92bc 100644
--- a/bindings/scripts/v8_types.py
+++ b/bindings/scripts/v8_types.py
@@ -55,26 +55,32 @@
     'NodeFilter',
     'SerializedScriptValue',
 ])
-TYPED_ARRAYS = {
-    # (cpp_type, v8_type), used by constructor templates
-    'ArrayBuffer': None,
-    'ArrayBufferView': None,
-    'Float32Array': ('float', 'v8::kExternalFloatArray'),
-    'Float64Array': ('double', 'v8::kExternalDoubleArray'),
-    'Int8Array': ('signed char', 'v8::kExternalByteArray'),
-    'Int16Array': ('short', 'v8::kExternalShortArray'),
-    'Int32Array': ('int', 'v8::kExternalIntArray'),
-    'Uint8Array': ('unsigned char', 'v8::kExternalUnsignedByteArray'),
-    'Uint8ClampedArray': ('unsigned char', 'v8::kExternalPixelArray'),
-    'Uint16Array': ('unsigned short', 'v8::kExternalUnsignedShortArray'),
-    'Uint32Array': ('unsigned int', 'v8::kExternalUnsignedIntArray'),
-}
+TYPED_ARRAY_TYPES = frozenset([
+    'Float32Array',
+    'Float64Array',
+    'Int8Array',
+    'Int16Array',
+    'Int32Array',
+    'Uint8Array',
+    'Uint8ClampedArray',
+    'Uint16Array',
+    'Uint32Array',
+])
+ARRAY_BUFFER_AND_VIEW_TYPES = TYPED_ARRAY_TYPES.union(frozenset([
+    'ArrayBuffer',
+    'ArrayBufferView',
+    'DataView',
+]))
 
-IdlType.is_typed_array_element_type = property(
-    lambda self: self.base_type in TYPED_ARRAYS)
+IdlType.is_array_buffer_or_view = property(
+    lambda self: self.base_type in ARRAY_BUFFER_AND_VIEW_TYPES)
+
+IdlType.is_typed_array = property(
+    lambda self: self.base_type in TYPED_ARRAY_TYPES)
 
 IdlType.is_wrapper_type = property(
     lambda self: (self.is_interface_type and
+                  not self.is_callback_interface and
                   self.base_type not in NON_WRAPPER_TYPES))
 
 
@@ -107,7 +113,7 @@
     'Promise': 'ScriptPromise',
     'ScriptValue': 'ScriptValue',
     # FIXME: Eliminate custom bindings for XPathNSResolver  http://crbug.com/345529
-    'XPathNSResolver': 'RefPtrWillBeRawPtr<XPathNSResolver>',
+    'XPathNSResolver': 'RawPtr<XPathNSResolver>',
     'boolean': 'bool',
     'unrestricted double': 'double',
     'unrestricted float': 'float',
@@ -176,15 +182,28 @@
             return 'String'
         return 'V8StringResource<%s>' % string_mode()
 
-    if idl_type.is_typed_array_element_type and raw_type:
-        return base_idl_type + '*'
+    if idl_type.is_array_buffer_or_view and raw_type:
+        return idl_type.implemented_as + '*'
     if idl_type.is_interface_type:
         implemented_as_class = idl_type.implemented_as
-        if raw_type:
+        if raw_type or (used_as_rvalue_type and idl_type.is_garbage_collected):
             return implemented_as_class + '*'
         new_type = 'Member' if used_in_cpp_sequence else 'RawPtr'
         ptr_type = cpp_ptr_type(('PassRefPtr' if used_as_rvalue_type else 'RefPtr'), new_type, idl_type.gc_type)
         return cpp_template_type(ptr_type, implemented_as_class)
+    if idl_type.is_dictionary:
+        return base_idl_type
+    if idl_type.is_union_type:
+        # Avoid "AOrNullOrB" for cpp type of (A? or B) because we generate
+        # V8AOrBOrNull to handle nulle for (A? or B), (A or B?) and (A or B)?
+        def member_cpp_name(idl_type):
+            if idl_type.is_nullable:
+                return idl_type.inner_type.name
+            return idl_type.name
+        idl_type_name = "Or".join(member_cpp_name(member)
+                                  for member in idl_type.member_types)
+        return 'const %s&' % idl_type_name if used_as_rvalue_type else idl_type_name
+
     # Default, assume native type is a pointer with same type name as idl type
     return base_idl_type + '*'
 
@@ -204,9 +223,6 @@
         return ' = 0'
     if base_idl_type == 'boolean':
         return ' = false'
-    if idl_type.base_type == 'Promise':
-        return '(nullptr)'
-
     if (base_idl_type in NON_WRAPPER_TYPES or
         base_idl_type in CPP_SPECIAL_CONVERSION_RULES or
         base_idl_type == 'any' or
@@ -216,23 +232,11 @@
     return ' = nullptr'
 
 
-def cpp_type_union(idl_type, extended_attributes=None, raw_type=False):
-    # FIXME: Need to revisit the design of union support.
-    # http://crbug.com/240176
-    return None
-
-
-def cpp_type_initializer_union(idl_type):
-    return (member_type.cpp_type_initializer for member_type in idl_type.member_types)
-
-
 # Allow access as idl_type.cpp_type if no arguments
 IdlTypeBase.cpp_type = property(cpp_type)
 IdlTypeBase.cpp_type_initializer = property(cpp_type_initializer)
 IdlTypeBase.cpp_type_args = cpp_type
-IdlUnionType.cpp_type = property(cpp_type_union)
-IdlUnionType.cpp_type_initializer = property(cpp_type_initializer_union)
-IdlUnionType.cpp_type_args = cpp_type_union
+IdlUnionType.cpp_type_initializer = ''
 
 
 IdlArrayOrSequenceType.native_array_element_type = property(
@@ -240,11 +244,8 @@
 
 
 def cpp_template_type(template, inner_type):
-    """Returns C++ template specialized to type, with space added if needed."""
-    if inner_type.endswith('>'):
-        format_string = '{template}<{inner_type} >'
-    else:
-        format_string = '{template}<{inner_type}>'
+    """Returns C++ template specialized to type."""
+    format_string = '{template}<{inner_type}>'
     return format_string.format(template=template, inner_type=inner_type)
 
 
@@ -310,7 +311,7 @@
 
 
 def gc_type(idl_type):
-    if idl_type.is_garbage_collected:
+    if idl_type.is_garbage_collected or idl_type.is_dictionary or idl_type.is_union_type:
         return 'GarbageCollectedObject'
     if idl_type.is_will_be_garbage_collected:
         return 'WillBeGarbageCollectedObject'
@@ -319,6 +320,17 @@
 IdlTypeBase.gc_type = property(gc_type)
 
 
+def is_traceable(idl_type):
+    return (idl_type.is_garbage_collected
+            or idl_type.is_will_be_garbage_collected
+            or idl_type.is_dictionary)
+
+IdlTypeBase.is_traceable = property(is_traceable)
+IdlUnionType.is_traceable = property(lambda self: True)
+IdlArrayOrSequenceType.is_traceable = property(
+    lambda self: self.element_type.is_traceable)
+
+
 ################################################################################
 # Includes
 ################################################################################
@@ -332,7 +344,7 @@
     'Dictionary': set(['bindings/core/v8/Dictionary.h']),
     'EventHandler': set(['bindings/core/v8/V8AbstractEventListener.h',
                          'bindings/core/v8/V8EventListenerList.h']),
-    'EventListener': set(['bindings/common/BindingSecurity.h',
+    'EventListener': set(['bindings/core/v8/BindingSecurity.h',
                           'bindings/core/v8/V8EventListenerList.h',
                           'core/frame/LocalDOMWindow.h']),
     'HTMLCollection': set(['bindings/core/v8/V8HTMLCollection.h',
@@ -347,14 +359,16 @@
                      'core/dom/NodeList.h',
                      'core/dom/StaticNodeList.h',
                      'core/html/LabelsNodeList.h']),
-    'Promise': set(['bindings/core/v8/V8ScriptPromise.h']),
-    'SerializedScriptValue': set(['bindings/core/v8/SerializedScriptValue.h']),
-    'ScriptValue': set(['bindings/common/ScriptValue.h']),
+    'Promise': set(['bindings/core/v8/ScriptPromise.h']),
+    'SerializedScriptValue': set(['bindings/core/v8/SerializedScriptValue.h',
+                                  'bindings/core/v8/SerializedScriptValueFactory.h']),
+    'ScriptValue': set(['bindings/core/v8/ScriptValue.h']),
 }
 
 
-def includes_for_type(idl_type):
+def includes_for_type(idl_type, extended_attributes=None):
     idl_type = idl_type.preprocessed_type
+    extended_attributes = extended_attributes or {}
 
     # Simple types
     base_idl_type = idl_type.base_type
@@ -362,8 +376,6 @@
         return INCLUDES_FOR_TYPE[base_idl_type]
     if idl_type.is_basic_type:
         return set()
-    if idl_type.is_typed_array_element_type:
-        return set(['bindings/core/v8/custom/V8%sCustom.h' % base_idl_type])
     if base_idl_type.endswith('ConstructorConstructor'):
         # FIXME: rename to NamedConstructor
         # FIXME: replace with a [NamedConstructorAttribute] extended attribute
@@ -379,22 +391,30 @@
     return set(['bindings/%s/v8/V8%s.h' % (component_dir[base_idl_type],
                                            base_idl_type)])
 
-IdlType.includes_for_type = property(includes_for_type)
-IdlUnionType.includes_for_type = property(
-    lambda self: set.union(*[member_type.includes_for_type
-                             for member_type in self.member_types]))
-IdlArrayOrSequenceType.includes_for_type = property(
-    lambda self: self.element_type.includes_for_type)
+IdlType.includes_for_type = includes_for_type
 
 
-def add_includes_for_type(idl_type):
-    includes.update(idl_type.includes_for_type)
+def includes_for_union_type(idl_type, extended_attributes=None):
+    return set.union(*[member_type.includes_for_type(extended_attributes)
+                       for member_type in idl_type.member_types])
+
+IdlUnionType.includes_for_type = includes_for_union_type
+
+
+def includes_for_array_or_sequence_type(idl_type, extended_attributes=None):
+    return idl_type.element_type.includes_for_type(extended_attributes)
+
+IdlArrayOrSequenceType.includes_for_type = includes_for_array_or_sequence_type
+
+
+def add_includes_for_type(idl_type, extended_attributes=None):
+    includes.update(idl_type.includes_for_type(extended_attributes))
 
 IdlTypeBase.add_includes_for_type = add_includes_for_type
 
 
 def includes_for_interface(interface_name):
-    return IdlType(interface_name).includes_for_type
+    return IdlType(interface_name).includes_for_type()
 
 
 def add_includes_for_interface(interface_name):
@@ -411,7 +431,7 @@
 def impl_includes_for_type(idl_type, interfaces_info):
     includes_for_type = set()
     if idl_type.impl_should_use_nullable_container:
-        includes_for_type.add('bindings/common/Nullable.h')
+        includes_for_type.add('bindings/core/v8/Nullable.h')
 
     idl_type = idl_type.preprocessed_type
     native_array_element_type = idl_type.native_array_element_type
@@ -425,12 +445,23 @@
         includes_for_type.add('wtf/text/WTFString.h')
     if base_idl_type in interfaces_info:
         interface_info = interfaces_info[idl_type.base_type]
-        includes_for_type.add(interface_info['include_path'])
+        if interface_info['include_path']:
+            includes_for_type.add(interface_info['include_path'])
     if base_idl_type in INCLUDES_FOR_TYPE:
         includes_for_type.update(INCLUDES_FOR_TYPE[base_idl_type])
+    if idl_type.is_typed_array:
+        return set(['core/dom/DOMTypedArray.h'])
+    return includes_for_type
+
+
+def impl_includes_for_type_union(idl_type, interfaces_info):
+    includes_for_type = set()
+    for member_type in idl_type.member_types:
+        includes_for_type.update(member_type.impl_includes_for_type(interfaces_info))
     return includes_for_type
 
 IdlTypeBase.impl_includes_for_type = impl_includes_for_type
+IdlUnionType.impl_includes_for_type = impl_includes_for_type_union
 
 
 component_dir = {}
@@ -446,42 +477,44 @@
 
 V8_VALUE_TO_CPP_VALUE = {
     # Basic
-    'Date': 'toCoreDate({v8_value})',
+    'Date': 'toCoreDate({isolate}, {v8_value})',
     'DOMString': '{v8_value}',
-    'ByteString': 'toByteString({arguments})',
-    'ScalarValueString': 'toScalarValueString({arguments})',
-    'boolean': '{v8_value}->BooleanValue()',
-    'float': 'toFloat({arguments})',
-    'unrestricted float': 'toFloat({arguments})',
-    'double': 'toDouble({arguments})',
-    'unrestricted double': 'toDouble({arguments})',
-    'byte': 'toInt8({arguments})',
-    'octet': 'toUInt8({arguments})',
-    'short': 'toInt16({arguments})',
-    'unsigned short': 'toUInt16({arguments})',
-    'long': 'toInt32({arguments})',
-    'unsigned long': 'toUInt32({arguments})',
-    'long long': 'toInt64({arguments})',
-    'unsigned long long': 'toUInt64({arguments})',
+    'ByteString': 'toByteString({isolate}, {arguments})',
+    'USVString': 'toUSVString({isolate}, {arguments})',
+    'boolean': 'toBoolean({isolate}, {arguments})',
+    'float': 'toRestrictedFloat({isolate}, {arguments})',
+    'unrestricted float': 'toFloat({isolate}, {arguments})',
+    'double': 'toRestrictedDouble({isolate}, {arguments})',
+    'unrestricted double': 'toDouble({isolate}, {arguments})',
+    'byte': 'toInt8({isolate}, {arguments})',
+    'octet': 'toUInt8({isolate}, {arguments})',
+    'short': 'toInt16({isolate}, {arguments})',
+    'unsigned short': 'toUInt16({isolate}, {arguments})',
+    'long': 'toInt32({isolate}, {arguments})',
+    'unsigned long': 'toUInt32({isolate}, {arguments})',
+    'long long': 'toInt64({isolate}, {arguments})',
+    'unsigned long long': 'toUInt64({isolate}, {arguments})',
     # Interface types
-    'Dictionary': 'Dictionary({v8_value}, {isolate})',
-    'EventTarget': 'V8DOMWrapper::isDOMWrapper({v8_value}) ? toWrapperTypeInfo(v8::Handle<v8::Object>::Cast({v8_value}))->toEventTarget(v8::Handle<v8::Object>::Cast({v8_value})) : 0',
-    'NodeFilter': 'toNodeFilter({v8_value}, info.Holder(), V8ScriptState::current({isolate}))',
-    'Promise': 'V8ScriptPromise::cast(V8ScriptState::current({isolate}), {v8_value})',
-    'SerializedScriptValue': 'SerializedScriptValue::create({v8_value}, 0, 0, exceptionState, {isolate})',
-    'ScriptValue': 'ScriptValue(V8ScriptState::current({isolate}), {v8_value})',
-    'Window': 'toDOMWindow({v8_value}, {isolate})',
-    'XPathNSResolver': 'toXPathNSResolver({v8_value}, {isolate})',
+    'Dictionary': 'Dictionary({v8_value}, {isolate}, exceptionState)',
+    'EventTarget': 'toEventTarget({isolate}, {v8_value})',
+    'NodeFilter': 'toNodeFilter({v8_value}, info.Holder(), ScriptState::current({isolate}))',
+    'Promise': 'ScriptPromise::cast(ScriptState::current({isolate}), {v8_value})',
+    'SerializedScriptValue': 'SerializedScriptValueFactory::instance().create({isolate}, {v8_value}, 0, 0, exceptionState)',
+    'ScriptValue': 'ScriptValue(ScriptState::current({isolate}), {v8_value})',
+    'Window': 'toDOMWindow({isolate}, {v8_value})',
+    'XPathNSResolver': 'toXPathNSResolver(ScriptState::current({isolate}), {v8_value})',
 }
 
 
 def v8_conversion_needs_exception_state(idl_type):
     return (idl_type.is_numeric_type or
+            idl_type.is_enum or
             idl_type.is_dictionary or
-            idl_type.name in ('ByteString', 'ScalarValueString', 'SerializedScriptValue'))
+            idl_type.name in ('Boolean', 'ByteString', 'Dictionary', 'USVString', 'SerializedScriptValue'))
 
 IdlType.v8_conversion_needs_exception_state = property(v8_conversion_needs_exception_state)
 IdlArrayOrSequenceType.v8_conversion_needs_exception_state = True
+IdlUnionType.v8_conversion_needs_exception_state = True
 
 
 TRIVIAL_CONVERSIONS = frozenset([
@@ -504,42 +537,45 @@
 IdlType.v8_conversion_is_trivial = property(v8_conversion_is_trivial)
 
 
-def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, index, isolate):
+def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, variable_name, index, isolate, restricted_float=False):
     if idl_type.name == 'void':
         return ''
 
     # Array or sequence types
     native_array_element_type = idl_type.native_array_element_type
     if native_array_element_type:
-        return v8_value_to_cpp_value_array_or_sequence(native_array_element_type, v8_value, index)
+        return v8_value_to_cpp_value_array_or_sequence(native_array_element_type, v8_value, index, isolate)
 
     # Simple types
     idl_type = idl_type.preprocessed_type
-    add_includes_for_type(idl_type)
-    base_idl_type = idl_type.base_type
+    base_idl_type = idl_type.as_union_type.name if idl_type.is_union_type else idl_type.base_type
 
-    if 'EnforceRange' in extended_attributes:
-        arguments = ', '.join([v8_value, 'EnforceRange', 'exceptionState'])
-    elif 'Clamp' in extended_attributes:
-        arguments = ', '.join([v8_value, 'Clamp', 'exceptionState'])
+    if idl_type.is_integer_type:
+        configuration = 'NormalConversion'
+        if 'EnforceRange' in extended_attributes:
+            configuration = 'EnforceRange'
+        elif 'Clamp' in extended_attributes:
+            configuration = 'Clamp'
+        arguments = ', '.join([v8_value, configuration, 'exceptionState'])
     elif idl_type.v8_conversion_needs_exception_state:
         arguments = ', '.join([v8_value, 'exceptionState'])
     else:
         arguments = v8_value
-
     if base_idl_type in V8_VALUE_TO_CPP_VALUE:
         cpp_expression_format = V8_VALUE_TO_CPP_VALUE[base_idl_type]
-    elif idl_type.is_typed_array_element_type:
+    elif idl_type.is_array_buffer_or_view:
         cpp_expression_format = (
             '{v8_value}->Is{idl_type}() ? '
-            'V8{idl_type}::toImpl(v8::Handle<v8::{idl_type}>::Cast({v8_value})) : 0')
-    elif idl_type.is_dictionary:
-        cpp_expression_format = 'V8{idl_type}::toImpl({isolate}, {v8_value}, exceptionState)'
+            'V8{idl_type}::toImpl(v8::Local<v8::{idl_type}>::Cast({v8_value})) : 0')
+    elif idl_type.use_output_parameter_for_result:
+        if idl_type.includes_nullable_type:
+            base_idl_type = idl_type.cpp_type + 'OrNull'
+        cpp_expression_format = 'V8{idl_type}::toImpl({isolate}, {v8_value}, {variable_name}, exceptionState)'
     else:
         cpp_expression_format = (
             'V8{idl_type}::toImplWithTypeCheck({isolate}, {v8_value})')
 
-    return cpp_expression_format.format(arguments=arguments, idl_type=base_idl_type, v8_value=v8_value, isolate=isolate)
+    return cpp_expression_format.format(arguments=arguments, idl_type=base_idl_type, v8_value=v8_value, variable_name=variable_name, isolate=isolate)
 
 
 def v8_value_to_cpp_value_array_or_sequence(native_array_element_type, v8_value, index, isolate='info.GetIsolate()'):
@@ -554,87 +590,102 @@
         this_cpp_type = None
         ref_ptr_type = cpp_ptr_type('RefPtr', 'Member', native_array_element_type.gc_type)
         expression_format = '(to{ref_ptr_type}NativeArray<{native_array_element_type}, V8{native_array_element_type}>({v8_value}, {index}, {isolate}, exceptionState))'
-        add_includes_for_type(native_array_element_type)
     else:
         ref_ptr_type = None
         this_cpp_type = native_array_element_type.cpp_type
-        expression_format = 'toImplArray<{cpp_type}>({v8_value}, {index}, {isolate}, exceptionState)'
+        if native_array_element_type.is_dictionary or native_array_element_type.is_union_type:
+            vector_type = 'HeapVector'
+        else:
+            vector_type = 'Vector'
+        expression_format = 'toImplArray<%s<{cpp_type}>>({v8_value}, {index}, {isolate}, exceptionState)' % vector_type
     expression = expression_format.format(native_array_element_type=native_array_element_type.name, cpp_type=this_cpp_type, index=index, ref_ptr_type=ref_ptr_type, v8_value=v8_value, isolate=isolate)
     return expression
 
 
-def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variable_name, index=None, declare_variable=True, isolate='info.GetIsolate()', used_in_private_script=False, return_promise=False):
+# FIXME: this function should be refactored, as this takes too many flags.
+def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variable_name, index=None, declare_variable=True, isolate='info.GetIsolate()', bailout_return_value=None, use_exception_state=False, restricted_float=False):
     """Returns an expression that converts a V8 value to a C++ value and stores it as a local value."""
 
-    # FIXME: Support union type.
-    if idl_type.is_union_type:
-        return '/* no V8 -> C++ conversion for IDL union type: %s */' % idl_type.name
-
     this_cpp_type = idl_type.cpp_type_args(extended_attributes=extended_attributes, raw_type=True)
     idl_type = idl_type.preprocessed_type
 
-    if idl_type.base_type in ('void', 'object', 'EventHandler', 'EventListener'):
-        return '/* no V8 -> C++ conversion for IDL type: %s */' % idl_type.name
+    cpp_value = v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, variable_name, index, isolate, restricted_float=restricted_float)
 
-    cpp_value = v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, index, isolate)
+    # Optional expression that returns a value to be assigned to the local variable.
+    assign_expression = None
+    # Optional void expression executed unconditionally.
+    set_expression = None
+    # Optional expression that returns true if the conversion fails.
+    check_expression = None
+    # Optional expression used as the return value when returning. Only
+    # meaningful if 'check_expression' is not None.
+    return_expression = bailout_return_value
+
     if idl_type.is_string_type or idl_type.v8_conversion_needs_exception_state:
-        # Types that need error handling and use one of a group of (C++) macros
-        # to take care of this.
+        # Types for which conversion can fail and that need error handling.
 
-        args = [variable_name, cpp_value]
-
-        if idl_type.v8_conversion_needs_exception_state:
-            macro = 'TONATIVE_DEFAULT_EXCEPTIONSTATE' if used_in_private_script else 'TONATIVE_VOID_EXCEPTIONSTATE'
-        elif return_promise:
-            macro = 'TOSTRING_VOID_EXCEPTIONSTATE'
+        if use_exception_state:
+            check_expression = 'exceptionState.hadException()'
         else:
-            macro = 'TOSTRING_DEFAULT' if used_in_private_script else 'TOSTRING_VOID'
+            check_expression = 'exceptionState.throwIfNeeded()'
 
-        if macro.endswith('_EXCEPTIONSTATE'):
-            args.append('exceptionState')
-
-        if used_in_private_script:
-            args.append('false')
-
-        suffix = ''
-
-        if return_promise:
-            suffix += '_PROMISE'
-            args.append('info')
-            if macro.endswith('_EXCEPTIONSTATE'):
-                args.append('V8ScriptState::current(%s)' % isolate)
-
-        if declare_variable:
-            args.insert(0, this_cpp_type)
+        if idl_type.is_dictionary or idl_type.is_union_type:
+            set_expression = cpp_value
         else:
-            suffix += '_INTERNAL'
-
-        return '%s(%s)' % (macro + suffix, ', '.join(args))
+            assign_expression = cpp_value
+            # Note: 'not idl_type.v8_conversion_needs_exception_state' implies
+            # 'idl_type.is_string_type', but there are types for which both are
+            # true (ByteString and USVString), so using idl_type.is_string_type
+            # as the condition here would be wrong.
+            if not idl_type.v8_conversion_needs_exception_state:
+                if use_exception_state:
+                    check_expression = '!%s.prepare(exceptionState)' % variable_name
+                else:
+                    check_expression = '!%s.prepare()' % variable_name
+    elif not idl_type.v8_conversion_is_trivial:
+        return {
+            'error_message': 'no V8 -> C++ conversion for IDL type: %s' % idl_type.name
+        }
+    else:
+        assign_expression = cpp_value
 
     # Types that don't need error handling, and simply assign a value to the
     # local variable.
 
-    if not idl_type.v8_conversion_is_trivial:
-        raise Exception('unclassified V8 -> C++ conversion for IDL type: %s' % idl_type.name)
-
-    assignment = '%s = %s' % (variable_name, cpp_value)
-    if declare_variable:
-        return '%s %s' % (this_cpp_type, assignment)
-    return assignment
+    return {
+        'assign_expression': assign_expression,
+        'check_expression': check_expression,
+        'cpp_type': this_cpp_type,
+        'cpp_name': variable_name,
+        'declare_variable': declare_variable,
+        'return_expression': bailout_return_value,
+        'set_expression': set_expression,
+    }
 
 
 IdlTypeBase.v8_value_to_local_cpp_value = v8_value_to_local_cpp_value
 
 
+def use_output_parameter_for_result(idl_type):
+    """True when methods/getters which return the given idl_type should
+    take the output argument.
+    """
+    return idl_type.is_dictionary or idl_type.is_union_type
+
+IdlTypeBase.use_output_parameter_for_result = property(use_output_parameter_for_result)
+
+
 ################################################################################
 # C++ -> V8
 ################################################################################
 
 def preprocess_idl_type(idl_type):
+    if idl_type.is_nullable:
+        return IdlNullableType(idl_type.inner_type.preprocessed_type)
     if idl_type.is_enum:
         # Enumerations are internally DOMStrings
         return IdlType('DOMString')
-    if (idl_type.name in ['Any', 'Object'] or idl_type.is_callback_function):
+    if idl_type.base_type in ['any', 'object'] or idl_type.is_callback_function:
         return IdlType('ScriptValue')
     return idl_type
 
@@ -675,15 +726,17 @@
     """
     extended_attributes = extended_attributes or {}
 
-    # FIXME: Support union type.
-    if idl_type.is_union_type:
-        return ''
+    # Nullable dictionaries need to be handled differently than either
+    # non-nullable dictionaries or unions.
+    if idl_type.is_dictionary and idl_type.is_nullable:
+        return 'NullableDictionary'
+
+    if idl_type.is_dictionary or idl_type.is_union_type:
+        return 'DictionaryOrUnion'
 
     # Array or sequence types
     native_array_element_type = idl_type.native_array_element_type
     if native_array_element_type:
-        if native_array_element_type.is_interface_type:
-            add_includes_for_type(native_array_element_type)
         return 'array'
 
     # Simple types
@@ -706,9 +759,11 @@
         raise 'Unrecognized TreatReturnedNullStringAs value: "%s"' % treat_returned_null_string_as
     if idl_type.is_basic_type or base_idl_type == 'ScriptValue':
         return base_idl_type
+    # Generic dictionary type
+    if base_idl_type == 'Dictionary':
+        return 'Dictionary'
 
     # Data type with potential additional includes
-    add_includes_for_type(idl_type)
     if base_idl_type in V8_SET_RETURN_VALUE:  # Special v8SetReturnValue treatment
         return base_idl_type
 
@@ -724,7 +779,7 @@
     'unsigned': 'v8SetReturnValueUnsigned(info, {cpp_value})',
     'DOMString': 'v8SetReturnValueString(info, {cpp_value}, info.GetIsolate())',
     'ByteString': 'v8SetReturnValueString(info, {cpp_value}, info.GetIsolate())',
-    'ScalarValueString': 'v8SetReturnValueString(info, {cpp_value}, info.GetIsolate())',
+    'USVString': 'v8SetReturnValueString(info, {cpp_value}, info.GetIsolate())',
     # [TreatReturnedNullStringAs]
     'StringOrNull': 'v8SetReturnValueStringOrNull(info, {cpp_value}, info.GetIsolate())',
     'StringOrUndefined': 'v8SetReturnValueStringOrUndefined(info, {cpp_value}, info.GetIsolate())',
@@ -745,14 +800,30 @@
     'DOMWrapperForMainWorld': 'v8SetReturnValueForMainWorld(info, WTF::getPtr({cpp_value}))',
     'DOMWrapperFast': 'v8SetReturnValueFast(info, WTF::getPtr({cpp_value}), {script_wrappable})',
     'DOMWrapperDefault': 'v8SetReturnValue(info, {cpp_value})',
+    # Note that static attributes and operations do not check whether |this| is
+    # an instance of the interface nor |this|'s creation context is the same as
+    # the current context.  So we must always use the current context as the
+    # creation context of the DOM wrapper for the return value.
+    'DOMWrapperStatic': 'v8SetReturnValue(info, {cpp_value}, info.GetIsolate()->GetCurrentContext()->Global())',
+    # Generic dictionary type
+    'Dictionary': 'v8SetReturnValue(info, {cpp_value})',
+    'DictionaryStatic': '#error not implemented yet',
+    # Nullable dictionaries
+    'NullableDictionary': 'v8SetReturnValue(info, result.get())',
+    'NullableDictionaryStatic': '#error not implemented yet',
+    # Union types or dictionaries
+    'DictionaryOrUnion': 'v8SetReturnValue(info, result)',
+    'DictionaryOrUnionStatic': '#error not implemented yet',
 }
 
 
-def v8_set_return_value(idl_type, cpp_value, extended_attributes=None, script_wrappable='', release=False, for_main_world=False):
+def v8_set_return_value(idl_type, cpp_value, extended_attributes=None, script_wrappable='', release=False, for_main_world=False, is_static=False):
     """Returns a statement that converts a C++ value to a V8 value and sets it as a return value.
 
     """
     def dom_wrapper_conversion_type():
+        if is_static:
+            return 'DOMWrapperStatic'
         if not script_wrappable:
             return 'DOMWrapperDefault'
         if for_main_world:
@@ -767,6 +838,8 @@
         cpp_value = idl_type.cpp_value_to_v8_value(cpp_value, extended_attributes=extended_attributes)
     if this_v8_conversion_type == 'DOMWrapper':
         this_v8_conversion_type = dom_wrapper_conversion_type()
+    if is_static and this_v8_conversion_type in ('Dictionary', 'NullableDictionary', 'DictionaryOrUnion'):
+        this_v8_conversion_type += 'Static'
 
     format_string = V8_SET_RETURN_VALUE[this_v8_conversion_type]
     # FIXME: oilpan: Remove .release() once we remove all RefPtrs from generated code.
@@ -776,27 +849,18 @@
     return statement
 
 
-def v8_set_return_value_union(idl_type, cpp_value, extended_attributes=None, script_wrappable='', release=False, for_main_world=False):
-    # FIXME: Need to revisit the design of union support.
-    # http://crbug.com/240176
-    return None
-
-
 IdlTypeBase.v8_set_return_value = v8_set_return_value
-IdlUnionType.v8_set_return_value = v8_set_return_value_union
 
 IdlType.release = property(lambda self: self.is_interface_type)
-IdlUnionType.release = property(
-    lambda self: [member_type.is_interface_type
-                  for member_type in self.member_types])
+IdlUnionType.release = False
 
 
 CPP_VALUE_TO_V8_VALUE = {
     # Built-in types
-    'Date': 'v8DateOrNaN({cpp_value}, {isolate})',
+    'Date': 'v8DateOrNaN({isolate}, {cpp_value})',
     'DOMString': 'v8String({isolate}, {cpp_value})',
     'ByteString': 'v8String({isolate}, {cpp_value})',
-    'ScalarValueString': 'v8String({isolate}, {cpp_value})',
+    'USVString': 'v8String({isolate}, {cpp_value})',
     'boolean': 'v8Boolean({cpp_value}, {isolate})',
     'int': 'v8::Integer::New({isolate}, {cpp_value})',
     'unsigned': 'v8::Integer::NewFromUnsigned({isolate}, {cpp_value})',
@@ -806,15 +870,27 @@
     'unrestricted double': 'v8::Number::New({isolate}, {cpp_value})',
     'void': 'v8Undefined()',
     # [TreatReturnedNullStringAs]
-    'StringOrNull': '{cpp_value}.isNull() ? v8::Handle<v8::Value>(v8::Null({isolate})) : v8String({isolate}, {cpp_value})',
+    'StringOrNull': '{cpp_value}.isNull() ? v8::Local<v8::Value>(v8::Null({isolate})) : v8String({isolate}, {cpp_value})',
     'StringOrUndefined': '{cpp_value}.isNull() ? v8Undefined() : v8String({isolate}, {cpp_value})',
     # Special cases
-    'EventHandler': '{cpp_value} ? v8::Handle<v8::Value>(V8AbstractEventListener::cast({cpp_value})->getListenerObject(impl->executionContext())) : v8::Handle<v8::Value>(v8::Null({isolate}))',
+    'Dictionary': '{cpp_value}.v8Value()',
+    'EventHandler': '{cpp_value} ? v8::Local<v8::Value>(V8AbstractEventListener::cast({cpp_value})->getListenerObject(impl->executionContext())) : v8::Local<v8::Value>(v8::Null({isolate}))',
     'ScriptValue': '{cpp_value}.v8Value()',
-    'SerializedScriptValue': '{cpp_value} ? {cpp_value}->deserialize() : v8::Handle<v8::Value>(v8::Null({isolate}))',
+    'SerializedScriptValue': '{cpp_value} ? {cpp_value}->deserialize() : v8::Local<v8::Value>(v8::Null({isolate}))',
     # General
-    'array': 'v8Array({cpp_value}, {creation_context}, {isolate})',
+    'array': 'toV8({cpp_value}, {creation_context}, {isolate})',
     'DOMWrapper': 'toV8({cpp_value}, {creation_context}, {isolate})',
+    # Passing nullable dictionaries isn't a pattern currently used
+    # anywhere in the web platform, and more work would be needed in
+    # the code generator to distinguish between passing null, and
+    # passing an object which happened to not contain any of the
+    # dictionary's defined attributes. For now, don't define
+    # NullableDictionary here, which will cause an exception to be
+    # thrown during code generation if an argument to a method is a
+    # nullable dictionary type.
+    #
+    # Union types or dictionaries
+    'DictionaryOrUnion': 'toV8({cpp_value}, {creation_context}, {isolate})',
 }
 
 
@@ -833,12 +909,40 @@
 def literal_cpp_value(idl_type, idl_literal):
     """Converts an expression that is a valid C++ literal for this type."""
     # FIXME: add validation that idl_type and idl_literal are compatible
+    if idl_type.base_type in ('any', 'object') and idl_literal.is_null:
+        return 'ScriptValue()'
     literal_value = str(idl_literal)
     if idl_type.base_type in CPP_UNSIGNED_TYPES:
         return literal_value + 'u'
     return literal_value
 
+
+def union_literal_cpp_value(idl_type, idl_literal):
+    if idl_literal.is_null:
+        return idl_type.name + '()'
+    elif idl_literal.idl_type == 'DOMString':
+        member_type = idl_type.string_member_type
+    elif idl_literal.idl_type in ('integer', 'float'):
+        member_type = idl_type.numeric_member_type
+    elif idl_literal.idl_type == 'boolean':
+        member_type = idl_type.boolean_member_type
+    else:
+        raise ValueError('Unsupported literal type: ' + idl_literal.idl_type)
+
+    return '%s::from%s(%s)' % (idl_type.name, member_type.name,
+                               member_type.literal_cpp_value(idl_literal))
+
+
+def array_or_sequence_literal_cpp_value(idl_type, idl_literal):
+    # Only support empty arrays.
+    if idl_literal.value == '[]':
+        return cpp_type(idl_type) + '()'
+    raise ValueError('Unsupported literal type: ' + idl_literal.idl_type)
+
+
 IdlType.literal_cpp_value = literal_cpp_value
+IdlUnionType.literal_cpp_value = union_literal_cpp_value
+IdlArrayOrSequenceType.literal_cpp_value = array_or_sequence_literal_cpp_value
 
 
 ################################################################################
@@ -850,13 +954,14 @@
     # - String types (String/AtomicString) represent null as a null string,
     #   i.e. one for which String::isNull() returns true.
     # - Enum types, as they are implemented as Strings.
-    # - Wrapper types (raw pointer or RefPtr/PassRefPtr) represent null as
+    # - Interface types (raw pointer or RefPtr/PassRefPtr) represent null as
     #   a null pointer.
-    # - Dictionary types represent null as a null pointer. They are garbage
-    #   collected so their type is raw pointer.
-    # - 'Object' type. We use ScriptValue for object type.
-    return (idl_type.is_string_type or idl_type.is_wrapper_type or
-            idl_type.is_enum or idl_type.is_dictionary or idl_type.base_type == 'object')
+    # - Union types, as thier container classes can represent null value.
+    # - 'Object' and 'any' type. We use ScriptValue for object type.
+    return (idl_type.is_string_type or idl_type.is_interface_type or
+            idl_type.is_enum or idl_type.is_union_type
+            or idl_type.base_type == 'object' or idl_type.base_type == 'any'
+            or idl_type.is_callback_function or idl_type.is_callback_interface)
 
 IdlTypeBase.cpp_type_has_null_value = property(cpp_type_has_null_value)
 
@@ -874,3 +979,27 @@
 IdlTypeBase.is_implicit_nullable = property(is_implicit_nullable)
 IdlUnionType.is_implicit_nullable = False
 IdlTypeBase.is_explicit_nullable = property(is_explicit_nullable)
+
+
+def number_of_nullable_member_types_union(idl_type):
+    # http://heycam.github.io/webidl/#dfn-number-of-nullable-member-types
+    count = 0
+    for member in idl_type.member_types:
+        if member.is_nullable:
+            count += 1
+            member = member.inner_type
+        if member.is_union_type:
+            count += number_of_nullable_member_types_union(member)
+    return count
+
+IdlUnionType.number_of_nullable_member_types = property(
+    number_of_nullable_member_types_union)
+
+
+def includes_nullable_type_union(idl_type):
+    # http://heycam.github.io/webidl/#dfn-includes-a-nullable-type
+    return idl_type.number_of_nullable_member_types == 1
+
+IdlTypeBase.includes_nullable_type = False
+IdlNullableType.includes_nullable_type = True
+IdlUnionType.includes_nullable_type = property(includes_nullable_type_union)
diff --git a/bindings/scripts/v8_union.py b/bindings/scripts/v8_union.py
new file mode 100644
index 0000000..1b94261
--- /dev/null
+++ b/bindings/scripts/v8_union.py
@@ -0,0 +1,153 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import v8_utilities
+
+
+UNION_H_INCLUDES = frozenset([
+    'bindings/core/v8/Dictionary.h',
+    'bindings/core/v8/ExceptionState.h',
+    'bindings/core/v8/V8Binding.h',
+    'platform/heap/Handle.h',
+])
+
+UNION_CPP_INCLUDES_BLACKLIST = frozenset([
+    # This header defines static functions needed to implement event handler
+    # attributes in interfaces that implement GlobalEventHandlers. They are not
+    # needed or used by UnionTypes*.cpp, so including the header causes
+    # compilation errors.
+    # FIXME: We should solve this problem in a way that doesn't involve special-
+    # casing a header like this.
+    'core/dom/GlobalEventHandlers.h',
+])
+
+
+cpp_includes = set()
+header_forward_decls = set()
+
+
+def union_context(union_types, interfaces_info):
+    cpp_includes.clear()
+    header_forward_decls.clear()
+
+    # For container classes we strip nullable wrappers. For example,
+    # both (A or B)? and (A? or B) will become AOrB. This should be OK
+    # because container classes can handle null and it seems that
+    # distinguishing (A or B)? and (A? or B) doesn't make sense.
+    container_cpp_types = set()
+    union_types_for_containers = set()
+    nullable_cpp_types = set()
+    for union_type in union_types:
+        cpp_type = union_type.cpp_type
+        if cpp_type not in container_cpp_types:
+            union_types_for_containers.add(union_type)
+            container_cpp_types.add(cpp_type)
+        if union_type.includes_nullable_type:
+            nullable_cpp_types.add(cpp_type)
+
+    union_types_for_containers = sorted(union_types_for_containers,
+                                        key=lambda union_type: union_type.cpp_type)
+    nullable_cpp_types = sorted(nullable_cpp_types)
+
+    return {
+        'containers': [container_context(union_type, interfaces_info)
+                       for union_type in union_types_for_containers],
+        'cpp_includes': sorted(cpp_includes - UNION_CPP_INCLUDES_BLACKLIST),
+        'header_forward_decls': sorted(header_forward_decls),
+        'header_includes': sorted(UNION_H_INCLUDES),
+        'nullable_cpp_types': nullable_cpp_types,
+    }
+
+
+def container_context(union_type, interfaces_info):
+    members = []
+
+    # These variables refer to member contexts if the given union type has
+    # corresponding types. They are used for V8 -> impl conversion.
+    array_buffer_type = None
+    array_buffer_view_type = None
+    array_or_sequence_type = None
+    boolean_type = None
+    dictionary_type = None
+    interface_types = []
+    numeric_type = None
+    string_type = None
+    for member in union_type.member_types:
+        context = member_context(member, interfaces_info)
+        members.append(context)
+        if member.base_type == 'ArrayBuffer':
+            if array_buffer_type:
+                raise Exception('%s is ambiguous.' % union_type.name)
+            array_buffer_type = context
+        elif member.base_type == 'ArrayBufferView':
+            if array_buffer_view_type:
+                raise Exception('%s is ambiguous.' % union_type.name)
+            array_buffer_view_type = context
+        # FIXME: Remove generic Dictionary special casing.
+        elif member.is_dictionary or member.base_type == 'Dictionary':
+            if dictionary_type:
+                raise Exception('%s is ambiguous.' % union_type.name)
+            dictionary_type = context
+        elif member.is_array_or_sequence_type:
+            if array_or_sequence_type:
+                raise Exception('%s is ambiguous.' % union_type.name)
+            array_or_sequence_type = context
+        elif member.is_interface_type:
+            interface_types.append(context)
+        elif member is union_type.boolean_member_type:
+            boolean_type = context
+        elif member is union_type.numeric_member_type:
+            numeric_type = context
+        elif member is union_type.string_member_type:
+            string_type = context
+        else:
+            raise Exception('%s is not supported as an union member.' % member.name)
+
+    # Nullable restriction checks
+    nullable_members = union_type.number_of_nullable_member_types
+    if nullable_members > 1:
+        raise Exception('%s contains more than one nullable members' % union_type.name)
+    if dictionary_type and nullable_members == 1:
+        raise Exception('%s has a dictionary and a nullable member' % union_type.name)
+
+    return {
+        'array_buffer_type': array_buffer_type,
+        'array_buffer_view_type': array_buffer_view_type,
+        'array_or_sequence_type': array_or_sequence_type,
+        'boolean_type': boolean_type,
+        'cpp_class': union_type.cpp_type,
+        'dictionary_type': dictionary_type,
+        'includes_nullable_type': union_type.includes_nullable_type,
+        'interface_types': interface_types,
+        'members': members,
+        'numeric_type': numeric_type,
+        'string_type': string_type,
+        'type_string': str(union_type),
+    }
+
+
+def member_context(member, interfaces_info):
+    cpp_includes.update(member.includes_for_type())
+    interface_info = interfaces_info.get(member.name, None)
+    if interface_info:
+        cpp_includes.update(interface_info.get('dependencies_include_paths', []))
+        header_forward_decls.add(member.implemented_as)
+    if member.is_nullable:
+        member = member.inner_type
+    return {
+        'cpp_name': v8_utilities.uncapitalize(member.name),
+        'cpp_type': member.cpp_type_args(used_in_cpp_sequence=True),
+        'cpp_local_type': member.cpp_type,
+        'cpp_value_to_v8_value': member.cpp_value_to_v8_value(
+            cpp_value='impl.getAs%s()' % member.name, isolate='isolate',
+            creation_context='creationContext'),
+        'enum_values': member.enum_values,
+        'is_traceable': member.is_traceable,
+        'rvalue_cpp_type': member.cpp_type_args(used_as_rvalue_type=True),
+        'specific_type_enum': 'SpecificType' + member.name,
+        'type_name': member.name,
+        'v8_value_to_local_cpp_value': member.v8_value_to_local_cpp_value(
+            {}, 'v8Value', 'cppValue', isolate='isolate',
+            use_exception_state=True, restricted_float=True),
+    }
diff --git a/bindings/scripts/v8_utilities.py b/bindings/scripts/v8_utilities.py
index e6ee9c9..1cd44ab 100644
--- a/bindings/scripts/v8_utilities.py
+++ b/bindings/scripts/v8_utilities.py
@@ -28,8 +28,6 @@
 
 """Functions shared by various parts of the code generator.
 
-Extends IdlTypeBase type with |enum_validation_expression| property.
-
 Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
 """
 
@@ -37,8 +35,8 @@
 
 from idl_types import IdlTypeBase
 import idl_types
+from idl_definitions import Exposure, IdlInterface
 from v8_globals import includes
-import v8_types
 
 ACRONYMS = [
     'CSSOM',  # must come *before* CSS to match full acronym
@@ -118,15 +116,6 @@
 # C++
 ################################################################################
 
-def enum_validation_expression(idl_type):
-    # FIXME: Add IdlEnumType, move property to derived type, and remove this check
-    if not idl_type.is_enum:
-        return None
-    return ' || '.join(['string == "%s"' % enum_value
-                        for enum_value in idl_type.enum_values])
-IdlTypeBase.enum_validation_expression = property(enum_validation_expression)
-
-
 def scoped_name(interface, definition, base_name):
     if 'ImplementedInPrivateScript' in definition.extended_attributes:
         return '%s::PrivateScript::%s' % (v8_class_name(interface), base_name)
@@ -142,7 +131,14 @@
 
 
 def v8_class_name(interface):
-    return v8_types.v8_type(interface.name)
+    return 'V8' + interface.name
+
+
+def v8_class_name_or_partial(interface):
+    class_name = v8_class_name(interface)
+    if interface.is_partial:
+        return ''.join([class_name, 'Partial'])
+    return class_name
 
 
 ################################################################################
@@ -193,6 +189,7 @@
     'ActiveWindow': 'callingDOMWindow(info.GetIsolate())',
     'FirstWindow': 'enteredDOMWindow(info.GetIsolate())',
     'Document': 'document',
+    'ThisValue': 'ScriptValue(scriptState, info.This())',
 }
 # List because key order matters, as we want arguments in deterministic order
 CALL_WITH_VALUES = [
@@ -202,6 +199,7 @@
     'ActiveWindow',
     'FirstWindow',
     'Document',
+    'ThisValue',
 ]
 
 
@@ -227,6 +225,12 @@
     return 'ENABLE(%s)' % extended_attributes['Conditional']
 
 
+# [Constructor], [NamedConstructor]
+def is_constructor_attribute(member):
+    # TODO(yukishiino): replace this with [Constructor] and [NamedConstructor] extended attribute
+    return member.idl_type.name.endswith('Constructor')
+
+
 # [DeprecateAs]
 def deprecate_as(member):
     extended_attributes = member.extended_attributes
@@ -238,6 +242,7 @@
 
 # [Exposed]
 EXPOSED_EXECUTION_CONTEXT_METHOD = {
+    'CompositorWorker': 'isCompositorWorkerGlobalScope',
     'DedicatedWorker': 'isDedicatedWorkerGlobalScope',
     'ServiceWorker': 'isServiceWorkerGlobalScope',
     'SharedWorker': 'isSharedWorkerGlobalScope',
@@ -246,36 +251,88 @@
 }
 
 
-def exposed(definition_or_member, interface):
-    exposure_set = extended_attribute_value_as_list(definition_or_member, 'Exposed')
-    if not exposure_set:
-        return None
+EXPOSED_WORKERS = set([
+    'CompositorWorker',
+    'DedicatedWorker',
+    'SharedWorker',
+    'ServiceWorker',
+])
 
-    interface_exposure_set = expanded_exposure_set_for_interface(interface)
+
+class ExposureSet:
+    """An ExposureSet is a collection of Exposure instructions."""
+    def __init__(self, exposures=None):
+        self.exposures = set(exposures) if exposures else set()
+
+    def issubset(self, other):
+        """Returns true if |self|'s exposure set is a subset of
+        |other|'s exposure set. This function doesn't care about
+        RuntimeEnabled."""
+        self_set = self._extended(set(e.exposed for e in self.exposures))
+        other_set = self._extended(set(e.exposed for e in other.exposures))
+        return self_set.issubset(other_set)
+
+    @staticmethod
+    def _extended(target):
+        if EXPOSED_WORKERS.issubset(target):
+            return target | set(['Worker'])
+        elif 'Worker' in target:
+            return target | EXPOSED_WORKERS
+        return target
+
+    def add(self, exposure):
+        self.exposures.add(exposure)
+
+    def __len__(self):
+        return len(self.exposures)
+
+    def __iter__(self):
+        return self.exposures.__iter__()
+
+    @staticmethod
+    def _code(exposure):
+        exposed = ('context->%s()' %
+                   EXPOSED_EXECUTION_CONTEXT_METHOD[exposure.exposed])
+        if exposure.runtime_enabled is not None:
+            runtime_enabled = ('RuntimeEnabledFeatures::%sEnabled()' %
+                               uncapitalize(exposure.runtime_enabled))
+            return '({0} && {1})'.format(exposed, runtime_enabled)
+        return exposed
+
+    def code(self):
+        if len(self.exposures) == 0:
+            return None
+        # We use sorted here to deflake output.
+        return ' || '.join(sorted(self._code(e) for e in self.exposures))
+
+
+def exposed(member, interface):
+    """Returns a C++ code that checks if a method/attribute/etc is exposed.
+
+    When the Exposed attribute contains RuntimeEnabledFeatures (i.e.
+    Exposed(Arguments) form is given), the code contains check for them as
+    well.
+
+    EXAMPLE: [Exposed=Window, RuntimeEnabledFeature=Feature1]
+      => context->isDocument()
+
+    EXAMPLE: [Exposed(Window Feature1, Window Feature2)]
+      => context->isDocument() && RuntimeEnabledFeatures::feature1Enabled() ||
+         context->isDocument() && RuntimeEnabledFeatures::feature2Enabled()
+    """
+    exposure_set = ExposureSet(
+        extended_attribute_value_as_list(member, 'Exposed'))
+    interface_exposure_set = ExposureSet(
+        extended_attribute_value_as_list(interface, 'Exposed'))
+    for e in exposure_set:
+        if e.exposed not in EXPOSED_EXECUTION_CONTEXT_METHOD:
+            raise ValueError('Invalid execution context: %s' % e.exposed)
 
     # Methods must not be exposed to a broader scope than their interface.
-    if not set(exposure_set).issubset(interface_exposure_set):
+    if not exposure_set.issubset(interface_exposure_set):
         raise ValueError('Interface members\' exposure sets must be a subset of the interface\'s.')
 
-    exposure_checks = []
-    for environment in exposure_set:
-        # Methods must be exposed on one of the scopes known to Blink.
-        if environment not in EXPOSED_EXECUTION_CONTEXT_METHOD:
-            raise ValueError('Values for the [Exposed] annotation must reflect to a valid exposure scope.')
-
-        exposure_checks.append('context->%s()' % EXPOSED_EXECUTION_CONTEXT_METHOD[environment])
-
-    return ' || '.join(exposure_checks)
-
-
-def expanded_exposure_set_for_interface(interface):
-    exposure_set = extended_attribute_value_as_list(interface, 'Exposed')
-
-    # "Worker" is an aggregation for the different kinds of workers.
-    if 'Worker' in exposure_set:
-        exposure_set.extend(('DedicatedWorker', 'SharedWorker', 'ServiceWorker'))
-
-    return sorted(set(exposure_set))
+    return exposure_set.code()
 
 
 # [GarbageCollected], [WillBeGarbageCollected]
@@ -296,22 +353,30 @@
     return extended_attributes['ImplementedAs']
 
 
+def cpp_name_from_interfaces_info(name, interfaces_info):
+    return interfaces_info.get(name, {}).get('implemented_as') or name
+
+
+def cpp_name_or_partial(interface):
+    cpp_class_name = cpp_name(interface)
+    if interface.is_partial:
+        return ''.join([cpp_class_name, 'Partial'])
+    return cpp_class_name
+
+
 # [MeasureAs]
-def measure_as(definition_or_member):
+def measure_as(definition_or_member, interface):
     extended_attributes = definition_or_member.extended_attributes
-    if 'MeasureAs' not in extended_attributes:
-        return None
-    includes.add('core/frame/UseCounter.h')
-    return extended_attributes['MeasureAs']
-
-
-# [PerContextEnabled]
-def per_context_enabled_function_name(definition_or_member):
-    extended_attributes = definition_or_member.extended_attributes
-    if 'PerContextEnabled' not in extended_attributes:
-        return None
-    feature_name = extended_attributes['PerContextEnabled']
-    return 'ContextFeatures::%sEnabled' % uncapitalize(feature_name)
+    if 'MeasureAs' in extended_attributes:
+        includes.add('core/frame/UseCounter.h')
+        return lambda suffix: extended_attributes['MeasureAs']
+    if 'Measure' in extended_attributes:
+        includes.add('core/frame/UseCounter.h')
+        measure_as_name = capitalize(definition_or_member.name)
+        if interface is not None:
+            measure_as_name = '%s_%s' % (capitalize(interface.name), measure_as_name)
+        return lambda suffix: 'V8%s_%s' % (measure_as_name, suffix)
+    return None
 
 
 # [RuntimeEnabled]
@@ -329,9 +394,200 @@
     return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name)
 
 
+# [Unforgeable]
+def is_unforgeable(interface, member):
+    return (('Unforgeable' in interface.extended_attributes or
+             'Unforgeable' in member.extended_attributes) and
+            not member.is_static)
+
+
+# [TypeChecking=Interface] / [LegacyInterfaceTypeChecking]
+def is_legacy_interface_type_checking(interface, member):
+    if not ('TypeChecking' in interface.extended_attributes or
+            'TypeChecking' in member.extended_attributes):
+        return True
+    if 'LegacyInterfaceTypeChecking' in member.extended_attributes:
+        return True
+    return False
+
+
+# [Unforgeable], [Global], [PrimaryGlobal] and [DoNotExposeJSAccessors]
+def on_instance(interface, member):
+    """Returns True if the interface's member needs to be defined on every
+    instance object.
+
+    The following members must be defiend on an instance object.
+    - [Unforgeable] members
+    - regular members of [Global] or [PrimaryGlobal] interfaces
+    - members on which [DoNotExposeJSAccessors] is specified
+    """
+    # TODO(yukishiino): Implement this function following the spec.
+    return not on_prototype(interface, member)
+
+
+# [ExposeJSAccessors]
+def on_prototype(interface, member):
+    """Returns True if the interface's member needs to be defined on the
+    prototype object.
+
+    Most members are defined on the prototype object.  Exceptions are as
+    follows.
+    - constant members
+    - static members (optional)
+    - [Unforgeable] members
+    - members of [Global] or [PrimaryGlobal] interfaces
+    - named properties of [Global] or [PrimaryGlobal] interfaces
+    However, if [ExposeJSAccessors] is specified, the member is defined on the
+    prototype object.
+    """
+    # TODO(yukishiino): Implement this function following the spec.
+
+    if ('ExposeJSAccessors' in interface.extended_attributes and
+            'DoNotExposeJSAccessors' in interface.extended_attributes):
+        raise Exception('Both of ExposeJSAccessors and DoNotExposeJSAccessors are specified at a time in an interface: ' + interface.name)
+    if ('ExposeJSAccessors' in member.extended_attributes and
+            'DoNotExposeJSAccessors' in member.extended_attributes):
+        raise Exception('Both of ExposeJSAccessors and DoNotExposeJSAccessors are specified at a time on a member: ' + member.name + ' in an interface: ' + interface.name)
+
+    # Note that ExposeJSAccessors and DoNotExposeJSAccessors are more powerful
+    # than 'static', [Unforgeable] and [OverrideBuiltins].
+    if 'ExposeJSAccessors' in member.extended_attributes:
+        return True
+    if 'DoNotExposeJSAccessors' in member.extended_attributes:
+        return False
+
+    # These members must not be placed on prototype chains.
+    if (is_constructor_attribute(member) or
+            member.is_static or
+            is_unforgeable(interface, member) or
+            'OverrideBuiltins' in interface.extended_attributes):
+        return False
+
+    # TODO(yukishiino): We should handle [Global] and [PrimaryGlobal] instead of
+    # Window.
+    if (interface.name == 'Window'):
+        return member.idl_type.name == 'EventHandler'
+
+    if 'ExposeJSAccessors' in interface.extended_attributes:
+        return True
+    if 'DoNotExposeJSAccessors' in interface.extended_attributes:
+        return False
+
+    return True
+
+
+# static, const
+def on_interface(interface, member):
+    """Returns True if the interface's member needs to be defined on the
+    interface object.
+
+    The following members must be defiend on an interface object.
+    - constant members
+    - static members
+    """
+    # TODO(yukishiino): Implement this function following the spec.
+    return False
+
+
 ################################################################################
-# Dart Specific extended attributes
+# Indexed properties
+# http://heycam.github.io/webidl/#idl-indexed-properties
 ################################################################################
-def dart_custom_method(extended_attributes):
-    return ('DartCustom' in extended_attributes and
-            extended_attribute_value_contains(extended_attributes['DartCustom'], 'New'))
+
+def indexed_property_getter(interface):
+    try:
+        # Find indexed property getter, if present; has form:
+        # getter TYPE [OPTIONAL_IDENTIFIER](unsigned long ARG1)
+        return next(
+            method
+            for method in interface.operations
+            if ('getter' in method.specials and
+                len(method.arguments) == 1 and
+                str(method.arguments[0].idl_type) == 'unsigned long'))
+    except StopIteration:
+        return None
+
+
+def indexed_property_setter(interface):
+    try:
+        # Find indexed property setter, if present; has form:
+        # setter RETURN_TYPE [OPTIONAL_IDENTIFIER](unsigned long ARG1, ARG_TYPE ARG2)
+        return next(
+            method
+            for method in interface.operations
+            if ('setter' in method.specials and
+                len(method.arguments) == 2 and
+                str(method.arguments[0].idl_type) == 'unsigned long'))
+    except StopIteration:
+        return None
+
+
+def indexed_property_deleter(interface):
+    try:
+        # Find indexed property deleter, if present; has form:
+        # deleter TYPE [OPTIONAL_IDENTIFIER](unsigned long ARG)
+        return next(
+            method
+            for method in interface.operations
+            if ('deleter' in method.specials and
+                len(method.arguments) == 1 and
+                str(method.arguments[0].idl_type) == 'unsigned long'))
+    except StopIteration:
+        return None
+
+
+################################################################################
+# Named properties
+# http://heycam.github.io/webidl/#idl-named-properties
+################################################################################
+
+def named_property_getter(interface):
+    try:
+        # Find named property getter, if present; has form:
+        # getter TYPE [OPTIONAL_IDENTIFIER](DOMString ARG1)
+        getter = next(
+            method
+            for method in interface.operations
+            if ('getter' in method.specials and
+                len(method.arguments) == 1 and
+                str(method.arguments[0].idl_type) == 'DOMString'))
+        getter.name = getter.name or 'anonymousNamedGetter'
+        return getter
+    except StopIteration:
+        return None
+
+
+def named_property_setter(interface):
+    try:
+        # Find named property setter, if present; has form:
+        # setter RETURN_TYPE [OPTIONAL_IDENTIFIER](DOMString ARG1, ARG_TYPE ARG2)
+        return next(
+            method
+            for method in interface.operations
+            if ('setter' in method.specials and
+                len(method.arguments) == 2 and
+                str(method.arguments[0].idl_type) == 'DOMString'))
+    except StopIteration:
+        return None
+
+
+def named_property_deleter(interface):
+    try:
+        # Find named property deleter, if present; has form:
+        # deleter TYPE [OPTIONAL_IDENTIFIER](DOMString ARG)
+        return next(
+            method
+            for method in interface.operations
+            if ('deleter' in method.specials and
+                len(method.arguments) == 1 and
+                str(method.arguments[0].idl_type) == 'DOMString'))
+    except StopIteration:
+        return None
+
+
+IdlInterface.indexed_property_getter = property(indexed_property_getter)
+IdlInterface.indexed_property_setter = property(indexed_property_setter)
+IdlInterface.indexed_property_deleter = property(indexed_property_deleter)
+IdlInterface.named_property_getter = property(named_property_getter)
+IdlInterface.named_property_setter = property(named_property_setter)
+IdlInterface.named_property_deleter = property(named_property_deleter)
diff --git a/core/html/canvas/EXTShaderTextureLOD.idl b/bindings/templates/copyright_block.txt
similarity index 64%
copy from core/html/canvas/EXTShaderTextureLOD.idl
copy to bindings/templates/copyright_block.txt
index 975005a..4c2c944 100644
--- a/core/html/canvas/EXTShaderTextureLOD.idl
+++ b/bindings/templates/copyright_block.txt
@@ -2,8 +2,5 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-[
-    NoInterfaceObject,
-    WillBeGarbageCollected,
-] interface EXTShaderTextureLOD {
-};
+// This file has been auto-generated by {{code_generator}}. DO NOT MODIFY!
+
diff --git a/bindings/tests/idls/core/ArrayBuffer.idl b/bindings/tests/idls/core/ArrayBuffer.idl
new file mode 100644
index 0000000..7878c57
--- /dev/null
+++ b/bindings/tests/idls/core/ArrayBuffer.idl
@@ -0,0 +1,11 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// https://www.khronos.org/registry/typedarray/specs/latest/#ARRAYBUFFER
+
+[
+    ImplementedAs=TestArrayBuffer,
+] interface ArrayBuffer {
+    readonly attribute unsigned long byteLength;
+};
diff --git a/bindings/tests/idls/core/ArrayBufferView.idl b/bindings/tests/idls/core/ArrayBufferView.idl
new file mode 100644
index 0000000..e6e9262
--- /dev/null
+++ b/bindings/tests/idls/core/ArrayBufferView.idl
@@ -0,0 +1,13 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// https://www.khronos.org/registry/typedarray/specs/latest/#ARRAYBUFFERVIEW
+
+[
+    ImplementedAs=TestArrayBufferView,
+] interface ArrayBufferView {
+    readonly attribute ArrayBuffer buffer;
+    readonly attribute unsigned long byteOffset;
+    readonly attribute unsigned long byteLength;
+};
diff --git a/bindings/tests/idls/core/DataView.idl b/bindings/tests/idls/core/DataView.idl
new file mode 100644
index 0000000..e26468d
--- /dev/null
+++ b/bindings/tests/idls/core/DataView.idl
@@ -0,0 +1,15 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// https://www.khronos.org/registry/typedarray/specs/latest/#DATAVIEW
+
+[
+    ImplementedAs=TestDataView,
+] interface DataView : ArrayBufferView {
+    [RaisesException] octet getUint8(unsigned long byteOffset);
+    [RaisesException] double getFloat64(unsigned long byteOffset, optional boolean littleEndian);
+
+    [RaisesException] void setUint8(unsigned long byteOffset, octet value);
+    [RaisesException] void setFloat64(unsigned long byteOffset, double value, optional boolean littleEndian);
+};
diff --git a/bindings/tests/idls/core/TestDictionary.idl b/bindings/tests/idls/core/TestDictionary.idl
index 7bd1ac0..d135101 100644
--- a/bindings/tests/idls/core/TestDictionary.idl
+++ b/bindings/tests/idls/core/TestDictionary.idl
@@ -2,16 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-enum TestEnum { "foo", "bar", "baz" };
-
-[
-    GarbageCollected,
-] dictionary TestDictionary {
+dictionary TestDictionary {
     boolean booleanMember;
     long longMember = 1;
     DOMString stringMember;
     TestInterface testInterfaceMember;
     double? doubleOrNullMember = null;
+    double restrictedDoubleMember = 3.14;
+    unrestricted double unrestrictedDoubleMember = 3.14;
     DOMString? stringOrNullMember = "default string value";
     TestInterface? testInterfaceOrNullMember;
     TestInterfaceGarbageCollected testInterfaceGarbageCollectedMember;
@@ -19,9 +17,23 @@
     TestInterfaceWillBeGarbageCollected testInterfaceWillBeGarbageCollectedMember;
     TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCollectedOrNullMember;
     DOMString[] stringArrayMember;
-    sequence<DOMString> stringSequenceMember;
+    sequence<DOMString> stringSequenceMember = [];
+    sequence<TestInterface> testInterfaceSequenceMember = [];
+    sequence<TestInterfaceGarbageCollected> testInterfaceGarbageCollectedSequenceMember = [];
+    sequence<TestInterfaceWillBeGarbageCollected> testInterfaceWillBeGarbageCollectedSequenceMember = [];
     TestEnum enumMember = "foo";
+    sequence<TestEnum> enumSequenceMember;
     Element? elementOrNullMember;
     object objectMember;
     object? objectOrNullMember;
+    [ImplementedAs=createMember] boolean create;
+    [DeprecateAs=CreateMember, ImplementedAs=createMember] boolean deprecatedCreateMember;
+    (double or DOMString) doubleOrStringMember = 3.14;
+    sequence<(double or DOMString)> doubleOrStringSequenceMember;
+    (double or DOMString) otherDoubleOrStringMember = "default string value";
+    (TestInterface2 or Uint8Array) testInterface2OrUint8ArrayMember;
+    sequence<InternalDictionary> internalDictionarySequenceMember;
+    Uint8Array uint8ArrayMember;
+    EventTarget eventTargetMember;
+    any anyMember = null;
 };
diff --git a/bindings/tests/idls/core/TestDictionaryDerived.idl b/bindings/tests/idls/core/TestDictionaryDerived.idl
new file mode 100644
index 0000000..51817ef
--- /dev/null
+++ b/bindings/tests/idls/core/TestDictionaryDerived.idl
@@ -0,0 +1,12 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+[
+    ImplementedAs=TestDictionaryDerivedImplementedAs,
+] dictionary TestDictionaryDerived : TestDictionary {
+    DOMString derivedStringMember;
+    DOMString derivedStringMemberWithDefault = "default string value";
+    required long requiredLongMember;
+    sequence<DOMStringOrDouble> stringOrDoubleSequenceMember;
+};
diff --git a/bindings/tests/idls/core/TestImplements.idl b/bindings/tests/idls/core/TestImplements.idl
index e6e55db..ffe8372 100644
--- a/bindings/tests/idls/core/TestImplements.idl
+++ b/bindings/tests/idls/core/TestImplements.idl
@@ -45,5 +45,4 @@
     [Reflect=IMPLEMENTS_REFLECT_CONSTANT] const unsigned short IMPLEMENTS_CONSTANT_2 = 2;
 
     [RuntimeEnabled=ImplementsFeatureName] attribute Node implementsRuntimeEnabledNodeAttribute;
-    [PerContextEnabled=ImplementsContextName] attribute Node implementsPerContextEnabledNodeAttribute;
 };
diff --git a/bindings/tests/idls/core/TestInterface.idl b/bindings/tests/idls/core/TestInterface.idl
index 135c6f8..69a51cd 100644
--- a/bindings/tests/idls/core/TestInterface.idl
+++ b/bindings/tests/idls/core/TestInterface.idl
@@ -34,13 +34,14 @@
 [
     ActiveDOMObject,
     Conditional=CONDITION,
-    Custom=(LegacyCallAsFunction,ToV8),
+    Custom=LegacyCallAsFunction,
     DoNotCheckConstants,
     ImplementedAs=TestInterfaceImplementation,
     Iterable,
+    Measure,
     RuntimeEnabled=FeatureName,
     SetWrapperReferenceTo(TestInterface referencedName),
-    TypeChecking=(Interface,Unrestricted),
+    TypeChecking=Interface,
     Exposed=(Worker,Window),
 ] interface TestInterface : TestInterfaceEmpty {
     // members needed to test [ImplementedAs], as this affect attribute
@@ -49,30 +50,38 @@
     const unsigned long UNSIGNED_LONG = 0;
     [Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1;
 
-    attribute TestInterface testInterfaceAttribute; // Self-referential interface type with [ImplementedAs]
+    [Measure] attribute TestInterface testInterfaceAttribute; // Self-referential interface type with [ImplementedAs]
     attribute TestInterfaceConstructor testInterfaceConstructorAttribute;
+    attribute TestInterfaceConstructor TestInterface;
+    attribute TestInterface2Constructor TestInterface2;
     attribute double doubleAttribute;
     attribute float floatAttribute;
     attribute unrestricted double unrestrictedDoubleAttribute;
     attribute unrestricted float unrestrictedFloatAttribute;
+    attribute TestEnum testEnumAttribute;
+    attribute DOMStringOrDouble stringOrDoubleAttribute;
     static attribute DOMString staticStringAttribute;
+    static attribute TestInterface staticReturnDOMWrapperAttribute;
+    [LegacyInterfaceTypeChecking] attribute TestInterfaceEmpty legacyInterfaceTypeCheckingAttribute;
 
     void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
     void voidMethodDoubleArgFloatArg(double doubleArg, float floatArg);
     void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestricted double unrestrictedDoubleArg, unrestricted float unrestrictedFloatArg);
+    void voidMethodTestEnumArg(TestEnum testEnumArg);
     [PerWorldBindings] void voidMethod();
 
     // Anonymous indexed property operations
-    getter DOMString (unsigned long index);
+    [DoNotCheckSecurity] getter DOMString (unsigned long index);
     setter DOMString (unsigned long index, DOMString value);
     deleter boolean (unsigned long index);
 
     // Anonymous named property operations
-    getter DOMString (DOMString name);
+    [DoNotCheckSecurity] getter DOMString (DOMString name);
     setter DOMString (DOMString name, DOMString value);
     deleter boolean (DOMString name);
 
     [NotEnumerable] stringifier;
+    [NotEnumerable, RaisesException] serializer;
 
     // Per-method [Exposed] annotation support.
     void alwaysExposedMethod();
@@ -82,15 +91,32 @@
     static void alwaysExposedStaticMethod();
     [Exposed=Worker] static void workerExposedStaticMethod();
     [Exposed=Window] static void windowExposedStaticMethod();
+    static TestInterface staticReturnDOMWrapperMethod();
 
     attribute long alwaysExposedAttribute;
     [Exposed=Worker] attribute long workerExposedAttribute;
     [Exposed=Window] attribute long windowExposedAttribute;
 
+    [Exposed=Window, RuntimeEnabled=FeatureName] void methodWithExposedAndRuntimeEnabledFlag();
+    [Exposed=Window] void overloadMethodWithExposedAndRuntimeEnabledFlag(long longArg);
+    [Exposed=Window, RuntimeEnabled=FeatureName] void overloadMethodWithExposedAndRuntimeEnabledFlag(DOMString string);
+    [Exposed=Window, RuntimeEnabled=FeatureName2] void overloadMethodWithExposedAndRuntimeEnabledFlag(Window window);
+
+    [Exposed(Window FeatureName, Worker FeatureName2)] void methodWithExposedHavingRuntimeEnabldFlag();
+
     [Exposed=(Window,ServiceWorker)] void windowAndServiceWorkerExposedMethod();
 
-    void voidMethodPartailOverload();
-    static void voidMethodPartailOverload();
+    void voidMethodPartialOverload();
+    void voidMethodPartialOverload(double doubleArg);
+    static void staticVoidMethodPartialOverload();
+
+    Promise promiseMethodPartialOverload();
+    Promise promiseMethodPartialOverload(Window window);
+    static Promise staticPromiseMethodPartialOverload();
+
+    [LenientThis] attribute any lenientThisAttribute;
+
+    [LegacyInterfaceTypeChecking] void legacyInterfaceTypeCheckingMethod(TestInterfaceEmpty testInterfaceEmptyArg);
 };
 
 TestInterface implements TestImplements;
diff --git a/bindings/tests/idls/core/TestInterface2.idl b/bindings/tests/idls/core/TestInterface2.idl
index 8bb30a6..02de68e 100644
--- a/bindings/tests/idls/core/TestInterface2.idl
+++ b/bindings/tests/idls/core/TestInterface2.idl
@@ -34,24 +34,27 @@
 // The more *minor* extended attribute should be put in this file.
 
 [
-    Constructor, // Test interaction with [Custom=Wrap]
-    Custom=Wrap, // Conflicts with and [Custom=ToV8], respectively
+    Constructor,
     DependentLifetime, // Covered by [ActiveDOMObject]
     SetWrapperReferenceFrom=ownerNode, // Conflicts with [SetWrapperReferenceTo]
-    SpecialWrapFor=(TestInterface,TestInterfaceEmpty), // Conflicts with [Custom=ToV8]
+    // Note that Exposed(Arguments) has no effect on bindings-tests. It is
+    // processed in generate_global_constructors.py.
+    Exposed(Window FeatureName), // Conflicts with Exposed=(Window,Worker)
 ] interface TestInterface2 {
     // This interface has only runtime enabled constants.
     [RuntimeEnabled=FeatureName] const unsigned short CONST_VALUE_1 = 1;
 
     // Indexed property operations with an identifier
     [RaisesException] getter TestInterfaceEmpty item(unsigned long index);
-    [RaisesException] setter DOMString setItem(unsigned long index, DOMString value);
+    [RaisesException, TypeChecking=Interface] setter TestInterfaceEmpty setItem(unsigned long index, TestInterfaceEmpty value);
     [RaisesException] deleter boolean deleteItem(unsigned long index);
 
     // Named property operations with an identifier
     [RaisesException] getter TestInterfaceEmpty namedItem(DOMString name);
-    [RaisesException] setter DOMString setNamedItem(DOMString name, DOMString value);
+    [RaisesException, TypeChecking=Interface] setter TestInterfaceEmpty setNamedItem(DOMString name, TestInterfaceEmpty? value);
     [RaisesException] deleter boolean deleteNamedItem(DOMString name);
 
     stringifier DOMString stringifierMethod();
+
+    readonly setlike<TestInterfaceEmpty>;
 };
diff --git a/bindings/tests/idls/core/TestInterface3.idl b/bindings/tests/idls/core/TestInterface3.idl
index 2e20986..4470f7c 100644
--- a/bindings/tests/idls/core/TestInterface3.idl
+++ b/bindings/tests/idls/core/TestInterface3.idl
@@ -35,6 +35,7 @@
 
 [
     Custom=VisitDOMWrapper, // Conflict with [SetWrapperReferenceTo] and [SetWrapperReferenceFrom]
+    NoImplHeader,
 ] interface TestInterface3 {
     [Custom] getter boolean (unsigned long index);
     [Custom] setter boolean (unsigned long index, Node value);
@@ -43,4 +44,9 @@
     [Custom=(PropertyGetter,PropertyEnumerator,PropertyQuery)] getter Node (DOMString name);
     [Custom] setter Node (DOMString name, Node value);
     [Custom] deleter boolean (DOMString name);
+
+    void voidMethodDocument(Document document);
+
+    [RuntimeEnabled=FeatureName] iterable<any>;
+    [RuntimeEnabled=FeatureName, CallWith=ScriptState, RaisesException, ImplementedAs=iterableKeys] Iterator keys();
 };
diff --git a/bindings/tests/idls/core/TestInterfaceAccessors.idl b/bindings/tests/idls/core/TestInterfaceAccessors.idl
new file mode 100644
index 0000000..e6c4636
--- /dev/null
+++ b/bindings/tests/idls/core/TestInterfaceAccessors.idl
@@ -0,0 +1,13 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// An interface for testing (DoNot)ExposeJSAccessors extended attributes.
+
+[
+    ExposeJSAccessors,
+] interface TestInterfaceAccessors : TestInterfaceEmpty {
+    attribute long noExposeJSAccessorAttribute;
+    [ExposeJSAccessors] attribute long exposeJSAccessorAttribute;
+    [DoNotExposeJSAccessors] attribute long doNotExposeJSAccessorAttribute;
+};
diff --git a/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl b/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl
index 8fac9b8..56ead63 100644
--- a/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl
+++ b/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl
@@ -29,13 +29,15 @@
 [
     CheckSecurity=Frame,
 ] interface TestInterfaceCheckSecurity {
-    readonly attribute long longAttribute;
+    readonly attribute long readonlyLongAttribute;
+    attribute long longAttribute;
     void voidMethod();
 
     [DoNotCheckSecurity] attribute long doNotCheckSecurityLongAttribute;
     [DoNotCheckSecurity] readonly attribute long doNotCheckSecurityReadonlyLongAttribute; // Separate read only attribute to check attribute configuration
     [DoNotCheckSecurity=Setter] attribute long doNotCheckSecurityOnSetterLongAttribute;
     [DoNotCheckSecurity, Replaceable] readonly attribute long doNotCheckSecurityReplaceableReadonlyLongAttribute;
+    [DoNotCheckSecurity, Replaceable, ExposeJSAccessors] readonly attribute long doNotCheckSecurityReplaceableReadonlyLongAccessor;
 
     [DoNotCheckSecurity] void doNotCheckSecurityVoidMethod();
     [DoNotCheckSecurity, DoNotCheckSignature] void doNotCheckSecurityDoNotCheckSignatureVoidMethod();
diff --git a/bindings/tests/idls/core/TestInterfaceConstructor.idl b/bindings/tests/idls/core/TestInterfaceConstructor.idl
index f82e44c..29878ae 100644
--- a/bindings/tests/idls/core/TestInterfaceConstructor.idl
+++ b/bindings/tests/idls/core/TestInterfaceConstructor.idl
@@ -38,12 +38,13 @@
         Dictionary dictionaryArg,
         sequence<DOMString> sequenceStringArg,
         sequence<Dictionary> sequenceDictionaryArg,
+        sequence<(long or TestDictionary)> sequenceLongOrTestDictionaryArg,
         optional Dictionary optionalDictionaryArg,
         [Default=Undefined] optional TestInterfaceEmpty optionalTestInterfaceEmptyArg),
     Constructor(DOMString arg, optional DOMString optArg),
     Constructor(DOMString arg, DOMString arg2, DOMString arg3),
     NamedConstructor=Audio(DOMString arg, optional DOMString optArg),
-    ConstructorCallWith=(ExecutionContext,Document),
+    ConstructorCallWith=(ScriptState,ExecutionContext,Document),
     MeasureAs=TestFeature,
     RaisesException=Constructor,
 ] interface TestInterfaceConstructor {
diff --git a/bindings/tests/idls/core/TestInterfaceConstructor4.idl b/bindings/tests/idls/core/TestInterfaceConstructor4.idl
index 246f551..2153167 100644
--- a/bindings/tests/idls/core/TestInterfaceConstructor4.idl
+++ b/bindings/tests/idls/core/TestInterfaceConstructor4.idl
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Test for overload resolution for the string-like ScalarValueString
+// Test for overload resolution for the string-like USVString
 // argument.
 [
     Constructor(TestInterfaceConstructor4 testInterface4Arg),
-    Constructor(ScalarValueString scalarValueStringArg),
+    Constructor(USVString usvStringArg),
 ] interface TestInterfaceConstructor4 {
 };
diff --git a/bindings/tests/idls/core/TestInterfaceEventConstructor.idl b/bindings/tests/idls/core/TestInterfaceEventConstructor.idl
deleted file mode 100644
index e193a0d..0000000
--- a/bindings/tests/idls/core/TestInterfaceEventConstructor.idl
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
-    EventConstructor,
-    RaisesException=Constructor,
-] interface TestInterfaceEventConstructor : Event {
-    readonly attribute DOMString readonlyStringAttribute;
-
-    [InitializedByEventConstructor] readonly attribute DOMString initializedByEventConstructorReadonlyStringAttribute;
-    [InitializedByEventConstructor] readonly attribute any initializedByEventConstructorReadonlyAnyAttribute;
-    [InitializedByEventConstructor] readonly attribute boolean initializedByEventConstructorReadonlyBooleanAttribute;
-    [InitializedByEventConstructor] readonly attribute long initializedByEventConstructorReadonlyLongAttribute;
-    [InitializedByEventConstructor] readonly attribute Uint8Array initializedByEventConstructorReadonlyUint8ArrayAttribute;
-    [InitializedByEventConstructor] readonly attribute TestInterfaceEmpty initializedByEventConstructorReadonlyTestInterfaceEmptyAttribute;
-    [InitializedByEventConstructor] readonly attribute TestInterfaceEmpty[] initializedByEventConstructorReadonlyTestInterfaceEmptyArrayAttribute;
-    [InitializedByEventConstructor] readonly attribute TestInterfaceEmpty? initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttribute;
-
-    [DeprecateAs=initializedByEventConstructorReadonlyStringAttribute, InitializedByEventConstructor] readonly attribute DOMString deprecatedInitializedByEventConstructorReadonlyStringAttribute;
-    [ImplementedAs=implementedAsName, InitializedByEventConstructor] readonly attribute DOMString implementedAsInitializedByEventConstructorReadonlyStringAttribute;
-    [DeprecateAs=initializedByEventConstructorReadonlyStringAttribute, ImplementedAs=deprecatedImplementedAsName, InitializedByEventConstructor] readonly attribute DOMString deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAttribute;
-};
diff --git a/core/html/canvas/EXTShaderTextureLOD.idl b/bindings/tests/idls/core/TestInterfaceEventInit.idl
similarity index 65%
copy from core/html/canvas/EXTShaderTextureLOD.idl
copy to bindings/tests/idls/core/TestInterfaceEventInit.idl
index 975005a..4fad512 100644
--- a/core/html/canvas/EXTShaderTextureLOD.idl
+++ b/bindings/tests/idls/core/TestInterfaceEventInit.idl
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-[
-    NoInterfaceObject,
-    WillBeGarbageCollected,
-] interface EXTShaderTextureLOD {
+dictionary TestInterfaceEventInit : EventInit {
+    DOMString stringMember;
 };
diff --git a/bindings/tests/idls/core/TestInterfaceEventInitConstructor.idl b/bindings/tests/idls/core/TestInterfaceEventInitConstructor.idl
new file mode 100644
index 0000000..2fa3746
--- /dev/null
+++ b/bindings/tests/idls/core/TestInterfaceEventInitConstructor.idl
@@ -0,0 +1,9 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+[
+    Constructor(DOMString type, TestInterfaceEventInit testInterfaceEventInit),
+] interface TestInterfaceEventInitConstructor : Event {
+    readonly attribute DOMString readonlyStringAttribute;
+};
diff --git a/bindings/tests/idls/core/TestInterfaceGarbageCollected.idl b/bindings/tests/idls/core/TestInterfaceGarbageCollected.idl
index 55739a3..216cbed 100644
--- a/bindings/tests/idls/core/TestInterfaceGarbageCollected.idl
+++ b/bindings/tests/idls/core/TestInterfaceGarbageCollected.idl
@@ -8,4 +8,6 @@
 ] interface TestInterfaceGarbageCollected : EventTarget { // Inherit from EventTarget to test order of internal fields
     attribute TestInterfaceGarbageCollected attr1;
     void func(TestInterfaceGarbageCollected arg);
+
+    setlike<DOMString>;
 };
diff --git a/bindings/tests/idls/core/TestInterfaceNode.idl b/bindings/tests/idls/core/TestInterfaceNode.idl
index 25c62a5..a4ff40d 100644
--- a/bindings/tests/idls/core/TestInterfaceNode.idl
+++ b/bindings/tests/idls/core/TestInterfaceNode.idl
@@ -29,6 +29,8 @@
  */
 
 interface TestInterfaceNode : Node {
+    inherit attribute DOMString nodeName;
+
     attribute DOMString stringAttribute;
     readonly attribute TestInterfaceEmpty readonlyTestInterfaceEmptyAttribute;
     attribute EventHandler eventHandlerAttribute;
diff --git a/bindings/tests/idls/core/TestInterfaceNotScriptWrappable.idl b/bindings/tests/idls/core/TestInterfaceNotScriptWrappable.idl
deleted file mode 100644
index aa8192d..0000000
--- a/bindings/tests/idls/core/TestInterfaceNotScriptWrappable.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
-    NotScriptWrappable,
-] interface TestInterfaceNotScriptWrappable {
-    attribute TestInterfaceNotScriptWrappable attr1;
-    void func(TestInterfaceNotScriptWrappable arg);
-};
diff --git a/bindings/tests/idls/core/TestInterfaceOwnProperties.idl b/bindings/tests/idls/core/TestInterfaceOwnProperties.idl
new file mode 100644
index 0000000..940024a
--- /dev/null
+++ b/bindings/tests/idls/core/TestInterfaceOwnProperties.idl
@@ -0,0 +1,13 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// An interface for testing (DoNot)ExposeJSAccessors extended attributes.
+
+[
+    DoNotExposeJSAccessors,
+] interface TestInterfaceOwnProperties : TestInterfaceEmpty {
+    attribute long noExposeJSAccessorAttribute;
+    [ExposeJSAccessors] attribute long exposeJSAccessorAttribute;
+    [DoNotExposeJSAccessors] attribute long doNotExposeJSAccessorAttribute;
+};
diff --git a/bindings/tests/idls/core/TestInterfaceOwnPropertiesDerived.idl b/bindings/tests/idls/core/TestInterfaceOwnPropertiesDerived.idl
new file mode 100644
index 0000000..86f47b6
--- /dev/null
+++ b/bindings/tests/idls/core/TestInterfaceOwnPropertiesDerived.idl
@@ -0,0 +1,11 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// An interface for testing (DoNot)ExposeJSAccessors extended attributes.
+
+interface TestInterfaceOwnPropertiesDerived : TestInterfaceOwnProperties {
+    attribute long noExposeJSAccessorAttribute;
+    [ExposeJSAccessors] attribute long exposeJSAccessorAttribute;
+    [DoNotExposeJSAccessors] attribute long doNotExposeJSAccessorAttribute;
+};
diff --git a/bindings/tests/idls/core/TestInterfaceWillBeGarbageCollected.idl b/bindings/tests/idls/core/TestInterfaceWillBeGarbageCollected.idl
index be955b0..8515a03 100644
--- a/bindings/tests/idls/core/TestInterfaceWillBeGarbageCollected.idl
+++ b/bindings/tests/idls/core/TestInterfaceWillBeGarbageCollected.idl
@@ -32,6 +32,7 @@
     Constructor(DOMString str),
     NamedConstructor=TestInterface(DOMString str),
     WillBeGarbageCollected,
+    Unforgeable,
 ] interface TestInterfaceWillBeGarbageCollected : EventTarget { // Inherit from EventTarget to test order of internal fields
     attribute TestInterfaceWillBeGarbageCollected attr1;
     void func(TestInterfaceWillBeGarbageCollected arg);
diff --git a/bindings/tests/idls/core/TestObject.idl b/bindings/tests/idls/core/TestObject.idl
index 44d9cae..97a9ab9 100644
--- a/bindings/tests/idls/core/TestObject.idl
+++ b/bindings/tests/idls/core/TestObject.idl
@@ -88,7 +88,7 @@
     attribute Date dateAttribute;
     attribute DOMString stringAttribute;
     attribute ByteString byteStringAttribute;
-    attribute ScalarValueString scalarValueStringAttribute;
+    attribute USVString usvStringAttribute;
     attribute DOMTimeStamp domTimeStampAttribute;
     attribute boolean booleanAttribute;
     attribute byte byteAttribute;
@@ -150,11 +150,19 @@
     attribute TestInterface? testInterfaceOrNullAttribute;
     // Enumerations
     attribute TestEnum testEnumAttribute;
+    attribute TestEnum? testEnumOrNullAttribute;
     // Static attributes
     static attribute DOMString staticStringAttribute;
     static attribute long staticLongAttribute;
     // Exceptional type
     attribute EventHandler eventHandlerAttribute;
+    // Union types
+    attribute (double or DOMString) doubleOrStringAttribute;
+    attribute (double or DOMString)? doubleOrStringOrNullAttribute;
+    attribute (double? or DOMString) doubleOrNullStringAttribute;
+    attribute (DOMString or sequence<DOMString>) stringOrStringSequenceAttribute;
+    attribute (TestEnum or double) testEnumOrDoubleAttribute;
+    attribute (unrestricted double or DOMString) unrestrictedDoubleOrStringAttribute;
 
     // Extended attributes
     [LogActivity, LogAllWorlds] attribute long activityLoggingAccessForAllWorldsLongAttribute;
@@ -187,7 +195,6 @@
     [Custom=Setter, ImplementedAs=implementedAsNameWithCustomGetter] attribute long customSetterImplementedAsLongAttribute;
     [MeasureAs=TestFeature] attribute long measureAsLongAttribute;
     [NotEnumerable] attribute long notEnumerableLongAttribute;
-    [PerContextEnabled=FeatureName] attribute long perContextEnabledLongAttribute;
     [PerWorldBindings] readonly attribute TestInterfaceEmpty perWorldBindingsReadonlyTestInterfaceEmptyAttribute;
     [LogActivity, LogAllWorlds, PerWorldBindings] attribute long activityLoggingAccessPerWorldBindingsLongAttribute;
     [LogActivity, PerWorldBindings] attribute long activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute;
@@ -231,9 +238,9 @@
     [Reflect, ReflectOnly=("empty","missing","invalid","a-normal"), ReflectEmpty="empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute DOMString limitedWithEmptyMissingInvalidAttribute;
 
     [Replaceable] readonly attribute long replaceableReadonlyLongAttribute;
-    [Replaceable, PutForwards=href] readonly attribute TestNode locationReplaceable;
+    [Replaceable, ExposeJSAccessors] readonly attribute long replaceableReadonlyLongAccessor;
+    [PutForwards=href] readonly attribute TestNode locationPutForwards;
     [RuntimeEnabled=FeatureName] attribute long runtimeEnabledLongAttribute;
-    [PerContextEnabled=FeatureName, RuntimeEnabled=FeatureName] attribute long perContextEnabledRuntimeEnabledLongAttribute;
     [Conditional=CONDITION, RuntimeEnabled=FeatureName] attribute long conditionalRuntimeEnabledLongAttribute;
     [SetterCallWith=(ActiveWindow,FirstWindow)] attribute DOMString setterCallWithActiveWindowAndFirstWindowStringAttribute;
     [SetterCallWith=ExecutionContext] attribute DOMString setterCallWithExecutionContextStringAttribute;
@@ -244,14 +251,20 @@
     [TreatReturnedNullStringAs=Undefined, CachedAttribute=isStringDirty] attribute DOMString cachedTreatReturnedNullStringAsUndefinedStringAttribute;
     [TreatReturnedNullStringAs=Null] attribute ByteString treatReturnedNullStringAsNullByteStringAttribute;
     [TreatReturnedNullStringAs=Undefined] attribute ByteString treatReturnedNullStringAsUndefinedByteStringAttribute;
-    [TreatReturnedNullStringAs=Null] attribute ScalarValueString treatReturnedNullStringAsNullScalarValueStringAttribute;
-    [TreatReturnedNullStringAs=Undefined] attribute ScalarValueString treatReturnedNullStringAsUndefinedScalarValueStringAttribute;
+    [TreatReturnedNullStringAs=Null] attribute USVString treatReturnedNullStringAsNullUSVStringAttribute;
+    [TreatReturnedNullStringAs=Undefined] attribute USVString treatReturnedNullStringAsUndefinedUSVStringAttribute;
     [TypeChecking=Interface] attribute float typeCheckingInterfaceFloatAttribute; // nop for non-interface types
     [TypeChecking=Interface] attribute TestInterface typeCheckingInterfaceTestInterfaceAttribute;
     [TypeChecking=Interface] attribute TestInterface? typeCheckingInterfaceTestInterfaceOrNullAttribute;
     [Reflect, URL] attribute DOMString urlStringAttribute;
     [Reflect=reflectUrlAttribute, URL] attribute DOMString urlStringAttribute;
     [Unforgeable] attribute long unforgeableLongAttribute;
+    [Measure] attribute long measuredLongAttribute;
+    [SameObject] attribute TestInterface sameObjectAttribute;
+    [Unscopeable] attribute long unscopeableLongAttribute;
+    [Unscopeable, RuntimeEnabled=FeatureName] attribute long unscopeableRuntimeEnabledLongAttribute;
+    [Unscopeable] void unscopeableVoidMethod();
+    [Unscopeable, RuntimeEnabled=FeatureName] void unscopeableRuntimeEnabledVoidMethod();
 
 
     // Methods
@@ -268,7 +281,7 @@
     Date dateMethod();
     DOMString stringMethod();
     ByteString byteStringMethod();
-    ScalarValueString scalarValueStringMethod();
+    USVString usvStringMethod();
     DOMTimeStamp readonlyDOMTimeStampMethod();
     boolean booleanMethod();
     byte byteMethod();
@@ -285,7 +298,7 @@
     void voidMethodDateArg(Date dateArg);
     void voidMethodStringArg(DOMString stringArg);
     void voidMethodByteStringArg(ByteString stringArg);
-    void voidMethodScalarValueStringArg(ScalarValueString scalarValueStringArg);
+    void voidMethodUSVStringArg(USVString usvStringArg);
     void voidMethodDOMTimeStampArg(DOMTimeStamp domTimeStampArg);
     void voidMethodBooleanArg(boolean booleanArg);
     void voidMethodByteArg(byte byteArg);
@@ -306,6 +319,8 @@
     VoidCallbackFunction voidCallbackFunctionMethod();
     AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgMethod();
     void voidMethodVoidCallbackFunctionArg(VoidCallbackFunction voidCallbackFunctionArg);
+    void voidMethodOptionalVoidCallbackFunctionArg(optional VoidCallbackFunction voidCallbackFunctionArg);
+    void voidMethodNullableVoidCallbackFunctionArg(VoidCallbackFunction? voidCallbackFunctionArg);
     void voidMethodAnyCallbackFunctionOptionalAnyArg(AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgArg);
     // Custom type conversions
     any anyMethod();
@@ -336,6 +351,7 @@
     void voidMethodArrayLongArg(long[] arrayLongArg);
     void voidMethodArrayStringArg(DOMString[] arrayStringArg);
     void voidMethodArrayTestInterfaceEmptyArg(TestInterfaceEmpty[] arrayTestInterfaceEmptyArg);
+    void voidMethodNullableArrayLongArg(long[]? arrayLongArg);
     // Sequences
     sequence<long> longSequenceMethod();
     sequence<DOMString> stringSequenceMethod();
@@ -344,6 +360,7 @@
     void voidMethodSequenceStringArg(sequence<DOMString> stringSequenceArg);
     void voidMethodSequenceTestInterfaceEmptyArg(sequence<TestInterfaceEmpty> testInterfaceEmptySequenceArg);
     void voidMethodSequenceSequenceDOMStringArg(sequence<sequence<DOMString>> stringSequenceSequenceArg);
+    void voidMethodNullableSequenceLongArg(sequence<long>? longSequenceArg);
     // Nullable types
     long? nullableLongMethod();
     DOMString? nullableStringMethod();
@@ -352,7 +369,15 @@
     // Union types
     (TestInterfaceGarbageCollected or DOMString) testInterfaceGarbageCollectedOrDOMStringMethod();
     (TestInterfaceWillBeGarbageCollected or TestDictionary) testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod();
-    (sequence<long> or DOMString[] or unrestricted double) longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod();
+    (boolean or DOMString or unrestricted double) booleanOrDOMStringOrUnrestrictedDoubleMethod();
+    (TestInterface or long) testInterfaceOrLongMethod();
+    void voidMethodDoubleOrDOMStringArg((double or DOMString) arg);
+    void voidMethodDoubleOrDOMStringOrNullArg((double or DOMString)? arg);
+    void voidMethodDoubleOrNullOrDOMStringArg((double? or DOMString) arg);
+    void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg((DOMString or ArrayBuffer or ArrayBufferView) arg);
+    void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg((ArrayBuffer or ArrayBufferView or Dictionary) arg);
+    // Array of Union types
+    void voidMethodArrayOfDoubleOrDOMStringArg((double or DOMString)... arg);
     // Currently only used on interface type arguments
     void voidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? nullableTestInterfaceEmptyArg);
     // Callback interface types
@@ -364,8 +389,11 @@
     void voidMethodTestEnumArg(TestEnum testEnumTypeArg);
     // Exceptional types
     Dictionary dictionaryMethod();
+    TestDictionary testDictionaryMethod();
+    TestDictionary? nullableTestDictionaryMethod();
+    void passPermissiveDictionaryMethod([PermissiveDictionaryConversion] optional TestDictionary arg);
     NodeFilter nodeFilterMethod();
-    Promise promiseMethod(long arg1, Dictionary arg2, DOMString arg3, DOMString... variadic);
+    Promise<void> promiseMethod(long arg1, Dictionary arg2, DOMString arg3, DOMString... variadic);
     Promise promiseMethodWithoutExceptionState(Dictionary arg1);
     SerializedScriptValue serializedScriptValueMethod();
     XPathNSResolver xPathNSResolverMethod();
@@ -375,8 +403,6 @@
     void voidMethodSerializedScriptValueArg(SerializedScriptValue serializedScriptValueArg);
     void voidMethodXPathNSResolverArg(XPathNSResolver xPathNSResolverArg);
     void voidMethodDictionarySequenceArg(sequence<Dictionary> dictionarySequenceArg);
-    Promise overloadedPromiseMethod(long arg);
-    Promise overloadedPromiseMethod(DOMString arg);
 
     // Arguments
     void voidMethodStringArgLongArg(DOMString stringArg, long longArg);
@@ -406,6 +432,10 @@
     void voidMethodDefaultNullableByteStringArg(optional ByteString? defaultStringArg = null);
     void voidMethodDefaultNullableStringArg(optional DOMString? defaultStringArg = null);
     void voidMethodDefaultNullableTestInterfaceArg(optional TestInterface? defaultTestInterfaceArg = null);
+    void voidMethodDefaultDoubleOrStringArgs(optional (double or DOMString) defaultLongArg = 10.0,
+                                             optional (double or DOMString?) defaultStringArg = "foo",
+                                             optional (double or DOMString)? defaultNullArg = null);
+    void voidMethodDefaultStringSequenceArg(optional sequence<DOMString> defaultStringSequenceArg = []);
 
     // Variadic operations
     void voidMethodVariadicStringArg(DOMString... variadicStringArgs);
@@ -436,7 +466,14 @@
     void overloadedMethodI(double doubleArg);
     void overloadedMethodJ(DOMString stringArg);
     void overloadedMethodJ(TestDictionary testDictionaryArg);
+    void overloadedMethodK(Function functionArg);
+    void overloadedMethodK(DOMString stringArg);
+    void overloadedMethodL(long longArg, any... restArgs);
+    void overloadedMethodL(DOMString stringArg, any... restArgs);
 
+    Promise promiseOverloadMethod();
+    Promise promiseOverloadMethod(Window arg1, double arg2);
+    Promise promiseOverloadMethod(Document arg1, double arg2);
 
     [PerWorldBindings] void overloadedPerWorldBindingsMethod();
     [PerWorldBindings] void overloadedPerWorldBindingsMethod(long longArg);
@@ -444,6 +481,14 @@
     static void overloadedStaticMethod(long longArg);
     static void overloadedStaticMethod(long longArg1, long longArg2);
 
+    // Special operations
+    [CallWith=ScriptState] getter any item(unsigned long index);
+    [CallWith=ScriptState] getter object(DOMString name);
+    [CallWith=ScriptState] setter DOMString setItem(unsigned long index, DOMString value);
+    [CallWith=ScriptState] setter DOMString(DOMString name, DOMString value);
+    [RaisesException, CallWith=ScriptState] deleter boolean(unsigned long index);
+    [CallWith=ScriptState] deleter boolean(DOMString name);
+
     // Extended attributes for arguments
     // [Clamp]
     void voidMethodClampUnsignedShortArg([Clamp] unsigned short clampUnsignedShortArg);
@@ -469,16 +514,22 @@
     [CallWith=(ScriptState,ScriptArguments)] void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(optional boolean optionalBooleanArg);
     [CallWith=ActiveWindow] void callWithActiveWindow();
     [CallWith=(ActiveWindow,FirstWindow)] void callWithActiveWindowScriptWindow();
+    [CallWith=ThisValue] void callWithThisValue();
     [CheckSecurity=Node] void checkSecurityForNodeVoidMethod();
     [Conditional=CONDITION] void conditionalConditionVoidMethod();
     [Conditional=CONDITION] static void conditionalConditionStaticVoidMethod();
     [Custom] void customVoidMethod();
+    [Custom=CallPrologue] void customCallPrologueVoidMethod();
+    [Custom=CallEpilogue] void customCallEpilogueVoidMethod();
     [Conditional=CONDITION, Custom] void conditionalConditionCustomVoidMethod();
     [CustomElementCallbacks] void customElementCallbacksVoidMethod();
     [DeprecateAs=voidMethod] void deprecatedVoidMethod();
     [DoNotCheckSignature] void doNotCheckSignatureVoidMethod();
     [ImplementedAs=implementedAsMethodName] void implementedAsVoidMethod();
     [MeasureAs=TestFeature] void measureAsVoidMethod();
+    [Measure] void measureMethod();
+    [Measure] void measureOverloadedMethod();
+    [Measure] void measureOverloadedMethod(long arg);
     [DeprecateAs=TestFeatureA] void DeprecateAsOverloadedMethod();
     [DeprecateAs=TestFeatureB] void DeprecateAsOverloadedMethod(long arg);
     [DeprecateAs=TestFeature] void DeprecateAsSameValueOverloadedMethod();
@@ -494,9 +545,9 @@
     [DeprecateAs=TestFeatureA, MeasureAs=TestFeatureB] void deprecateAsSameValueMeasureAsSameValueOverloadedMethod();
     [DeprecateAs=TestFeatureA, MeasureAs=TestFeatureB] void deprecateAsSameValueMeasureAsSameValueOverloadedMethod(long arg);
     [NotEnumerable] void notEnumerableVoidMethod();
-    [PerContextEnabled=FeatureName] void perContextEnabledVoidMethod();
     [PerWorldBindings] void perWorldBindingsVoidMethod();
     [PerWorldBindings] void perWorldBindingsVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
+    [PostMessage, RaisesException] void postMessage(SerializedScriptValue message, optional sequence<Transferable> transfer);
     [LogActivity, LogAllWorlds, PerWorldBindings] void activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
     [LogActivity, PerWorldBindings] void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
     [RaisesException] void raisesExceptionVoidMethod();
@@ -505,28 +556,37 @@
     [RaisesException] void raisesExceptionVoidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackInterfaceArg);
     [RaisesException] void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterface optionalTestCallbackInterfaceArg);
     [RaisesException] TestInterfaceEmpty raisesExceptionTestInterfaceEmptyVoidMethod();
+    [RaisesException] XPathNSResolver raisesExceptionXPathNSResolverVoidMethod();
     [CallWith=ExecutionContext, RaisesException] void callWithExecutionContextRaisesExceptionVoidMethodLongArg(long longArg);
     [RuntimeEnabled=FeatureName] void runtimeEnabledVoidMethod();
     [PerWorldBindings, RuntimeEnabled=FeatureName] void perWorldBindingsRuntimeEnabledVoidMethod();
     [RuntimeEnabled=FeatureName] void runtimeEnabledOverloadedVoidMethod(DOMString stringArg);
     [RuntimeEnabled=FeatureName] void runtimeEnabledOverloadedVoidMethod(long longArg);
     [RuntimeEnabled=FeatureName1] void partiallyRuntimeEnabledOverloadedVoidMethod(DOMString stringArg);
-    [RuntimeEnabled=FeatureName2] void partiallyRuntimeEnabledOverloadedVoidMethod(TestInterface testInterface);
-    void partiallyRuntimeEnabledOverloadedVoidMethod(long longArg);
+    [RuntimeEnabled=FeatureName2] void partiallyRuntimeEnabledOverloadedVoidMethod(TestInterface testInterfaceArg);
+    void partiallyRuntimeEnabledOverloadedVoidMethod(long longArg, DOMString stringArg);
+    [RuntimeEnabled=FeatureName3] void partiallyRuntimeEnabledOverloadedVoidMethod(long longArg, DOMString stringArg, TestInterface testInterfaceArg);
     [TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStringMethod();
     [TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUndefinedStringMethod();
     [TreatReturnedNullStringAs=Null] ByteString treatReturnedNullStringAsNullByteStringMethod();
     [TreatReturnedNullStringAs=Undefined] ByteString treatReturnedNullStringAsUndefinedByteStringMethod();
-    [TreatReturnedNullStringAs=Null] ScalarValueString treatReturnedNullStringAsNullScalarValueStringMethod();
-    [TreatReturnedNullStringAs=Undefined] ScalarValueString treatReturnedNullStringAsUndefinedScalarValueStringMethod();
+    [TreatReturnedNullStringAs=Null] USVString treatReturnedNullStringAsNullUSVStringMethod();
+    [TreatReturnedNullStringAs=Undefined] USVString treatReturnedNullStringAsUndefinedUSVStringMethod();
     [TypeChecking=Interface] void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
     [TypeChecking=Interface] void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg(TestInterfaceEmpty... testInterfaceEmptyArg);
-    [TypeChecking=Unrestricted] void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(float floatArg, double doubleArg);
+    // Avoid redundant type checking
+    [TypeChecking=Interface] void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(Node node1, optional Node node2);
+    [TypeChecking=Interface] void useToImpl4ArgumentsCheckingIfPossibleWithNullableArg(Node node1, Node? node2);
+    [TypeChecking=Interface] void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg(Node node1, [Default=Undefined] optional Node node2);
+    void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(float floatArg, double doubleArg);
     [Unforgeable] void unforgeableVoidMethod();
     void voidMethodTestInterfaceGarbageCollectedSequenceArg(sequence<TestInterfaceGarbageCollected> testInterfaceGarbageCollectedSequenceArg);
     void voidMethodTestInterfaceGarbageCollectedArrayArg(TestInterfaceGarbageCollected[] testInterfaceGarbageCollectedArrayArg);
     void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(sequence<TestInterfaceWillBeGarbageCollected> testInterfaceWillBeGarbageCollectedSequenceArg);
     void voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(TestInterfaceWillBeGarbageCollected[] testInterfaceWillBeGarbageCollectedArrayArg);
+    [NewObject] TestInterface newObjectTestInterfaceMethod();
+
+    serializer DOMString serializerMethod();
 
     // Extended attributes on referenced interfaces
     // (not self; self-reference tests at interface themselves)
@@ -552,4 +612,6 @@
     [ImplementedInPrivateScript, OnlyExposedToPrivateScript] short methodForPrivateScriptOnly(short value1, short value2);
     [ImplementedInPrivateScript, OnlyExposedToPrivateScript] attribute DOMString attributeForPrivateScriptOnly;
     [ImplementedInPrivateScript] attribute TestEnum enumForPrivateScript;
+
+    maplike<long, DOMStringOrDouble>;
 };
diff --git a/bindings/tests/idls/core/TestPartialInterface2.idl b/bindings/tests/idls/core/TestPartialInterface2.idl
index 43abced..4bb8686 100644
--- a/bindings/tests/idls/core/TestPartialInterface2.idl
+++ b/bindings/tests/idls/core/TestPartialInterface2.idl
@@ -30,7 +30,6 @@
 
 [
     ImplementedAs=TestPartialInterfaceImplementation, // Conflicts with default partial interface class name
-    PerContextEnabled=PartialContextName, // Conflicts with [RuntimeEnabled]
 ] partial interface TestInterface {
     const unsigned short PARTIAL2_UNSIGNED_SHORT = 0;
 
diff --git a/bindings/tests/idls/core/TestPartialInterface4.idl b/bindings/tests/idls/core/TestPartialInterface4.idl
new file mode 100644
index 0000000..fcdbd80
--- /dev/null
+++ b/bindings/tests/idls/core/TestPartialInterface4.idl
@@ -0,0 +1,10 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+[
+    Conditional=FOO,
+    TypeChecking=Interface,
+] partial interface TestInterface3 {
+    [Conditional=BAR] static void voidMethodDocument(Document document, double d);
+};
diff --git a/bindings/tests/idls/core/TestPermissiveDictionary.idl b/bindings/tests/idls/core/TestPermissiveDictionary.idl
new file mode 100644
index 0000000..c4a1f50
--- /dev/null
+++ b/bindings/tests/idls/core/TestPermissiveDictionary.idl
@@ -0,0 +1,14 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This dictionary only exists to test the "permissive" dictionary
+// conversion code path. In this code path, if a non-object type is
+// seen as input while converting to the dictionary type, it is
+// treated similarly to undefined or null, instead of throwing a
+// TypeError.
+
+[PermissiveDictionaryConversion]
+dictionary TestPermissiveDictionary {
+    boolean booleanMember;
+};
diff --git a/bindings/tests/idls/core/Uint8ClampedArray.idl b/bindings/tests/idls/core/Uint8ClampedArray.idl
new file mode 100644
index 0000000..13f411c
--- /dev/null
+++ b/bindings/tests/idls/core/Uint8ClampedArray.idl
@@ -0,0 +1,10 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// https://www.khronos.org/registry/typedarray/specs/latest/#TYPEDARRAYS
+
+[
+    ImplementedAs=TestUint8ClampedArray,
+] interface Uint8ClampedArray : ArrayBufferView {
+};
diff --git a/bindings/tests/idls/modules/TestInterface5.idl b/bindings/tests/idls/modules/TestInterface5.idl
index 72e8535..d08b7cb 100644
--- a/bindings/tests/idls/modules/TestInterface5.idl
+++ b/bindings/tests/idls/modules/TestInterface5.idl
@@ -31,16 +31,17 @@
 // Test for interface extended attributes and special operations.
 // Also used as a target by TestObject
 
+enum TestEnumModules { "EnumModulesValue1", "EnumModulesValue2" };
+
 [
     ActiveDOMObject,
     Conditional=CONDITION,
-    Custom=(LegacyCallAsFunction,ToV8),
+    Custom=LegacyCallAsFunction,
     DoNotCheckConstants,
     ImplementedAs=TestInterface5Implementation,
-    Iterable,
     RuntimeEnabled=FeatureName,
     SetWrapperReferenceTo(TestInterface5 referencedName),
-    TypeChecking=(Interface,Unrestricted),
+    TypeChecking=Interface,
     Exposed=(Worker,Window),
 ] interface TestInterface5 : TestInterfaceEmpty {
     // members needed to test [ImplementedAs], as this affect attribute
@@ -88,5 +89,11 @@
     [Exposed=Window] attribute long windowExposedAttribute;
 
     [Exposed=(Window,ServiceWorker)] void windowAndServiceWorkerExposedMethod();
+
+    // Union types
+    void voidMethodBooleanOrDOMStringArg((boolean or DOMString) arg);
+    void voidMethodDoubleOrDOMStringArg((double or DOMString) arg);
+
+    iterable<any>;
 };
 
diff --git a/bindings/tests/idls/modules/TestPartialInterface3.idl b/bindings/tests/idls/modules/TestPartialInterface3.idl
index d09f7bd..353454e 100644
--- a/bindings/tests/idls/modules/TestPartialInterface3.idl
+++ b/bindings/tests/idls/modules/TestPartialInterface3.idl
@@ -30,16 +30,19 @@
 
 [
     ImplementedAs=TestPartialInterfaceImplementation3,
-    PerContextEnabled=PartialContextName3,
 ] partial interface TestInterface {
     const unsigned short PARTIAL3_UNSIGNED_SHORT = 0;
 
-    attribute long partial3LongAttribute;
-    static attribute long partial3StaticLongAttribute;
-
     void voidMethodPartialOverload(DOMString value);
-    static void voidMethodPartialOverload(DOMString value);
+    static void staticVoidMethodPartialOverload(DOMString value);
+
+    Promise promiseMethodPartialOverload(Document document);
+    static Promise staticPromiseMethodPartialOverload(DOMString value);
 
     void partial2VoidMethod(DOMString value);
+    void partial2VoidMethod(Node node);
+    void partialVoidTestEnumModulesArgMethod(TestEnumModules arg);
     static void partial2StaticVoidMethod(DOMString value);
+
+    [Unscopeable] void unscopeableVoidMethod();
 };
diff --git a/core/README b/core/README
index 418d1e5..630832e 100644
--- a/core/README
+++ b/core/README
@@ -5,5 +5,5 @@
 using the script: $DART_ROOT/sdk/lib/html/scripts/idlsync.py
 
 The current version corresponds to:
-URL: http://src.chromium.org/blink/branches/dart/dartium
-Current revision: 190578
+URL: https://src.chromium.org/blink/branches/dart/2454_1
+Current revision: 202759
diff --git a/core/animation/Animation.idl b/core/animation/Animation.idl
index 02b98bf..76ef6bb 100644
--- a/core/animation/Animation.idl
+++ b/core/animation/Animation.idl
@@ -28,14 +28,29 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// http://dev.w3.org/fxtf/web-animations/#idl-def-Animation
+// https://w3c.github.io/web-animations/#animation
+
+enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" };
 
 [
-    // FIXME: should be optional union type http://crbug.com/240176
-    Constructor(Element? target, sequence<Dictionary> keyframes),
-    Constructor(Element? target, sequence<Dictionary> keyframes, double timingInput),
-    Constructor(Element? target, sequence<Dictionary> keyframes, Dictionary timingInput),
-    RaisesException=Constructor,
-    RuntimeEnabled=WebAnimationsAPI,
-] interface Animation : AnimationNode {
+    ActiveDOMObject,
+    NoInterfaceObject,
+] interface Animation : EventTarget {
+    // TODO(dstockwell): Add timeline property.
+    [RuntimeEnabled=WebAnimationsAPI] attribute AnimationEffectReadOnly? effect;
+    [Measure] attribute double?    startTime;
+    [Measure] attribute double?    currentTime;
+    [Measure] attribute double     playbackRate;
+    [Measure] readonly attribute AnimationPlayState playState;
+    [Measure, RaisesException] void finish();
+    [Measure] void play();
+    [Measure] void pause();
+    [Measure] void reverse();
+    [RuntimeEnabled=WebAnimationsAPI] attribute double startClip;
+    [RuntimeEnabled=WebAnimationsAPI] attribute double endClip;
+
+    [Measure] void cancel();
+    [Measure] attribute EventHandler onfinish;
+    [RuntimeEnabled=WebAnimationsAPI, CallWith=ScriptState] readonly attribute Promise<Animation> finished;
+    [RuntimeEnabled=WebAnimationsAPI, CallWith=ScriptState] readonly attribute Promise<Animation> ready;
 };
diff --git a/modules/performance/WorkerGlobalScopePerformance.idl b/core/animation/AnimationEffectReadOnly.idl
similarity index 81%
copy from modules/performance/WorkerGlobalScopePerformance.idl
copy to core/animation/AnimationEffectReadOnly.idl
index 559003a..06540d1 100644
--- a/modules/performance/WorkerGlobalScopePerformance.idl
+++ b/core/animation/AnimationEffectReadOnly.idl
@@ -28,6 +28,13 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-partial interface WorkerGlobalScope {
-    readonly attribute WorkerPerformance performance;
+// https://w3c.github.io/web-animations/#the-animationeffectreadonly-interface
+
+[
+    RuntimeEnabled=WebAnimationsAPI,
+    WillBeGarbageCollected,
+    ImplementedAs=AnimationEffect,
+] interface AnimationEffectReadOnly {
+    readonly attribute AnimationEffectTiming timing;
+    readonly attribute ComputedTimingProperties computedTiming;
 };
diff --git a/core/animation/AnimationEffectTiming.idl b/core/animation/AnimationEffectTiming.idl
new file mode 100644
index 0000000..59a395e
--- /dev/null
+++ b/core/animation/AnimationEffectTiming.idl
@@ -0,0 +1,22 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// https://w3c.github.io/web-animations/#the-animationeffecttiming-interface
+// TODO(dstockwell): Should extend AnimationEffectTimingReadOnly
+
+[
+    RuntimeEnabled=WebAnimationsAPI,
+    WillBeGarbageCollected,
+] interface AnimationEffectTiming {
+    attribute double delay;
+    attribute double endDelay;
+    attribute DOMString fill;
+    attribute double iterationStart;
+    attribute unrestricted double iterations;
+    attribute (unrestricted double or DOMString) duration;
+    // TODO(dstockwell): playbackRate has been removed from level 1.
+    attribute double playbackRate;
+    attribute DOMString direction;
+    attribute DOMString easing;
+};
diff --git a/core/animation/AnimationPlayer.idl b/core/animation/AnimationPlayer.idl
deleted file mode 100644
index 45720a4..0000000
--- a/core/animation/AnimationPlayer.idl
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" };
-
-[
-    NoInterfaceObject,
-    WillBeGarbageCollected,
-    ActiveDOMObject,
-] interface AnimationPlayer : EventTarget {
-    [RuntimeEnabled=WebAnimationsAPI]                      attribute AnimationNode? source;
-    [RuntimeEnabled=WebAnimationsPlaybackControl]          attribute double?    startTime;
-    [RuntimeEnabled=WebAnimationsPlaybackControl]          attribute double?    currentTime;
-    [RuntimeEnabled=WebAnimationsPlaybackControl]          attribute double     playbackRate;
-    [RuntimeEnabled=WebAnimationsPlaybackControl, MeasureAs=AnimationPlayerGetPlayState] readonly attribute AnimationPlayState playState;
-    [RuntimeEnabled=WebAnimationsPlaybackControl, MeasureAs=AnimationPlayerFinish, RaisesException] void finish();
-    [RuntimeEnabled=WebAnimationsPlaybackControl, MeasureAs=AnimationPlayerPlay] void play();
-    [RuntimeEnabled=WebAnimationsPlaybackControl, MeasureAs=AnimationPlayerPause] void pause();
-    [RuntimeEnabled=WebAnimationsPlaybackControl, MeasureAs=AnimationPlayerReverse] void reverse();
-
-    void cancel();
-    [MeasureAs=AnimationPlayerFinishEvent] attribute EventHandler onfinish;
-};
diff --git a/core/animation/AnimationTimeline.idl b/core/animation/AnimationTimeline.idl
index 31b1648..81f4238 100644
--- a/core/animation/AnimationTimeline.idl
+++ b/core/animation/AnimationTimeline.idl
@@ -2,11 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+// http://www.w3.org/TR/web-animations/#the-animationtimeline-interface
+
+// TODO(dstockwell): This interface has several changes in the latest spec:
+// https://w3c.github.io/web-animations/#the-animationtimeline-interface
+
 [
     RuntimeEnabled=WebAnimationsAPI,
     WillBeGarbageCollected,
 ] interface AnimationTimeline {
-    readonly attribute double? currentTime;
-    AnimationPlayer play(AnimationNode source);
-    sequence<AnimationPlayer> getAnimationPlayers();
+    attribute double? currentTime;
+    attribute double playbackRate;
+    Animation play(AnimationEffectReadOnly source);
+    sequence<Animation> getAnimations();
 };
diff --git a/core/animation/ComputedTimingProperties.idl b/core/animation/ComputedTimingProperties.idl
new file mode 100644
index 0000000..71e0530
--- /dev/null
+++ b/core/animation/ComputedTimingProperties.idl
@@ -0,0 +1,17 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// https://w3c.github.io/web-animations/#the-computedtimingproperties-dictionary
+
+dictionary ComputedTimingProperties : KeyframeEffectOptions {
+    // TODO(dstockwell): There is no startTime member in the spec.
+    double              startTime;
+    unrestricted double endTime;
+    unrestricted double activeDuration;
+    double?             localTime;
+    // TODO(dstockwell): The timeFraction and currentIteration members should
+    // both be of type unrestricted double? (nullable).
+    unrestricted double timeFraction;
+    unsigned long?      currentIteration;
+};
diff --git a/core/animation/DocumentAnimation.idl b/core/animation/DocumentAnimation.idl
index d2c2861..7e02888 100644
--- a/core/animation/DocumentAnimation.idl
+++ b/core/animation/DocumentAnimation.idl
@@ -2,8 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+// https://w3c.github.io/web-animations/#extensions-to-the-document-interface
+
 [
     RuntimeEnabled=WebAnimationsAPI,
 ] partial interface Document {
+    // TODO(dstockwell): This should be a DocumentTimeline.
     readonly attribute AnimationTimeline timeline;
 };
diff --git a/core/animation/EffectModel.idl b/core/animation/EffectModel.idl
new file mode 100644
index 0000000..38c7185
--- /dev/null
+++ b/core/animation/EffectModel.idl
@@ -0,0 +1,15 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// http://www.w3.org/TR/web-animations/#the-animationeffect-interface
+
+// TODO(dstockwell): This interface has been removed in the latest spec:
+// https://w3c.github.io/web-animations/
+
+[
+    RuntimeEnabled=WebAnimationsAPI,
+    NoInterfaceObject,
+    WillBeGarbageCollected
+] interface EffectModel {
+};
diff --git a/core/animation/ElementAnimation.idl b/core/animation/ElementAnimation.idl
index ccfbca7..7129e4d 100644
--- a/core/animation/ElementAnimation.idl
+++ b/core/animation/ElementAnimation.idl
@@ -28,13 +28,17 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// http://www.w3.org/TR/web-animations/#idl-def-Element
-// FIXME: move to Animatable
-// http://dev.w3.org/fxtf/web-animations/#idl-def-Animatable
+// http://www.w3.org/TR/web-animations/#the-animatable-interface
+// http://www.w3.org/TR/web-animations/#extensions-to-the-element-interface
+
+// TODO(dstockwell): This should be an Animatable interface, where Element
+// implements Animatable. The interface also has several changes:
+// https://w3c.github.io/web-animations/#the-animatable-interface
 
 partial interface Element {
-    // FIXME: needs support for union types http://crbug.com/240176
-    // AnimationPlayer animate((AnimationEffect or sequence<Dictionary>)? effect, optional (double or Dictionary) timing);
-    [Custom, RaisesException] AnimationPlayer animate(object effect, optional object timing);
-    [RuntimeEnabled=WebAnimationsAPI] sequence<AnimationPlayer> getAnimationPlayers();
+    // FIXME: Union types with dictionary type members doesn't work (yet).
+    // Animation animate((EffectModel or sequence<Dictionary>)? effect, optional (double or KeyframeEffectOptions) timing);
+    [Measure, RaisesException] Animation animate((EffectModel or sequence<Dictionary>)? effect, optional double timing);
+    [Measure, RaisesException] Animation animate((EffectModel or sequence<Dictionary>)? effect, KeyframeEffectOptions timing);
+    [RuntimeEnabled=WebAnimationsAPI] sequence<Animation> getAnimations();
 };
diff --git a/core/animation/AnimationNode.idl b/core/animation/KeyframeEffect.idl
similarity index 75%
rename from core/animation/AnimationNode.idl
rename to core/animation/KeyframeEffect.idl
index c04ede6..0235507 100644
--- a/core/animation/AnimationNode.idl
+++ b/core/animation/KeyframeEffect.idl
@@ -28,20 +28,14 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// https://w3c.github.io/web-animations/#the-keyframeeffect-interfaces
+
 [
+    // TODO(dstockwell): the third argument should be "optional (unrestricted double or KeyframeEffectOptions) timing".
+    Constructor(Element? target, sequence<Dictionary> keyframes, optional unrestricted double timing),
+    Constructor(Element? target, sequence<Dictionary> keyframes, KeyframeEffectOptions timing),
+    RaisesException=Constructor,
     RuntimeEnabled=WebAnimationsAPI,
-    WillBeGarbageCollected,
-] interface AnimationNode {
-    // Playback state
-    readonly attribute double? localTime;
-    readonly attribute unsigned long? currentIteration;
-
-    // Calculated timing
-    readonly attribute double startTime;
-    readonly attribute double duration;
-    readonly attribute double activeDuration;
-    readonly attribute double endTime;
-
-    readonly attribute Timing timing;
-    readonly attribute AnimationPlayer? player;
+    TypeChecking=Interface,
+] interface KeyframeEffect : AnimationEffectReadOnly {
 };
diff --git a/core/animation/KeyframeEffectOptions.idl b/core/animation/KeyframeEffectOptions.idl
new file mode 100644
index 0000000..9585948
--- /dev/null
+++ b/core/animation/KeyframeEffectOptions.idl
@@ -0,0 +1,21 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// https://w3c.github.io/web-animations/#the-animationeffecttimingproperties-dictionary
+
+// TODO(dstockwell): Rename this to AnimationEffectTimingProperties.
+dictionary KeyframeEffectOptions {
+    double                             delay = 0;
+    double                             endDelay = 0;
+    // TODO(dstockwell): The fill type should be FillMode.
+    DOMString                          fill = "auto";
+    double                             iterationStart = 0.0;
+    unrestricted double                iterations = 1.0;
+    (unrestricted double or DOMString) duration = "auto";
+    // TODO(dstockwell): There is no playbackRate member in the spec.
+    double                             playbackRate = 1.0;
+    // TODO(dstockwell): The direction type should be PlaybackDirection.
+    DOMString                          direction = "normal";
+    DOMString                          easing = "linear";
+};
diff --git a/core/animation/Timing.idl b/core/animation/Timing.idl
deleted file mode 100644
index 1bb3198..0000000
--- a/core/animation/Timing.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
-    RuntimeEnabled=WebAnimationsAPI,
-    ImplementedAs=AnimationNodeTiming,
-    WillBeGarbageCollected,
-] interface Timing {
-    attribute double delay;
-    attribute double endDelay;
-    attribute DOMString fill;
-    attribute double iterationStart;
-    attribute double iterations;
-
-    // FIXME: This uses a NamedPropertyGetter to implement the 'duration' attribute
-    // because duration has a union type (which is tricky to do with an attribute).
-    // Fix will be in a follow-up patch if there is a better solution.
-    [NotEnumerable, ImplementedAs=getDuration] getter (double or DOMString) (DOMString name);
-
-    // FIXME: If the user calls animation.specified.duration = "" (empty string) then duration
-    // gets set to 0 (This is correct behavior for IDL). Correct result is for duration to
-    // be set to 'auto'.
-    [TypeChecking=Interface, ImplementedAs=setDuration] setter double (DOMString name, double duration);
-
-    attribute double playbackRate;
-    attribute DOMString direction;
-    attribute DOMString easing;
-};
diff --git a/core/clipboard/DataTransfer.idl b/core/clipboard/DataTransfer.idl
index 5448d01..3b5e1b4 100644
--- a/core/clipboard/DataTransfer.idl
+++ b/core/clipboard/DataTransfer.idl
@@ -26,19 +26,22 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    WillBeGarbageCollected
-] interface DataTransfer {
-             [TreatReturnedNullStringAs=Undefined] attribute DOMString dropEffect;
-             [TreatReturnedNullStringAs=Undefined] attribute DOMString effectAllowed;
-    readonly attribute DOMString[] types;
-    readonly attribute FileList files;
+// https://html.spec.whatwg.org/#the-datatransfer-interface
 
-    void clearData(optional DOMString type);
-    DOMString getData(DOMString type);
-    void setData(DOMString type, DOMString data);
+[
+    GarbageCollected
+] interface DataTransfer {
+    attribute DOMString dropEffect;
+    attribute DOMString effectAllowed;
+
+    [SameObject] readonly attribute DataTransferItemList items;
+
     [RaisesException] void setDragImage(Element image, long x, long y);
 
-    readonly attribute DataTransferItemList items;
+    /* old interface */
+    [SameObject] readonly attribute DOMString[] types;
+    DOMString getData(DOMString format);
+    void setData(DOMString format, DOMString data);
+    void clearData(optional DOMString format);
+    [SameObject] readonly attribute FileList files;
 };
-
diff --git a/core/clipboard/DataTransferItem.idl b/core/clipboard/DataTransferItem.idl
index 32e6904..1328c6e 100644
--- a/core/clipboard/DataTransferItem.idl
+++ b/core/clipboard/DataTransferItem.idl
@@ -28,14 +28,15 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// https://html.spec.whatwg.org/#the-datatransferitem-interface
+
 [
-    WillBeGarbageCollected,
-    NoInterfaceObject
+    GarbageCollected,
 ] interface DataTransferItem {
     readonly attribute DOMString kind;
     readonly attribute DOMString type;
-
+    // TODO(philipj): The callback argument should be a FunctionStringCallback.
     [CallWith=ExecutionContext] void getAsString(StringCallback? callback);
-    Blob getAsFile();
+    // TODO(philipj): getAsFile() should return a File object. crbug.com/361145
+    Blob? getAsFile();
 };
-
diff --git a/core/clipboard/DataTransferItemList.idl b/core/clipboard/DataTransferItemList.idl
index 7bdf22c..4349174 100644
--- a/core/clipboard/DataTransferItemList.idl
+++ b/core/clipboard/DataTransferItemList.idl
@@ -28,17 +28,17 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#datatransferitemlist
+// https://html.spec.whatwg.org/#the-datatransferitemlist-interface
 
 [
     TypeChecking=Interface,
-    WillBeGarbageCollected,
+    GarbageCollected,
 ] interface DataTransferItemList {
-    readonly attribute long length;
+    readonly attribute unsigned long length;
     [ImplementedAs=item] getter DataTransferItem (unsigned long index);
-
-    [RaisesException] DataTransferItem add(DOMString data, DOMString type);
-    DataTransferItem add(File? file);
+    [RaisesException] DataTransferItem? add(DOMString data, DOMString type);
+    // TODO(philipj): The file argument should not be nullable.
+    DataTransferItem? add(File? file);
     [RaisesException, ImplementedAs=deleteItem] void remove(unsigned long index);
     void clear();
 };
diff --git a/core/css/CSS.idl b/core/css/CSS.idl
index 36fe6da..7e5e2e0 100644
--- a/core/css/CSS.idl
+++ b/core/css/CSS.idl
@@ -27,11 +27,12 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// http://dev.w3.org/csswg/css-conditional/#the-css-interface
+
 [
-    NoInterfaceObject,
     ImplementedAs=DOMWindowCSS,
     WillBeGarbageCollected
 ] interface CSS {
-    boolean supports(DOMString property, DOMString value);
-    boolean supports(DOMString conditionText);
+    static boolean supports(DOMString property, DOMString value);
+    static boolean supports(DOMString conditionText);
 };
diff --git a/core/css/CSSCharsetRule.idl b/core/css/CSSCharsetRule.idl
deleted file mode 100644
index 1635a71..0000000
--- a/core/css/CSSCharsetRule.idl
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-interface CSSCharsetRule : CSSRule {
-    [MeasureAs=CSSCharsetRuleEncoding] attribute DOMString encoding;
-};
diff --git a/core/css/CSSFontFaceRule.idl b/core/css/CSSFontFaceRule.idl
index f13497c..6d2ece7 100644
--- a/core/css/CSSFontFaceRule.idl
+++ b/core/css/CSSFontFaceRule.idl
@@ -18,8 +18,14 @@
  * Boston, MA 02110-1301, USA.
  */
 
-// Introduced in DOM Level 2:
+// The CSSFontFaceRule interface was introduced in DOM Level 2 Style, but has
+// been replaced by an entirely different interface in CSS Fonts:
+// http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSFontFaceRule
+// http://dev.w3.org/csswg/css-fonts/#om-fontface
+//
+// The interface from DOM Level 2 Style is implemented here.
+// TODO(philipj): Implement the interface from CSS Fonts.
+
 interface CSSFontFaceRule : CSSRule {
     readonly attribute CSSStyleDeclaration style;
 };
-
diff --git a/core/css/CSSGroupingRule.idl b/core/css/CSSGroupingRule.idl
new file mode 100644
index 0000000..c6dbf4e
--- /dev/null
+++ b/core/css/CSSGroupingRule.idl
@@ -0,0 +1,11 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// http://dev.w3.org/csswg/cssom/#the-cssgroupingrule-interface
+
+interface CSSGroupingRule : CSSRule {
+    [SameObject] readonly attribute CSSRuleList cssRules;
+    [RaisesException] unsigned long insertRule(DOMString rule, unsigned long index);
+    [RaisesException] void deleteRule(unsigned long index);
+};
diff --git a/core/css/CSSImportRule.idl b/core/css/CSSImportRule.idl
index f56ef9f..e845ca2 100644
--- a/core/css/CSSImportRule.idl
+++ b/core/css/CSSImportRule.idl
@@ -18,10 +18,11 @@
  * Boston, MA 02110-1301, USA.
  */
 
-// Introduced in DOM Level 2:
-interface CSSImportRule : CSSRule {
-    readonly attribute DOMString? href;
-    readonly attribute MediaList media;
-    readonly attribute CSSStyleSheet styleSheet;
-};
+// http://dev.w3.org/csswg/cssom/#the-cssimportrule-interface
 
+interface CSSImportRule : CSSRule {
+    readonly attribute DOMString href;
+    // TODO(philipj): media should have [PutForwards=mediaText].
+    [SameObject] readonly attribute MediaList media;
+    [SameObject] readonly attribute CSSStyleSheet styleSheet;
+};
diff --git