Blink IDL update.

git-svn-id: http://dart.googlecode.com/svn/third_party/WebCore@21970 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/WebCore.gyp/scripts/action_csspropertynames.py b/WebCore.gyp/scripts/action_csspropertynames.py
deleted file mode 100644
index b95540d..0000000
--- a/WebCore.gyp/scripts/action_csspropertynames.py
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2009 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.
-#
-# action_csspropertynames.py is a harness script to connect actions sections of
-# gyp-based builds to makeprop.pl.
-#
-# usage: action_csspropertynames.py OUTPUTS -- [--defines ENABLE_FLAG1 ENABLE_FLAG2 ...] -- INPUTS
-#
-# Exactly two outputs must be specified: a path to each of CSSPropertyNames.cpp
-# and CSSPropertyNames.h.
-#
-# Multiple inputs may be specified. One input must have a basename of
-# makeprop.pl; this is taken as the path to makeprop.pl. All other inputs are
-# paths to .in files that are used as input to makeprop.pl; at least one,
-# CSSPropertyNames.in, is required.
-
-
-import os
-import posixpath
-import shlex
-import shutil
-import subprocess
-import sys
-
-
-def SplitArgsIntoSections(args):
-    sections = []
-    while len(args) > 0:
-        if not '--' in args:
-            # If there is no '--' left, everything remaining is an entire section.
-            dashes = len(args)
-        else:
-            dashes = args.index('--')
-
-        sections.append(args[:dashes])
-
-        # Next time through the loop, look at everything after this '--'.
-        if dashes + 1 == len(args):
-            # If the '--' is at the end of the list, we won't come back through the
-            # loop again. Add an empty section now corresponding to the nothingness
-            # following the final '--'.
-            args = []
-            sections.append(args)
-        else:
-            args = args[dashes + 1:]
-
-    return sections
-
-
-def SplitDefines(options):
-    # The defines come in as one flat string. Split it up into distinct arguments.
-    if '--defines' in options:
-        definesIndex = options.index('--defines')
-        if definesIndex + 1 < len(options):
-            splitOptions = shlex.split(options[definesIndex + 1])
-            if splitOptions:
-                options[definesIndex + 1] = ' '.join(splitOptions)
-
-def main(args):
-    outputs, options, inputs = SplitArgsIntoSections(args[1:])
-
-    SplitDefines(options)
-
-    # Make all output pathnames absolute so that they can be accessed after
-    # changing directory.
-    for index in xrange(0, len(outputs)):
-        outputs[index] = os.path.abspath(outputs[index])
-
-    outputDir = os.path.dirname(outputs[0])
-
-    # Look at the inputs and figure out which one is makeprop.pl and which are
-    # inputs to that script.
-    makepropInput = None
-    inFiles = []
-    for input in inputs:
-        # Make input pathnames absolute so they can be accessed after changing
-        # directory. On Windows, convert \ to / for inputs to the perl script to
-        # work around the intermix of activepython + cygwin perl.
-        inputAbs = os.path.abspath(input)
-        inputAbsPosix = inputAbs.replace(os.path.sep, posixpath.sep)
-        inputBasename = os.path.basename(input)
-        if inputBasename == 'makeprop.pl':
-            assert makepropInput == None
-            makepropInput = inputAbs
-        elif inputBasename.endswith('.in'):
-            inFiles.append(inputAbsPosix)
-        else:
-            assert False
-
-    assert makepropInput != None
-    assert len(inFiles) >= 1
-
-    # Change to the output directory because makeprop.pl puts output in its
-    # working directory.
-    os.chdir(outputDir)
-
-    # Merge all inFiles into a single file whose name will be the same as the
-    # first listed inFile, but in the output directory.
-    mergedPath = os.path.basename(inFiles[0])
-    merged = open(mergedPath, 'wb')    # 'wb' to get \n only on windows
-
-    # Concatenate all the input files.
-    for inFilePath in inFiles:
-        inFile = open(inFilePath)
-        shutil.copyfileobj(inFile, merged)
-        inFile.close()
-
-    merged.close()
-
-    # scriptsPath is a Perl include directory, located relative to
-    # makepropInput.
-    scriptsPath = os.path.normpath(
-        os.path.join(os.path.dirname(makepropInput), os.pardir, 'scripts'))
-
-    # Build up the command.
-    command = ['perl', '-I', scriptsPath, makepropInput]
-    command.extend(options)
-
-    # Do it. checkCall is new in 2.5, so simulate its behavior with call and
-    # assert.
-    returnCode = subprocess.call(command)
-    assert returnCode == 0
-
-    # Don't leave behind the merged file or the .gperf file created by
-    # makeprop.
-    (root, ext) = os.path.splitext(mergedPath)
-    gperfPath = root + '.gperf'
-    os.unlink(gperfPath)
-    os.unlink(mergedPath)
-
-    # Go through the outputs. Any output that belongs in a different directory
-    # is moved. Do a copy and delete instead of rename for maximum portability.
-    # Note that all paths used in this section are still absolute.
-    for output in outputs:
-        thisOutputDir = os.path.dirname(output)
-        if thisOutputDir != outputDir:
-            outputBasename = os.path.basename(output)
-            src = os.path.join(outputDir, outputBasename)
-            dst = os.path.join(thisOutputDir, outputBasename)
-            shutil.copyfile(src, dst)
-            os.unlink(src)
-
-    return returnCode
-
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/WebCore.gyp/scripts/action_cssvaluekeywords.py b/WebCore.gyp/scripts/action_cssvaluekeywords.py
deleted file mode 100644
index 8232fb4..0000000
--- a/WebCore.gyp/scripts/action_cssvaluekeywords.py
+++ /dev/null
@@ -1,178 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2009 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.
-#
-# Copyright (c) 2009 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.
-
-# action_cssvaluekeywords.py is a harness script to connect actions sections of
-# gyp-based builds to makevalues.pl.
-#
-# usage: action_cssvaluekeywords.py OUTPUTS -- [--defines ENABLE_FLAG1 ENABLE_FLAG2 ...] -- INPUTS
-#
-# Exactly two outputs must be specified: a path to each of CSSValueKeywords.c
-# and CSSValueKeywords.h.
-#
-# Multiple inputs may be specified. One input must have a basename of
-# makevalues.pl; this is taken as the path to makevalues.pl. All other inputs
-# are paths to .in files that are used as input to makevalues.pl; at least
-# one, CSSValueKeywords.in, is required.
-
-
-import os
-import posixpath
-import shlex
-import shutil
-import subprocess
-import sys
-
-
-def SplitArgsIntoSections(args):
-    sections = []
-    while len(args) > 0:
-        if not '--' in args:
-            # If there is no '--' left, everything remaining is an entire section.
-            dashes = len(args)
-        else:
-            dashes = args.index('--')
-
-        sections.append(args[:dashes])
-
-        # Next time through the loop, look at everything after this '--'.
-        if dashes + 1 == len(args):
-            # If the '--' is at the end of the list, we won't come back through the
-            # loop again. Add an empty section now corresponding to the nothingness
-            # following the final '--'.
-            args = []
-            sections.append(args)
-        else:
-            args = args[dashes + 1:]
-
-    return sections
-
-
-def SplitDefines(options):
-    # The defines come in as one flat string. Split it up into distinct arguments.
-    if '--defines' in options:
-        definesIndex = options.index('--defines')
-        if definesIndex + 1 < len(options):
-            splitOptions = shlex.split(options[definesIndex + 1])
-            if splitOptions:
-                options[definesIndex + 1] = ' '.join(splitOptions)
-
-def main(args):
-    outputs, options, inputs = SplitArgsIntoSections(args[1:])
-
-    SplitDefines(options)
-
-    # Make all output pathnames absolute so that they can be accessed after
-    # changing directory.
-    for index in xrange(0, len(outputs)):
-        outputs[index] = os.path.abspath(outputs[index])
-
-    outputDir = os.path.dirname(outputs[0])
-
-    # Look at the inputs and figure out which one is makevalues.pl and which are
-    # inputs to that script.
-    makevaluesInput = None
-    inFiles = []
-    for input in inputs:
-        # Make input pathnames absolute so they can be accessed after changing
-        # directory. On Windows, convert \ to / for inputs to the perl script to
-        # work around the intermix of activepython + cygwin perl.
-        inputAbs = os.path.abspath(input)
-        inputAbsPosix = inputAbs.replace(os.path.sep, posixpath.sep)
-        inputBasename = os.path.basename(input)
-        if inputBasename == 'makevalues.pl':
-            assert makevaluesInput == None
-            makevaluesInput = inputAbs
-        elif inputBasename.endswith('.in'):
-            inFiles.append(inputAbsPosix)
-        else:
-            assert False
-
-    assert makevaluesInput != None
-    assert len(inFiles) >= 1
-
-    # Change to the output directory because makevalues.pl puts output in its
-    # working directory.
-    os.chdir(outputDir)
-
-    # Merge all inFiles into a single file whose name will be the same as the
-    # first listed inFile, but in the output directory.
-    mergedPath = os.path.basename(inFiles[0])
-    merged = open(mergedPath, 'wb')    # 'wb' to get \n only on windows
-
-    # Concatenate all the input files.
-    for inFilePath in inFiles:
-        inFile = open(inFilePath)
-        shutil.copyfileobj(inFile, merged)
-        inFile.close()
-
-    merged.close()
-
-    # scriptsPath is a Perl include directory, located relative to
-    # makevaluesInput.
-    scriptsPath = os.path.normpath(
-        os.path.join(os.path.dirname(makevaluesInput), os.pardir, 'scripts'))
-
-    # Build up the command.
-    command = ['perl', '-I', scriptsPath, makevaluesInput]
-    command.extend(options)
-
-    # Do it. checkCall is new in 2.5, so simulate its behavior with call and
-    # assert.
-    returnCode = subprocess.call(command)
-    assert returnCode == 0
-
-    # Don't leave behind the merged file or the .gperf file created by
-    # makevalues.
-    (root, ext) = os.path.splitext(mergedPath)
-    gperfPath = root + '.gperf'
-    os.unlink(gperfPath)
-    os.unlink(mergedPath)
-
-    # Go through the outputs. Any output that belongs in a different directory
-    # is moved. Do a copy and delete instead of rename for maximum portability.
-    # Note that all paths used in this section are still absolute.
-    for output in outputs:
-        thisOutputDir = os.path.dirname(output)
-        if thisOutputDir != outputDir:
-            outputBasename = os.path.basename(output)
-            src = os.path.join(outputDir, outputBasename)
-            dst = os.path.join(thisOutputDir, outputBasename)
-            shutil.copyfile(src, dst)
-            os.unlink(src)
-
-    return returnCode
-
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/WebCore.gyp/scripts/action_derivedsourcesallinone.py b/WebCore.gyp/scripts/action_derivedsourcesallinone.py
deleted file mode 100644
index 34b7b7a..0000000
--- a/WebCore.gyp/scripts/action_derivedsourcesallinone.py
+++ /dev/null
@@ -1,227 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2009 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.
-#
-# Copyright (c) 2009 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.
-
-# action_derivedsourcesallinone.py generates a single cpp file that includes
-# all v8 bindings cpp files generated from idls. Files can be assigned into
-# multiple output files, to reduce maximum compilation unit size and allow
-# parallel compilation.
-#
-# usage: action_derivedsourcesallinone.py IDL_FILES_LIST -- OUTPUT_FILE1 OUTPUT_FILE2 ...
-#
-# Note that IDL_FILES_LIST is a text file containing the IDL file paths.
-
-# FIXME: Move to bindings/scripts
-
-import errno
-import os
-import os.path
-import re
-import subprocess
-import sys
-
-# A regexp for finding Conditional attributes in interface definitions.
-conditionalPattern = re.compile('interface[\s]*\[[^\]]*Conditional=([\_0-9a-zA-Z&|]*)')
-
-copyrightTemplate = """/*
- * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
- *
- * This file was generated by the make_jni_lists.py script.
- *
- * Copyright (C) 2009 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.
- */
-"""
-
-
-# Wraps conditional with ENABLE() and replace '&','|' with '&&','||' if more than one conditional is specified.
-def formatConditional(conditional):
-    def wrapWithEnable(s):
-        if re.match('[|&]$', s):
-            return s * 2
-        return 'ENABLE(' + s + ')'
-    return ' '.join(map(wrapWithEnable, conditional))
-
-
-# Find the conditional interface attribute.
-def extractConditional(idlFilePath):
-    conditional = None
-
-    # Read file and look for "interface [ Conditional=XXX ]".
-    idlFile = open(idlFilePath)
-    idlContents = idlFile.read().replace('\n', '')
-    idlFile.close()
-
-    match = conditionalPattern.search(idlContents)
-    if match:
-        conditional = match.group(1)
-        conditional = re.split('([|&])', conditional)
-
-    return conditional
-
-# Extracts conditional and interface name from each IDL file.
-def extractMetaData(filePaths):
-    metaDataList = []
-
-    for f in filePaths:
-        metaData = {}
-        if len(f) == 0:
-            continue
-        if not os.path.exists(f):
-            print 'WARNING: file not found: "%s"' % f
-            continue
-
-        # Extract type name from file name
-        (parentPath, fileName) = os.path.split(f)
-        (interfaceName, ext) = os.path.splitext(fileName)
-
-        if not ext == '.idl':
-            continue
-
-        metaData = {
-            'conditional': extractConditional(f),
-            'name': interfaceName,
-        }
-
-        metaDataList.append(metaData)
-
-    return metaDataList
-
-
-def generateContent(filesMetaData, partition, totalPartitions):
-    # Sort files by conditionals.
-    filesMetaData.sort()
-
-    output = []
-
-    # Add fixed content.
-    output.append(copyrightTemplate)
-    output.append('#define NO_IMPLICIT_ATOMICSTRING\n\n')
-
-    # List all includes segmented by if and endif.
-    prevConditional = None
-    for metaData in filesMetaData:
-        name = metaData['name']
-        if (hash(name) % totalPartitions) != partition:
-            continue
-        conditional = metaData['conditional']
-
-        if prevConditional and prevConditional != conditional:
-            output.append('#endif\n')
-        if conditional and prevConditional != conditional:
-            output.append('\n#if %s\n' % formatConditional(conditional))
-
-        output.append('#include "bindings/V8%s.cpp"\n' % name)
-
-        prevConditional = conditional
-
-    if prevConditional:
-        output.append('#endif\n')
-
-    return ''.join(output)
-
-
-def writeContent(content, outputFileName):
-    (parentPath, fileName) = os.path.split(outputFileName)
-    if not os.path.exists(parentPath):
-        print parentPath
-        os.mkdir(parentPath)
-    f = open(outputFileName, 'w')
-    f.write(content)
-    f.close()
-
-
-def resolveCygpath(cygdriveNames):
-    cmd = ['cygpath', '-f', '-', '-wa']
-    process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-    idlFileNames = []
-    for fileName in cygdriveNames:
-        process.stdin.write("%s\n" % fileName)
-        process.stdin.flush()
-        idlFileNames.append(process.stdout.readline().rstrip())
-    process.stdin.close()
-    process.wait()
-    return idlFileNames
-
-
-def main(args):
-    assert(len(args) > 3)
-    inOutBreakIndex = args.index('--')
-    inputFileName = args[1]
-    outputFileNames = args[inOutBreakIndex+1:]
-
-    inputFile = open(inputFileName, 'r')
-    idlFileNames = []
-    cygdriveNames = []
-    for line in inputFile:
-        idlFileName = line.rstrip().split(' ')[0]
-        if idlFileName.startswith("/cygdrive"):
-            cygdriveNames.append(idlFileName)
-        else:
-            idlFileNames.append(idlFileName)
-
-    if cygdriveNames:
-        idlFileNames.extend(resolveCygpath(cygdriveNames))
-    inputFile.close()
-
-    filesMetaData = extractMetaData(idlFileNames)
-    for fileName in outputFileNames:
-        partition = outputFileNames.index(fileName)
-        fileContents = generateContent(filesMetaData, partition, len(outputFileNames))
-        writeContent(fileContents, fileName)
-
-    return 0
-
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/WebCore.gyp/scripts/action_makenames.py b/WebCore.gyp/scripts/action_makenames.py
deleted file mode 100644
index 4cf45cd..0000000
--- a/WebCore.gyp/scripts/action_makenames.py
+++ /dev/null
@@ -1,182 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2009 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.
-#
-# Copyright (c) 2009 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.
-
-# action_makenames.py is a harness script to connect actions sections of
-# gyp-based builds to make_names.pl.
-#
-# usage: action_makenames.py OUTPUTS -- INPUTS [-- OPTIONS]
-#
-# Multiple OUTPUTS, INPUTS, and OPTIONS may be listed. The sections are
-# separated by -- arguments.
-#
-# The directory name of the first output is chosen as the directory in which
-# make_names will run. If the directory name for any subsequent output is
-# different, those files will be moved to the desired directory.
-#
-# Multiple INPUTS may be listed. An input with a basename matching
-# "make_names.pl" is taken as the path to that script. Inputs with names
-# ending in TagNames.in or tags.in are taken as tag inputs. Inputs with names
-# ending in AttributeNames.in or attrs.in are taken as attribute inputs. There
-# may be at most one tag input and one attribute input. A make_names.pl input
-# is required and at least one tag or attribute input must be present.
-#
-# OPTIONS is a list of additional options to pass to make_names.pl. This
-# section need not be present.
-
-
-import os
-import posixpath
-import shutil
-import subprocess
-import sys
-
-
-def SplitArgsIntoSections(args):
-    sections = []
-    while len(args) > 0:
-        if not '--' in args:
-            # If there is no '--' left, everything remaining is an entire section.
-            dashes = len(args)
-        else:
-            dashes = args.index('--')
-
-        sections.append(args[:dashes])
-
-        # Next time through the loop, look at everything after this '--'.
-        if dashes + 1 == len(args):
-            # If the '--' is at the end of the list, we won't come back through the
-            # loop again. Add an empty section now corresponding to the nothingness
-            # following the final '--'.
-            args = []
-            sections.append(args)
-        else:
-            args = args[dashes + 1:]
-
-    return sections
-
-
-def main(args):
-    sections = SplitArgsIntoSections(args[1:])
-    assert len(sections) == 2 or len(sections) == 3
-    (outputs, inputs) = sections[:2]
-    if len(sections) == 3:
-        options = sections[2]
-    else:
-        options = []
-
-    # Make all output pathnames absolute so that they can be accessed after
-    # changing directory.
-    for index in xrange(0, len(outputs)):
-        outputs[index] = os.path.abspath(outputs[index])
-
-    outputDir = os.path.dirname(outputs[0])
-
-    # Look at the inputs and figure out which ones are make_names.pl, tags, and
-    # attributes. There can be at most one of each, and those are the only
-    # input types supported. make_names.pl is required and at least one of tags
-    # and attributes is required.
-    makeNamesInput = None
-    tagInput = None
-    attrInput = None
-    eventsInput = None
-    for input in inputs:
-        # Make input pathnames absolute so they can be accessed after changing
-        # directory. On Windows, convert \ to / for inputs to the perl script to
-        # work around the intermix of activepython + cygwin perl.
-        inputAbs = os.path.abspath(input)
-        inputAbsPosix = inputAbs.replace(os.path.sep, posixpath.sep)
-        inputBasename = os.path.basename(input)
-        if inputBasename in ('make_names.pl', 'make_event_factory.pl', 'make_dom_exceptions.pl', 'make_settings.pl'):
-            assert makeNamesInput == None
-            makeNamesInput = inputAbs
-        elif inputBasename.endswith('TagNames.in') or inputBasename.endswith('tags.in'):
-            assert tagInput == None
-            tagInput = inputAbsPosix
-        elif inputBasename.endswith('AttributeNames.in') or inputBasename.endswith('attrs.in'):
-            assert attrInput == None
-            attrInput = inputAbsPosix
-        elif (inputBasename.endswith('EventTargetFactory.in') or inputBasename.endswith('EventNames.in')
-            or inputBasename.endswith('DOMExceptions.in') or inputBasename.endswith('Settings.in')):
-            eventsInput = inputAbsPosix
-        elif inputBasename.endswith('Names.in'):
-            options.append(inputAbsPosix)
-        elif inputBasename.endswith('.pm'):
-            continue
-        else:
-            assert False
-
-    assert makeNamesInput != None
-    assert tagInput != None or attrInput != None or eventsInput != None or ('--fonts' in options)
-
-    # scriptsPath is a Perl include directory, located relative to
-    # makeNamesInput.
-    scriptsPath = os.path.normpath(
-        os.path.join(os.path.dirname(makeNamesInput), os.pardir, 'scripts'))
-
-    # Change to the output directory because make_names.pl puts output in its
-    # working directory.
-    os.chdir(outputDir)
-
-    # Build up the command.
-    command = ['perl', '-I', scriptsPath, makeNamesInput]
-    if tagInput != None:
-        command.extend(['--tags', tagInput])
-    if attrInput != None:
-        command.extend(['--attrs', attrInput])
-    if eventsInput != None:
-        command.extend(['--input', eventsInput])
-    command.extend(options)
-
-    # Do it. check_call is new in 2.5, so simulate its behavior with call and
-    # assert.
-    returnCode = subprocess.call(command)
-    assert returnCode == 0
-
-    # Go through the outputs. Any output that belongs in a different directory
-    # is moved. Do a copy and delete instead of rename for maximum portability.
-    # Note that all paths used in this section are still absolute.
-    for output in outputs:
-        thisOutputDir = os.path.dirname(output)
-        if thisOutputDir != outputDir:
-            outputBasename = os.path.basename(output)
-            src = os.path.join(outputDir, outputBasename)
-            dst = os.path.join(thisOutputDir, outputBasename)
-            shutil.copyfile(src, dst)
-            os.unlink(src)
-
-    return returnCode
-
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/WebCore.gyp/scripts/action_useragentstylesheets.py b/WebCore.gyp/scripts/action_useragentstylesheets.py
deleted file mode 100644
index 850dd07..0000000
--- a/WebCore.gyp/scripts/action_useragentstylesheets.py
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2009 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.
-#
-# Copyright (c) 2009 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.
-
-# usage:
-# action_useragentstylesheets.py OUTPUTS INPUTS -- MAINSCRIPT MODULES -- OPTIONS
-#
-# OUTPUTS must contain two items, in order: a path to UserAgentStyleSheets.h
-# and a path to UserAgentStyleSheetsData.cpp.
-# INPUTS contains one or more CSS files.
-#
-# MAINSCRIPT is the path to make-css-file-arrays.pl. MODULES may contain
-# multiple paths to additional perl modules.
-#
-# OPTIONS are passed as-is to MAINSCRIPT as additional arguments.
-
-
-import os
-import shlex
-import subprocess
-import sys
-
-
-def SplitArgsIntoSections(args):
-    sections = []
-    while len(args) > 0:
-        if not '--' in args:
-            # If there is no '--' left, everything remaining is an entire section.
-            dashes = len(args)
-        else:
-            dashes = args.index('--')
-
-        sections.append(args[:dashes])
-
-        # Next time through the loop, look at everything after this '--'.
-        if dashes + 1 == len(args):
-            # If the '--' is at the end of the list, we won't come back through the
-            # loop again. Add an empty section now corresponding to the nothingness
-            # following the final '--'.
-            args = []
-            sections.append(args)
-        else:
-            args = args[dashes + 1:]
-
-    return sections
-
-
-def main(args):
-    sections = SplitArgsIntoSections(args[1:])
-    assert len(sections) == 3
-    (outputsInputs, scripts, options) = sections
-
-    assert len(outputsInputs) >= 3
-    outputH = outputsInputs[0]
-    outputCpp = outputsInputs[1]
-    styleSheets = outputsInputs[2:]
-
-    assert len(scripts) >= 1
-    makeCssFileArrays = scripts[0]
-    perlModules = scripts[1:]
-
-    includeDirs = []
-    for perlModule in perlModules:
-        includeDir = os.path.dirname(perlModule)
-        if not includeDir in includeDirs:
-            includeDirs.append(includeDir)
-
-    # The defines come in as one flat string. Split it up into distinct arguments.
-    if '--defines' in options:
-        definesIndex = options.index('--defines')
-        if definesIndex + 1 < len(options):
-            splitOptions = shlex.split(options[definesIndex + 1])
-            if splitOptions:
-                options[definesIndex + 1] = ' '.join(splitOptions)
-
-    # Build up the command.
-    command = ['perl']
-    for includeDir in includeDirs:
-        command.extend(['-I', includeDir])
-    command.append(makeCssFileArrays)
-    command.extend(options)
-    command.extend([outputH, outputCpp])
-    command.extend(styleSheets)
-
-    # Do it. check_call is new in 2.5, so simulate its behavior with call and
-    # assert.
-    returnCode = subprocess.call(command)
-    assert returnCode == 0
-
-    return returnCode
-
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/WebCore.gyp/scripts/rule_bison.py b/WebCore.gyp/scripts/rule_bison.py
deleted file mode 100644
index 952165a..0000000
--- a/WebCore.gyp/scripts/rule_bison.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2009 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.
-#
-# Copyright (c) 2009 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.
-
-# usage: rule_bison.py INPUT_FILE OUTPUT_DIR [BISON_EXE]
-# INPUT_FILE is a path to either CSSGrammar.y or XPathGrammar.y.
-# OUTPUT_DIR is where the bison-generated .cpp and .h files should be placed.
-
-import errno
-import os
-import os.path
-import subprocess
-import sys
-
-assert len(sys.argv) == 3 or len(sys.argv) == 4
-
-inputFile = sys.argv[1]
-outputDir = sys.argv[2]
-bisonExe = 'bison'
-if len(sys.argv) > 3:
-    bisonExe = sys.argv[3]
-
-inputName = os.path.basename(inputFile)
-assert inputName == 'CSSGrammar.y' or inputName == 'XPathGrammar.y'
-prefix = {'CSSGrammar.y': 'cssyy', 'XPathGrammar.y': 'xpathyy'}[inputName]
-
-(inputRoot, inputExt) = os.path.splitext(inputName)
-
-# The generated .h will be in a different location depending on the bison
-# version.
-outputHTries = [
-    os.path.join(outputDir, inputRoot + '.cpp.h'),
-    os.path.join(outputDir, inputRoot + '.hpp'),
-]
-
-for outputHTry in outputHTries:
-    try:
-        os.unlink(outputHTry)
-    except OSError, e:
-        if e.errno != errno.ENOENT:
-            raise
-
-outputCpp = os.path.join(outputDir, inputRoot + '.cpp')
-
-returnCode = subprocess.call([bisonExe, '-d', '-p', prefix, inputFile, '-o', outputCpp])
-assert returnCode == 0
-
-# Find the name that bison used for the generated header file.
-outputHTmp = None
-for outputHTry in outputHTries:
-    try:
-        os.stat(outputHTry)
-        outputHTmp = outputHTry
-        break
-    except OSError, e:
-        if e.errno != errno.ENOENT:
-            raise
-
-assert outputHTmp != None
-
-# Read the header file in under the generated name and remove it.
-outputHFile = open(outputHTmp)
-outputHContents = outputHFile.read()
-outputHFile.close()
-os.unlink(outputHTmp)
-
-# Rewrite the generated header with #include guards.
-outputH = os.path.join(outputDir, inputRoot + '.h')
-
-outputHFile = open(outputH, 'w')
-print >>outputHFile, '#ifndef %sH' % inputRoot
-print >>outputHFile, '#define %sH' % inputRoot
-print >>outputHFile, outputHContents
-print >>outputHFile, '#endif'
-outputHFile.close()
diff --git a/WebCore.gyp/scripts/supplemental_idl_files.py b/WebCore.gyp/scripts/supplemental_idl_files.py
deleted file mode 100644
index 5f4498f..0000000
--- a/WebCore.gyp/scripts/supplemental_idl_files.py
+++ /dev/null
@@ -1,47 +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.
-
-"""This file returns a list of all the files that have the
-Supplemental attribute."""
-
-import re
-import sys
-
-supplemental_regex = re.compile(r'\[.+Supplemental=(\w+).+\]', re.M | re.S)
-
-
-def DoMain(filenames):
-    supplemental_files = set()
-    for filename in filenames:
-        with open(filename) as f:
-            match = re.search(supplemental_regex, f.read())
-            if match:
-                supplemental_files.add(filename)
-    return '\n'.join(supplemental_files)
diff --git a/bindings/dart/gyp/scripts/build_dart_snapshot.py b/bindings/dart/gyp/scripts/build_dart_snapshot.py
deleted file mode 100644
index bbcec13..0000000
--- a/bindings/dart/gyp/scripts/build_dart_snapshot.py
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/usr/bin/python
-#
-# 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:
-#
-#     * 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.
-#
-# Copyright (c) 2011 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.
-
-# build_dart_snapshot.py generates two C++ files: DartSnapshot.cpp
-# with a constant which is a snapshot of major DOM libs an
-# DartResolver.cpp which is a resolver for dart:html library.
-
-import os.path
-import subprocess
-import sys
-
-
-def main(args):
-    assert(len(args) >= 4)
-    dartPath = args[1]
-    dartSnapshotTemplateFile = args[2]
-    outputFilePath = args[3]
-    genSnapshotBinPath = args[4]
-    snapshottedLibPaths = args[5:]
-
-    def path(*components):
-        return os.path.abspath(os.path.join(*components))
-
-    def dartName(path):
-        # Translates <dirs>/foo.dart into foo.
-        return os.path.splitext(os.path.split(path)[1])[0]
-
-    snapshottedLibs = [
-        ('html', path(outputFilePath, 'html_dartium.dart')),
-        ('indexed_db', path(outputFilePath, 'indexed_db_dartium.dart')),
-        ('svg', path(outputFilePath, 'svg_dartium.dart')),
-        ('web_audio', path(outputFilePath, 'web_audio_dartium.dart')),
-        ('web_gl', path(outputFilePath, 'web_gl_dartium.dart')),
-        ('web_sql', path(outputFilePath, 'web_sql_dartium.dart'))]
-    snapshottedLibs.extend([(dartName(p), path(p)) for p in snapshottedLibPaths])
-
-    # Generate a Dart script to build the snapshot from.
-    snapshotScriptName = os.path.join(outputFilePath, 'snapshotScript.dart')
-    with file(snapshotScriptName, 'w') as snapshotScript:
-      snapshotScript.write('library snapshot;\n')
-      for name, _ in snapshottedLibs:
-        snapshotScript.write('import \'dart:%(name)s\' as %(name)s;\n' % { 'name': name })
-
-    binarySnapshotFile = path(outputFilePath, 'DartSnapshot.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,
-        '--script=%s' % snapshotScriptName,
-    ]
-    command.extend(['--url_mapping=dart:%s,%s' % lib for lib in snapshottedLibs])
-
-    pipe = subprocess.Popen(command,
-                            stdout=subprocess.PIPE,
-                            stderr=subprocess.PIPE)
-    out, error = pipe.communicate()
-    if (pipe.returncode != 0):
-        raise Exception('Snapshot bin generation failed: %s/%s' % (out, error))
-
-    # Build a command to generate the snapshot file.
-    command = [
-        'python',
-        path(dartPath, 'runtime', 'tools', 'create_snapshot_file.py'),
-        '--input_cc=%s' % dartSnapshotTemplateFile,
-        '--input_bin=%s' % binarySnapshotFile,
-        '--output=%s' % path(outputFilePath, 'DartSnapshot.bytes'),
-    ]
-
-    pipe = subprocess.Popen(command,
-                            stdout=subprocess.PIPE,
-                            stderr=subprocess.PIPE)
-    out, error = pipe.communicate()
-    if (pipe.returncode != 0):
-        raise Exception('Snapshot file generation failed: %s/%s' % (out, error))
-
-    snapshotSizeInBytes = os.path.getsize(binarySnapshotFile)
-    productDir = os.path.dirname(genSnapshotBinPath)
-    snapshotSizeOutputPath = os.path.join(productDir, 'snapshot-size.txt')
-    with file(snapshotSizeOutputPath, 'w') as snapshotSizeFile:
-      snapshotSizeFile.write('%d\n' % snapshotSizeInBytes)
-
-    return 0
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/bindings/dart/gyp/scripts/dart_action_derivedsourcesallinone.py b/bindings/dart/gyp/scripts/dart_action_derivedsourcesallinone.py
deleted file mode 100644
index 969ffa6..0000000
--- a/bindings/dart/gyp/scripts/dart_action_derivedsourcesallinone.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/python
-#
-# 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:
-#
-#     * 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.
-#
-# Copyright (c) 2011 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.
-
-# dart_action_derivedsourceslist.py generates a single or several cpp files
-# that include all Dart bindings cpp files generated from idls.
-#
-# usage: dart_action_derivedsourceslist.py IDL_FILES_LIST -- OUTPUT_FILE1 OUTPUT_FILE2 ...
-#
-# Note that IDL_FILES_LIST is a text file containing the IDL file paths.
-
-import os.path
-import re
-import sys
-
-v8scriptPath = os.path.join(sys.path[0], '../../../../WebCore.gyp/scripts')
-sys.path.append(v8scriptPath)
-
-# FIXME: there are couple of very ugly hacks like duplication of main code and
-# regexp to rewrite V8 prefix to Dart. It all can be easily solved with minimal
-# modifications to action_derivedsourcesallinone.py.
-import action_derivedsourcesallinone as base
-
-
-def main(args):
-    assert(len(args) > 3)
-    inOutBreakIndex = args.index('--')
-    inputFileName = args[1]
-    outputFileNames = args[inOutBreakIndex + 1:]
-
-    inputFile = open(inputFileName, 'r')
-    idlFileNames = inputFile.read().split('\n')
-    inputFile.close()
-
-    filesMetaData = base.extractMetaData(idlFileNames)
-    for fileName in outputFileNames:
-        partition = outputFileNames.index(fileName)
-        fileContents = base.generateContent(filesMetaData, partition, len(outputFileNames))
-        # FIXME: ugly hack---change V8 prefix to Dart.
-        fileContents = re.sub('\n#include "bindings/V8', '\n#include "bindings/Dart', fileContents)
-        base.writeContent(fileContents, fileName)
-
-    return 0
-
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/bindings/dart/gyp/scripts/dart_html_lib_deps.py b/bindings/dart/gyp/scripts/dart_html_lib_deps.py
deleted file mode 100644
index ff534f0..0000000
--- a/bindings/dart/gyp/scripts/dart_html_lib_deps.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2012 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.
-#
-# Copyright (c) 2012 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 fnmatch
-import os
-import sys
-
-
-def printAllFilesRecursively(directory, pattern):
-  def matches(basename): return fnmatch.fnmatch(basename, pattern)
-  for root, _, files in os.walk(directory):
-    for basename in filter(matches, files):
-      # gyp operates correctly only on /, not Windows \.
-      print os.path.join(root, basename).replace(os.sep, '/')
-
-
-
-def main(args):
-  dart_html_lib_dir = args[1]
-
-  deps = [
-      ('idl', '*.idl'),
-      ('scripts', '*.py'),
-      ('src', '*.dart'),
-      ('templates', '*.*template'),
-  ]
-
-  for directory, pattern in deps:
-    printAllFilesRecursively(os.path.join(dart_html_lib_dir, directory), pattern)
-
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/bindings/dart/gyp/scripts/generate_dart_bindings.py b/bindings/dart/gyp/scripts/generate_dart_bindings.py
deleted file mode 100644
index c8bf7b9..0000000
--- a/bindings/dart/gyp/scripts/generate_dart_bindings.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2012 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.
-
-import glob
-import os.path
-import sys
-import tempfile
-
-def main(args):
-    assert(len(args) == 5)
-    idlListFileName = args[1]
-    dartScriptDir = args[2]
-    outputFilePath = args[3]
-    featureDefines = args[4]
-    
-    # Clear out any stale dart/lib/html/scripts/.pyc files that are lurking.
-    for f in glob.glob(os.path.join(dartScriptDir, '*.pyc')):
-      os.remove(f)
-
-    baseDir = os.path.dirname(idlListFileName)
-    idlListFile = open(idlListFileName, 'r')
-    idlFiles = [os.path.join(baseDir, fileName.strip()) for fileName in idlListFile]
-    idlListFile.close()
-
-    def analyse(featureDef):
-      featureDef = featureDef.strip('"')
-      if '=' not in featureDef: return None
-      feature, status = featureDef.split('=')
-      if status == '1':
-        return feature
-      return None
-
-    featureDefines = filter(None, map(analyse, featureDefines.split()))
-
-    sys.path.insert(0, dartScriptDir)
-    import fremontcutbuilder
-    import dartdomgenerator
-
-    database = fremontcutbuilder.build_database(idlFiles, tempfile.mkdtemp(), featureDefines)
-    database.Load()
-    dartdomgenerator.GenerateFromDatabase(database, None, outputFilePath)
-    database.Delete()
-
-    return 0
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/bindings/dart/gyp/scripts/massage_factories.py b/bindings/dart/gyp/scripts/massage_factories.py
deleted file mode 100644
index 4148763..0000000
--- a/bindings/dart/gyp/scripts/massage_factories.py
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/python
-#
-# 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:
-#
-#     * 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.
-#
-# Copyright (c) 2011 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.
-
-# build_dart_snapshot.py generates two C++ files: DartSnapshot.cpp
-# with a constant which is a snapshot of major DOM libs an
-# DartResolver.cpp which is a resolver for dart:html library.
-
-import re
-import os.path
-import sys
-
-
-def main(args):
-    _, inputDir, outputDir, tag = args
-
-    def massage(ext, repls):
-        input = open(os.path.join(inputDir, 'V8%sElementWrapperFactory.%s' % (tag, ext)), 'r')
-        output = open(os.path.join(outputDir, 'Dart%sElementWrapperFactory.%s' % (tag, ext)), 'w')
-        for line in input:
-            for regexp, repl in repls:
-                line = regexp.sub(repl, line)
-            output.write(line)
-
-        input.close()
-        output.close()
-
-    massage('h', [
-        (re.compile(r'v8\.h'), 'dart_api.h'),
-        (re.compile(r', bool'), ''),
-        (re.compile(r', v8::Isolate\*( isolate)?'), ''),
-        (re.compile(r', isolate'), ''),
-        (re.compile(r', v8::Handle<v8::Object> creationContext'), ''),
-        (re.compile(r', creationContext'), ''),
-        (re.compile(r'createWrapper'), 'toDart'),
-        (re.compile(r'v8::Handle<v8::Object>'), 'Dart_Handle'),
-        (re.compile(r'V8'), 'Dart'),
-    ])
-    massage('cpp', [
-        (re.compile(r'^#include "V8'), '#include "Dart'),
-        (re.compile(r'v8\.h'), 'dart_api.h'),
-        (re.compile(
-            r'return wrap\(static_cast<(\w+)\*>\(element\), creationContext, isolate\);'),
-            r'return Dart\1::toDart(static_cast<\1*>(element));'),
-        (re.compile(
-            r'return createWrapperFunction\(element, creationContext, isolate\)'),
-            r'return createWrapperFunction(element)'),
-        (re.compile(
-            r'return V8%sElement::createWrapper\(element, creationContext, isolate\);' % tag),
-            r'return DartDOMWrapper::toDart<Dart%sElement>(element);' % tag),
-        (re.compile(
-            r'return createV8HTMLFallbackWrapper\(toHTMLUnknownElement\(element\), creationContext, isolate\);'),
-            r'return DartHTMLUnknownElement::toDart(toHTMLUnknownElement(element));'),
-        (re.compile(
-            r'return createV8HTMLDirectWrapper\(element, creationContext, isolate\);'),
-            r'return DartDOMWrapper::toDart<DartHTMLElement>(element);'),
-        (re.compile(
-            r'#include "CustomElementHelpers.h"'),
-            r'#include "CustomElementHelpers.h"\n#include "DartCustomElement.h"'),
-        (re.compile(
-            r'return CustomElementHelpers::wrap\(element, creationContext, constructor, isolate\);'),
-            r'return DartCustomElement::toDart(element, constructor);'),
-        (re.compile(
-            r'return wrap\(toHTMLUnknownElement\(element\), creationContext, isolate\);'),
-            r'return DartHTMLUnknownElement::toDart(toHTMLUnknownElement(element));'),
-        (re.compile(r'createV8%sWrapper' % tag), r'createDart%sWrapper' % tag),
-        (re.compile(r', v8::Isolate\*( isolate)?'), ''),
-        (re.compile(r', v8::Handle<v8::Object> creationContext'), ''),
-        (re.compile(r'v8::Handle<v8::Object>'), 'Dart_Handle'),
-        (re.compile(r'findSVGTagNameOfV8Type'), 'findSVGTagNameOfDartType'),
-        (re.compile(r'findHTMLTagNameOfV8Type'), 'findHTMLTagNameOfDartType'),
-        (re.compile(r'V8CustomElement'), 'DartCustomElement'),
-        (re.compile(r'WrapperTypeInfo'), 'DartWrapperTypeInfo'),
-        (re.compile(r'WrapperTypeTraits'), 'DartWrapperTypeTraits'),
-    ])
-
-    return 0
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv))
diff --git a/LICENSE-APPLE b/core/LICENSE-APPLE
similarity index 100%
rename from LICENSE-APPLE
rename to core/LICENSE-APPLE
diff --git a/LICENSE-LGPL-2 b/core/LICENSE-LGPL-2
similarity index 100%
rename from LICENSE-LGPL-2
rename to core/LICENSE-LGPL-2
diff --git a/LICENSE-LGPL-2.1 b/core/LICENSE-LGPL-2.1
similarity index 100%
rename from LICENSE-LGPL-2.1
rename to core/LICENSE-LGPL-2.1
diff --git a/README b/core/README
similarity index 93%
rename from README
rename to core/README
index fb8e9c0..081bdf4 100644
--- a/README
+++ b/core/README
@@ -6,4 +6,4 @@
 
 The current version corresponds to:
 URL: http://src.chromium.org/multivm/trunk/webkit
-Current revision: 1184
+Current revision: 1206
diff --git a/css/CSSCharsetRule.idl b/core/css/CSSCharsetRule.idl
similarity index 100%
rename from css/CSSCharsetRule.idl
rename to core/css/CSSCharsetRule.idl
diff --git a/css/CSSFontFaceLoadEvent.idl b/core/css/CSSFontFaceLoadEvent.idl
similarity index 100%
rename from css/CSSFontFaceLoadEvent.idl
rename to core/css/CSSFontFaceLoadEvent.idl
diff --git a/css/CSSFontFaceRule.idl b/core/css/CSSFontFaceRule.idl
similarity index 100%
rename from css/CSSFontFaceRule.idl
rename to core/css/CSSFontFaceRule.idl
diff --git a/css/CSSHostRule.idl b/core/css/CSSHostRule.idl
similarity index 78%
rename from css/CSSHostRule.idl
rename to core/css/CSSHostRule.idl
index 1d624c4..f28dc50 100644
--- a/css/CSSHostRule.idl
+++ b/core/css/CSSHostRule.idl
@@ -24,8 +24,8 @@
 ] interface CSSHostRule : CSSRule {
     readonly attribute CSSRuleList cssRules;
     
-    [RaisesException] unsigned long      insertRule([Optional=DefaultIsUndefined] DOMString rule, 
-                                  [Optional=DefaultIsUndefined] unsigned long index);
-    [RaisesException] void               deleteRule([Optional=DefaultIsUndefined] unsigned long index);
+    [RaisesException] unsigned long      insertRule([Default=Undefined] optional DOMString rule, 
+                                  [Default=Undefined] optional unsigned long index);
+    [RaisesException] void               deleteRule([Default=Undefined] optional unsigned long index);
 };
 
diff --git a/css/CSSImportRule.idl b/core/css/CSSImportRule.idl
similarity index 100%
rename from css/CSSImportRule.idl
rename to core/css/CSSImportRule.idl
diff --git a/css/CSSMediaRule.idl b/core/css/CSSMediaRule.idl
similarity index 77%
rename from css/CSSMediaRule.idl
rename to core/css/CSSMediaRule.idl
index 5269b07..b1ea13a 100644
--- a/css/CSSMediaRule.idl
+++ b/core/css/CSSMediaRule.idl
@@ -23,8 +23,8 @@
     readonly attribute MediaList media;
     readonly attribute CSSRuleList cssRules;
     
-     [RaisesException] unsigned long      insertRule([Optional=DefaultIsUndefined] DOMString rule, 
-                                                 [Optional=DefaultIsUndefined] unsigned long index);
-    [RaisesException] void               deleteRule([Optional=DefaultIsUndefined] unsigned long index);
+     [RaisesException] unsigned long      insertRule([Default=Undefined] optional DOMString rule, 
+                                                 [Default=Undefined] optional unsigned long index);
+    [RaisesException] void               deleteRule([Default=Undefined] optional unsigned long index);
 };
 
diff --git a/css/CSSPageRule.idl b/core/css/CSSPageRule.idl
similarity index 100%
rename from css/CSSPageRule.idl
rename to core/css/CSSPageRule.idl
diff --git a/css/CSSPrimitiveValue.idl b/core/css/CSSPrimitiveValue.idl
similarity index 84%
rename from css/CSSPrimitiveValue.idl
rename to core/css/CSSPrimitiveValue.idl
index e69eccf..8581cdb 100644
--- a/css/CSSPrimitiveValue.idl
+++ b/core/css/CSSPrimitiveValue.idl
@@ -55,11 +55,11 @@
     
     readonly attribute unsigned short primitiveType;
 
-     [RaisesException] void setFloatValue([Optional=DefaultIsUndefined] unsigned short unitType,
-                                      [Optional=DefaultIsUndefined] float floatValue);
-    [RaisesException] float getFloatValue([Optional=DefaultIsUndefined] unsigned short unitType);
-     [RaisesException] void setStringValue([Optional=DefaultIsUndefined] unsigned short stringType, 
-                                       [Optional=DefaultIsUndefined] DOMString stringValue);
+     [RaisesException] void setFloatValue([Default=Undefined] optional unsigned short unitType,
+                                      [Default=Undefined] optional float floatValue);
+    [RaisesException] float getFloatValue([Default=Undefined] optional unsigned short unitType);
+     [RaisesException] void setStringValue([Default=Undefined] optional unsigned short stringType, 
+                                       [Default=Undefined] optional DOMString stringValue);
     [RaisesException] DOMString getStringValue();
     [RaisesException] Counter getCounterValue();
     [RaisesException] Rect getRectValue();
diff --git a/css/CSSRule.idl b/core/css/CSSRule.idl
similarity index 100%
rename from css/CSSRule.idl
rename to core/css/CSSRule.idl
diff --git a/css/CSSRuleList.idl b/core/css/CSSRuleList.idl
similarity index 94%
rename from css/CSSRuleList.idl
rename to core/css/CSSRuleList.idl
index 79fd87c..5e6ef7a 100644
--- a/css/CSSRuleList.idl
+++ b/core/css/CSSRuleList.idl
@@ -30,6 +30,6 @@
     SkipVTableValidation
 ] interface CSSRuleList {
     readonly attribute unsigned long    length;
-    CSSRule           item([Optional=DefaultIsUndefined] unsigned long index);
+    CSSRule           item([Default=Undefined] optional unsigned long index);
 };
 
diff --git a/css/CSSStyleDeclaration.idl b/core/css/CSSStyleDeclaration.idl
similarity index 65%
rename from css/CSSStyleDeclaration.idl
rename to core/css/CSSStyleDeclaration.idl
index f0e6de4..67da6d7 100644
--- a/css/CSSStyleDeclaration.idl
+++ b/core/css/CSSStyleDeclaration.idl
@@ -29,20 +29,20 @@
 ] interface CSSStyleDeclaration {
              [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString        cssText;
 
-    [TreatReturnedNullStringAs=Null] DOMString          getPropertyValue([Optional=DefaultIsUndefined] DOMString propertyName);
-    CSSValue           getPropertyCSSValue([Optional=DefaultIsUndefined] DOMString propertyName);
-    [TreatReturnedNullStringAs=Null, RaisesException] DOMString          removeProperty([Optional=DefaultIsUndefined] DOMString propertyName);
-    [TreatReturnedNullStringAs=Null] DOMString          getPropertyPriority([Optional=DefaultIsUndefined] DOMString propertyName);
-     [RaisesException] void setProperty([Optional=DefaultIsUndefined] DOMString propertyName, 
-                                    [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString value, 
-                                    [Optional=DefaultIsUndefined] DOMString priority);
+    [TreatReturnedNullStringAs=Null] DOMString          getPropertyValue([Default=Undefined] optional DOMString propertyName);
+    CSSValue           getPropertyCSSValue([Default=Undefined] optional DOMString propertyName);
+    [TreatReturnedNullStringAs=Null, RaisesException] DOMString          removeProperty([Default=Undefined] optional DOMString propertyName);
+    [TreatReturnedNullStringAs=Null] DOMString          getPropertyPriority([Default=Undefined] optional DOMString propertyName);
+     [RaisesException] void setProperty([Default=Undefined] optional DOMString propertyName, 
+                                    [TreatNullAs=NullString,Default=Undefined] optional DOMString value, 
+                                    [Default=Undefined] optional DOMString priority);
 
     readonly attribute unsigned long    length;
-    DOMString          item([Optional=DefaultIsUndefined] unsigned long index);
+    DOMString          item([Default=Undefined] optional unsigned long index);
     readonly attribute CSSRule          parentRule;
 
     // Extensions
-    [TreatReturnedNullStringAs=Null] DOMString          getPropertyShorthand([Optional=DefaultIsUndefined] DOMString propertyName);
-    boolean            isPropertyImplicit([Optional=DefaultIsUndefined] DOMString propertyName);
+    [TreatReturnedNullStringAs=Null] DOMString          getPropertyShorthand([Default=Undefined] optional DOMString propertyName);
+    boolean            isPropertyImplicit([Default=Undefined] optional DOMString propertyName);
 };
 
diff --git a/css/CSSStyleRule.idl b/core/css/CSSStyleRule.idl
similarity index 100%
rename from css/CSSStyleRule.idl
rename to core/css/CSSStyleRule.idl
diff --git a/css/CSSStyleSheet.idl b/core/css/CSSStyleSheet.idl
similarity index 67%
rename from css/CSSStyleSheet.idl
rename to core/css/CSSStyleSheet.idl
index 04d0844..7ab434f 100644
--- a/css/CSSStyleSheet.idl
+++ b/core/css/CSSStyleSheet.idl
@@ -25,16 +25,16 @@
     readonly attribute CSSRule          ownerRule;
     readonly attribute CSSRuleList      cssRules;
 
-    [RaisesException] unsigned long insertRule([Optional=DefaultIsUndefined] DOMString rule, 
-                                            [Optional=DefaultIsUndefined] unsigned long index);
-    [RaisesException] void               deleteRule([Optional=DefaultIsUndefined] unsigned long index);
+    [RaisesException] unsigned long insertRule([Default=Undefined] optional DOMString rule, 
+                                            [Default=Undefined] optional unsigned long index);
+    [RaisesException] void               deleteRule([Default=Undefined] optional unsigned long index);
 
     // IE Extensions
     readonly attribute CSSRuleList      rules;
 
-    [RaisesException] long addRule([Optional=DefaultIsUndefined] DOMString selector,
-                 [Optional=DefaultIsUndefined] DOMString style,
-                 [Optional] unsigned long index);
-    [RaisesException] void removeRule([Optional=DefaultIsUndefined] unsigned long index);
+    [RaisesException] long addRule([Default=Undefined] optional DOMString selector,
+                 [Default=Undefined] optional DOMString style,
+                 optional unsigned long index);
+    [RaisesException] void removeRule([Default=Undefined] optional unsigned long index);
 };
 
diff --git a/css/CSSSupportsRule.idl b/core/css/CSSSupportsRule.idl
similarity index 86%
rename from css/CSSSupportsRule.idl
rename to core/css/CSSSupportsRule.idl
index 4bfc779..1c4173d 100644
--- a/css/CSSSupportsRule.idl
+++ b/core/css/CSSSupportsRule.idl
@@ -32,8 +32,8 @@
     readonly attribute CSSRuleList cssRules;
     readonly attribute DOMString conditionText;
 
-    [RaisesException] unsigned long insertRule([Optional=DefaultIsUndefined] DOMString rule,
-                             [Optional=DefaultIsUndefined] unsigned long index);
-    [RaisesException] void deleteRule([Optional=DefaultIsUndefined] unsigned long index);
+    [RaisesException] unsigned long insertRule([Default=Undefined] optional DOMString rule,
+                             [Default=Undefined] optional unsigned long index);
+    [RaisesException] void deleteRule([Default=Undefined] optional unsigned long index);
 };
 
diff --git a/css/CSSUnknownRule.idl b/core/css/CSSUnknownRule.idl
similarity index 100%
rename from css/CSSUnknownRule.idl
rename to core/css/CSSUnknownRule.idl
diff --git a/css/CSSValue.idl b/core/css/CSSValue.idl
similarity index 100%
rename from css/CSSValue.idl
rename to core/css/CSSValue.idl
diff --git a/css/CSSValueList.idl b/core/css/CSSValueList.idl
similarity index 94%
rename from css/CSSValueList.idl
rename to core/css/CSSValueList.idl
index bcbea6a..9504c7b 100644
--- a/css/CSSValueList.idl
+++ b/core/css/CSSValueList.idl
@@ -29,6 +29,6 @@
     ImplementationLacksVTable
 ] interface CSSValueList : CSSValue {
     readonly attribute unsigned long    length;
-    CSSValue           item([Optional=DefaultIsUndefined] unsigned long index);
+    CSSValue           item([Default=Undefined] optional unsigned long index);
 };
 
diff --git a/css/Counter.idl b/core/css/Counter.idl
similarity index 100%
rename from css/Counter.idl
rename to core/css/Counter.idl
diff --git a/css/DOMWindowCSS.idl b/core/css/DOMWindowCSS.idl
similarity index 100%
rename from css/DOMWindowCSS.idl
rename to core/css/DOMWindowCSS.idl
diff --git a/css/FontLoader.idl b/core/css/FontLoader.idl
similarity index 91%
rename from css/FontLoader.idl
rename to core/css/FontLoader.idl
index cb8b9e6..b39c40e 100644
--- a/css/FontLoader.idl
+++ b/core/css/FontLoader.idl
@@ -42,16 +42,16 @@
     attribute EventListener onload;
     attribute EventListener onerror;
 
-    boolean checkFont(DOMString font, [Optional=DefaultIsNullString] DOMString text);
+    boolean checkFont(DOMString font, [Default=NullString] optional DOMString text);
     void loadFont(Dictionary params);
     void notifyWhenFontsReady([Callback] VoidCallback callback);
     readonly attribute boolean loading;
 
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/css/MediaList.idl b/core/css/MediaList.idl
similarity index 84%
rename from css/MediaList.idl
rename to core/css/MediaList.idl
index 4b5bf84..46ef79e 100644
--- a/css/MediaList.idl
+++ b/core/css/MediaList.idl
@@ -32,9 +32,9 @@
              [TreatNullAs=NullString, TreatReturnedNullStringAs=Null, SetterRaisesException] attribute DOMString mediaText;
     readonly attribute unsigned long length;
 
-    [TreatReturnedNullStringAs=Null] DOMString item([Optional=DefaultIsUndefined] unsigned long index);
-    [RaisesException] void deleteMedium([Optional=DefaultIsUndefined] DOMString oldMedium);
-    [RaisesException] void appendMedium([Optional=DefaultIsUndefined] DOMString newMedium);
+    [TreatReturnedNullStringAs=Null] DOMString item([Default=Undefined] optional unsigned long index);
+    [RaisesException] void deleteMedium([Default=Undefined] optional DOMString oldMedium);
+    [RaisesException] void appendMedium([Default=Undefined] optional DOMString newMedium);
 
 };
 
diff --git a/css/MediaQueryList.idl b/core/css/MediaQueryList.idl
similarity index 85%
rename from css/MediaQueryList.idl
rename to core/css/MediaQueryList.idl
index bbc5255..7fb2bca 100644
--- a/css/MediaQueryList.idl
+++ b/core/css/MediaQueryList.idl
@@ -21,6 +21,6 @@
 ] interface MediaQueryList {
     readonly attribute DOMString media;
     readonly attribute boolean matches;
-    void addListener([Optional=DefaultIsUndefined] MediaQueryListListener listener);
-    void removeListener([Optional=DefaultIsUndefined] MediaQueryListListener listener);
+    void addListener([Default=Undefined] optional MediaQueryListListener listener);
+    void removeListener([Default=Undefined] optional MediaQueryListListener listener);
 };
diff --git a/css/MediaQueryListListener.idl b/core/css/MediaQueryListListener.idl
similarity index 92%
rename from css/MediaQueryListListener.idl
rename to core/css/MediaQueryListListener.idl
index 3e7ce16..91f97f1 100644
--- a/css/MediaQueryListListener.idl
+++ b/core/css/MediaQueryListListener.idl
@@ -21,5 +21,5 @@
     
     CPPPureInterface,
 ] interface MediaQueryListListener {
-    void queryChanged([Optional=DefaultIsUndefined] MediaQueryList list);
+    void queryChanged([Default=Undefined] optional MediaQueryList list);
 };
diff --git a/css/RGBColor.idl b/core/css/RGBColor.idl
similarity index 100%
rename from css/RGBColor.idl
rename to core/css/RGBColor.idl
diff --git a/css/Rect.idl b/core/css/Rect.idl
similarity index 100%
rename from css/Rect.idl
rename to core/css/Rect.idl
diff --git a/css/StyleMedia.idl b/core/css/StyleMedia.idl
similarity index 94%
rename from css/StyleMedia.idl
rename to core/css/StyleMedia.idl
index b4e97f4..cd87599 100644
--- a/css/StyleMedia.idl
+++ b/core/css/StyleMedia.idl
@@ -26,5 +26,5 @@
 
 interface StyleMedia {
     readonly attribute DOMString type;
-    boolean matchMedium([Optional=DefaultIsUndefined] DOMString mediaquery);
+    boolean matchMedium([Default=Undefined] optional DOMString mediaquery);
 };
diff --git a/css/StyleSheet.idl b/core/css/StyleSheet.idl
similarity index 100%
rename from css/StyleSheet.idl
rename to core/css/StyleSheet.idl
diff --git a/css/StyleSheetList.idl b/core/css/StyleSheetList.idl
similarity index 93%
rename from css/StyleSheetList.idl
rename to core/css/StyleSheetList.idl
index 900bede..c9c044e 100644
--- a/css/StyleSheetList.idl
+++ b/core/css/StyleSheetList.idl
@@ -26,6 +26,6 @@
     ImplementationLacksVTable
 ] interface StyleSheetList {
     readonly attribute unsigned long    length;
-    StyleSheet         item([Optional=DefaultIsUndefined] unsigned long index);
+    StyleSheet         item([Default=Undefined] optional unsigned long index);
 };
 
diff --git a/css/WebKitCSSFilterRule.idl b/core/css/WebKitCSSFilterRule.idl
similarity index 100%
rename from css/WebKitCSSFilterRule.idl
rename to core/css/WebKitCSSFilterRule.idl
diff --git a/css/WebKitCSSFilterValue.idl b/core/css/WebKitCSSFilterValue.idl
similarity index 98%
rename from css/WebKitCSSFilterValue.idl
rename to core/css/WebKitCSSFilterValue.idl
index 1ddf7ec..ce66c6d 100644
--- a/css/WebKitCSSFilterValue.idl
+++ b/core/css/WebKitCSSFilterValue.idl
@@ -24,7 +24,6 @@
  */
 
 [
-        Conditional=CSS_FILTERS,
         IndexedGetter,
         DoNotCheckConstants,
     ImplementationLacksVTable
diff --git a/css/WebKitCSSKeyframeRule.idl b/core/css/WebKitCSSKeyframeRule.idl
similarity index 100%
rename from css/WebKitCSSKeyframeRule.idl
rename to core/css/WebKitCSSKeyframeRule.idl
diff --git a/css/WebKitCSSKeyframesRule.idl b/core/css/WebKitCSSKeyframesRule.idl
similarity index 89%
rename from css/WebKitCSSKeyframesRule.idl
rename to core/css/WebKitCSSKeyframesRule.idl
index 21e8dcf..19faaa5 100644
--- a/css/WebKitCSSKeyframesRule.idl
+++ b/core/css/WebKitCSSKeyframesRule.idl
@@ -34,8 +34,8 @@
     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString name;
     readonly attribute CSSRuleList cssRules;
     
-    void insertRule([Optional=DefaultIsUndefined] DOMString rule);
-    void deleteRule([Optional=DefaultIsUndefined] DOMString key);
-    WebKitCSSKeyframeRule findRule([Optional=DefaultIsUndefined] DOMString key);
+    void insertRule([Default=Undefined] optional DOMString rule);
+    void deleteRule([Default=Undefined] optional DOMString key);
+    WebKitCSSKeyframeRule findRule([Default=Undefined] optional DOMString key);
 };
 
diff --git a/css/WebKitCSSMatrix.idl b/core/css/WebKitCSSMatrix.idl
similarity index 69%
rename from css/WebKitCSSMatrix.idl
rename to core/css/WebKitCSSMatrix.idl
index 28fea09..697acdd 100644
--- a/css/WebKitCSSMatrix.idl
+++ b/core/css/WebKitCSSMatrix.idl
@@ -25,7 +25,7 @@
 
 // Introduced in DOM Level ?:
 [
-    Constructor([Optional=DefaultIsNullString] DOMString cssValue),
+    Constructor([Default=NullString] optional DOMString cssValue),
     RaisesException
 ] interface WebKitCSSMatrix {
 
@@ -54,49 +54,49 @@
     attribute double m43;
     attribute double m44;
 
-    [RaisesException] void setMatrixValue([Optional=DefaultIsUndefined] DOMString string);
+    [RaisesException] void setMatrixValue([Default=Undefined] optional DOMString string);
     
     // Multiply this matrix by secondMatrix, on the right (result = this * secondMatrix)
-    [Immutable] WebKitCSSMatrix multiply([Optional=DefaultIsUndefined] WebKitCSSMatrix secondMatrix);
+    [Immutable] WebKitCSSMatrix multiply([Default=Undefined] optional WebKitCSSMatrix secondMatrix);
     
     // Return the inverse of this matrix. Throw an exception if the matrix is not invertible
     [Immutable, RaisesException] WebKitCSSMatrix inverse();
     
     // Return this matrix translated by the passed values.
     // Passing a NaN will use a value of 0. This allows the 3D form to used for 2D operations    
-    [Immutable] WebKitCSSMatrix translate([Optional=DefaultIsUndefined] double x, 
-                                          [Optional=DefaultIsUndefined] double y, 
-                                          [Optional=DefaultIsUndefined] double z);
+    [Immutable] WebKitCSSMatrix translate([Default=Undefined] optional double x, 
+                                          [Default=Undefined] optional double y, 
+                                          [Default=Undefined] optional double z);
     
     // Returns this matrix scaled by the passed values.
     // Passing scaleX or scaleZ as NaN uses a value of 1, but passing scaleY of NaN 
     // makes it the same as scaleX. This allows the 3D form to used for 2D operations
-    [Immutable] WebKitCSSMatrix scale([Optional=DefaultIsUndefined] double scaleX, 
-                                      [Optional=DefaultIsUndefined] double scaleY, 
-                                      [Optional=DefaultIsUndefined] double scaleZ);
+    [Immutable] WebKitCSSMatrix scale([Default=Undefined] optional double scaleX, 
+                                      [Default=Undefined] optional double scaleY, 
+                                      [Default=Undefined] optional double scaleZ);
     
     // Returns this matrix rotated by the passed values.
     // If rotY and rotZ are NaN, rotate about Z (rotX=0, rotateY=0, rotateZ=rotX).
     // Otherwise use a rotation value of 0 for any passed NaN.    
-    [Immutable] WebKitCSSMatrix rotate([Optional=DefaultIsUndefined] double rotX, 
-                                       [Optional=DefaultIsUndefined] double rotY, 
-                                       [Optional=DefaultIsUndefined] double rotZ);
+    [Immutable] WebKitCSSMatrix rotate([Default=Undefined] optional double rotX, 
+                                       [Default=Undefined] optional double rotY, 
+                                       [Default=Undefined] optional double rotZ);
     
     // Returns this matrix rotated about the passed axis by the passed angle.
     // Passing a NaN will use a value of 0. If the axis is (0,0,0) use a value
     // of (0,0,1).
-    [Immutable] WebKitCSSMatrix rotateAxisAngle([Optional=DefaultIsUndefined] double x, 
-                                                [Optional=DefaultIsUndefined] double y, 
-                                                [Optional=DefaultIsUndefined] double z, 
-                                                [Optional=DefaultIsUndefined] double angle);
+    [Immutable] WebKitCSSMatrix rotateAxisAngle([Default=Undefined] optional double x, 
+                                                [Default=Undefined] optional double y, 
+                                                [Default=Undefined] optional double z, 
+                                                [Default=Undefined] optional double angle);
 
     // Returns this matrix skewed along the X axis by the passed values.
     // Passing a NaN will use a value of 0.
-    [Immutable] WebKitCSSMatrix skewX([Optional=DefaultIsUndefined] double angle);
+    [Immutable] WebKitCSSMatrix skewX([Default=Undefined] optional double angle);
 
     // Returns this matrix skewed along the Y axis by the passed values.
     // Passing a NaN will use a value of 0.
-    [Immutable] WebKitCSSMatrix skewY([Optional=DefaultIsUndefined] double angle);
+    [Immutable] WebKitCSSMatrix skewY([Default=Undefined] optional double angle);
 
     [NotEnumerable] DOMString toString();
 };
diff --git a/css/WebKitCSSMixFunctionValue.idl b/core/css/WebKitCSSMixFunctionValue.idl
similarity index 100%
rename from css/WebKitCSSMixFunctionValue.idl
rename to core/css/WebKitCSSMixFunctionValue.idl
diff --git a/css/WebKitCSSRegionRule.idl b/core/css/WebKitCSSRegionRule.idl
similarity index 100%
rename from css/WebKitCSSRegionRule.idl
rename to core/css/WebKitCSSRegionRule.idl
diff --git a/css/WebKitCSSTransformValue.idl b/core/css/WebKitCSSTransformValue.idl
similarity index 100%
rename from css/WebKitCSSTransformValue.idl
rename to core/css/WebKitCSSTransformValue.idl
diff --git a/css/WebKitCSSViewportRule.idl b/core/css/WebKitCSSViewportRule.idl
similarity index 100%
rename from css/WebKitCSSViewportRule.idl
rename to core/css/WebKitCSSViewportRule.idl
diff --git a/dom/AnimationEvent.idl b/core/dom/AnimationEvent.idl
similarity index 100%
rename from dom/AnimationEvent.idl
rename to core/dom/AnimationEvent.idl
diff --git a/dom/Attr.idl b/core/dom/Attr.idl
similarity index 100%
rename from dom/Attr.idl
rename to core/dom/Attr.idl
diff --git a/dom/AutocompleteErrorEvent.idl b/core/dom/AutocompleteErrorEvent.idl
similarity index 100%
rename from dom/AutocompleteErrorEvent.idl
rename to core/dom/AutocompleteErrorEvent.idl
diff --git a/dom/BeforeLoadEvent.idl b/core/dom/BeforeLoadEvent.idl
similarity index 100%
rename from dom/BeforeLoadEvent.idl
rename to core/dom/BeforeLoadEvent.idl
diff --git a/dom/CDATASection.idl b/core/dom/CDATASection.idl
similarity index 100%
rename from dom/CDATASection.idl
rename to core/dom/CDATASection.idl
diff --git a/core/dom/CharacterData.idl b/core/dom/CharacterData.idl
new file mode 100644
index 0000000..4b45308
--- /dev/null
+++ b/core/dom/CharacterData.idl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ *
+ * 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 CharacterData : Node {
+
+    [TreatNullAs=NullString, SetterRaisesException] attribute DOMString data;
+
+    readonly attribute unsigned long length;
+    
+    [TreatReturnedNullStringAs=Null, RaisesException] DOMString substringData([IsIndex,Default=Undefined] optional unsigned long offset, [IsIndex,Default=Undefined] optional unsigned long length);
+
+    [RaisesException] void appendData([Default=Undefined] optional DOMString data);
+
+     [RaisesException] void insertData([IsIndex,Default=Undefined] optional unsigned long offset, 
+                                   [Default=Undefined] optional DOMString data);
+
+     [RaisesException] void deleteData([IsIndex,Default=Undefined] optional unsigned long offset, 
+                                   [IsIndex,Default=Undefined] optional unsigned long length);
+
+     [RaisesException] void replaceData([IsIndex,Default=Undefined] optional unsigned long offset, 
+                                    [IsIndex,Default=Undefined] optional unsigned long length,
+                                    [Default=Undefined] optional DOMString data);
+
+    // DOM 4
+    [RaisesException] void remove();
+};
+
diff --git a/dom/ClientRect.idl b/core/dom/ClientRect.idl
similarity index 100%
rename from dom/ClientRect.idl
rename to core/dom/ClientRect.idl
diff --git a/dom/ClientRectList.idl b/core/dom/ClientRectList.idl
similarity index 94%
rename from dom/ClientRectList.idl
rename to core/dom/ClientRectList.idl
index 70bac18..de579f5 100644
--- a/dom/ClientRectList.idl
+++ b/core/dom/ClientRectList.idl
@@ -29,7 +29,7 @@
     ImplementationLacksVTable
 ] interface ClientRectList {
     readonly attribute unsigned long length;
-    ClientRect item([IsIndex,Optional=DefaultIsUndefined] unsigned long index);
+    ClientRect item([IsIndex,Default=Undefined] optional unsigned long index);
     // FIXME: Fix list behavior to allow custom exceptions to be thrown.
 };
 
diff --git a/dom/Clipboard.idl b/core/dom/Clipboard.idl
similarity index 96%
rename from dom/Clipboard.idl
rename to core/dom/Clipboard.idl
index f03ce01..da58a66 100644
--- a/dom/Clipboard.idl
+++ b/core/dom/Clipboard.idl
@@ -34,7 +34,7 @@
     [CustomGetter] readonly attribute Array types;
     readonly attribute FileList files;
 
-    [Custom, RaisesException] void clearData([Optional] DOMString type);
+    [Custom, RaisesException] void clearData(optional DOMString type);
     DOMString getData(DOMString type);
     boolean setData(DOMString type, DOMString data);
     [Custom, RaisesException] void setDragImage(HTMLImageElement image, long x, long y);
diff --git a/dom/Comment.idl b/core/dom/Comment.idl
similarity index 100%
rename from dom/Comment.idl
rename to core/dom/Comment.idl
diff --git a/dom/CompositionEvent.idl b/core/dom/CompositionEvent.idl
similarity index 78%
rename from dom/CompositionEvent.idl
rename to core/dom/CompositionEvent.idl
index 0afbbbb..61bfad0 100644
--- a/dom/CompositionEvent.idl
+++ b/core/dom/CompositionEvent.idl
@@ -29,11 +29,11 @@
 
     [InitializedByEventConstructor] readonly attribute DOMString data;
 
-    void initCompositionEvent([Optional=DefaultIsUndefined] DOMString typeArg, 
-                              [Optional=DefaultIsUndefined] boolean canBubbleArg, 
-                              [Optional=DefaultIsUndefined] boolean cancelableArg, 
-                              [Optional=DefaultIsUndefined] DOMWindow viewArg, 
-                              [Optional=DefaultIsUndefined] DOMString dataArg);
+    void initCompositionEvent([Default=Undefined] optional DOMString typeArg, 
+                              [Default=Undefined] optional boolean canBubbleArg, 
+                              [Default=Undefined] optional boolean cancelableArg, 
+                              [Default=Undefined] optional DOMWindow viewArg, 
+                              [Default=Undefined] optional DOMString dataArg);
 
 };
 
diff --git a/dom/CustomElementConstructor.idl b/core/dom/CustomElementConstructor.idl
similarity index 100%
rename from dom/CustomElementConstructor.idl
rename to core/dom/CustomElementConstructor.idl
diff --git a/dom/CustomEvent.idl b/core/dom/CustomEvent.idl
similarity index 83%
rename from dom/CustomEvent.idl
rename to core/dom/CustomEvent.idl
index 13263b3..f4a67e4 100644
--- a/dom/CustomEvent.idl
+++ b/core/dom/CustomEvent.idl
@@ -28,8 +28,8 @@
 ] interface CustomEvent : Event {
     [InitializedByEventConstructor, Custom] readonly attribute any detail;
 
-    void initCustomEvent([Optional=DefaultIsUndefined] DOMString typeArg, 
-                         [Optional=DefaultIsUndefined] boolean canBubbleArg, 
-                         [Optional=DefaultIsUndefined] boolean cancelableArg, 
-                         [Optional=DefaultIsUndefined] any detailArg);
+    void initCustomEvent([Default=Undefined] optional DOMString typeArg, 
+                         [Default=Undefined] optional boolean canBubbleArg, 
+                         [Default=Undefined] optional boolean cancelableArg, 
+                         [Default=Undefined] optional any detailArg);
 };
diff --git a/dom/DOMCoreException.idl b/core/dom/DOMCoreException.idl
similarity index 100%
rename from dom/DOMCoreException.idl
rename to core/dom/DOMCoreException.idl
diff --git a/dom/DOMError.idl b/core/dom/DOMError.idl
similarity index 100%
rename from dom/DOMError.idl
rename to core/dom/DOMError.idl
diff --git a/dom/DOMImplementation.idl b/core/dom/DOMImplementation.idl
similarity index 62%
rename from dom/DOMImplementation.idl
rename to core/dom/DOMImplementation.idl
index 4bcfc63..960e2df 100644
--- a/dom/DOMImplementation.idl
+++ b/core/dom/DOMImplementation.idl
@@ -25,25 +25,25 @@
 
     // DOM Level 1
 
-     boolean hasFeature([Optional=DefaultIsUndefined] DOMString feature, 
-                                      [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString version);
+     boolean hasFeature([Default=Undefined] optional DOMString feature, 
+                                      [TreatNullAs=NullString,Default=Undefined] optional DOMString version);
 
     // DOM Level 2
 
-     [RaisesException] DocumentType createDocumentType([TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString qualifiedName,
-                                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString publicId,
-                                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString systemId);
-     [RaisesException] Document createDocument([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI, 
-                                           [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString qualifiedName, 
-                                           [TreatNullAs=NullString,Optional=DefaultIsUndefined] DocumentType doctype);
+     [RaisesException] DocumentType createDocumentType([TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString qualifiedName,
+                                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString publicId,
+                                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString systemId);
+     [RaisesException] Document createDocument([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, 
+                                           [TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName, 
+                                           [TreatNullAs=NullString,Default=Undefined] optional DocumentType doctype);
 
     // DOMImplementationCSS interface from DOM Level 2 CSS
 
-     [RaisesException] CSSStyleSheet createCSSStyleSheet([Optional=DefaultIsUndefined] DOMString title,
-                                                     [Optional=DefaultIsUndefined] DOMString media);
+     [RaisesException] CSSStyleSheet createCSSStyleSheet([Default=Undefined] optional DOMString title,
+                                                     [Default=Undefined] optional DOMString media);
 
     // HTMLDOMImplementation interface from DOM Level 2 HTML
 
-    HTMLDocument createHTMLDocument([Optional=DefaultIsNullString] DOMString title);
+    HTMLDocument createHTMLDocument([Default=NullString] optional DOMString title);
 };
 
diff --git a/dom/DOMNamedFlowCollection.idl b/core/dom/DOMNamedFlowCollection.idl
similarity index 100%
rename from dom/DOMNamedFlowCollection.idl
rename to core/dom/DOMNamedFlowCollection.idl
diff --git a/dom/DOMStringList.idl b/core/dom/DOMStringList.idl
similarity index 89%
rename from dom/DOMStringList.idl
rename to core/dom/DOMStringList.idl
index 1ca73e0..6eccd57 100644
--- a/dom/DOMStringList.idl
+++ b/core/dom/DOMStringList.idl
@@ -28,7 +28,7 @@
     ImplementationLacksVTable
 ] interface DOMStringList {
     readonly attribute unsigned long length;
-    [TreatReturnedNullStringAs=Null] DOMString item([Optional=DefaultIsUndefined] unsigned long index);
-    boolean contains([Optional=DefaultIsUndefined] DOMString string);
+    [TreatReturnedNullStringAs=Null] DOMString item([Default=Undefined] optional unsigned long index);
+    boolean contains([Default=Undefined] optional DOMString string);
 };
 
diff --git a/dom/DOMStringMap.idl b/core/dom/DOMStringMap.idl
similarity index 100%
rename from dom/DOMStringMap.idl
rename to core/dom/DOMStringMap.idl
diff --git a/dom/DataTransferItem.idl b/core/dom/DataTransferItem.idl
similarity index 94%
rename from dom/DataTransferItem.idl
rename to core/dom/DataTransferItem.idl
index 1131d03..8096ce6 100644
--- a/dom/DataTransferItem.idl
+++ b/core/dom/DataTransferItem.idl
@@ -34,7 +34,7 @@
     readonly attribute DOMString kind;
     readonly attribute DOMString type;
 
-    void getAsString([Callback,Optional=DefaultIsUndefined] StringCallback callback);
+    void getAsString([Callback,Default=Undefined] optional StringCallback callback);
     Blob getAsFile();
 };
 
diff --git a/dom/DataTransferItemList.idl b/core/dom/DataTransferItemList.idl
similarity index 88%
rename from dom/DataTransferItemList.idl
rename to core/dom/DataTransferItemList.idl
index 67763e9..9b63b49 100644
--- a/dom/DataTransferItemList.idl
+++ b/core/dom/DataTransferItemList.idl
@@ -34,11 +34,11 @@
     ImplementationLacksVTable
 ] interface DataTransferItemList {
     readonly attribute long length;
-    DataTransferItem item([Optional=DefaultIsUndefined] unsigned long index);
+    DataTransferItem item([Default=Undefined] optional unsigned long index);
 
     void clear();
     void add(File? file);
-    [RaisesException] void add([Optional=DefaultIsUndefined] DOMString data, 
-             [Optional=DefaultIsUndefined] DOMString type);
+    [RaisesException] void add([Default=Undefined] optional DOMString data, 
+             [Default=Undefined] optional DOMString type);
 };
 
diff --git a/dom/DeviceAcceleration.idl b/core/dom/DeviceAcceleration.idl
similarity index 100%
rename from dom/DeviceAcceleration.idl
rename to core/dom/DeviceAcceleration.idl
diff --git a/dom/DeviceMotionEvent.idl b/core/dom/DeviceMotionEvent.idl
similarity index 70%
rename from dom/DeviceMotionEvent.idl
rename to core/dom/DeviceMotionEvent.idl
index 4177e11..3e6a6ca 100644
--- a/dom/DeviceMotionEvent.idl
+++ b/core/dom/DeviceMotionEvent.idl
@@ -28,11 +28,11 @@
     readonly attribute DeviceAcceleration accelerationIncludingGravity;
     readonly attribute DeviceRotationRate rotationRate;
     readonly attribute double? interval;
-    [Custom] void initDeviceMotionEvent([Optional=DefaultIsUndefined] DOMString type, 
-                                        [Optional=DefaultIsUndefined] boolean bubbles, 
-                                        [Optional=DefaultIsUndefined] boolean cancelable, 
-                                        [Optional=DefaultIsUndefined] Acceleration acceleration, 
-                                        [Optional=DefaultIsUndefined] Acceleration accelerationIncludingGravity, 
-                                        [Optional=DefaultIsUndefined] RotationRate rotationRate, 
-                                        [Optional=DefaultIsUndefined] double interval);
+    [Custom] void initDeviceMotionEvent([Default=Undefined] optional DOMString type, 
+                                        [Default=Undefined] optional boolean bubbles, 
+                                        [Default=Undefined] optional boolean cancelable, 
+                                        [Default=Undefined] optional Acceleration acceleration, 
+                                        [Default=Undefined] optional Acceleration accelerationIncludingGravity, 
+                                        [Default=Undefined] optional RotationRate rotationRate, 
+                                        [Default=Undefined] optional double interval);
 };
diff --git a/dom/DeviceOrientationEvent.idl b/core/dom/DeviceOrientationEvent.idl
similarity index 70%
rename from dom/DeviceOrientationEvent.idl
rename to core/dom/DeviceOrientationEvent.idl
index 65bd538..286f2bb 100644
--- a/dom/DeviceOrientationEvent.idl
+++ b/core/dom/DeviceOrientationEvent.idl
@@ -28,11 +28,11 @@
     readonly attribute double? beta;
     readonly attribute double? gamma;
     readonly attribute boolean? absolute;
-    [Custom] void initDeviceOrientationEvent([Optional=DefaultIsUndefined] DOMString type, 
-                                             [Optional=DefaultIsUndefined] boolean bubbles, 
-                                             [Optional=DefaultIsUndefined] boolean cancelable, 
-                                             [Optional=DefaultIsUndefined] double alpha, 
-                                             [Optional=DefaultIsUndefined] double beta, 
-                                             [Optional=DefaultIsUndefined] double gamma,
-                                             [Optional=DefaultIsUndefined] boolean absolute);
+    [Custom] void initDeviceOrientationEvent([Default=Undefined] optional DOMString type, 
+                                             [Default=Undefined] optional boolean bubbles, 
+                                             [Default=Undefined] optional boolean cancelable, 
+                                             [Default=Undefined] optional double alpha, 
+                                             [Default=Undefined] optional double beta, 
+                                             [Default=Undefined] optional double gamma,
+                                             [Default=Undefined] optional boolean absolute);
 };
diff --git a/dom/DeviceRotationRate.idl b/core/dom/DeviceRotationRate.idl
similarity index 100%
rename from dom/DeviceRotationRate.idl
rename to core/dom/DeviceRotationRate.idl
diff --git a/dom/Document.idl b/core/dom/Document.idl
similarity index 60%
rename from dom/Document.idl
rename to core/dom/Document.idl
index 2884c1b..f5d405b 100644
--- a/dom/Document.idl
+++ b/core/dom/Document.idl
@@ -27,28 +27,28 @@
     readonly attribute DOMImplementation implementation;
     readonly attribute Element documentElement;
 
-    [ReturnNewObject, DeliverCustomElementCallbacks, PerWorldBindings, RaisesException] Element createElement([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString tagName);
+    [ReturnNewObject, DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Element createElement([TreatNullAs=NullString,Default=Undefined] optional DOMString tagName);
     DocumentFragment   createDocumentFragment();
-    [ReturnNewObject, PerWorldBindings] Text createTextNode([Optional=DefaultIsUndefined] DOMString data);
-    [ReturnNewObject] Comment createComment([Optional=DefaultIsUndefined] DOMString data);
-    [ReturnNewObject, RaisesException] CDATASection createCDATASection([Optional=DefaultIsUndefined] DOMString data);
-    [ReturnNewObject, RaisesException] ProcessingInstruction createProcessingInstruction([Optional=DefaultIsUndefined] DOMString target,
-                                                                                 [Optional=DefaultIsUndefined] DOMString data);
-    [ReturnNewObject, RaisesException] Attr createAttribute([Optional=DefaultIsUndefined] DOMString name);
-    [ReturnNewObject, RaisesException] EntityReference createEntityReference([Optional=DefaultIsUndefined] DOMString name);
-    [PerWorldBindings] NodeList           getElementsByTagName([Optional=DefaultIsUndefined] DOMString tagname);
+    [ReturnNewObject, PerWorldBindings] Text createTextNode([Default=Undefined] optional DOMString data);
+    [ReturnNewObject] Comment createComment([Default=Undefined] optional DOMString data);
+    [ReturnNewObject, RaisesException] CDATASection createCDATASection([Default=Undefined] optional DOMString data);
+    [ReturnNewObject, RaisesException] ProcessingInstruction createProcessingInstruction([Default=Undefined] optional DOMString target,
+                                                                                 [Default=Undefined] optional DOMString data);
+    [ReturnNewObject, RaisesException] Attr createAttribute([Default=Undefined] optional DOMString name);
+    [ReturnNewObject, RaisesException] EntityReference createEntityReference([Default=Undefined] optional DOMString name);
+    [PerWorldBindings] NodeList           getElementsByTagName([Default=Undefined] optional DOMString tagname);
 
     // Introduced in DOM Level 2:
 
-    [ReturnNewObject, DeliverCustomElementCallbacks, RaisesException] Node importNode([Optional=DefaultIsUndefined] Node importedNode,
-                    [Optional] boolean deep);
-    [ReturnNewObject, DeliverCustomElementCallbacks, RaisesException] Element createElementNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
-                            [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString qualifiedName);
-    [ReturnNewObject, RaisesException] Attr createAttributeNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
-                                                                          [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString qualifiedName);
-     NodeList getElementsByTagNameNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
-                                                   [Optional=DefaultIsUndefined] DOMString localName);
-    [PerWorldBindings] Element            getElementById([Optional=DefaultIsUndefined] DOMString elementId);
+    [ReturnNewObject, DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Node importNode([Default=Undefined] optional Node importedNode,
+                    optional boolean deep);
+    [ReturnNewObject, DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Element createElementNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+                            [TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName);
+    [ReturnNewObject, RaisesException] Attr createAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+                                                                          [TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName);
+     NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+                                                   [Default=Undefined] optional DOMString localName);
+    [PerWorldBindings] Element            getElementById([Default=Undefined] optional DOMString elementId);
 
     // DOM Level 3 Core
 
@@ -58,13 +58,13 @@
              [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString xmlVersion;
              [SetterRaisesException] attribute boolean xmlStandalone;
 
-    [RaisesException] Node               adoptNode([Optional=DefaultIsUndefined] Node source);
+    [RaisesException] Node               adoptNode([Default=Undefined] optional Node source);
 
     [TreatReturnedNullStringAs=Null] readonly attribute DOMString documentURI;
 
     // DOM Level 2 Events (DocumentEvents interface)
 
-    [RaisesException] Event              createEvent([Optional=DefaultIsUndefined] DOMString eventType);
+    [RaisesException] Event              createEvent([Default=Undefined] optional DOMString eventType);
 
     // DOM Level 2 Tranversal and Range (DocumentRange interface)
 
@@ -72,14 +72,14 @@
 
     // DOM Level 2 Tranversal and Range (DocumentTraversal interface)
 
-     [RaisesException] NodeIterator createNodeIterator([Optional=DefaultIsUndefined] Node root,
-                                                   [Optional=DefaultIsUndefined] unsigned long whatToShow,
-                                                   [Optional=DefaultIsUndefined] NodeFilter filter,
-                                                   [Optional=DefaultIsUndefined] boolean expandEntityReferences);
-     [RaisesException] TreeWalker createTreeWalker([Optional=DefaultIsUndefined] Node root,
-                                               [Optional=DefaultIsUndefined] unsigned long whatToShow,
-                                               [Optional=DefaultIsUndefined] NodeFilter filter,
-                                               [Optional=DefaultIsUndefined] boolean expandEntityReferences);
+     [RaisesException] NodeIterator createNodeIterator([Default=Undefined] optional Node root,
+                                                   [Default=Undefined] optional unsigned long whatToShow,
+                                                   [Default=Undefined] optional NodeFilter filter,
+                                                   [Default=Undefined] optional boolean expandEntityReferences);
+     [RaisesException] TreeWalker createTreeWalker([Default=Undefined] optional Node root,
+                                               [Default=Undefined] optional unsigned long whatToShow,
+                                               [Default=Undefined] optional NodeFilter filter,
+                                               [Default=Undefined] optional boolean expandEntityReferences);
 
     // DOM Level 2 Abstract Views (DocumentView interface)
 
@@ -91,30 +91,30 @@
 
     // DOM Level 2 Style (DocumentCSS interface)
 
-     CSSStyleDeclaration getOverrideStyle([Optional=DefaultIsUndefined] Element element,
-                                                        [Optional=DefaultIsUndefined] DOMString pseudoElement);
+     CSSStyleDeclaration getOverrideStyle([Default=Undefined] optional Element element,
+                                                        [Default=Undefined] optional DOMString pseudoElement);
 
     // DOM Level 3 XPath (XPathEvaluator interface)
-     [RaisesException] XPathExpression createExpression([Optional=DefaultIsUndefined] DOMString expression,
-                                                    [Optional=DefaultIsUndefined] XPathNSResolver resolver);
+     [RaisesException] XPathExpression createExpression([Default=Undefined] optional DOMString expression,
+                                                    [Default=Undefined] optional XPathNSResolver resolver);
     XPathNSResolver    createNSResolver(Node nodeResolver);
-    [Custom, RaisesException] XPathResult evaluate([Optional=DefaultIsUndefined] DOMString expression,
-                                                  [Optional=DefaultIsUndefined] Node contextNode,
-                                                  [Optional=DefaultIsUndefined] XPathNSResolver resolver,
-                                                  [Optional=DefaultIsUndefined] unsigned short type,
-                                                  [Optional=DefaultIsUndefined] XPathResult inResult);
+    [Custom, RaisesException] XPathResult evaluate([Default=Undefined] optional DOMString expression,
+                                                  [Default=Undefined] optional Node contextNode,
+                                                  [Default=Undefined] optional XPathNSResolver resolver,
+                                                  [Default=Undefined] optional unsigned short type,
+                                                  [Default=Undefined] optional XPathResult inResult);
 
     // Common extensions
     [DeliverCustomElementCallbacks]
-    boolean            execCommand([Optional=DefaultIsUndefined] DOMString command,
-                                   [Optional=DefaultIsUndefined] boolean userInterface,
-                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString value);
+    boolean            execCommand([Default=Undefined] optional DOMString command,
+                                   [Default=Undefined] optional boolean userInterface,
+                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString value);
 
-    boolean            queryCommandEnabled([Optional=DefaultIsUndefined] DOMString command);
-    boolean            queryCommandIndeterm([Optional=DefaultIsUndefined] DOMString command);
-    boolean            queryCommandState([Optional=DefaultIsUndefined] DOMString command);
-    boolean            queryCommandSupported([Optional=DefaultIsUndefined] DOMString command);
-    DOMString          queryCommandValue([Optional=DefaultIsUndefined] DOMString command);
+    boolean            queryCommandEnabled([Default=Undefined] optional DOMString command);
+    boolean            queryCommandIndeterm([Default=Undefined] optional DOMString command);
+    boolean            queryCommandState([Default=Undefined] optional DOMString command);
+    boolean            queryCommandSupported([Default=Undefined] optional DOMString command);
+    DOMString          queryCommandValue([Default=Undefined] optional DOMString command);
 
     // Moved down from HTMLDocument
 
@@ -135,13 +135,9 @@
     readonly attribute HTMLCollection anchors;
     readonly attribute DOMString lastModified;
 
-    [PerWorldBindings] NodeList getElementsByName([Optional=DefaultIsUndefined] DOMString elementName);
+    [PerWorldBindings] NodeList getElementsByName([Default=Undefined] optional DOMString elementName);
 
-#if defined(ENABLE_MICRODATA) && ENABLE_MICRODATA
-    NodeList getItems([TreatNullAs=NullString, TreatUndefinedAs=NullString, Optional=DefaultIsUndefined] DOMString typeNames);
-#endif
-
-    [Custom] attribute Location location;
+    [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] attribute Location location;
 
     // IE extensions
 
@@ -149,10 +145,10 @@
     [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString defaultCharset;
     [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString readyState;
 
-    Element            elementFromPoint([Optional=DefaultIsUndefined] long x, 
-                                        [Optional=DefaultIsUndefined] long y);
-    Range              caretRangeFromPoint([Optional=DefaultIsUndefined] long x, 
-                                           [Optional=DefaultIsUndefined] long y);
+    Element            elementFromPoint([Default=Undefined] optional long x, 
+                                        [Default=Undefined] optional long y);
+    Range              caretRangeFromPoint([Default=Undefined] optional long x, 
+                                           [Default=Undefined] optional long y);
 
     // Mozilla extensions
     DOMSelection       getSelection();
@@ -166,7 +162,7 @@
     CanvasRenderingContext getCSSCanvasContext(DOMString contextId, DOMString name, long width, long height);
 
     // HTML 5
-    NodeList getElementsByClassName([Optional=DefaultIsUndefined] DOMString tagname);
+    NodeList getElementsByClassName([Default=Undefined] optional DOMString tagname);
 
     readonly attribute DOMString compatMode;
 
@@ -258,35 +254,33 @@
     [NotEnumerable] attribute EventListener onsearch;
     [NotEnumerable] attribute EventListener onselectstart;
     [NotEnumerable] attribute EventListener onselectionchange;
-    [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch] attribute EventListener ontouchstart;
-    [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch] attribute EventListener ontouchmove;
-    [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch] attribute EventListener ontouchend;
-    [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch] attribute EventListener ontouchcancel;
+    [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchstart;
+    [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchmove;
+    [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchend;
+    [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchcancel;
     [NotEnumerable] attribute EventListener onwebkitfullscreenchange;
     [NotEnumerable] attribute EventListener onwebkitfullscreenerror;
     [NotEnumerable] attribute EventListener onwebkitpointerlockchange;
     [NotEnumerable] attribute EventListener onwebkitpointerlockerror;
     [NotEnumerable, EnabledAtRuntime=experimentalContentSecurityPolicyFeatures] attribute EventListener onsecuritypolicyviolation;
 
-#if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS
-    [ReturnNewObject, EnabledAtRuntime=touch, RaisesException] Touch createTouch([Optional=DefaultIsUndefined] DOMWindow window,
-                                                     [Optional=DefaultIsUndefined] EventTarget target,
-                                                     [Optional=DefaultIsUndefined] long identifier,
-                                                     [Optional=DefaultIsUndefined] long pageX,
-                                                     [Optional=DefaultIsUndefined] long pageY,
-                                                     [Optional=DefaultIsUndefined] long screenX,
-                                                     [Optional=DefaultIsUndefined] long screenY,
-                                                     [Optional=DefaultIsUndefined] long webkitRadiusX,
-                                                     [Optional=DefaultIsUndefined] long webkitRadiusY,
-                                                     [Optional=DefaultIsUndefined] float webkitRotationAngle,
-                                                     [Optional=DefaultIsUndefined] float webkitForce);
+    [ReturnNewObject, EnabledAtRuntime=touch, RaisesException] Touch createTouch([Default=Undefined] optional DOMWindow window,
+                                                     [Default=Undefined] optional EventTarget target,
+                                                     [Default=Undefined] optional long identifier,
+                                                     [Default=Undefined] optional long pageX,
+                                                     [Default=Undefined] optional long pageY,
+                                                     [Default=Undefined] optional long screenX,
+                                                     [Default=Undefined] optional long screenY,
+                                                     [Default=Undefined] optional long webkitRadiusX,
+                                                     [Default=Undefined] optional long webkitRadiusY,
+                                                     [Default=Undefined] optional float webkitRotationAngle,
+                                                     [Default=Undefined] optional float webkitForce);
     [ReturnNewObject, EnabledAtRuntime=touch, Custom, RaisesException] TouchList createTouchList();
-#endif
 
 #if defined(ENABLE_CUSTOM_ELEMENTS) && ENABLE_CUSTOM_ELEMENTS
-    [EnabledAtRuntime=customDOMElements, Conditional=CUSTOM_ELEMENTS, ImplementedAs=registerElement, CallWith=ScriptState, DeliverCustomElementCallbacks, RaisesException] CustomElementConstructor webkitRegister(DOMString name, [Optional] Dictionary options);
-    [ReturnNewObject, DeliverCustomElementCallbacks, PerWorldBindings, RaisesException] Element createElement(DOMString localName, [TreatNullAs=NullString] DOMString typeExtension);
-    [ReturnNewObject, DeliverCustomElementCallbacks, RaisesException] Element createElementNS([TreatNullAs=NullString] DOMString namespaceURI, DOMString qualifiedName,
+    [EnabledAtRuntime=customDOMElements, Conditional=CUSTOM_ELEMENTS, ImplementedAs=registerElement, CallWith=ScriptState, DeliverCustomElementCallbacks, RaisesException] CustomElementConstructor webkitRegister(DOMString name, optional Dictionary options);
+    [ReturnNewObject, DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Element createElement(DOMString localName, [TreatNullAs=NullString] DOMString typeExtension);
+    [ReturnNewObject, DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Element createElementNS([TreatNullAs=NullString] DOMString namespaceURI, DOMString qualifiedName,
                             [TreatNullAs=NullString] DOMString typeExtension);
 #endif
 
diff --git a/dom/DocumentFragment.idl b/core/dom/DocumentFragment.idl
similarity index 100%
rename from dom/DocumentFragment.idl
rename to core/dom/DocumentFragment.idl
diff --git a/dom/DocumentType.idl b/core/dom/DocumentType.idl
similarity index 100%
rename from dom/DocumentType.idl
rename to core/dom/DocumentType.idl
diff --git a/dom/Element.idl b/core/dom/Element.idl
similarity index 75%
rename from dom/Element.idl
rename to core/dom/Element.idl
index b734d48..fb3bd5a 100644
--- a/dom/Element.idl
+++ b/core/dom/Element.idl
@@ -27,14 +27,14 @@
 
     [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString tagName;
 
-    [TreatReturnedNullStringAs=Null] DOMString getAttribute([Optional=DefaultIsUndefined] DOMString name);
-     [RaisesException] void setAttribute([Optional=DefaultIsUndefined] DOMString name,
-                                     [Optional=DefaultIsUndefined] DOMString value);
-    void removeAttribute([Optional=DefaultIsUndefined] DOMString name);
-    Attr getAttributeNode([Optional=DefaultIsUndefined] DOMString name);
-    [RaisesException] Attr setAttributeNode([Optional=DefaultIsUndefined] Attr newAttr);
-    [RaisesException] Attr removeAttributeNode([Optional=DefaultIsUndefined] Attr oldAttr);
-    [PerWorldBindings] NodeList getElementsByTagName([Optional=DefaultIsUndefined] DOMString name);
+    [TreatReturnedNullStringAs=Null] DOMString getAttribute([Default=Undefined] optional DOMString name);
+     [RaisesException] void setAttribute([Default=Undefined] optional DOMString name,
+                                     [Default=Undefined] optional DOMString value);
+    void removeAttribute([Default=Undefined] optional DOMString name);
+    Attr getAttributeNode([Default=Undefined] optional DOMString name);
+    [RaisesException] Attr setAttributeNode([Default=Undefined] optional Attr newAttr);
+    [RaisesException] Attr removeAttributeNode([Default=Undefined] optional Attr oldAttr);
+    [PerWorldBindings] NodeList getElementsByTagName([Default=Undefined] optional DOMString name);
 
     // For ObjC this is defined on Node for legacy support.
     [PerWorldBindings] readonly attribute NamedNodeMap     attributes;
@@ -42,21 +42,21 @@
 
     // DOM Level 2 Core
 
-     DOMString getAttributeNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
-                                            [Optional=DefaultIsUndefined] DOMString localName);
-     [RaisesException] void setAttributeNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
-                                       [Optional=DefaultIsUndefined] DOMString qualifiedName, 
-                                       [Optional=DefaultIsUndefined] DOMString value);
+     DOMString getAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+                                            [Default=Undefined] optional DOMString localName);
+     [RaisesException] void setAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+                                       [Default=Undefined] optional DOMString qualifiedName, 
+                                       [Default=Undefined] optional DOMString value);
      void removeAttributeNS([TreatNullAs=NullString] DOMString namespaceURI,
                                           DOMString localName);
-     NodeList getElementsByTagNameNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
-                                                   [Optional=DefaultIsUndefined] DOMString localName);
-     Attr getAttributeNodeNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
-                                           [Optional=DefaultIsUndefined] DOMString localName);
-    [RaisesException] Attr setAttributeNodeNS([Optional=DefaultIsUndefined] Attr newAttr);
+     NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+                                                   [Default=Undefined] optional DOMString localName);
+     Attr getAttributeNodeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+                                           [Default=Undefined] optional DOMString localName);
+    [RaisesException] Attr setAttributeNodeNS([Default=Undefined] optional Attr newAttr);
     boolean hasAttribute(DOMString name);
-     boolean hasAttributeNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
-                                          [Optional=DefaultIsUndefined] DOMString localName);
+     boolean hasAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+                                          [Default=Undefined] optional DOMString localName);
 
     [PerWorldBindings] readonly attribute CSSStyleDeclaration style;
 
@@ -78,16 +78,16 @@
 
     void focus();
     void blur();
-    void scrollIntoView([Optional] boolean alignWithTop);
+    void scrollIntoView(optional boolean alignWithTop);
 
     // WebKit extensions
 
-    void scrollIntoViewIfNeeded([Optional] boolean centerIfNeeded);
-    void scrollByLines([Optional=DefaultIsUndefined] long lines);
-    void scrollByPages([Optional=DefaultIsUndefined] long pages);
+    void scrollIntoViewIfNeeded(optional boolean centerIfNeeded);
+    void scrollByLines([Default=Undefined] optional long lines);
+    void scrollByPages([Default=Undefined] optional long pages);
 
     // HTML 5
-    NodeList getElementsByClassName([Optional=DefaultIsUndefined] DOMString name);
+    NodeList getElementsByClassName([Default=Undefined] optional DOMString name);
 
     [Reflect=class, PerWorldBindings] attribute DOMString className;
     [PerWorldBindings] readonly attribute DOMTokenList classList;
@@ -99,7 +99,7 @@
     [RaisesException] NodeList querySelectorAll(DOMString selectors);
 
     // WebKit extension, pending specification.
-    [RaisesException] boolean webkitMatchesSelector([Optional=DefaultIsUndefined] DOMString selectors);
+    [RaisesException] boolean webkitMatchesSelector([Default=Undefined] optional DOMString selectors);
 
     // ElementTraversal API
     [PerWorldBindings] readonly attribute Element firstElementChild;
@@ -123,7 +123,7 @@
 
     // Mozilla version
     const unsigned short ALLOW_KEYBOARD_INPUT = 1;
-    [EnabledAtRuntime] void webkitRequestFullScreen([Optional=DefaultIsUndefined] unsigned short flags);
+    [EnabledAtRuntime] void webkitRequestFullScreen([Default=Undefined] optional unsigned short flags);
 
     // W3C version
     [EnabledAtRuntime] void webkitRequestFullscreen();
@@ -199,10 +199,10 @@
     [NotEnumerable, PerWorldBindings] attribute EventListener onreset;
     [NotEnumerable, PerWorldBindings] attribute EventListener onsearch;
     [NotEnumerable, PerWorldBindings] attribute EventListener onselectstart;
-    [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchstart;
-    [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchmove;
-    [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchend;
-    [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchcancel;
+    [NotEnumerable, EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchstart;
+    [NotEnumerable, EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchmove;
+    [NotEnumerable, EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchend;
+    [NotEnumerable, EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchcancel;
     [NotEnumerable, PerWorldBindings] attribute EventListener onwebkitfullscreenchange;
     [NotEnumerable, PerWorldBindings] attribute EventListener onwebkitfullscreenerror;
 };
diff --git a/dom/Entity.idl b/core/dom/Entity.idl
similarity index 100%
rename from dom/Entity.idl
rename to core/dom/Entity.idl
diff --git a/dom/EntityReference.idl b/core/dom/EntityReference.idl
similarity index 100%
rename from dom/EntityReference.idl
rename to core/dom/EntityReference.idl
diff --git a/dom/ErrorEvent.idl b/core/dom/ErrorEvent.idl
similarity index 100%
rename from dom/ErrorEvent.idl
rename to core/dom/ErrorEvent.idl
diff --git a/dom/Event.idl b/core/dom/Event.idl
similarity index 91%
rename from dom/Event.idl
rename to core/dom/Event.idl
index 2ba9cd1..9fee227 100644
--- a/dom/Event.idl
+++ b/core/dom/Event.idl
@@ -60,9 +60,9 @@
 
     void               stopPropagation();
     void               preventDefault();
-     void initEvent([Optional=DefaultIsUndefined] DOMString eventTypeArg, 
-                                  [Optional=DefaultIsUndefined] boolean canBubbleArg, 
-                                  [Optional=DefaultIsUndefined] boolean cancelableArg);
+     void initEvent([Default=Undefined] optional DOMString eventTypeArg, 
+                                  [Default=Undefined] optional boolean canBubbleArg, 
+                                  [Default=Undefined] optional boolean cancelableArg);
 
     // DOM Level 3 Additions.
     readonly attribute boolean defaultPrevented;
diff --git a/dom/EventException.idl b/core/dom/EventException.idl
similarity index 100%
rename from dom/EventException.idl
rename to core/dom/EventException.idl
diff --git a/dom/EventListener.idl b/core/dom/EventListener.idl
similarity index 100%
rename from dom/EventListener.idl
rename to core/dom/EventListener.idl
diff --git a/dom/EventTarget.idl b/core/dom/EventTarget.idl
similarity index 89%
rename from dom/EventTarget.idl
rename to core/dom/EventTarget.idl
index adffe23..161b03f 100644
--- a/dom/EventTarget.idl
+++ b/core/dom/EventTarget.idl
@@ -25,10 +25,10 @@
 ] interface EventTarget {
     void addEventListener(DOMString type, 
                                          EventListener listener, 
-                                         [Optional] boolean useCapture);
+                                         optional boolean useCapture);
     void removeEventListener(DOMString type, 
                                          EventListener listener, 
-                                         [Optional] boolean useCapture);
+                                         optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
 
diff --git a/dom/FocusEvent.idl b/core/dom/FocusEvent.idl
similarity index 100%
rename from dom/FocusEvent.idl
rename to core/dom/FocusEvent.idl
diff --git a/dom/HashChangeEvent.idl b/core/dom/HashChangeEvent.idl
similarity index 74%
rename from dom/HashChangeEvent.idl
rename to core/dom/HashChangeEvent.idl
index fc30c10..2408afe 100644
--- a/dom/HashChangeEvent.idl
+++ b/core/dom/HashChangeEvent.idl
@@ -21,11 +21,11 @@
 [
     ConstructorTemplate=Event
 ] interface HashChangeEvent : Event {
-    void initHashChangeEvent([Optional=DefaultIsUndefined] DOMString type, 
-                             [Optional=DefaultIsUndefined] boolean canBubble, 
-                             [Optional=DefaultIsUndefined] boolean cancelable, 
-                             [Optional=DefaultIsUndefined] DOMString oldURL, 
-                             [Optional=DefaultIsUndefined] DOMString newURL); 
+    void initHashChangeEvent([Default=Undefined] optional DOMString type, 
+                             [Default=Undefined] optional boolean canBubble, 
+                             [Default=Undefined] optional boolean cancelable, 
+                             [Default=Undefined] optional DOMString oldURL, 
+                             [Default=Undefined] optional DOMString newURL); 
     [InitializedByEventConstructor] readonly attribute DOMString oldURL;
     [InitializedByEventConstructor] readonly attribute DOMString newURL;
 };
diff --git a/dom/KeyboardEvent.idl b/core/dom/KeyboardEvent.idl
similarity index 65%
rename from dom/KeyboardEvent.idl
rename to core/dom/KeyboardEvent.idl
index c9b30ce..6eefd3a 100644
--- a/dom/KeyboardEvent.idl
+++ b/core/dom/KeyboardEvent.idl
@@ -31,16 +31,16 @@
     readonly attribute boolean          altGraphKey;
 
     // FIXME: this does not match the version in the DOM spec.
-    void initKeyboardEvent([Optional=DefaultIsUndefined] DOMString type, 
-                           [Optional=DefaultIsUndefined] boolean canBubble, 
-                           [Optional=DefaultIsUndefined] boolean cancelable, 
-                           [Optional=DefaultIsUndefined] DOMWindow view, 
-                           [Optional=DefaultIsUndefined] DOMString keyIdentifier,
-                           [Optional=DefaultIsUndefined] unsigned long keyLocation,
-                           [Optional=DefaultIsUndefined] boolean ctrlKey,
-                           [Optional=DefaultIsUndefined] boolean altKey,
-                           [Optional=DefaultIsUndefined] boolean shiftKey,
-                           [Optional=DefaultIsUndefined] boolean metaKey,
-                           [Optional=DefaultIsUndefined] boolean altGraphKey);
+    void initKeyboardEvent([Default=Undefined] optional DOMString type, 
+                           [Default=Undefined] optional boolean canBubble, 
+                           [Default=Undefined] optional boolean cancelable, 
+                           [Default=Undefined] optional DOMWindow view, 
+                           [Default=Undefined] optional DOMString keyIdentifier,
+                           [Default=Undefined] optional unsigned long keyLocation,
+                           [Default=Undefined] optional boolean ctrlKey,
+                           [Default=Undefined] optional boolean altKey,
+                           [Default=Undefined] optional boolean shiftKey,
+                           [Default=Undefined] optional boolean metaKey,
+                           [Default=Undefined] optional boolean altGraphKey);
 };
 
diff --git a/dom/MessageChannel.idl b/core/dom/MessageChannel.idl
similarity index 100%
rename from dom/MessageChannel.idl
rename to core/dom/MessageChannel.idl
diff --git a/core/dom/MessageEvent.idl b/core/dom/MessageEvent.idl
new file mode 100644
index 0000000..928f2d7
--- /dev/null
+++ b/core/dom/MessageEvent.idl
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2007 Henry Mason <hmason@mac.com>
+ * 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.
+ *
+ * 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. 
+ *
+ */
+
+[
+    ConstructorTemplate=Event
+] interface MessageEvent : Event {
+    [InitializedByEventConstructor] readonly attribute DOMString origin;
+    [InitializedByEventConstructor] readonly attribute DOMString lastEventId;
+    [InitializedByEventConstructor] readonly attribute DOMWindow source;
+    [InitializedByEventConstructor, CachedAttribute, CustomGetter] readonly attribute any data;
+    [InitializedByEventConstructor, CustomGetter] readonly attribute Array ports;
+
+    [Custom] void initMessageEvent([Default=Undefined] optional DOMString typeArg, 
+                                   [Default=Undefined] optional boolean canBubbleArg, 
+                                   [Default=Undefined] optional boolean cancelableArg, 
+                                   [Default=Undefined] optional any dataArg, 
+                                   [Default=Undefined] optional DOMString originArg, 
+                                   [Default=Undefined] optional DOMString lastEventIdArg, 
+                                   [Default=Undefined] optional DOMWindow sourceArg, 
+                                   [Default=Undefined] optional Array messagePorts);
+
+    [Custom] void webkitInitMessageEvent([Default=Undefined] optional DOMString typeArg,
+                                         [Default=Undefined] optional boolean canBubbleArg,
+                                         [Default=Undefined] optional boolean cancelableArg,
+                                         [Default=Undefined] optional any dataArg,
+                                         [Default=Undefined] optional DOMString originArg,
+                                         [Default=Undefined] optional DOMString lastEventIdArg,
+                                         [Default=Undefined] optional DOMWindow sourceArg,
+                                         [Default=Undefined] optional Array transferables);
+};
+
diff --git a/dom/MessagePort.idl b/core/dom/MessagePort.idl
similarity index 90%
rename from dom/MessagePort.idl
rename to core/dom/MessagePort.idl
index 270b4e4..85514c2 100644
--- a/dom/MessagePort.idl
+++ b/core/dom/MessagePort.idl
@@ -31,7 +31,7 @@
 ] interface MessagePort {
 // We need to have something as an ObjC binding, because MessagePort is used in MessageEvent, which already has one,
 // but we don't want to actually expose the API while it is in flux.
-    [Custom, RaisesException] void postMessage(any message, [Optional] Array messagePorts);
+    [Custom, RaisesException] void postMessage(any message, optional Array messagePorts);
 
     void start();
     void close();
@@ -42,10 +42,10 @@
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
 
diff --git a/dom/MouseEvent.idl b/core/dom/MouseEvent.idl
similarity index 63%
rename from dom/MouseEvent.idl
rename to core/dom/MouseEvent.idl
index da60d42..888ac71 100644
--- a/dom/MouseEvent.idl
+++ b/core/dom/MouseEvent.idl
@@ -34,21 +34,21 @@
                                     readonly attribute long             webkitMovementX;
                                     readonly attribute long             webkitMovementY;
     
-     void initMouseEvent([Optional=DefaultIsUndefined] DOMString type, 
-                                       [Optional=DefaultIsUndefined] boolean canBubble, 
-                                       [Optional=DefaultIsUndefined] boolean cancelable, 
-                                       [Optional=DefaultIsUndefined] DOMWindow view, 
-                                       [Optional=DefaultIsUndefined] long detail, 
-                                       [Optional=DefaultIsUndefined] long screenX, 
-                                       [Optional=DefaultIsUndefined] long screenY, 
-                                       [Optional=DefaultIsUndefined] long clientX, 
-                                       [Optional=DefaultIsUndefined] long clientY, 
-                                       [Optional=DefaultIsUndefined] boolean ctrlKey, 
-                                       [Optional=DefaultIsUndefined] boolean altKey, 
-                                       [Optional=DefaultIsUndefined] boolean shiftKey, 
-                                       [Optional=DefaultIsUndefined] boolean metaKey, 
-                                       [Optional=DefaultIsUndefined] unsigned short button, 
-                                       [Optional=DefaultIsUndefined] EventTarget relatedTarget);
+     void initMouseEvent([Default=Undefined] optional DOMString type, 
+                                       [Default=Undefined] optional boolean canBubble, 
+                                       [Default=Undefined] optional boolean cancelable, 
+                                       [Default=Undefined] optional DOMWindow view, 
+                                       [Default=Undefined] optional long detail, 
+                                       [Default=Undefined] optional long screenX, 
+                                       [Default=Undefined] optional long screenY, 
+                                       [Default=Undefined] optional long clientX, 
+                                       [Default=Undefined] optional long clientY, 
+                                       [Default=Undefined] optional boolean ctrlKey, 
+                                       [Default=Undefined] optional boolean altKey, 
+                                       [Default=Undefined] optional boolean shiftKey, 
+                                       [Default=Undefined] optional boolean metaKey, 
+                                       [Default=Undefined] optional unsigned short button, 
+                                       [Default=Undefined] optional EventTarget relatedTarget);
 
     // extensions
     readonly attribute long             offsetX;
diff --git a/dom/MutationEvent.idl b/core/dom/MutationEvent.idl
similarity index 63%
rename from dom/MutationEvent.idl
rename to core/dom/MutationEvent.idl
index ad3afae..16c183e 100644
--- a/dom/MutationEvent.idl
+++ b/core/dom/MutationEvent.idl
@@ -31,14 +31,14 @@
     readonly attribute DOMString      attrName;
     readonly attribute unsigned short attrChange;
 
-     void initMutationEvent([Optional=DefaultIsUndefined] DOMString type, 
-                                          [Optional=DefaultIsUndefined] boolean canBubble, 
-                                          [Optional=DefaultIsUndefined] boolean cancelable, 
-                                          [Optional=DefaultIsUndefined] Node relatedNode, 
-                                          [Optional=DefaultIsUndefined] DOMString prevValue, 
-                                          [Optional=DefaultIsUndefined] DOMString newValue, 
-                                          [Optional=DefaultIsUndefined] DOMString attrName, 
-                                          [Optional=DefaultIsUndefined] unsigned short attrChange);
+     void initMutationEvent([Default=Undefined] optional DOMString type, 
+                                          [Default=Undefined] optional boolean canBubble, 
+                                          [Default=Undefined] optional boolean cancelable, 
+                                          [Default=Undefined] optional Node relatedNode, 
+                                          [Default=Undefined] optional DOMString prevValue, 
+                                          [Default=Undefined] optional DOMString newValue, 
+                                          [Default=Undefined] optional DOMString attrName, 
+                                          [Default=Undefined] optional unsigned short attrChange);
 
 };
 
diff --git a/dom/MutationObserver.idl b/core/dom/MutationObserver.idl
similarity index 96%
rename from dom/MutationObserver.idl
rename to core/dom/MutationObserver.idl
index 29aa06e..6df62b7 100644
--- a/dom/MutationObserver.idl
+++ b/core/dom/MutationObserver.idl
@@ -29,7 +29,7 @@
  */
 
 [
-    CustomConstructor,
+    CustomConstructor(MutationCallback callback),
     ImplementationLacksVTable
 ] interface MutationObserver {
     [RaisesException] void observe(Node target, Dictionary options);
diff --git a/dom/MutationRecord.idl b/core/dom/MutationRecord.idl
similarity index 100%
rename from dom/MutationRecord.idl
rename to core/dom/MutationRecord.idl
diff --git a/dom/NamedFlow.idl b/core/dom/NamedFlow.idl
similarity index 94%
rename from dom/NamedFlow.idl
rename to core/dom/NamedFlow.idl
index 6471ed2..147f089 100644
--- a/dom/NamedFlow.idl
+++ b/core/dom/NamedFlow.idl
@@ -42,9 +42,9 @@
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
diff --git a/dom/NamedNodeMap.idl b/core/dom/NamedNodeMap.idl
similarity index 64%
rename from dom/NamedNodeMap.idl
rename to core/dom/NamedNodeMap.idl
index b1da75d..8752794 100644
--- a/dom/NamedNodeMap.idl
+++ b/core/dom/NamedNodeMap.idl
@@ -22,17 +22,16 @@
     GenerateIsReachable=ImplElementRoot,
     IndexedGetter,
     CustomNamedGetter,
-    CustomIndexedGetter,
     ImplementationLacksVTable
 ] interface NamedNodeMap {
 
-    Node getNamedItem([Optional=DefaultIsUndefined] DOMString name);
+    Node getNamedItem([Default=Undefined] optional DOMString name);
 
-    [RaisesException] Node setNamedItem([Optional=DefaultIsUndefined] Node node);
+    [RaisesException] Node setNamedItem([Default=Undefined] optional Node node);
 
-    [RaisesException] Node removeNamedItem([Optional=DefaultIsUndefined] DOMString name);
+    [RaisesException] Node removeNamedItem([Default=Undefined] optional DOMString name);
 
-    Node item([Optional=DefaultIsUndefined] unsigned long index);
+    Node item([Default=Undefined] optional unsigned long index);
     
     readonly attribute unsigned long length;
 
@@ -40,13 +39,13 @@
     // Introduced in DOM Level 2:
 
     // FIXME: the implementation does take an exceptioncode parameter.
-    /*[RaisesException]*/ Node getNamedItemNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI, 
-                                              [Optional=DefaultIsUndefined] DOMString localName);
+    /*[RaisesException]*/ Node getNamedItemNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, 
+                                              [Default=Undefined] optional DOMString localName);
 
-    [RaisesException] Node setNamedItemNS([Optional=DefaultIsUndefined] Node node);
+    [RaisesException] Node setNamedItemNS([Default=Undefined] optional Node node);
 
-     [RaisesException] Node removeNamedItemNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI, 
-                                          [Optional=DefaultIsUndefined] DOMString localName);
+     [RaisesException] Node removeNamedItemNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, 
+                                          [Default=Undefined] optional DOMString localName);
 
 };
 
diff --git a/dom/Node.idl b/core/dom/Node.idl
similarity index 78%
rename from dom/Node.idl
rename to core/dom/Node.idl
index 6838afc..a693fde 100644
--- a/dom/Node.idl
+++ b/core/dom/Node.idl
@@ -52,19 +52,19 @@
     [PerWorldBindings] readonly attribute Node             nextSibling;
     [PerWorldBindings] readonly attribute Document         ownerDocument;
 
-    [Custom, PerWorldBindings, RaisesException] Node insertBefore(Node newChild, Node refChild);
-    [Custom, RaisesException] Node replaceChild(Node newChild, Node oldChild);
+    [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Node insertBefore(Node newChild, Node refChild);
+    [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Node replaceChild(Node newChild, Node oldChild);
     [Custom, PerWorldBindings, RaisesException] Node removeChild(Node oldChild);
-    [Custom, PerWorldBindings, RaisesException] Node appendChild(Node newChild);
+    [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Node appendChild(Node newChild);
 
     boolean            hasChildNodes();
     [DeliverCustomElementCallbacks, PerWorldBindings]
-    Node               cloneNode([Optional=DefaultIsUndefined] boolean deep);
+    Node               cloneNode([Default=Undefined] optional boolean deep);
     void               normalize();
 
     // Introduced in DOM Level 2:
-     boolean isSupported([Optional=DefaultIsUndefined] DOMString feature, 
-                                       [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString version);
+     boolean isSupported([Default=Undefined] optional DOMString feature, 
+                                       [TreatNullAs=NullString,Default=Undefined] optional DOMString version);
 
     [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString        namespaceURI;
              [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, SetterRaisesException] attribute DOMString        prefix;
@@ -76,11 +76,11 @@
              // FIXME: the spec says this can also raise on retrieval.
              [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, SetterRaisesException] attribute DOMString       textContent;
 
-    boolean            isSameNode([Optional=DefaultIsUndefined] Node other);
-    boolean            isEqualNode([Optional=DefaultIsUndefined] Node other);
-    [TreatReturnedNullStringAs=Null] DOMString          lookupPrefix([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI);
-    boolean            isDefaultNamespace([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI);
-    [TreatReturnedNullStringAs=Null] DOMString          lookupNamespaceURI([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString prefix);
+    boolean            isSameNode([Default=Undefined] optional Node other);
+    boolean            isEqualNode([Default=Undefined] optional Node other);
+    [TreatReturnedNullStringAs=Null] DOMString          lookupPrefix([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI);
+    boolean            isDefaultNamespace([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI);
+    [TreatReturnedNullStringAs=Null] DOMString          lookupNamespaceURI([TreatNullAs=NullString,Default=Undefined] optional DOMString prefix);
 
     // DocumentPosition
     const unsigned short      DOCUMENT_POSITION_DISCONNECTED = 0x01;
@@ -90,19 +90,19 @@
     const unsigned short      DOCUMENT_POSITION_CONTAINED_BY = 0x10;
     const unsigned short      DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
 
-    unsigned short     compareDocumentPosition([Optional=DefaultIsUndefined] Node other);
+    unsigned short     compareDocumentPosition([Default=Undefined] optional Node other);
 
     // Introduced in DOM4
-    boolean contains([Optional=DefaultIsUndefined] Node other);
+    boolean contains([Default=Undefined] optional Node other);
 
     // IE extensions
     [PerWorldBindings] readonly attribute Element          parentElement;
 
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
diff --git a/dom/NodeFilter.idl b/core/dom/NodeFilter.idl
similarity index 96%
rename from dom/NodeFilter.idl
rename to core/dom/NodeFilter.idl
index 3d22c8d..b42757c 100644
--- a/dom/NodeFilter.idl
+++ b/core/dom/NodeFilter.idl
@@ -41,7 +41,7 @@
     const unsigned long       SHOW_DOCUMENT_FRAGMENT         = 0x00000400;
     const unsigned long       SHOW_NOTATION                  = 0x00000800;
 
-    [CallWith=ScriptState] short acceptNode([Optional=DefaultIsUndefined] Node n);
+    [CallWith=ScriptState] short acceptNode([Default=Undefined] optional Node n);
 
 };
 
diff --git a/dom/NodeIterator.idl b/core/dom/NodeIterator.idl
similarity index 100%
rename from dom/NodeIterator.idl
rename to core/dom/NodeIterator.idl
diff --git a/dom/NodeList.idl b/core/dom/NodeList.idl
similarity index 93%
rename from dom/NodeList.idl
rename to core/dom/NodeList.idl
index 6e6537c..4a6394d 100644
--- a/dom/NodeList.idl
+++ b/core/dom/NodeList.idl
@@ -26,7 +26,7 @@
     SkipVTableValidation
 ] interface NodeList {
 
-    Node item([IsIndex,Optional=DefaultIsUndefined] unsigned long index);
+    Node item([IsIndex,Default=Undefined] optional unsigned long index);
 
     readonly attribute unsigned long length;
 
diff --git a/dom/Notation.idl b/core/dom/Notation.idl
similarity index 100%
rename from dom/Notation.idl
rename to core/dom/Notation.idl
diff --git a/dom/OverflowEvent.idl b/core/dom/OverflowEvent.idl
similarity index 100%
rename from dom/OverflowEvent.idl
rename to core/dom/OverflowEvent.idl
diff --git a/dom/PageTransitionEvent.idl b/core/dom/PageTransitionEvent.idl
similarity index 100%
rename from dom/PageTransitionEvent.idl
rename to core/dom/PageTransitionEvent.idl
diff --git a/dom/PopStateEvent.idl b/core/dom/PopStateEvent.idl
similarity index 100%
rename from dom/PopStateEvent.idl
rename to core/dom/PopStateEvent.idl
diff --git a/dom/ProcessingInstruction.idl b/core/dom/ProcessingInstruction.idl
similarity index 100%
rename from dom/ProcessingInstruction.idl
rename to core/dom/ProcessingInstruction.idl
diff --git a/dom/ProgressEvent.idl b/core/dom/ProgressEvent.idl
similarity index 100%
rename from dom/ProgressEvent.idl
rename to core/dom/ProgressEvent.idl
diff --git a/dom/PropertyNodeList.idl b/core/dom/PropertyNodeList.idl
similarity index 100%
rename from dom/PropertyNodeList.idl
rename to core/dom/PropertyNodeList.idl
diff --git a/core/dom/Range.idl b/core/dom/Range.idl
new file mode 100644
index 0000000..3504bad
--- /dev/null
+++ b/core/dom/Range.idl
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.
+ * 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.
+ */
+
+// Introduced in DOM Level 2:
+[
+    ImplementationLacksVTable
+] interface Range {
+
+    [GetterRaisesException] readonly attribute Node startContainer;
+    [GetterRaisesException] readonly attribute long startOffset;
+    [GetterRaisesException] readonly attribute Node endContainer;
+    [GetterRaisesException] readonly attribute long endOffset;
+    [GetterRaisesException] readonly attribute boolean collapsed;
+    [GetterRaisesException] readonly attribute Node commonAncestorContainer;
+
+     [RaisesException] void setStart([Default=Undefined] optional Node refNode, 
+                                 [Default=Undefined] optional long offset);
+     [RaisesException] void setEnd([Default=Undefined] optional Node refNode, 
+                               [Default=Undefined] optional long offset);
+    [RaisesException] void setStartBefore([Default=Undefined] optional Node refNode);
+    [RaisesException] void setStartAfter([Default=Undefined] optional Node refNode);
+    [RaisesException] void setEndBefore([Default=Undefined] optional Node refNode);
+    [RaisesException] void setEndAfter([Default=Undefined] optional Node refNode);
+    [RaisesException] void collapse([Default=Undefined] optional boolean toStart);
+    [RaisesException] void selectNode([Default=Undefined] optional Node refNode);
+    [RaisesException] void selectNodeContents([Default=Undefined] optional Node refNode);
+
+    // CompareHow
+    const unsigned short START_TO_START = 0;
+    const unsigned short START_TO_END   = 1;
+    const unsigned short END_TO_END     = 2;
+    const unsigned short END_TO_START   = 3;
+
+     [RaisesException] short compareBoundaryPoints([Default=Undefined] optional CompareHow how,
+                                               [Default=Undefined] optional Range sourceRange);
+
+    [RaisesException] void deleteContents();
+    [RaisesException] DocumentFragment extractContents();
+    [RaisesException] DocumentFragment cloneContents();
+    [RaisesException] void insertNode([Default=Undefined] optional Node newNode);
+    [RaisesException] void surroundContents([Default=Undefined] optional Node newParent);
+    [RaisesException] Range cloneRange();
+    [RaisesException] DOMString toString();
+
+    [RaisesException] void detach();
+
+    // CSSOM View Module API extensions
+
+    ClientRectList getClientRects();
+    ClientRect getBoundingClientRect();
+
+    // extensions
+
+    [RaisesException] DocumentFragment createContextualFragment([Default=Undefined] optional DOMString html);
+
+    // WebKit extensions
+
+    [RaisesException] boolean intersectsNode([Default=Undefined] optional Node refNode);
+
+    [RaisesException] short compareNode([Default=Undefined] optional Node refNode);
+
+    // CompareResults
+    const unsigned short NODE_BEFORE           = 0;
+    const unsigned short NODE_AFTER            = 1;
+    const unsigned short NODE_BEFORE_AND_AFTER = 2;
+    const unsigned short NODE_INSIDE           = 3;
+
+    [RaisesException] short comparePoint([Default=Undefined] optional Node refNode, 
+                       [Default=Undefined] optional long offset);
+
+    [RaisesException] boolean isPointInRange([Default=Undefined] optional Node refNode, 
+                           [Default=Undefined] optional long offset);
+
+    [RaisesException] void expand([Default=Undefined] optional DOMString unit);
+};
+
diff --git a/dom/RangeException.idl b/core/dom/RangeException.idl
similarity index 100%
rename from dom/RangeException.idl
rename to core/dom/RangeException.idl
diff --git a/dom/RequestAnimationFrameCallback.idl b/core/dom/RequestAnimationFrameCallback.idl
similarity index 100%
rename from dom/RequestAnimationFrameCallback.idl
rename to core/dom/RequestAnimationFrameCallback.idl
diff --git a/dom/SecurityPolicyViolationEvent.idl b/core/dom/SecurityPolicyViolationEvent.idl
similarity index 100%
rename from dom/SecurityPolicyViolationEvent.idl
rename to core/dom/SecurityPolicyViolationEvent.idl
diff --git a/dom/ShadowRoot.idl b/core/dom/ShadowRoot.idl
similarity index 65%
rename from dom/ShadowRoot.idl
rename to core/dom/ShadowRoot.idl
index 220d4a1..8d95548 100644
--- a/dom/ShadowRoot.idl
+++ b/core/dom/ShadowRoot.idl
@@ -29,16 +29,16 @@
     attribute boolean applyAuthorStyles;
     attribute boolean resetStyleInheritance;
 
-    [TreatNullAs=NullString, DeliverCustomElementCallbacks, SetterRaisesException] attribute DOMString innerHTML;
+    [TreatNullAs=NullString, DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds, SetterRaisesException] attribute DOMString innerHTML;
 
-    [RaisesException] Node cloneNode([Optional=DefaultIsUndefined] boolean deep);
+    [RaisesException] Node cloneNode([Default=Undefined] optional boolean deep);
     DOMSelection getSelection();
-    Element getElementById([Optional=DefaultIsUndefined] DOMString elementId);
-    NodeList getElementsByClassName([Optional=DefaultIsUndefined] DOMString className);
-    NodeList getElementsByTagName([Optional=DefaultIsUndefined] DOMString tagName);
-    NodeList getElementsByTagNameNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
-                                    [Optional=DefaultIsUndefined] DOMString localName);
+    Element getElementById([Default=Undefined] optional DOMString elementId);
+    NodeList getElementsByClassName([Default=Undefined] optional DOMString className);
+    NodeList getElementsByTagName([Default=Undefined] optional DOMString tagName);
+    NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+                                    [Default=Undefined] optional DOMString localName);
 
-    Element elementFromPoint([Optional=DefaultIsUndefined] long x, 
-                             [Optional=DefaultIsUndefined] long y);
+    Element elementFromPoint([Default=Undefined] optional long x, 
+                             [Default=Undefined] optional long y);
 };
diff --git a/dom/StringCallback.idl b/core/dom/StringCallback.idl
similarity index 100%
rename from dom/StringCallback.idl
rename to core/dom/StringCallback.idl
diff --git a/dom/Text.idl b/core/dom/Text.idl
similarity index 84%
rename from dom/Text.idl
rename to core/dom/Text.idl
index 630c85b..62d6ca3 100644
--- a/dom/Text.idl
+++ b/core/dom/Text.idl
@@ -22,11 +22,11 @@
 
     // DOM Level 1
 
-    [RaisesException] Text splitText([IsIndex,Optional=DefaultIsUndefined] unsigned long offset);
+    [RaisesException] Text splitText([IsIndex,Default=Undefined] optional unsigned long offset);
 
     // Introduced in DOM Level 3:
     readonly attribute DOMString       wholeText;
-    [RaisesException] Text               replaceWholeText([Optional=DefaultIsUndefined] DOMString content);
+    [RaisesException] Text               replaceWholeText([Default=Undefined] optional DOMString content);
     // ShadowAware API
     [EnabledAtRuntime=shadowDOM, ImplementedAs=insertionParentForBinding, PerWorldBindings] readonly attribute Node webkitInsertionParent;
 
diff --git a/dom/TextEvent.idl b/core/dom/TextEvent.idl
similarity index 79%
rename from dom/TextEvent.idl
rename to core/dom/TextEvent.idl
index fe72de0..4af1a6f 100644
--- a/dom/TextEvent.idl
+++ b/core/dom/TextEvent.idl
@@ -28,11 +28,11 @@
 
     readonly attribute DOMString data;
 
-    void initTextEvent([Optional=DefaultIsUndefined] DOMString typeArg, 
-                       [Optional=DefaultIsUndefined] boolean canBubbleArg, 
-                       [Optional=DefaultIsUndefined] boolean cancelableArg, 
-                       [Optional=DefaultIsUndefined] DOMWindow viewArg, 
-                       [Optional=DefaultIsUndefined] DOMString dataArg);
+    void initTextEvent([Default=Undefined] optional DOMString typeArg, 
+                       [Default=Undefined] optional boolean canBubbleArg, 
+                       [Default=Undefined] optional boolean cancelableArg, 
+                       [Default=Undefined] optional DOMWindow viewArg, 
+                       [Default=Undefined] optional DOMString dataArg);
 
 };
 
diff --git a/dom/Touch.idl b/core/dom/Touch.idl
similarity index 98%
rename from dom/Touch.idl
rename to core/dom/Touch.idl
index 7486c6f..4625083 100644
--- a/dom/Touch.idl
+++ b/core/dom/Touch.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=TOUCH_EVENTS,
     ImplementationLacksVTable
 ] interface Touch {
     readonly attribute long             clientX;
diff --git a/dom/TouchEvent.idl b/core/dom/TouchEvent.idl
similarity index 62%
rename from dom/TouchEvent.idl
rename to core/dom/TouchEvent.idl
index a33c1a0..236aff2 100644
--- a/dom/TouchEvent.idl
+++ b/core/dom/TouchEvent.idl
@@ -23,9 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Conditional=TOUCH_EVENTS
-] interface TouchEvent : UIEvent {
+interface TouchEvent : UIEvent {
     readonly attribute TouchList touches;
     readonly attribute TouchList targetTouches;
     readonly attribute TouchList changedTouches;
@@ -34,17 +32,17 @@
     readonly attribute boolean altKey;
     readonly attribute boolean metaKey;
 
-    void initTouchEvent([Optional=DefaultIsUndefined] TouchList touches,
-                        [Optional=DefaultIsUndefined] TouchList targetTouches,
-                        [Optional=DefaultIsUndefined] TouchList changedTouches,
-                        [Optional=DefaultIsUndefined] DOMString type,
-                        [Optional=DefaultIsUndefined] DOMWindow view,
-                        [Optional=DefaultIsUndefined] long screenX, 
-                        [Optional=DefaultIsUndefined] long screenY, 
-                        [Optional=DefaultIsUndefined] long clientX, 
-                        [Optional=DefaultIsUndefined] long clientY,
-                        [Optional=DefaultIsUndefined] boolean ctrlKey,
-                        [Optional=DefaultIsUndefined] boolean altKey,
-                        [Optional=DefaultIsUndefined] boolean shiftKey,
-                        [Optional=DefaultIsUndefined] boolean metaKey);
+    void initTouchEvent([Default=Undefined] optional TouchList touches,
+                        [Default=Undefined] optional TouchList targetTouches,
+                        [Default=Undefined] optional TouchList changedTouches,
+                        [Default=Undefined] optional DOMString type,
+                        [Default=Undefined] optional DOMWindow view,
+                        [Default=Undefined] optional long screenX, 
+                        [Default=Undefined] optional long screenY, 
+                        [Default=Undefined] optional long clientX, 
+                        [Default=Undefined] optional long clientY,
+                        [Default=Undefined] optional boolean ctrlKey,
+                        [Default=Undefined] optional boolean altKey,
+                        [Default=Undefined] optional boolean shiftKey,
+                        [Default=Undefined] optional boolean metaKey);
 };
diff --git a/dom/TouchList.idl b/core/dom/TouchList.idl
similarity index 97%
rename from dom/TouchList.idl
rename to core/dom/TouchList.idl
index 811e0a7..acbc149 100644
--- a/dom/TouchList.idl
+++ b/core/dom/TouchList.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=TOUCH_EVENTS,
     IndexedGetter,
     ImplementationLacksVTable
 ] interface TouchList {
diff --git a/dom/TransitionEvent.idl b/core/dom/TransitionEvent.idl
similarity index 100%
rename from dom/TransitionEvent.idl
rename to core/dom/TransitionEvent.idl
diff --git a/dom/TreeWalker.idl b/core/dom/TreeWalker.idl
similarity index 100%
rename from dom/TreeWalker.idl
rename to core/dom/TreeWalker.idl
diff --git a/dom/UIEvent.idl b/core/dom/UIEvent.idl
similarity index 77%
rename from dom/UIEvent.idl
rename to core/dom/UIEvent.idl
index c7e1fab..415078a 100644
--- a/dom/UIEvent.idl
+++ b/core/dom/UIEvent.idl
@@ -23,11 +23,11 @@
     [InitializedByEventConstructor] readonly attribute DOMWindow view;
     [InitializedByEventConstructor] readonly attribute long detail;
     
-     void initUIEvent([Optional=DefaultIsUndefined] DOMString type, 
-                                    [Optional=DefaultIsUndefined] boolean canBubble, 
-                                    [Optional=DefaultIsUndefined] boolean cancelable, 
-                                    [Optional=DefaultIsUndefined] DOMWindow view, 
-                                    [Optional=DefaultIsUndefined] long detail);
+     void initUIEvent([Default=Undefined] optional DOMString type, 
+                                    [Default=Undefined] optional boolean canBubble, 
+                                    [Default=Undefined] optional boolean cancelable, 
+                                    [Default=Undefined] optional DOMWindow view, 
+                                    [Default=Undefined] optional long detail);
 
     // extensions
     readonly attribute long                 keyCode;
diff --git a/dom/WheelEvent.idl b/core/dom/WheelEvent.idl
similarity index 64%
rename from dom/WheelEvent.idl
rename to core/dom/WheelEvent.idl
index 44a6845..ec923b3 100644
--- a/dom/WheelEvent.idl
+++ b/core/dom/WheelEvent.idl
@@ -34,15 +34,15 @@
     // WebKit Extension
     readonly attribute boolean webkitDirectionInvertedFromDevice;
 
-    void initWebKitWheelEvent([Optional=DefaultIsUndefined] long wheelDeltaX,
-                              [Optional=DefaultIsUndefined] long wheelDeltaY, 
-                              [Optional=DefaultIsUndefined] DOMWindow view, 
-                              [Optional=DefaultIsUndefined] long screenX,
-                              [Optional=DefaultIsUndefined] long screenY,
-                              [Optional=DefaultIsUndefined] long clientX,
-                              [Optional=DefaultIsUndefined] long clientY,
-                              [Optional=DefaultIsUndefined] boolean ctrlKey,
-                              [Optional=DefaultIsUndefined] boolean altKey,
-                              [Optional=DefaultIsUndefined] boolean shiftKey,
-                              [Optional=DefaultIsUndefined] boolean metaKey);
+    void initWebKitWheelEvent([Default=Undefined] optional long wheelDeltaX,
+                              [Default=Undefined] optional long wheelDeltaY, 
+                              [Default=Undefined] optional DOMWindow view, 
+                              [Default=Undefined] optional long screenX,
+                              [Default=Undefined] optional long screenY,
+                              [Default=Undefined] optional long clientX,
+                              [Default=Undefined] optional long clientY,
+                              [Default=Undefined] optional boolean ctrlKey,
+                              [Default=Undefined] optional boolean altKey,
+                              [Default=Undefined] optional boolean shiftKey,
+                              [Default=Undefined] optional boolean metaKey);
 };
diff --git a/fileapi/Blob.idl b/core/fileapi/Blob.idl
similarity index 86%
rename from fileapi/Blob.idl
rename to core/fileapi/Blob.idl
index 4ac641b..d8ef965 100644
--- a/fileapi/Blob.idl
+++ b/core/fileapi/Blob.idl
@@ -30,11 +30,12 @@
 
 [
     CustomToJSObject,
-    CustomConstructor
+    CustomConstructor,
+    CustomConstructor(sequence<any> blobParts, optional BlobPropertyBag options)
 ] interface Blob {
     readonly attribute unsigned long long size;
     readonly attribute DOMString type;
 
-    Blob slice([Optional] long long start, [Optional] long long end, [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString contentType);
+    Blob slice(optional long long start, optional long long end, [TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString contentType);
 };
 
diff --git a/fileapi/File.idl b/core/fileapi/File.idl
similarity index 91%
rename from fileapi/File.idl
rename to core/fileapi/File.idl
index 40e3d0d..4e653fd 100644
--- a/fileapi/File.idl
+++ b/core/fileapi/File.idl
@@ -26,8 +26,6 @@
 interface File : Blob {
     readonly attribute DOMString name;
     readonly attribute Date lastModifiedDate;
-#if defined(ENABLE_DIRECTORY_UPLOAD) && ENABLE_DIRECTORY_UPLOAD
-    readonly attribute DOMString webkitRelativePath;
-#endif
+    [EnabledAtRuntime=directoryUpload] readonly attribute DOMString webkitRelativePath;
 };
 
diff --git a/fileapi/FileError.idl b/core/fileapi/FileError.idl
similarity index 100%
rename from fileapi/FileError.idl
rename to core/fileapi/FileError.idl
diff --git a/fileapi/FileException.idl b/core/fileapi/FileException.idl
similarity index 100%
rename from fileapi/FileException.idl
rename to core/fileapi/FileException.idl
diff --git a/fileapi/FileList.idl b/core/fileapi/FileList.idl
similarity index 100%
rename from fileapi/FileList.idl
rename to core/fileapi/FileList.idl
diff --git a/fileapi/FileReader.idl b/core/fileapi/FileReader.idl
similarity index 92%
rename from fileapi/FileReader.idl
rename to core/fileapi/FileReader.idl
index ad74a14..d37f1c3 100644
--- a/fileapi/FileReader.idl
+++ b/core/fileapi/FileReader.idl
@@ -44,7 +44,7 @@
     // async read methods
     [RaisesException] void readAsArrayBuffer(Blob blob);
     [RaisesException] void readAsBinaryString(Blob blob);
-    [RaisesException] void readAsText(Blob blob, [Optional] DOMString encoding);
+    [RaisesException] void readAsText(Blob blob, optional DOMString encoding);
     [RaisesException] void readAsDataURL(Blob blob);
 
     void abort();
@@ -57,10 +57,10 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 
     attribute EventListener onloadstart;
diff --git a/fileapi/FileReaderSync.idl b/core/fileapi/FileReaderSync.idl
similarity index 96%
rename from fileapi/FileReaderSync.idl
rename to core/fileapi/FileReaderSync.idl
index 4fe6270..a36e4c3 100644
--- a/fileapi/FileReaderSync.idl
+++ b/core/fileapi/FileReaderSync.idl
@@ -33,6 +33,6 @@
 ] interface FileReaderSync {
     [CallWith=ScriptExecutionContext, RaisesException] ArrayBuffer readAsArrayBuffer(Blob blob);
     [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsBinaryString(Blob blob);
-    [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsText(Blob blob, [Optional] DOMString encoding);
+    [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsText(Blob blob, optional DOMString encoding);
     [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsDataURL(Blob blob);
 };
diff --git a/html/DOMFormData.idl b/core/html/DOMFormData.idl
similarity index 86%
rename from html/DOMFormData.idl
rename to core/html/DOMFormData.idl
index 206a76c..25d9ed1 100644
--- a/html/DOMFormData.idl
+++ b/core/html/DOMFormData.idl
@@ -29,14 +29,14 @@
  */
 
 [
-    CustomConstructor,
+    CustomConstructor(optional HTMLFormElement form),
     InterfaceName=FormData,
     ImplementationLacksVTable
 ] interface DOMFormData {
     // void append(DOMString name, DOMString value);
     // void append(DOMString name, Blob value, optional DOMString filename);
-    [Custom] void append([Optional=DefaultIsUndefined] DOMString name, 
-                         [Optional=DefaultIsUndefined] DOMString value,
-                         [Optional=DefaultIsUndefined] DOMString filename);
+    [Custom] void append([Default=Undefined] optional DOMString name, 
+                         [Default=Undefined] optional DOMString value,
+                         [Default=Undefined] optional DOMString filename);
 };
 
diff --git a/html/DOMSettableTokenList.idl b/core/html/DOMSettableTokenList.idl
similarity index 100%
rename from html/DOMSettableTokenList.idl
rename to core/html/DOMSettableTokenList.idl
diff --git a/html/DOMTokenList.idl b/core/html/DOMTokenList.idl
similarity index 95%
rename from html/DOMTokenList.idl
rename to core/html/DOMTokenList.idl
index cc1ddcd..2fb088d 100644
--- a/html/DOMTokenList.idl
+++ b/core/html/DOMTokenList.idl
@@ -32,7 +32,7 @@
     [RaisesException] boolean contains(DOMString token);
     [RaisesException] void add(DOMString... tokens);
     [RaisesException] void remove(DOMString... tokens);
-    [RaisesException] boolean toggle(DOMString token, [Optional] boolean force);
+    [RaisesException] boolean toggle(DOMString token, optional boolean force);
     [NotEnumerable] DOMString toString();
 };
 
diff --git a/html/DOMURL.idl b/core/html/DOMURL.idl
similarity index 100%
rename from html/DOMURL.idl
rename to core/html/DOMURL.idl
diff --git a/html/HTMLAllCollection.idl b/core/html/HTMLAllCollection.idl
similarity index 95%
rename from html/HTMLAllCollection.idl
rename to core/html/HTMLAllCollection.idl
index be05d36..3fcf555 100644
--- a/html/HTMLAllCollection.idl
+++ b/core/html/HTMLAllCollection.idl
@@ -32,7 +32,7 @@
     DependentLifetime,
 ] interface HTMLAllCollection {
     readonly attribute unsigned long length;
-    [Custom] Node item([Optional=DefaultIsUndefined] unsigned long index);
+    [Custom] Node item([Default=Undefined] optional unsigned long index);
     [Custom] Node namedItem(DOMString name);
     // FIXME: This should return an HTMLAllCollection.
     NodeList tags(DOMString name);
diff --git a/html/HTMLAnchorElement.idl b/core/html/HTMLAnchorElement.idl
similarity index 100%
rename from html/HTMLAnchorElement.idl
rename to core/html/HTMLAnchorElement.idl
diff --git a/html/HTMLAppletElement.idl b/core/html/HTMLAppletElement.idl
similarity index 100%
rename from html/HTMLAppletElement.idl
rename to core/html/HTMLAppletElement.idl
diff --git a/html/HTMLAreaElement.idl b/core/html/HTMLAreaElement.idl
similarity index 100%
rename from html/HTMLAreaElement.idl
rename to core/html/HTMLAreaElement.idl
diff --git a/html/HTMLAudioElement.idl b/core/html/HTMLAudioElement.idl
similarity index 94%
rename from html/HTMLAudioElement.idl
rename to core/html/HTMLAudioElement.idl
index 1e86817..1f2f903 100644
--- a/html/HTMLAudioElement.idl
+++ b/core/html/HTMLAudioElement.idl
@@ -25,6 +25,6 @@
 
 [
     Conditional=VIDEO,
-    NamedConstructor=Audio([Optional=DefaultIsNullString] DOMString src)
+    NamedConstructor=Audio([Default=NullString] optional DOMString src)
 ] interface HTMLAudioElement : HTMLMediaElement {
 };
diff --git a/html/HTMLBRElement.idl b/core/html/HTMLBRElement.idl
similarity index 100%
rename from html/HTMLBRElement.idl
rename to core/html/HTMLBRElement.idl
diff --git a/html/HTMLBaseElement.idl b/core/html/HTMLBaseElement.idl
similarity index 100%
rename from html/HTMLBaseElement.idl
rename to core/html/HTMLBaseElement.idl
diff --git a/html/HTMLBaseFontElement.idl b/core/html/HTMLBaseFontElement.idl
similarity index 100%
rename from html/HTMLBaseFontElement.idl
rename to core/html/HTMLBaseFontElement.idl
diff --git a/html/HTMLBodyElement.idl b/core/html/HTMLBodyElement.idl
similarity index 100%
rename from html/HTMLBodyElement.idl
rename to core/html/HTMLBodyElement.idl
diff --git a/html/HTMLButtonElement.idl b/core/html/HTMLButtonElement.idl
similarity index 100%
rename from html/HTMLButtonElement.idl
rename to core/html/HTMLButtonElement.idl
diff --git a/html/HTMLCanvasElement.idl b/core/html/HTMLCanvasElement.idl
similarity index 88%
rename from html/HTMLCanvasElement.idl
rename to core/html/HTMLCanvasElement.idl
index aa5269b..28af6fa 100644
--- a/html/HTMLCanvasElement.idl
+++ b/core/html/HTMLCanvasElement.idl
@@ -29,9 +29,9 @@
     attribute long width;
     attribute long height;
 
-    [Custom, RaisesException] DOMString toDataURL([TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString type);
+    [Custom, RaisesException] DOMString toDataURL([TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString type);
 
     // The custom binding is needed to handle context creation attributes.
-    [Custom] any getContext([Optional=DefaultIsUndefined] DOMString contextId);
+    [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] any getContext([Default=Undefined] optional DOMString contextId);
 };
 
diff --git a/html/HTMLCollection.idl b/core/html/HTMLCollection.idl
similarity index 87%
rename from html/HTMLCollection.idl
rename to core/html/HTMLCollection.idl
index da28cc7..037b6f0 100644
--- a/html/HTMLCollection.idl
+++ b/core/html/HTMLCollection.idl
@@ -20,7 +20,7 @@
 
 [
     IndexedGetter,
-    CustomNamedGetter,
+    NamedGetter,
     CustomToJSObject,
     GenerateIsReachable=ImplOwnerNodeRoot,
     DependentLifetime,
@@ -28,7 +28,7 @@
     SkipVTableValidation
 ] interface HTMLCollection {
     readonly attribute unsigned long length;
-    Node item([Optional=DefaultIsUndefined] unsigned long index);
-    Node namedItem([Optional=DefaultIsUndefined] DOMString name);
+    Node item([Default=Undefined] optional unsigned long index);
+    Node namedItem([Default=Undefined] optional DOMString name);
 };
 
diff --git a/html/HTMLDListElement.idl b/core/html/HTMLDListElement.idl
similarity index 100%
rename from html/HTMLDListElement.idl
rename to core/html/HTMLDListElement.idl
diff --git a/html/HTMLDataListElement.idl b/core/html/HTMLDataListElement.idl
similarity index 100%
rename from html/HTMLDataListElement.idl
rename to core/html/HTMLDataListElement.idl
diff --git a/html/HTMLDetailsElement.idl b/core/html/HTMLDetailsElement.idl
similarity index 91%
rename from html/HTMLDetailsElement.idl
rename to core/html/HTMLDetailsElement.idl
index ca3894e..8909fc8 100644
--- a/html/HTMLDetailsElement.idl
+++ b/core/html/HTMLDetailsElement.idl
@@ -17,9 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-[
-    Conditional=DETAILS_ELEMENT
-] interface HTMLDetailsElement : HTMLElement {
+interface HTMLDetailsElement : HTMLElement {
     [Reflect] attribute boolean open;
 };
 
diff --git a/html/HTMLDialogElement.idl b/core/html/HTMLDialogElement.idl
similarity index 100%
rename from html/HTMLDialogElement.idl
rename to core/html/HTMLDialogElement.idl
diff --git a/html/HTMLDirectoryElement.idl b/core/html/HTMLDirectoryElement.idl
similarity index 100%
rename from html/HTMLDirectoryElement.idl
rename to core/html/HTMLDirectoryElement.idl
diff --git a/html/HTMLDivElement.idl b/core/html/HTMLDivElement.idl
similarity index 100%
rename from html/HTMLDivElement.idl
rename to core/html/HTMLDivElement.idl
diff --git a/html/HTMLDocument.idl b/core/html/HTMLDocument.idl
similarity index 88%
rename from html/HTMLDocument.idl
rename to core/html/HTMLDocument.idl
index 7fdcf55..ec69153 100644
--- a/html/HTMLDocument.idl
+++ b/core/html/HTMLDocument.idl
@@ -25,8 +25,8 @@
 ] interface HTMLDocument : Document {
     [Custom] void open();
     void close();
-    [Custom] void write([Optional=DefaultIsUndefined] DOMString text);
-    [Custom] void writeln([Optional=DefaultIsUndefined] DOMString text);
+    [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void write([Default=Undefined] optional DOMString text);
+    [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void writeln([Default=Undefined] optional DOMString text);
 
     readonly attribute HTMLCollection embeds;
     readonly attribute HTMLCollection plugins;
diff --git a/html/HTMLElement.idl b/core/html/HTMLElement.idl
similarity index 69%
rename from html/HTMLElement.idl
rename to core/html/HTMLElement.idl
index d39c72d..4b1cfa7 100644
--- a/html/HTMLElement.idl
+++ b/core/html/HTMLElement.idl
@@ -42,12 +42,12 @@
              [TreatNullAs=NullString, DeliverCustomElementCallbacks, SetterRaisesException] attribute DOMString outerHTML;
              [TreatNullAs=NullString, SetterRaisesException] attribute DOMString outerText;
 
-    [RaisesException] Element insertAdjacentElement([Optional=DefaultIsUndefined] DOMString where,
-                                  [Optional=DefaultIsUndefined] Element element);
-    [DeliverCustomElementCallbacks, RaisesException] void insertAdjacentHTML([Optional=DefaultIsUndefined] DOMString where,
-                            [Optional=DefaultIsUndefined] DOMString html);
-    [RaisesException] void insertAdjacentText([Optional=DefaultIsUndefined] DOMString where,
-                            [Optional=DefaultIsUndefined] DOMString text);
+    [RaisesException] Element insertAdjacentElement([Default=Undefined] optional DOMString where,
+                                  [Default=Undefined] optional Element element);
+    [DeliverCustomElementCallbacks, RaisesException] void insertAdjacentHTML([Default=Undefined] optional DOMString where,
+                            [Default=Undefined] optional DOMString html);
+    [RaisesException] void insertAdjacentText([Default=Undefined] optional DOMString where,
+                            [Default=Undefined] optional DOMString text);
 
     readonly attribute HTMLCollection children;
 
@@ -56,19 +56,6 @@
 
              attribute boolean spellcheck;
 
-             [Conditional=MICRODATA, Reflect] attribute boolean itemScope;
-    [Conditional=MICRODATA] readonly attribute DOMSettableTokenList itemType;
-             [Conditional=MICRODATA, Reflect, URL] attribute DOMString itemId;
-
-    [Conditional=MICRODATA] readonly attribute DOMSettableTokenList itemRef;
-    [Conditional=MICRODATA] readonly attribute DOMSettableTokenList itemProp;
-
-#if defined(ENABLE_MICRODATA) && ENABLE_MICRODATA
-    [Conditional=MICRODATA] readonly attribute HTMLPropertiesCollection properties;
-#endif
-
-    [Conditional=MICRODATA, Custom, SetterRaisesException] attribute any itemValue;
-
     void click();
 };
 
diff --git a/html/HTMLEmbedElement.idl b/core/html/HTMLEmbedElement.idl
similarity index 100%
rename from html/HTMLEmbedElement.idl
rename to core/html/HTMLEmbedElement.idl
diff --git a/html/HTMLFieldSetElement.idl b/core/html/HTMLFieldSetElement.idl
similarity index 100%
rename from html/HTMLFieldSetElement.idl
rename to core/html/HTMLFieldSetElement.idl
diff --git a/html/HTMLFontElement.idl b/core/html/HTMLFontElement.idl
similarity index 100%
rename from html/HTMLFontElement.idl
rename to core/html/HTMLFontElement.idl
diff --git a/html/HTMLFormControlsCollection.idl b/core/html/HTMLFormControlsCollection.idl
similarity index 93%
rename from html/HTMLFormControlsCollection.idl
rename to core/html/HTMLFormControlsCollection.idl
index 9c0ecd9..ba47fd3 100644
--- a/html/HTMLFormControlsCollection.idl
+++ b/core/html/HTMLFormControlsCollection.idl
@@ -24,5 +24,5 @@
     GenerateIsReachable=ImplOwnerNodeRoot,
     DependentLifetime,
 ] interface HTMLFormControlsCollection : HTMLCollection {
-    [Custom] Node namedItem([Optional=DefaultIsUndefined] DOMString name);
+    [Custom] Node namedItem([Default=Undefined] optional DOMString name);
 };
diff --git a/html/HTMLFormElement.idl b/core/html/HTMLFormElement.idl
similarity index 98%
rename from html/HTMLFormElement.idl
rename to core/html/HTMLFormElement.idl
index 24703c6..fdb1468 100644
--- a/html/HTMLFormElement.idl
+++ b/core/html/HTMLFormElement.idl
@@ -19,7 +19,6 @@
  */
 
 [
-    IndexedGetter,
     CustomIndexedGetter,
     CustomNamedGetter
 ] interface HTMLFormElement : HTMLElement {
diff --git a/html/HTMLFrameElement.idl b/core/html/HTMLFrameElement.idl
similarity index 100%
rename from html/HTMLFrameElement.idl
rename to core/html/HTMLFrameElement.idl
diff --git a/html/HTMLFrameSetElement.idl b/core/html/HTMLFrameSetElement.idl
similarity index 100%
rename from html/HTMLFrameSetElement.idl
rename to core/html/HTMLFrameSetElement.idl
diff --git a/html/HTMLHRElement.idl b/core/html/HTMLHRElement.idl
similarity index 100%
rename from html/HTMLHRElement.idl
rename to core/html/HTMLHRElement.idl
diff --git a/html/HTMLHeadElement.idl b/core/html/HTMLHeadElement.idl
similarity index 100%
rename from html/HTMLHeadElement.idl
rename to core/html/HTMLHeadElement.idl
diff --git a/html/HTMLHeadingElement.idl b/core/html/HTMLHeadingElement.idl
similarity index 100%
rename from html/HTMLHeadingElement.idl
rename to core/html/HTMLHeadingElement.idl
diff --git a/html/HTMLHtmlElement.idl b/core/html/HTMLHtmlElement.idl
similarity index 100%
rename from html/HTMLHtmlElement.idl
rename to core/html/HTMLHtmlElement.idl
diff --git a/html/HTMLIFrameElement.idl b/core/html/HTMLIFrameElement.idl
similarity index 100%
rename from html/HTMLIFrameElement.idl
rename to core/html/HTMLIFrameElement.idl
diff --git a/html/HTMLImageElement.idl b/core/html/HTMLImageElement.idl
similarity index 100%
rename from html/HTMLImageElement.idl
rename to core/html/HTMLImageElement.idl
diff --git a/html/HTMLInputElement.idl b/core/html/HTMLInputElement.idl
similarity index 89%
rename from html/HTMLInputElement.idl
rename to core/html/HTMLInputElement.idl
index fcbc10f..76a8e6e 100644
--- a/html/HTMLInputElement.idl
+++ b/core/html/HTMLInputElement.idl
@@ -59,8 +59,8 @@
     [SetterRaisesException] attribute Date valueAsDate;
     [SetterRaisesException] attribute double valueAsNumber;
 
-    [RaisesException] void stepUp([Optional] long n);
-    [RaisesException] void stepDown([Optional] long n);
+    [RaisesException] void stepUp(optional long n);
+    [RaisesException] void stepDown(optional long n);
 
     attribute unsigned long width;
     readonly attribute boolean willValidate;
@@ -80,15 +80,15 @@
     [RaisesException] void setRangeText(DOMString replacement,
                         unsigned long start,
                         unsigned long end,
-                        [Optional=DefaultIsNullString] DOMString selectionMode);
+                        [Default=NullString] optional DOMString selectionMode);
 
-    [Custom] void setSelectionRange([Optional=DefaultIsUndefined] long start, 
-                                    [Optional=DefaultIsUndefined] long end, 
-                                    [Optional] DOMString direction);
+    [Custom] void setSelectionRange([Default=Undefined] optional long start, 
+                                    [Default=Undefined] optional long end, 
+                                    optional DOMString direction);
 
     // Non-standard attributes
     [Reflect] attribute DOMString align;
-    [Conditional=DIRECTORY_UPLOAD, Reflect] attribute boolean webkitdirectory;
+    [Reflect, EnabledAtRuntime=directoryUpload] attribute boolean webkitdirectory;
     [Reflect] attribute DOMString useMap;
     [Reflect] attribute boolean incremental;
     [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime] attribute boolean webkitSpeech;
diff --git a/html/HTMLKeygenElement.idl b/core/html/HTMLKeygenElement.idl
similarity index 100%
rename from html/HTMLKeygenElement.idl
rename to core/html/HTMLKeygenElement.idl
diff --git a/html/HTMLLIElement.idl b/core/html/HTMLLIElement.idl
similarity index 100%
rename from html/HTMLLIElement.idl
rename to core/html/HTMLLIElement.idl
diff --git a/html/HTMLLabelElement.idl b/core/html/HTMLLabelElement.idl
similarity index 100%
rename from html/HTMLLabelElement.idl
rename to core/html/HTMLLabelElement.idl
diff --git a/html/HTMLLegendElement.idl b/core/html/HTMLLegendElement.idl
similarity index 100%
rename from html/HTMLLegendElement.idl
rename to core/html/HTMLLegendElement.idl
diff --git a/html/HTMLLinkElement.idl b/core/html/HTMLLinkElement.idl
similarity index 100%
rename from html/HTMLLinkElement.idl
rename to core/html/HTMLLinkElement.idl
diff --git a/html/HTMLMapElement.idl b/core/html/HTMLMapElement.idl
similarity index 100%
rename from html/HTMLMapElement.idl
rename to core/html/HTMLMapElement.idl
diff --git a/html/HTMLMarqueeElement.idl b/core/html/HTMLMarqueeElement.idl
similarity index 100%
rename from html/HTMLMarqueeElement.idl
rename to core/html/HTMLMarqueeElement.idl
diff --git a/html/HTMLMediaElement.idl b/core/html/HTMLMediaElement.idl
similarity index 84%
rename from html/HTMLMediaElement.idl
rename to core/html/HTMLMediaElement.idl
index c422c34..13cc91b 100644
--- a/html/HTMLMediaElement.idl
+++ b/core/html/HTMLMediaElement.idl
@@ -45,11 +45,11 @@
 readonly attribute TimeRanges buffered;
 void load();
 #if defined(ENABLE_ENCRYPTED_MEDIA) && ENABLE_ENCRYPTED_MEDIA
-    DOMString canPlayType([Optional=DefaultIsUndefined] DOMString type, [Optional=DefaultIsUndefined, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem);
+    DOMString canPlayType([Default=Undefined] optional DOMString type, [Default=Undefined, TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString keySystem);
 #elif defined(ENABLE_ENCRYPTED_MEDIA_V2) && ENABLE_ENCRYPTED_MEDIA_V2
-    DOMString canPlayType([Optional=DefaultIsUndefined] DOMString type, [Optional=DefaultIsUndefined, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem);
+    DOMString canPlayType([Default=Undefined] optional DOMString type, [Default=Undefined, TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString keySystem);
 #else
-DOMString canPlayType([Optional=DefaultIsUndefined] DOMString type);
+DOMString canPlayType([Default=Undefined] optional DOMString type);
 #endif
 
 // ready state
@@ -94,9 +94,9 @@
 readonly attribute unsigned long webkitVideoDecodedByteCount;
 
 #if defined(ENABLE_ENCRYPTED_MEDIA) && ENABLE_ENCRYPTED_MEDIA
-[EnabledAtRuntime=encryptedMedia, RaisesException] void webkitGenerateKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, [Optional] Uint8Array initData);
-[EnabledAtRuntime=encryptedMedia, RaisesException] void webkitAddKey([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, Uint8Array key, [Optional] Uint8Array initData, [Optional=DefaultIsNullString] DOMString sessionId);
-[EnabledAtRuntime=encryptedMedia, RaisesException] void webkitCancelKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, [Optional=DefaultIsNullString] DOMString sessionId);
+[EnabledAtRuntime=encryptedMedia, RaisesException] void webkitGenerateKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, optional Uint8Array initData);
+[EnabledAtRuntime=encryptedMedia, RaisesException] void webkitAddKey([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, Uint8Array key, optional Uint8Array initData, [Default=NullString] optional DOMString sessionId);
+[EnabledAtRuntime=encryptedMedia, RaisesException] void webkitCancelKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, [Default=NullString] optional DOMString sessionId);
 
     [EnabledAtRuntime=encryptedMedia] attribute EventListener onwebkitkeyadded;
     [EnabledAtRuntime=encryptedMedia] attribute EventListener onwebkitkeyerror;
@@ -107,10 +107,8 @@
     [EnabledAtRuntime=encryptedMedia] attribute MediaKeys mediaKeys;
 #endif
 
-#if defined(ENABLE_VIDEO_TRACK) && ENABLE_VIDEO_TRACK
-[EnabledAtRuntime=webkitVideoTrack, RaisesException] TextTrack addTextTrack(DOMString kind, [Optional] DOMString label, [Optional] DOMString language);
+[EnabledAtRuntime=webkitVideoTrack, RaisesException] TextTrack addTextTrack(DOMString kind, optional DOMString label, optional DOMString language);
 [EnabledAtRuntime=webkitVideoTrack] readonly attribute TextTrackList textTracks;
-#endif
 
 [Reflect, TreatNullAs=NullString] attribute DOMString mediaGroup;
 [CustomSetter] attribute MediaController controller;
diff --git a/html/HTMLMenuElement.idl b/core/html/HTMLMenuElement.idl
similarity index 100%
rename from html/HTMLMenuElement.idl
rename to core/html/HTMLMenuElement.idl
diff --git a/html/HTMLMetaElement.idl b/core/html/HTMLMetaElement.idl
similarity index 100%
rename from html/HTMLMetaElement.idl
rename to core/html/HTMLMetaElement.idl
diff --git a/html/HTMLMeterElement.idl b/core/html/HTMLMeterElement.idl
similarity index 100%
rename from html/HTMLMeterElement.idl
rename to core/html/HTMLMeterElement.idl
diff --git a/html/HTMLModElement.idl b/core/html/HTMLModElement.idl
similarity index 100%
rename from html/HTMLModElement.idl
rename to core/html/HTMLModElement.idl
diff --git a/html/HTMLOListElement.idl b/core/html/HTMLOListElement.idl
similarity index 100%
rename from html/HTMLOListElement.idl
rename to core/html/HTMLOListElement.idl
diff --git a/html/HTMLObjectElement.idl b/core/html/HTMLObjectElement.idl
similarity index 100%
rename from html/HTMLObjectElement.idl
rename to core/html/HTMLObjectElement.idl
diff --git a/html/HTMLOptGroupElement.idl b/core/html/HTMLOptGroupElement.idl
similarity index 100%
rename from html/HTMLOptGroupElement.idl
rename to core/html/HTMLOptGroupElement.idl
diff --git a/html/HTMLOptionElement.idl b/core/html/HTMLOptionElement.idl
similarity index 84%
rename from html/HTMLOptionElement.idl
rename to core/html/HTMLOptionElement.idl
index 7b00005..e47ca9f 100644
--- a/html/HTMLOptionElement.idl
+++ b/core/html/HTMLOptionElement.idl
@@ -19,7 +19,7 @@
  */
 
 [
-    NamedConstructor=Option([Optional=DefaultIsNullString] DOMString data, [Optional=DefaultIsNullString] DOMString value, [Optional=DefaultIsUndefined] boolean defaultSelected, [Optional=DefaultIsUndefined] boolean selected),
+    NamedConstructor=Option([Default=NullString] optional DOMString data, [Default=NullString] optional DOMString value, [Default=Undefined] optional boolean defaultSelected, [Default=Undefined] optional boolean selected),
     RaisesException
 ] interface HTMLOptionElement : HTMLElement {
     [Reflect] attribute boolean disabled;
diff --git a/html/HTMLOptionsCollection.idl b/core/html/HTMLOptionsCollection.idl
similarity index 79%
rename from html/HTMLOptionsCollection.idl
rename to core/html/HTMLOptionsCollection.idl
index e62490c..f5ee73d 100644
--- a/html/HTMLOptionsCollection.idl
+++ b/core/html/HTMLOptionsCollection.idl
@@ -28,10 +28,10 @@
     attribute long selectedIndex;
     [CustomSetter, SetterRaisesException] attribute unsigned long length;
 
-    [Custom] Node namedItem([Optional=DefaultIsUndefined] DOMString name);
+    [Custom] Node namedItem([Default=Undefined] optional DOMString name);
 
-    [Custom, RaisesException] void add([Optional=DefaultIsUndefined] HTMLOptionElement option, 
-                      [Optional] unsigned long index);
-    [Custom] void remove([Optional=DefaultIsUndefined] unsigned long index);
+    [Custom, RaisesException] void add([Default=Undefined] optional HTMLOptionElement option, 
+                      optional unsigned long index);
+    [Custom] void remove([Default=Undefined] optional unsigned long index);
 };
 
diff --git a/html/HTMLOutputElement.idl b/core/html/HTMLOutputElement.idl
similarity index 100%
rename from html/HTMLOutputElement.idl
rename to core/html/HTMLOutputElement.idl
diff --git a/html/HTMLParagraphElement.idl b/core/html/HTMLParagraphElement.idl
similarity index 100%
rename from html/HTMLParagraphElement.idl
rename to core/html/HTMLParagraphElement.idl
diff --git a/html/HTMLParamElement.idl b/core/html/HTMLParamElement.idl
similarity index 100%
rename from html/HTMLParamElement.idl
rename to core/html/HTMLParamElement.idl
diff --git a/html/HTMLPreElement.idl b/core/html/HTMLPreElement.idl
similarity index 100%
rename from html/HTMLPreElement.idl
rename to core/html/HTMLPreElement.idl
diff --git a/html/HTMLProgressElement.idl b/core/html/HTMLProgressElement.idl
similarity index 100%
rename from html/HTMLProgressElement.idl
rename to core/html/HTMLProgressElement.idl
diff --git a/html/HTMLPropertiesCollection.idl b/core/html/HTMLPropertiesCollection.idl
similarity index 100%
rename from html/HTMLPropertiesCollection.idl
rename to core/html/HTMLPropertiesCollection.idl
diff --git a/html/HTMLQuoteElement.idl b/core/html/HTMLQuoteElement.idl
similarity index 100%
rename from html/HTMLQuoteElement.idl
rename to core/html/HTMLQuoteElement.idl
diff --git a/html/HTMLScriptElement.idl b/core/html/HTMLScriptElement.idl
similarity index 100%
rename from html/HTMLScriptElement.idl
rename to core/html/HTMLScriptElement.idl
diff --git a/html/HTMLSelectElement.idl b/core/html/HTMLSelectElement.idl
similarity index 86%
rename from html/HTMLSelectElement.idl
rename to core/html/HTMLSelectElement.idl
index 9c410f8..922cdc6 100644
--- a/html/HTMLSelectElement.idl
+++ b/core/html/HTMLSelectElement.idl
@@ -19,7 +19,6 @@
  */
 
 [
-    IndexedGetter,
     CustomIndexedSetter,
     CustomIndexedGetter,
     SkipVTableValidation
@@ -37,10 +36,10 @@
     readonly attribute HTMLOptionsCollection options;
     [SetterRaisesException] attribute unsigned long length;
 
-    Node item([IsIndex,Optional=DefaultIsUndefined] unsigned long index);
-    Node namedItem([Optional=DefaultIsUndefined] DOMString name);
-     [RaisesException] void add([Optional=DefaultIsUndefined] HTMLElement element,
-                            [Optional=DefaultIsUndefined] HTMLElement before);
+    Node item([IsIndex,Default=Undefined] optional unsigned long index);
+    Node namedItem([Default=Undefined] optional DOMString name);
+     [RaisesException] void add([Default=Undefined] optional HTMLElement element,
+                            [Default=Undefined] optional HTMLElement before);
     // In JavaScript, we support both option index and option object parameters.
     // As of this writing this cannot be auto-generated.
     [Custom] void remove(/* indexOrOption */);
diff --git a/html/HTMLSourceElement.idl b/core/html/HTMLSourceElement.idl
similarity index 100%
rename from html/HTMLSourceElement.idl
rename to core/html/HTMLSourceElement.idl
diff --git a/html/HTMLSpanElement.idl b/core/html/HTMLSpanElement.idl
similarity index 100%
rename from html/HTMLSpanElement.idl
rename to core/html/HTMLSpanElement.idl
diff --git a/html/HTMLStyleElement.idl b/core/html/HTMLStyleElement.idl
similarity index 100%
rename from html/HTMLStyleElement.idl
rename to core/html/HTMLStyleElement.idl
diff --git a/html/HTMLTableCaptionElement.idl b/core/html/HTMLTableCaptionElement.idl
similarity index 100%
rename from html/HTMLTableCaptionElement.idl
rename to core/html/HTMLTableCaptionElement.idl
diff --git a/html/HTMLTableCellElement.idl b/core/html/HTMLTableCellElement.idl
similarity index 100%
rename from html/HTMLTableCellElement.idl
rename to core/html/HTMLTableCellElement.idl
diff --git a/html/HTMLTableColElement.idl b/core/html/HTMLTableColElement.idl
similarity index 100%
rename from html/HTMLTableColElement.idl
rename to core/html/HTMLTableColElement.idl
diff --git a/html/HTMLTableElement.idl b/core/html/HTMLTableElement.idl
similarity index 91%
rename from html/HTMLTableElement.idl
rename to core/html/HTMLTableElement.idl
index 0b42d00..1881de3 100644
--- a/html/HTMLTableElement.idl
+++ b/core/html/HTMLTableElement.idl
@@ -45,7 +45,7 @@
     HTMLElement createCaption();
     void deleteCaption();
 
-    [RaisesException] HTMLElement insertRow([Optional=DefaultIsUndefined] long index);
-    [RaisesException] void deleteRow([Optional=DefaultIsUndefined] long index);
+    [RaisesException] HTMLElement insertRow([Default=Undefined] optional long index);
+    [RaisesException] void deleteRow([Default=Undefined] optional long index);
 };
 
diff --git a/html/HTMLTableRowElement.idl b/core/html/HTMLTableRowElement.idl
similarity index 88%
rename from html/HTMLTableRowElement.idl
rename to core/html/HTMLTableRowElement.idl
index 5b26eee..a56f70a 100644
--- a/html/HTMLTableRowElement.idl
+++ b/core/html/HTMLTableRowElement.idl
@@ -27,7 +27,7 @@
     [Reflect=char] attribute DOMString ch;
     [Reflect=charoff] attribute DOMString chOff;
     [Reflect] attribute DOMString vAlign;
-    [RaisesException] HTMLElement insertCell([Optional=DefaultIsUndefined] long index);
-    [RaisesException] void deleteCell([Optional=DefaultIsUndefined] long index);
+    [RaisesException] HTMLElement insertCell([Default=Undefined] optional long index);
+    [RaisesException] void deleteCell([Default=Undefined] optional long index);
 };
 
diff --git a/html/HTMLTableSectionElement.idl b/core/html/HTMLTableSectionElement.idl
similarity index 87%
rename from html/HTMLTableSectionElement.idl
rename to core/html/HTMLTableSectionElement.idl
index 9e78a75..3126d77 100644
--- a/html/HTMLTableSectionElement.idl
+++ b/core/html/HTMLTableSectionElement.idl
@@ -24,7 +24,7 @@
     [Reflect=charoff] attribute DOMString chOff;
     [Reflect] attribute DOMString vAlign;
     readonly attribute HTMLCollection rows;
-    [RaisesException] HTMLElement insertRow([Optional=DefaultIsUndefined] long index);
-    [RaisesException] void deleteRow([Optional=DefaultIsUndefined] long index);
+    [RaisesException] HTMLElement insertRow([Default=Undefined] optional long index);
+    [RaisesException] void deleteRow([Default=Undefined] optional long index);
 };
 
diff --git a/html/HTMLTemplateElement.idl b/core/html/HTMLTemplateElement.idl
similarity index 100%
rename from html/HTMLTemplateElement.idl
rename to core/html/HTMLTemplateElement.idl
diff --git a/html/HTMLTextAreaElement.idl b/core/html/HTMLTextAreaElement.idl
similarity index 89%
rename from html/HTMLTextAreaElement.idl
rename to core/html/HTMLTextAreaElement.idl
index cbcf138..105683b 100644
--- a/html/HTMLTextAreaElement.idl
+++ b/core/html/HTMLTextAreaElement.idl
@@ -55,9 +55,9 @@
     [RaisesException] void setRangeText(DOMString replacement,
                         unsigned long start,
                         unsigned long end,
-                        [Optional=DefaultIsNullString] DOMString selectionMode);
+                        [Default=NullString] optional DOMString selectionMode);
 
-    void setSelectionRange([Optional=DefaultIsUndefined] long start,
-                           [Optional=DefaultIsUndefined] long end,
-                           [Optional] DOMString direction);
+    void setSelectionRange([Default=Undefined] optional long start,
+                           [Default=Undefined] optional long end,
+                           optional DOMString direction);
 };
diff --git a/html/HTMLTitleElement.idl b/core/html/HTMLTitleElement.idl
similarity index 100%
rename from html/HTMLTitleElement.idl
rename to core/html/HTMLTitleElement.idl
diff --git a/html/HTMLTrackElement.idl b/core/html/HTMLTrackElement.idl
similarity index 98%
rename from html/HTMLTrackElement.idl
rename to core/html/HTMLTrackElement.idl
index 312cc1a..f0d21f6 100644
--- a/html/HTMLTrackElement.idl
+++ b/core/html/HTMLTrackElement.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO_TRACK,
     EnabledAtRuntime=webkitVideoTrack
 ] interface HTMLTrackElement : HTMLElement {
     attribute DOMString kind;
diff --git a/html/HTMLUListElement.idl b/core/html/HTMLUListElement.idl
similarity index 100%
rename from html/HTMLUListElement.idl
rename to core/html/HTMLUListElement.idl
diff --git a/html/HTMLUnknownElement.idl b/core/html/HTMLUnknownElement.idl
similarity index 100%
rename from html/HTMLUnknownElement.idl
rename to core/html/HTMLUnknownElement.idl
diff --git a/html/HTMLVideoElement.idl b/core/html/HTMLVideoElement.idl
similarity index 100%
rename from html/HTMLVideoElement.idl
rename to core/html/HTMLVideoElement.idl
diff --git a/html/ImageData.idl b/core/html/ImageData.idl
similarity index 100%
rename from html/ImageData.idl
rename to core/html/ImageData.idl
diff --git a/html/MediaController.idl b/core/html/MediaController.idl
similarity index 94%
rename from html/MediaController.idl
rename to core/html/MediaController.idl
index 8999ad2..b6b8f01 100644
--- a/html/MediaController.idl
+++ b/core/html/MediaController.idl
@@ -51,9 +51,9 @@
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/html/MediaError.idl b/core/html/MediaError.idl
similarity index 98%
rename from html/MediaError.idl
rename to core/html/MediaError.idl
index 7337444..5dfeda0 100644
--- a/html/MediaError.idl
+++ b/core/html/MediaError.idl
@@ -23,10 +23,10 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-interface [
+[
     Conditional=VIDEO,
     ImplementationLacksVTable
-] MediaError {
+] interface MediaError {
       const unsigned short MEDIA_ERR_ABORTED = 1;
       const unsigned short MEDIA_ERR_NETWORK = 2;
       const unsigned short MEDIA_ERR_DECODE = 3;
diff --git a/html/MediaKeyError.idl b/core/html/MediaKeyError.idl
similarity index 98%
rename from html/MediaKeyError.idl
rename to core/html/MediaKeyError.idl
index ea174e1..597bfea 100644
--- a/html/MediaKeyError.idl
+++ b/core/html/MediaKeyError.idl
@@ -23,11 +23,11 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-interface [
+[
     Conditional=ENCRYPTED_MEDIA|ENCRYPTED_MEDIA_V2,
     EnabledAtRuntime=encryptedMedia, 
     ImplementationLacksVTable
-] MediaKeyError {
+] interface MediaKeyError {
     const unsigned short MEDIA_KEYERR_UNKNOWN = 1;
     const unsigned short MEDIA_KEYERR_CLIENT = 2;
     const unsigned short MEDIA_KEYERR_SERVICE = 3;
diff --git a/html/MediaKeyEvent.idl b/core/html/MediaKeyEvent.idl
similarity index 100%
rename from html/MediaKeyEvent.idl
rename to core/html/MediaKeyEvent.idl
diff --git a/html/MicroDataItemValue.idl b/core/html/MicroDataItemValue.idl
similarity index 100%
rename from html/MicroDataItemValue.idl
rename to core/html/MicroDataItemValue.idl
diff --git a/html/RadioNodeList.idl b/core/html/RadioNodeList.idl
similarity index 100%
rename from html/RadioNodeList.idl
rename to core/html/RadioNodeList.idl
diff --git a/html/TextMetrics.idl b/core/html/TextMetrics.idl
similarity index 100%
rename from html/TextMetrics.idl
rename to core/html/TextMetrics.idl
diff --git a/html/TimeRanges.idl b/core/html/TimeRanges.idl
similarity index 100%
rename from html/TimeRanges.idl
rename to core/html/TimeRanges.idl
diff --git a/html/ValidityState.idl b/core/html/ValidityState.idl
similarity index 100%
rename from html/ValidityState.idl
rename to core/html/ValidityState.idl
diff --git a/html/VoidCallback.idl b/core/html/VoidCallback.idl
similarity index 100%
rename from html/VoidCallback.idl
rename to core/html/VoidCallback.idl
diff --git a/html/canvas/ArrayBuffer.idl b/core/html/canvas/ArrayBuffer.idl
similarity index 93%
rename from html/canvas/ArrayBuffer.idl
rename to core/html/canvas/ArrayBuffer.idl
index e29718f..b56950f 100644
--- a/html/canvas/ArrayBuffer.idl
+++ b/core/html/canvas/ArrayBuffer.idl
@@ -24,11 +24,11 @@
  */
 
 [
-    CustomConstructor,
+    CustomConstructor(unsigned long length),
     ImplementationNamespace=WTF,
     ImplementationLacksVTable
 ] interface ArrayBuffer {
     readonly attribute unsigned long byteLength;
-    ArrayBuffer slice(long begin, [Optional] long end);
+    ArrayBuffer slice(long begin, optional long end);
 };
 
diff --git a/html/canvas/ArrayBufferView.idl b/core/html/canvas/ArrayBufferView.idl
similarity index 100%
rename from html/canvas/ArrayBufferView.idl
rename to core/html/canvas/ArrayBufferView.idl
diff --git a/html/canvas/CanvasGradient.idl b/core/html/canvas/CanvasGradient.idl
similarity index 89%
rename from html/canvas/CanvasGradient.idl
rename to core/html/canvas/CanvasGradient.idl
index 9dc1e7a..6ecd51b 100644
--- a/html/canvas/CanvasGradient.idl
+++ b/core/html/canvas/CanvasGradient.idl
@@ -26,8 +26,8 @@
     ImplementationLacksVTable
 ] interface CanvasGradient {
 
-    [RaisesException] void addColorStop([Optional=DefaultIsUndefined] float offset, 
-                      [Optional=DefaultIsUndefined] DOMString color);
+    [RaisesException] void addColorStop([Default=Undefined] optional float offset, 
+                      [Default=Undefined] optional DOMString color);
 
 };
 
diff --git a/html/canvas/CanvasPattern.idl b/core/html/canvas/CanvasPattern.idl
similarity index 100%
rename from html/canvas/CanvasPattern.idl
rename to core/html/canvas/CanvasPattern.idl
diff --git a/html/canvas/CanvasProxy.idl b/core/html/canvas/CanvasProxy.idl
similarity index 100%
rename from html/canvas/CanvasProxy.idl
rename to core/html/canvas/CanvasProxy.idl
diff --git a/html/canvas/CanvasRenderingContext.idl b/core/html/canvas/CanvasRenderingContext.idl
similarity index 100%
rename from html/canvas/CanvasRenderingContext.idl
rename to core/html/canvas/CanvasRenderingContext.idl
diff --git a/core/html/canvas/CanvasRenderingContext2D.idl b/core/html/canvas/CanvasRenderingContext2D.idl
new file mode 100644
index 0000000..3e91c82
--- /dev/null
+++ b/core/html/canvas/CanvasRenderingContext2D.idl
@@ -0,0 +1,222 @@
+/*
+ * Copyright (C) 2006 Apple Computer, 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.
+ */
+
+enum CanvasWindingRule { "nonzero", "evenodd" };
+
+interface CanvasRenderingContext2D : CanvasRenderingContext {
+
+    void save();
+    void restore();
+
+    void scale([Default=Undefined] optional float sx,
+               [Default=Undefined] optional float sy);
+    void rotate([Default=Undefined] optional float angle);
+    void translate([Default=Undefined] optional float tx,
+                   [Default=Undefined] optional float ty);
+    void transform([Default=Undefined] optional float m11,
+                   [Default=Undefined] optional float m12,
+                   [Default=Undefined] optional float m21,
+                   [Default=Undefined] optional float m22,
+                   [Default=Undefined] optional float dx,
+                   [Default=Undefined] optional float dy);
+    void setTransform([Default=Undefined] optional float m11,
+                      [Default=Undefined] optional float m12,
+                      [Default=Undefined] optional float m21,
+                      [Default=Undefined] optional float m22,
+                      [Default=Undefined] optional float dx,
+                      [Default=Undefined] optional float dy);
+
+    attribute float globalAlpha;
+    [TreatNullAs=NullString] attribute DOMString globalCompositeOperation;
+
+    [RaisesException] CanvasGradient createLinearGradient([Default=Undefined] optional float x0,
+                                        [Default=Undefined] optional float y0,
+                                        [Default=Undefined] optional float x1,
+                                        [Default=Undefined] optional float y1);
+    [RaisesException] CanvasGradient createRadialGradient([Default=Undefined] optional float x0,
+                                        [Default=Undefined] optional float y0,
+                                        [Default=Undefined] optional float r0,
+                                        [Default=Undefined] optional float x1,
+                                        [Default=Undefined] optional float y1,
+                                        [Default=Undefined] optional float r1);
+
+    attribute float lineWidth;
+    [TreatNullAs=NullString] attribute DOMString lineCap;
+    [TreatNullAs=NullString] attribute DOMString lineJoin;
+    attribute float miterLimit;
+
+    attribute float shadowOffsetX;
+    attribute float shadowOffsetY;
+    attribute float shadowBlur;
+    [TreatNullAs=NullString] attribute DOMString shadowColor;
+
+    void setLineDash(sequence<float> dash);
+    sequence<float> getLineDash();
+    attribute float lineDashOffset;
+
+    // FIXME: These attributes should be implemented.
+    // [Custom] attribute Array webkitLineDash;
+    // attribute float webkitLineDashOffset;
+
+    void clearRect([Default=Undefined] optional float x,
+                   [Default=Undefined] optional float y,
+                   [Default=Undefined] optional float width,
+                   [Default=Undefined] optional float height);
+    void fillRect([Default=Undefined] optional float x,
+                  [Default=Undefined] optional float y,
+                  [Default=Undefined] optional float width,
+                  [Default=Undefined] optional float height);
+
+    void beginPath();
+
+    attribute DOMPath currentPath;
+
+    // FIXME: These methods should be shared with CanvasRenderingContext2D in the CanvasPathMethods interface.
+    void closePath();
+    void moveTo([Default=Undefined] optional float x,
+                [Default=Undefined] optional float y);
+    void lineTo([Default=Undefined] optional float x,
+                [Default=Undefined] optional float y);
+    void quadraticCurveTo([Default=Undefined] optional float cpx,
+                          [Default=Undefined] optional float cpy,
+                          [Default=Undefined] optional float x,
+                          [Default=Undefined] optional float y);
+    void bezierCurveTo([Default=Undefined] optional float cp1x,
+                       [Default=Undefined] optional float cp1y,
+                       [Default=Undefined] optional float cp2x,
+                       [Default=Undefined] optional float cp2y,
+                       [Default=Undefined] optional float x,
+                       [Default=Undefined] optional float y);
+    [RaisesException] void arcTo([Default=Undefined] optional float x1,
+               [Default=Undefined] optional float y1,
+               [Default=Undefined] optional float x2,
+               [Default=Undefined] optional float y2,
+               [Default=Undefined] optional float radius);
+    void rect([Default=Undefined] optional float x,
+              [Default=Undefined] optional float y,
+              [Default=Undefined] optional float width,
+              [Default=Undefined] optional float height);
+    [RaisesException] void arc([Default=Undefined] optional float x,
+             [Default=Undefined] optional float y,
+             [Default=Undefined] optional float radius,
+             [Default=Undefined] optional float startAngle,
+             [Default=Undefined] optional float endAngle,
+             [Default=Undefined] optional boolean anticlockwise);
+
+    void fill(optional CanvasWindingRule winding);
+    void stroke();
+    void clip(optional CanvasWindingRule winding);
+    boolean isPointInPath([Default=Undefined] optional float x,
+                          [Default=Undefined] optional float y,
+                          optional CanvasWindingRule winding);
+    boolean isPointInStroke([Default=Undefined] optional float x,
+                            [Default=Undefined] optional float y);
+
+    // text
+    attribute DOMString font;
+    attribute DOMString textAlign;
+    attribute DOMString textBaseline;
+
+    TextMetrics measureText([Default=Undefined] optional DOMString text);
+
+    // other
+
+    void setAlpha([Default=Undefined] optional float alpha);
+    void setCompositeOperation([Default=Undefined] optional DOMString compositeOperation);
+
+    void setLineWidth([Default=Undefined] optional float width);
+    void setLineCap([Default=Undefined] optional DOMString cap);
+    void setLineJoin([Default=Undefined] optional DOMString join);
+    void setMiterLimit([Default=Undefined] optional float limit);
+
+    void clearShadow();
+
+    void fillText(DOMString text, float x, float y, optional float maxWidth);
+    void strokeText(DOMString text, float x, float y, optional float maxWidth);
+
+    void setStrokeColor([StrictTypeChecking] DOMString color, optional float alpha);
+    void setStrokeColor(float grayLevel, optional float alpha);
+    void setStrokeColor(float r, float g, float b, float a);
+    void setStrokeColor(float c, float m, float y, float k, float a);
+
+    void setFillColor([StrictTypeChecking] DOMString color, optional float alpha);
+    void setFillColor(float grayLevel, optional float alpha);
+    void setFillColor(float r, float g, float b, float a);
+    void setFillColor(float c, float m, float y, float k, float a);
+
+    void strokeRect([Default=Undefined] optional float x,
+                    [Default=Undefined] optional float y,
+                    [Default=Undefined] optional float width,
+                    [Default=Undefined] optional float height,
+                    optional float lineWidth);
+
+    [RaisesException] void drawImage(HTMLImageElement? image, float x, float y);
+    [RaisesException] void drawImage(HTMLImageElement? image, float x, float y, float width, float height);
+    [RaisesException] void drawImage(HTMLImageElement? image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
+    [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y);
+    [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y, float width, float height);
+    [RaisesException] void drawImage(HTMLCanvasElement? canvas, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
+#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
+    [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y);
+    [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y, float width, float height);
+    [RaisesException] void drawImage(HTMLVideoElement? video, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
+#endif
+
+    void drawImageFromRect(HTMLImageElement image,
+                           optional float sx, optional float sy, optional float sw, optional float sh,
+                           optional float dx, optional float dy, optional float dw, optional float dh,
+                           optional DOMString compositeOperation);
+
+    void setShadow(float width, float height, float blur, [StrictTypeChecking] optional DOMString color, optional float alpha);
+    void setShadow(float width, float height, float blur, float grayLevel, optional float alpha);
+    void setShadow(float width, float height, float blur, float r, float g, float b, float a);
+    void setShadow(float width, float height, float blur, float c, float m, float y, float k, float a);
+
+    [RaisesException] void putImageData(ImageData? imagedata, float dx, float dy);
+    [RaisesException] void putImageData(ImageData? imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
+
+    [RaisesException] void webkitPutImageDataHD(ImageData? imagedata, float dx, float dy);
+    [RaisesException] void webkitPutImageDataHD(ImageData? imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
+
+    [RaisesException] CanvasPattern createPattern(HTMLCanvasElement? canvas, [TreatNullAs=NullString] DOMString repetitionType);
+    [RaisesException] CanvasPattern createPattern(HTMLImageElement? image, [TreatNullAs=NullString] DOMString repetitionType);
+    [RaisesException] ImageData createImageData(ImageData? imagedata);
+    [RaisesException] ImageData createImageData(float sw, float sh);
+
+    [Custom] attribute custom strokeStyle;
+    [Custom] attribute custom fillStyle;
+
+    // pixel manipulation
+    [RaisesException] ImageData getImageData([Default=Undefined] optional float sx, [Default=Undefined] optional float sy,
+                           [Default=Undefined] optional float sw, [Default=Undefined] optional float sh);
+
+    [RaisesException] ImageData webkitGetImageDataHD([Default=Undefined] optional float sx, [Default=Undefined] optional float sy,
+                                   [Default=Undefined] optional float sw, [Default=Undefined] optional float sh);
+
+    readonly attribute float webkitBackingStorePixelRatio;
+
+    attribute boolean webkitImageSmoothingEnabled;
+};
+
diff --git a/core/html/canvas/DOMPath.idl b/core/html/canvas/DOMPath.idl
new file mode 100644
index 0000000..9a68c72
--- /dev/null
+++ b/core/html/canvas/DOMPath.idl
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2012, 2013 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER "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 HOLDER 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.
+ */
+
+[
+    EnabledAtRuntime=canvasPath,
+    Constructor,
+    Constructor(DOMPath path),
+#if defined(ENABLE_SVG) && ENABLE_SVG
+    Constructor(DOMString text),
+#endif
+    InterfaceName=Path
+] interface DOMPath {
+
+    // FIXME: These methods should be shared with CanvasRenderingContext2D in the CanvasPathMethods interface.
+    void closePath();
+    void moveTo([Default=Undefined] optional float x,
+                [Default=Undefined] optional float y);
+    void lineTo([Default=Undefined] optional float x,
+                [Default=Undefined] optional float y);
+    void quadraticCurveTo([Default=Undefined] optional float cpx,
+                          [Default=Undefined] optional float cpy,
+                          [Default=Undefined] optional float x,
+                          [Default=Undefined] optional float y);
+    void bezierCurveTo([Default=Undefined] optional float cp1x,
+                       [Default=Undefined] optional float cp1y,
+                       [Default=Undefined] optional float cp2x,
+                       [Default=Undefined] optional float cp2y,
+                       [Default=Undefined] optional float x,
+                       [Default=Undefined] optional float y);
+    [RaisesException] void arcTo([Default=Undefined] optional float x1,
+               [Default=Undefined] optional float y1,
+               [Default=Undefined] optional float x2,
+               [Default=Undefined] optional float y2,
+               [Default=Undefined] optional float radius);
+    void rect([Default=Undefined] optional float x,
+              [Default=Undefined] optional float y,
+              [Default=Undefined] optional float width,
+              [Default=Undefined] optional float height);
+    [RaisesException] void arc([Default=Undefined] optional float x,
+             [Default=Undefined] optional float y,
+             [Default=Undefined] optional float radius,
+             [Default=Undefined] optional float startAngle,
+             [Default=Undefined] optional float endAngle,
+             [Default=Undefined] optional boolean anticlockwise);
+};
diff --git a/html/canvas/DataView.idl b/core/html/canvas/DataView.idl
similarity index 77%
rename from html/canvas/DataView.idl
rename to core/html/canvas/DataView.idl
index bb923f3..7224fc5 100644
--- a/html/canvas/DataView.idl
+++ b/core/html/canvas/DataView.idl
@@ -24,7 +24,7 @@
  */
 
 [
-    CustomConstructor,
+    CustomConstructor(ArrayBuffer buffer, optional unsigned long byteOffset, optional unsigned long byteLength),
     CustomToJSObject
 ] interface DataView : ArrayBufferView {
     // All these methods raise an exception if they would read or write beyond the end of the view.
@@ -35,14 +35,14 @@
     [Custom, RaisesException] any getInt8();
     [Custom, RaisesException] any getUint8();
 
-    [StrictTypeChecking, RaisesException] short getInt16(unsigned long byteOffset, [Optional] boolean littleEndian);
-    [StrictTypeChecking, RaisesException] unsigned short getUint16(unsigned long byteOffset, [Optional] boolean littleEndian);
-    [StrictTypeChecking, RaisesException] long getInt32(unsigned long byteOffset, [Optional] boolean littleEndian);
-    [StrictTypeChecking, RaisesException] unsigned long getUint32(unsigned long byteOffset, [Optional] boolean littleEndian);
+    [StrictTypeChecking, RaisesException] short getInt16(unsigned long byteOffset, optional boolean littleEndian);
+    [StrictTypeChecking, RaisesException] unsigned short getUint16(unsigned long byteOffset, optional boolean littleEndian);
+    [StrictTypeChecking, RaisesException] long getInt32(unsigned long byteOffset, optional boolean littleEndian);
+    [StrictTypeChecking, RaisesException] unsigned long getUint32(unsigned long byteOffset, optional boolean littleEndian);
 
     // Use custom code to handle NaN case for JSC.
-    [StrictTypeChecking, RaisesException] float getFloat32(unsigned long byteOffset, [Optional] boolean littleEndian);
-    [StrictTypeChecking, RaisesException] double getFloat64(unsigned long byteOffset, [Optional] boolean littleEndian);
+    [StrictTypeChecking, RaisesException] float getFloat32(unsigned long byteOffset, optional boolean littleEndian);
+    [StrictTypeChecking, RaisesException] double getFloat64(unsigned long byteOffset, optional boolean littleEndian);
 
     // We have to use custom code because our code generator does not support uint8_t type.
     // void setInt8(unsigned long byteOffset, int8_t value);
@@ -50,11 +50,11 @@
     [Custom, RaisesException] void setInt8();
     [Custom, RaisesException] void setUint8();
 
-    [StrictTypeChecking, RaisesException] void setInt16(unsigned long byteOffset, short value, [Optional] boolean littleEndian);
-    [StrictTypeChecking, RaisesException] void setUint16(unsigned long byteOffset, unsigned short value, [Optional] boolean littleEndian);
-    [StrictTypeChecking, RaisesException] void setInt32(unsigned long byteOffset, long value, [Optional] boolean littleEndian);
-    [StrictTypeChecking, RaisesException] void setUint32(unsigned long byteOffset, unsigned long value, [Optional] boolean littleEndian);
-    [StrictTypeChecking, RaisesException] void setFloat32(unsigned long byteOffset, float value, [Optional] boolean littleEndian);
-    [StrictTypeChecking, RaisesException] void setFloat64(unsigned long byteOffset, double value, [Optional] boolean littleEndian);
+    [StrictTypeChecking, RaisesException] void setInt16(unsigned long byteOffset, short value, optional boolean littleEndian);
+    [StrictTypeChecking, RaisesException] void setUint16(unsigned long byteOffset, unsigned short value, optional boolean littleEndian);
+    [StrictTypeChecking, RaisesException] void setInt32(unsigned long byteOffset, long value, optional boolean littleEndian);
+    [StrictTypeChecking, RaisesException] void setUint32(unsigned long byteOffset, unsigned long value, optional boolean littleEndian);
+    [StrictTypeChecking, RaisesException] void setFloat32(unsigned long byteOffset, float value, optional boolean littleEndian);
+    [StrictTypeChecking, RaisesException] void setFloat64(unsigned long byteOffset, double value, optional boolean littleEndian);
 };
 
diff --git a/html/canvas/EXTDrawBuffers.idl b/core/html/canvas/EXTDrawBuffers.idl
similarity index 100%
rename from html/canvas/EXTDrawBuffers.idl
rename to core/html/canvas/EXTDrawBuffers.idl
diff --git a/html/canvas/EXTTextureFilterAnisotropic.idl b/core/html/canvas/EXTTextureFilterAnisotropic.idl
similarity index 100%
rename from html/canvas/EXTTextureFilterAnisotropic.idl
rename to core/html/canvas/EXTTextureFilterAnisotropic.idl
diff --git a/html/canvas/Float32Array.idl b/core/html/canvas/Float32Array.idl
similarity index 87%
rename from html/canvas/Float32Array.idl
rename to core/html/canvas/Float32Array.idl
index cf9eb72..a679309 100644
--- a/html/canvas/Float32Array.idl
+++ b/core/html/canvas/Float32Array.idl
@@ -36,10 +36,10 @@
     const unsigned long BYTES_PER_ELEMENT = 4;
 
     readonly attribute unsigned long length;
-    Float32Array subarray([Optional=DefaultIsUndefined] long start, 
-                          [Optional] long end);
+    Float32Array subarray([Default=Undefined] optional long start, 
+                          optional long end);
 
-    // void set(Float32Array array, [Optional] in unsigned long offset);
-    // void set(sequence<long> array, [Optional] in unsigned long offset);
+    // void set(Float32Array array, optional in unsigned long offset);
+    // void set(sequence<long> array, optional in unsigned long offset);
     void set();
 };
diff --git a/html/canvas/Float64Array.idl b/core/html/canvas/Float64Array.idl
similarity index 87%
rename from html/canvas/Float64Array.idl
rename to core/html/canvas/Float64Array.idl
index 9422bcf..fd6618b 100644
--- a/html/canvas/Float64Array.idl
+++ b/core/html/canvas/Float64Array.idl
@@ -36,10 +36,10 @@
     const unsigned long BYTES_PER_ELEMENT = 8;
 
     readonly attribute unsigned long length;
-    Float64Array subarray([Optional=DefaultIsUndefined] long start, 
-                          [Optional] long end);
+    Float64Array subarray([Default=Undefined] optional long start, 
+                          optional long end);
 
-    // void set(Float64Array array, [Optional] in unsigned long offset);
-    // void set(sequence<long> array, [Optional] in unsigned long offset);
+    // void set(Float64Array array, optional in unsigned long offset);
+    // void set(sequence<long> array, optional in unsigned long offset);
     void set();
 };
diff --git a/html/canvas/Int16Array.idl b/core/html/canvas/Int16Array.idl
similarity index 86%
rename from html/canvas/Int16Array.idl
rename to core/html/canvas/Int16Array.idl
index b94c659..4efe054 100644
--- a/html/canvas/Int16Array.idl
+++ b/core/html/canvas/Int16Array.idl
@@ -35,10 +35,10 @@
     const unsigned long BYTES_PER_ELEMENT = 2;
 
     readonly attribute unsigned long length;
-    Int16Array subarray([Optional=DefaultIsUndefined] long start, 
-                        [Optional] long end);
+    Int16Array subarray([Default=Undefined] optional long start, 
+                        optional long end);
 
-    // void set(Int16Array array, [Optional] in unsigned long offset);
-    // void set(sequence<long> array, [Optional] in unsigned long offset);
+    // void set(Int16Array array, optional in unsigned long offset);
+    // void set(sequence<long> array, optional in unsigned long offset);
     void set();
 };
diff --git a/html/canvas/Int32Array.idl b/core/html/canvas/Int32Array.idl
similarity index 86%
rename from html/canvas/Int32Array.idl
rename to core/html/canvas/Int32Array.idl
index 461932f..befea19 100644
--- a/html/canvas/Int32Array.idl
+++ b/core/html/canvas/Int32Array.idl
@@ -36,10 +36,10 @@
     const unsigned long BYTES_PER_ELEMENT = 4;
 
     readonly attribute unsigned long length;
-    Int32Array subarray([Optional=DefaultIsUndefined] long start, 
-                        [Optional] long end);
+    Int32Array subarray([Default=Undefined] optional long start, 
+                        optional long end);
 
-    // void set(Int32Array array, [Optional] in unsigned long offset);
-    // void set(sequence<long> array, [Optional] in unsigned long offset);
+    // void set(Int32Array array, optional in unsigned long offset);
+    // void set(sequence<long> array, optional in unsigned long offset);
     void set();
 };
diff --git a/html/canvas/Int8Array.idl b/core/html/canvas/Int8Array.idl
similarity index 87%
rename from html/canvas/Int8Array.idl
rename to core/html/canvas/Int8Array.idl
index e55a031..cbaecb5 100644
--- a/html/canvas/Int8Array.idl
+++ b/core/html/canvas/Int8Array.idl
@@ -36,10 +36,10 @@
     const unsigned long BYTES_PER_ELEMENT = 1;
 
     readonly attribute unsigned long length;
-    Int8Array subarray([Optional=DefaultIsUndefined] long start, 
-                       [Optional] long end);
+    Int8Array subarray([Default=Undefined] optional long start, 
+                       optional long end);
 
-    // void set(Int8Array array, [Optional] in unsigned long offset);
-    // void set(sequence<long> array, [Optional] in unsigned long offset);
+    // void set(Int8Array array, optional in unsigned long offset);
+    // void set(sequence<long> array, optional in unsigned long offset);
     void set();
 };
diff --git a/html/canvas/OESElementIndexUint.idl b/core/html/canvas/OESElementIndexUint.idl
similarity index 100%
rename from html/canvas/OESElementIndexUint.idl
rename to core/html/canvas/OESElementIndexUint.idl
diff --git a/html/canvas/OESStandardDerivatives.idl b/core/html/canvas/OESStandardDerivatives.idl
similarity index 100%
rename from html/canvas/OESStandardDerivatives.idl
rename to core/html/canvas/OESStandardDerivatives.idl
diff --git a/html/canvas/OESTextureFloat.idl b/core/html/canvas/OESTextureFloat.idl
similarity index 100%
rename from html/canvas/OESTextureFloat.idl
rename to core/html/canvas/OESTextureFloat.idl
diff --git a/html/canvas/OESTextureHalfFloat.idl b/core/html/canvas/OESTextureHalfFloat.idl
similarity index 100%
rename from html/canvas/OESTextureHalfFloat.idl
rename to core/html/canvas/OESTextureHalfFloat.idl
diff --git a/html/canvas/OESVertexArrayObject.idl b/core/html/canvas/OESVertexArrayObject.idl
similarity index 82%
rename from html/canvas/OESVertexArrayObject.idl
rename to core/html/canvas/OESVertexArrayObject.idl
index 699d6d0..29b1972 100644
--- a/html/canvas/OESVertexArrayObject.idl
+++ b/core/html/canvas/OESVertexArrayObject.idl
@@ -30,7 +30,7 @@
     const unsigned int VERTEX_ARRAY_BINDING_OES = 0x85B5;
     
     [StrictTypeChecking] WebGLVertexArrayObjectOES createVertexArrayOES();
-    [StrictTypeChecking] void         deleteVertexArrayOES([Optional=DefaultIsUndefined] WebGLVertexArrayObjectOES arrayObject);
-    [StrictTypeChecking] boolean      isVertexArrayOES([Optional=DefaultIsUndefined] WebGLVertexArrayObjectOES arrayObject);
-    [StrictTypeChecking, RaisesException] void         bindVertexArrayOES([Optional=DefaultIsUndefined] WebGLVertexArrayObjectOES arrayObject);
+    [StrictTypeChecking] void         deleteVertexArrayOES([Default=Undefined] optional WebGLVertexArrayObjectOES arrayObject);
+    [StrictTypeChecking] boolean      isVertexArrayOES([Default=Undefined] optional WebGLVertexArrayObjectOES arrayObject);
+    [StrictTypeChecking, RaisesException] void         bindVertexArrayOES([Default=Undefined] optional WebGLVertexArrayObjectOES arrayObject);
 };
diff --git a/html/canvas/Uint16Array.idl b/core/html/canvas/Uint16Array.idl
similarity index 88%
rename from html/canvas/Uint16Array.idl
rename to core/html/canvas/Uint16Array.idl
index e777687..ece7cde 100644
--- a/html/canvas/Uint16Array.idl
+++ b/core/html/canvas/Uint16Array.idl
@@ -36,9 +36,9 @@
     const unsigned long BYTES_PER_ELEMENT = 2;
 
     readonly attribute unsigned long length;
-    Uint16Array subarray([Optional=DefaultIsUndefined] long start, [Optional] long end);
+    Uint16Array subarray([Default=Undefined] optional long start, optional long end);
 
-    // void set(Uint16Array array, [Optional] in unsigned long offset);
-    // void set(sequence<long> array, [Optional] in unsigned long offset);
+    // void set(Uint16Array array, optional in unsigned long offset);
+    // void set(sequence<long> array, optional in unsigned long offset);
     void set();
 };
diff --git a/html/canvas/Uint32Array.idl b/core/html/canvas/Uint32Array.idl
similarity index 88%
rename from html/canvas/Uint32Array.idl
rename to core/html/canvas/Uint32Array.idl
index 8dfaeba..155d587 100644
--- a/html/canvas/Uint32Array.idl
+++ b/core/html/canvas/Uint32Array.idl
@@ -36,9 +36,9 @@
     const unsigned long BYTES_PER_ELEMENT = 4;
 
     readonly attribute unsigned long length;
-    Uint32Array subarray([Optional=DefaultIsUndefined] long start, [Optional] long end);
+    Uint32Array subarray([Default=Undefined] optional long start, optional long end);
 
-    // void set(Uint32Array array, [Optional] in unsigned long offset);
-    // void set(sequence<long> array, [Optional] in unsigned long offset);
+    // void set(Uint32Array array, optional in unsigned long offset);
+    // void set(sequence<long> array, optional in unsigned long offset);
     void set();
 };
diff --git a/html/canvas/Uint8Array.idl b/core/html/canvas/Uint8Array.idl
similarity index 88%
rename from html/canvas/Uint8Array.idl
rename to core/html/canvas/Uint8Array.idl
index f91663e..f946f09 100644
--- a/html/canvas/Uint8Array.idl
+++ b/core/html/canvas/Uint8Array.idl
@@ -36,9 +36,9 @@
     const unsigned long BYTES_PER_ELEMENT = 1;
 
     readonly attribute unsigned long length;
-    Uint8Array subarray([Optional=DefaultIsUndefined] long start, [Optional] long end);
+    Uint8Array subarray([Default=Undefined] optional long start, optional long end);
 
-    // void set(Uint8Array array, [Optional] in unsigned long offset);
-    // void set(sequence<long> array, [Optional] in unsigned long offset);
+    // void set(Uint8Array array, optional in unsigned long offset);
+    // void set(sequence<long> array, optional in unsigned long offset);
     void set();
 };
diff --git a/html/canvas/Uint8ClampedArray.idl b/core/html/canvas/Uint8ClampedArray.idl
similarity index 87%
rename from html/canvas/Uint8ClampedArray.idl
rename to core/html/canvas/Uint8ClampedArray.idl
index 8359c5c..c114643 100644
--- a/html/canvas/Uint8ClampedArray.idl
+++ b/core/html/canvas/Uint8ClampedArray.idl
@@ -36,10 +36,10 @@
     const unsigned long BYTES_PER_ELEMENT = 1;
 
     readonly attribute unsigned long length;
-    Uint8ClampedArray subarray([Optional=DefaultIsUndefined] long start, [Optional] long end);
+    Uint8ClampedArray subarray([Default=Undefined] optional long start, optional long end);
 
     // FIXME: Missing other setters!
-    // void set(Uint8ClampedArray array, [Optional] in unsigned long offset);
-    // void set(sequence<long> array, [Optional] in unsigned long offset);
+    // void set(Uint8ClampedArray array, optional in unsigned long offset);
+    // void set(sequence<long> array, optional in unsigned long offset);
     void set();
 };
diff --git a/html/canvas/WebGLActiveInfo.idl b/core/html/canvas/WebGLActiveInfo.idl
similarity index 100%
rename from html/canvas/WebGLActiveInfo.idl
rename to core/html/canvas/WebGLActiveInfo.idl
diff --git a/html/canvas/WebGLBuffer.idl b/core/html/canvas/WebGLBuffer.idl
similarity index 100%
rename from html/canvas/WebGLBuffer.idl
rename to core/html/canvas/WebGLBuffer.idl
diff --git a/html/canvas/WebGLCompressedTextureATC.idl b/core/html/canvas/WebGLCompressedTextureATC.idl
similarity index 100%
rename from html/canvas/WebGLCompressedTextureATC.idl
rename to core/html/canvas/WebGLCompressedTextureATC.idl
diff --git a/html/canvas/WebGLCompressedTexturePVRTC.idl b/core/html/canvas/WebGLCompressedTexturePVRTC.idl
similarity index 100%
rename from html/canvas/WebGLCompressedTexturePVRTC.idl
rename to core/html/canvas/WebGLCompressedTexturePVRTC.idl
diff --git a/html/canvas/WebGLCompressedTextureS3TC.idl b/core/html/canvas/WebGLCompressedTextureS3TC.idl
similarity index 100%
rename from html/canvas/WebGLCompressedTextureS3TC.idl
rename to core/html/canvas/WebGLCompressedTextureS3TC.idl
diff --git a/html/canvas/WebGLContextAttributes.idl b/core/html/canvas/WebGLContextAttributes.idl
similarity index 100%
rename from html/canvas/WebGLContextAttributes.idl
rename to core/html/canvas/WebGLContextAttributes.idl
diff --git a/html/canvas/WebGLContextEvent.idl b/core/html/canvas/WebGLContextEvent.idl
similarity index 100%
rename from html/canvas/WebGLContextEvent.idl
rename to core/html/canvas/WebGLContextEvent.idl
diff --git a/html/canvas/WebGLDebugRendererInfo.idl b/core/html/canvas/WebGLDebugRendererInfo.idl
similarity index 100%
rename from html/canvas/WebGLDebugRendererInfo.idl
rename to core/html/canvas/WebGLDebugRendererInfo.idl
diff --git a/html/canvas/WebGLDebugShaders.idl b/core/html/canvas/WebGLDebugShaders.idl
similarity index 100%
rename from html/canvas/WebGLDebugShaders.idl
rename to core/html/canvas/WebGLDebugShaders.idl
diff --git a/html/canvas/WebGLDepthTexture.idl b/core/html/canvas/WebGLDepthTexture.idl
similarity index 100%
rename from html/canvas/WebGLDepthTexture.idl
rename to core/html/canvas/WebGLDepthTexture.idl
diff --git a/html/canvas/WebGLFramebuffer.idl b/core/html/canvas/WebGLFramebuffer.idl
similarity index 100%
rename from html/canvas/WebGLFramebuffer.idl
rename to core/html/canvas/WebGLFramebuffer.idl
diff --git a/html/canvas/WebGLLoseContext.idl b/core/html/canvas/WebGLLoseContext.idl
similarity index 100%
rename from html/canvas/WebGLLoseContext.idl
rename to core/html/canvas/WebGLLoseContext.idl
diff --git a/html/canvas/WebGLProgram.idl b/core/html/canvas/WebGLProgram.idl
similarity index 100%
rename from html/canvas/WebGLProgram.idl
rename to core/html/canvas/WebGLProgram.idl
diff --git a/html/canvas/WebGLRenderbuffer.idl b/core/html/canvas/WebGLRenderbuffer.idl
similarity index 100%
rename from html/canvas/WebGLRenderbuffer.idl
rename to core/html/canvas/WebGLRenderbuffer.idl
diff --git a/html/canvas/WebGLRenderingContext.idl b/core/html/canvas/WebGLRenderingContext.idl
similarity index 100%
rename from html/canvas/WebGLRenderingContext.idl
rename to core/html/canvas/WebGLRenderingContext.idl
diff --git a/html/canvas/WebGLShader.idl b/core/html/canvas/WebGLShader.idl
similarity index 100%
rename from html/canvas/WebGLShader.idl
rename to core/html/canvas/WebGLShader.idl
diff --git a/html/canvas/WebGLShaderPrecisionFormat.idl b/core/html/canvas/WebGLShaderPrecisionFormat.idl
similarity index 100%
rename from html/canvas/WebGLShaderPrecisionFormat.idl
rename to core/html/canvas/WebGLShaderPrecisionFormat.idl
diff --git a/html/canvas/WebGLTexture.idl b/core/html/canvas/WebGLTexture.idl
similarity index 100%
rename from html/canvas/WebGLTexture.idl
rename to core/html/canvas/WebGLTexture.idl
diff --git a/html/canvas/WebGLUniformLocation.idl b/core/html/canvas/WebGLUniformLocation.idl
similarity index 100%
rename from html/canvas/WebGLUniformLocation.idl
rename to core/html/canvas/WebGLUniformLocation.idl
diff --git a/html/canvas/WebGLVertexArrayObjectOES.idl b/core/html/canvas/WebGLVertexArrayObjectOES.idl
similarity index 100%
rename from html/canvas/WebGLVertexArrayObjectOES.idl
rename to core/html/canvas/WebGLVertexArrayObjectOES.idl
diff --git a/html/shadow/HTMLContentElement.idl b/core/html/shadow/HTMLContentElement.idl
similarity index 100%
rename from html/shadow/HTMLContentElement.idl
rename to core/html/shadow/HTMLContentElement.idl
diff --git a/html/shadow/HTMLShadowElement.idl b/core/html/shadow/HTMLShadowElement.idl
similarity index 100%
rename from html/shadow/HTMLShadowElement.idl
rename to core/html/shadow/HTMLShadowElement.idl
diff --git a/html/track/TextTrack.idl b/core/html/track/TextTrack.idl
similarity index 93%
rename from html/track/TextTrack.idl
rename to core/html/track/TextTrack.idl
index 592047c..a2ad6d1 100644
--- a/html/track/TextTrack.idl
+++ b/core/html/track/TextTrack.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO_TRACK,
     EnabledAtRuntime=webkitVideoTrack,
     EventTarget,
     SkipVTableValidation
@@ -51,9 +50,9 @@
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/html/track/TextTrackCue.idl b/core/html/track/TextTrackCue.idl
similarity index 94%
rename from html/track/TextTrackCue.idl
rename to core/html/track/TextTrackCue.idl
index e21579a..ea2ca4c 100644
--- a/html/track/TextTrackCue.idl
+++ b/core/html/track/TextTrackCue.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO_TRACK,
     EnabledAtRuntime=webkitVideoTrack,
     Constructor(double startTime, double endTime, DOMString text),
     CallWith=ScriptExecutionContext,
@@ -54,10 +53,10 @@
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 
 #if defined(ENABLE_WEBVTT_REGIONS) && ENABLE_WEBVTT_REGIONS
diff --git a/html/track/TextTrackCueList.idl b/core/html/track/TextTrackCueList.idl
similarity index 97%
rename from html/track/TextTrackCueList.idl
rename to core/html/track/TextTrackCueList.idl
index 3c163ad..1c5b63f 100644
--- a/html/track/TextTrackCueList.idl
+++ b/core/html/track/TextTrackCueList.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO_TRACK,
     EnabledAtRuntime=webkitVideoTrack,
     IndexedGetter,
     ImplementationLacksVTable
diff --git a/html/track/TextTrackList.idl b/core/html/track/TextTrackList.idl
similarity index 92%
rename from html/track/TextTrackList.idl
rename to core/html/track/TextTrackList.idl
index 2ad9345..b837eaf 100644
--- a/html/track/TextTrackList.idl
+++ b/core/html/track/TextTrackList.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO_TRACK,
     EnabledAtRuntime=webkitVideoTrack,
     IndexedGetter,
     EventTarget,
@@ -37,10 +36,10 @@
 
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
 
diff --git a/html/track/TextTrackRegion.idl b/core/html/track/TextTrackRegion.idl
similarity index 97%
rename from html/track/TextTrackRegion.idl
rename to core/html/track/TextTrackRegion.idl
index db84177..2e80ca3 100644
--- a/html/track/TextTrackRegion.idl
+++ b/core/html/track/TextTrackRegion.idl
@@ -24,7 +24,7 @@
  */
 
 [
-    Conditional=VIDEO_TRACK & WEBVTT_REGIONS,
+    Conditional=WEBVTT_REGIONS,
     EnabledAtRuntime=webkitVideoTrack,
     Constructor()
 ] interface TextTrackRegion {
diff --git a/html/track/TextTrackRegionList.idl b/core/html/track/TextTrackRegionList.idl
similarity index 96%
rename from html/track/TextTrackRegionList.idl
rename to core/html/track/TextTrackRegionList.idl
index 94fa097..49c6772 100644
--- a/html/track/TextTrackRegionList.idl
+++ b/core/html/track/TextTrackRegionList.idl
@@ -24,7 +24,7 @@
  */
 
 [
-    Conditional=VIDEO_TRACK & WEBVTT_REGIONS,
+    Conditional=WEBVTT_REGIONS,
     EnabledAtRuntime=webkitVideoTrack,
     IndexedGetter,
     ImplementationLacksVTable
diff --git a/html/track/TrackEvent.idl b/core/html/track/TrackEvent.idl
similarity index 97%
rename from html/track/TrackEvent.idl
rename to core/html/track/TrackEvent.idl
index e7a645f..1ebb29a 100644
--- a/html/track/TrackEvent.idl
+++ b/core/html/track/TrackEvent.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO_TRACK,
     EnabledAtRuntime=webkitVideoTrack,
     ConstructorTemplate=Event
 ] interface TrackEvent : Event {
diff --git a/inspector/CodeGeneratorInspector.py b/core/inspector/CodeGeneratorInspector.py
similarity index 95%
rename from inspector/CodeGeneratorInspector.py
rename to core/inspector/CodeGeneratorInspector.py
index 467fa3f..3eed902 100755
--- a/inspector/CodeGeneratorInspector.py
+++ b/core/inspector/CodeGeneratorInspector.py
@@ -84,6 +84,7 @@
     exit(1)
 
 
+# FIXME: move this methods under Capitalizer class below and remove duplications.
 def dash_to_camelcase(word):
     return ''.join(x.capitalize() or '-' for x in word.split('-'))
 
@@ -170,13 +171,10 @@
         field_name_res = Capitalizer.upper_camel_case_to_lower(domain_name) + "Agent"
 
         class Res(object):
-            skip_js_bind = domain_name in cls.skip_js_bind_domains
             agent_field_name = field_name_res
 
         return Res
 
-    skip_js_bind_domains = set(["DOMDebugger"])
-
 
 class RawTypes(object):
     @staticmethod
@@ -242,10 +240,6 @@
             return "\"\""
 
         @staticmethod
-        def get_js_bind_type():
-            return "string"
-
-        @staticmethod
         def get_validate_method_params():
             class ValidateMethodParams:
                 template_type = "String"
@@ -280,10 +274,6 @@
         def get_c_initializer():
             return "0"
 
-        @staticmethod
-        def get_js_bind_type():
-            return "number"
-
         @classmethod
         def get_raw_validator_call_text(cls):
             return "RuntimeCastHelper::assertInt"
@@ -318,10 +308,6 @@
             return "0"
 
         @staticmethod
-        def get_js_bind_type():
-            return "number"
-
-        @staticmethod
         def get_validate_method_params():
             class ValidateMethodParams:
                 template_type = "Number"
@@ -355,10 +341,6 @@
             return "false"
 
         @staticmethod
-        def get_js_bind_type():
-            return "boolean"
-
-        @staticmethod
         def get_validate_method_params():
             class ValidateMethodParams:
                 template_type = "Boolean"
@@ -394,10 +376,6 @@
             return "InspectorObject::create()"
 
         @staticmethod
-        def get_js_bind_type():
-            return "object"
-
-        @staticmethod
         def get_output_argument_prefix():
             return ""
 
@@ -435,10 +413,6 @@
             raise Exception("Unsupported")
 
         @staticmethod
-        def get_js_bind_type():
-            raise Exception("Unsupported")
-
-        @staticmethod
         def get_raw_validator_call_text():
             return "RuntimeCastHelper::assertAny"
 
@@ -472,10 +446,6 @@
             return "InspectorArray::create()"
 
         @staticmethod
-        def get_js_bind_type():
-            return "object"
-
-        @staticmethod
         def get_output_argument_prefix():
             return ""
 
@@ -1687,7 +1657,6 @@
     frontend_cpp = string.Template(file_header_ + CodeGeneratorInspectorStrings.frontend_cpp)
     typebuilder_h = string.Template(file_header_ + CodeGeneratorInspectorStrings.typebuilder_h)
     typebuilder_cpp = string.Template(file_header_ + CodeGeneratorInspectorStrings.typebuilder_cpp)
-    backend_js = string.Template(file_header_ + CodeGeneratorInspectorStrings.backend_js)
     param_container_access_code = CodeGeneratorInspectorStrings.param_container_access_code
 
 
@@ -1777,7 +1746,6 @@
     backend_method_name_declaration_list = []
     method_handler_list = []
     frontend_method_list = []
-    backend_js_domain_initializer_list = []
 
     backend_virtual_setters_list = []
     backend_agent_interface_list = []
@@ -1821,23 +1789,6 @@
 
             frontend_method_declaration_lines = []
 
-            Generator.backend_js_domain_initializer_list.append("// %s.\n" % domain_name)
-
-            if not domain_fixes.skip_js_bind:
-                Generator.backend_js_domain_initializer_list.append("InspectorBackend.register%sDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, \"%s\");\n" % (domain_name, domain_name))
-
-            if "types" in json_domain:
-                for json_type in json_domain["types"]:
-                    if "type" in json_type and json_type["type"] == "string" and "enum" in json_type:
-                        enum_name = "%s.%s" % (domain_name, json_type["id"])
-                        Generator.process_enum(json_type, enum_name)
-                    elif json_type["type"] == "object":
-                        if "properties" in json_type:
-                            for json_property in json_type["properties"]:
-                                if "type" in json_property and json_property["type"] == "string" and "enum" in json_property:
-                                    enum_name = "%s.%s%s" % (domain_name, json_type["id"], to_title_case(json_property["name"]))
-                                    Generator.process_enum(json_property, enum_name)
-
             if "events" in json_domain:
                 for json_event in json_domain["events"]:
                     Generator.process_event(json_event, domain_name, frontend_method_declaration_lines)
@@ -1866,17 +1817,6 @@
             Generator.backend_setters_list.append("    virtual void registerAgent(%s* %s) { ASSERT(!m_%s); m_%s = %s; }" % (agent_interface_name, agent_field_name, agent_field_name, agent_field_name, agent_field_name))
             Generator.backend_field_list.append("    %s* m_%s;" % (agent_interface_name, agent_field_name))
 
-            Generator.backend_js_domain_initializer_list.append("\n")
-
-    @staticmethod
-    def process_enum(json_enum, enum_name):
-        enum_members = []
-        for member in json_enum["enum"]:
-            enum_members.append("%s: \"%s\"" % (fix_camel_case(member), member))
-
-        Generator.backend_js_domain_initializer_list.append("InspectorBackend.registerEnum(\"%s\", {%s});\n" % (
-            enum_name, ", ".join(enum_members)))
-
     @staticmethod
     def process_event(json_event, domain_name, frontend_method_declaration_lines):
         event_name = json_event["name"]
@@ -1893,18 +1833,9 @@
                                        Generator.EventMethodStructTemplate,
                                        Generator.frontend_method_list, Templates.frontend_method, {"eventName": event_name})
 
-        backend_js_event_param_list = []
-        if json_parameters:
-            for parameter in json_parameters:
-                parameter_name = parameter["name"]
-                backend_js_event_param_list.append("\"%s\"" % parameter_name)
-
         frontend_method_declaration_lines.append(
             "        void %s(%s);\n" % (event_name, ", ".join(decl_parameter_list)))
 
-        Generator.backend_js_domain_initializer_list.append("InspectorBackend.registerEvent(\"%s.%s\", [%s]);\n" % (
-            domain_name, event_name, ", ".join(backend_js_event_param_list)))
-
     class EventMethodStructTemplate:
         @staticmethod
         def append_prolog(line_list):
@@ -1937,7 +1868,6 @@
         agent_call_param_list = []
         response_cook_list = []
         request_message_param = ""
-        js_parameters_text = ""
         if "parameters" in json_command:
             json_params = json_command["parameters"]
             method_in_code += Templates.param_container_access_code
@@ -1979,16 +1909,6 @@
                 agent_call_param_list.append(param)
                 Generator.backend_agent_interface_list.append(", %s in_%s" % (formal_param_type_pattern % non_optional_type_model.get_command_return_pass_model().get_return_var_type(), json_param_name))
 
-                js_bind_type = param_raw_type.get_js_bind_type()
-                js_param_text = "{\"name\": \"%s\", \"type\": \"%s\", \"optional\": %s}" % (
-                    json_param_name,
-                    js_bind_type,
-                    ("true" if ("optional" in json_parameter and json_parameter["optional"]) else "false"))
-
-                js_param_list.append(js_param_text)
-
-            js_parameters_text = ", ".join(js_param_list)
-
         response_cook_text = ""
         if json_command.get("async") == True:
             callback_name = Capitalizer.lower_camel_case_to_upper(json_command_name) + "Callback"
@@ -2066,14 +1986,6 @@
                 if len(response_cook_text) != 0:
                     response_cook_text = "        if (!error.length()) {\n" + response_cook_text + "        }"
 
-        backend_js_reply_param_list = []
-        if "returns" in json_command:
-            for json_return in json_command["returns"]:
-                json_return_name = json_return["name"]
-                backend_js_reply_param_list.append("\"%s\"" % json_return_name)
-
-        js_reply_list = "[%s]" % ", ".join(backend_js_reply_param_list)
-
         Generator.backend_method_implementation_list.append(Templates.backend_method.substitute(None,
             domainName=domain_name, methodName=json_command_name,
             agentField="m_" + agent_field_name,
@@ -2085,7 +1997,6 @@
             commandNameIndex=cmd_enum_name))
         Generator.backend_method_name_declaration_list.append("    \"%s.%s\"," % (domain_name, json_command_name))
 
-        Generator.backend_js_domain_initializer_list.append("InspectorBackend.registerCommand(\"%s.%s\", [%s], %s);\n" % (domain_name, json_command_name, js_parameters_text, js_reply_list))
         Generator.backend_agent_interface_list.append(") = 0;\n")
 
     class CallbackMethodStructTemplate:
@@ -2305,8 +2216,6 @@
 typebuilder_h_file = SmartOutput(output_header_dirname + "/InspectorTypeBuilder.h")
 typebuilder_cpp_file = SmartOutput(output_cpp_dirname + "/InspectorTypeBuilder.cpp")
 
-backend_js_file = SmartOutput(output_cpp_dirname + "/InspectorBackendCommands.js")
-
 
 backend_h_file.write(Templates.backend_h.substitute(None,
     virtualSetters="\n".join(Generator.backend_virtual_setters_list),
@@ -2341,9 +2250,6 @@
     validatorCode="".join(flatten_list(Generator.validator_impl_list)),
     validatorIfdefName=VALIDATOR_IFDEF_NAME))
 
-backend_js_file.write(Templates.backend_js.substitute(None,
-    domainInitializers="".join(Generator.backend_js_domain_initializer_list)))
-
 backend_h_file.close()
 backend_cpp_file.close()
 
@@ -2352,5 +2258,3 @@
 
 typebuilder_h_file.close()
 typebuilder_cpp_file.close()
-
-backend_js_file.close()
diff --git a/inspector/CodeGeneratorInspectorStrings.py b/core/inspector/CodeGeneratorInspectorStrings.py
similarity index 99%
rename from inspector/CodeGeneratorInspectorStrings.py
rename to core/inspector/CodeGeneratorInspectorStrings.py
index 741bf6a..0f0aae2 100644
--- a/inspector/CodeGeneratorInspectorStrings.py
+++ b/core/inspector/CodeGeneratorInspectorStrings.py
@@ -867,12 +867,6 @@
 
 """)
 
-backend_js = (
-"""
-
-$domainInitializers
-""")
-
 param_container_access_code = """
     RefPtr<InspectorObject> paramsContainer = requestMessageObject->getObject("params");
     InspectorObject* paramsContainerPtr = paramsContainer.get();
diff --git a/inspector/InjectedScriptHost.idl b/core/inspector/InjectedScriptHost.idl
similarity index 100%
rename from inspector/InjectedScriptHost.idl
rename to core/inspector/InjectedScriptHost.idl
diff --git a/inspector/InspectorFrontendHost.idl b/core/inspector/InspectorFrontendHost.idl
similarity index 96%
rename from inspector/InspectorFrontendHost.idl
rename to core/inspector/InspectorFrontendHost.idl
index 5d77709..2ebcf0a 100644
--- a/inspector/InspectorFrontendHost.idl
+++ b/core/inspector/InspectorFrontendHost.idl
@@ -40,7 +40,6 @@
 
     void requestSetDockSide(DOMString side);
     void setAttachedWindowHeight(unsigned long height);
-    void setAttachedWindowWidth(unsigned long width);
     void moveWindowBy(float x, float y);
     void setInjectedScriptForOrigin(DOMString origin, DOMString script);
 
@@ -60,6 +59,8 @@
     [Custom] void recordSettingChanged(unsigned long settingChanged);
 
     DOMString loadResourceSynchronously(DOMString url);
+    DOMString getSelectionBackgroundColor();
+    DOMString getSelectionForegroundColor();
 
     void requestFileSystems();
     void addFileSystem();
diff --git a/inspector/JavaScriptCallFrame.idl b/core/inspector/JavaScriptCallFrame.idl
similarity index 100%
rename from inspector/JavaScriptCallFrame.idl
rename to core/inspector/JavaScriptCallFrame.idl
diff --git a/inspector/ScriptProfile.idl b/core/inspector/ScriptProfile.idl
similarity index 100%
rename from inspector/ScriptProfile.idl
rename to core/inspector/ScriptProfile.idl
diff --git a/inspector/ScriptProfileNode.idl b/core/inspector/ScriptProfileNode.idl
similarity index 100%
rename from inspector/ScriptProfileNode.idl
rename to core/inspector/ScriptProfileNode.idl
diff --git a/inspector/inline-javascript-imports.py b/core/inspector/inline-javascript-imports.py
similarity index 100%
rename from inspector/inline-javascript-imports.py
rename to core/inspector/inline-javascript-imports.py
diff --git a/loader/appcache/DOMApplicationCache.idl b/core/loader/appcache/DOMApplicationCache.idl
similarity index 95%
rename from loader/appcache/DOMApplicationCache.idl
rename to core/loader/appcache/DOMApplicationCache.idl
index 9a8f128..ac54056 100644
--- a/loader/appcache/DOMApplicationCache.idl
+++ b/core/loader/appcache/DOMApplicationCache.idl
@@ -53,10 +53,10 @@
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
 
diff --git a/page/AbstractView.idl b/core/page/AbstractView.idl
similarity index 100%
rename from page/AbstractView.idl
rename to core/page/AbstractView.idl
diff --git a/page/BarInfo.idl b/core/page/BarInfo.idl
similarity index 100%
rename from page/BarInfo.idl
rename to core/page/BarInfo.idl
diff --git a/page/Console.idl b/core/page/Console.idl
similarity index 100%
rename from page/Console.idl
rename to core/page/Console.idl
diff --git a/page/Crypto.idl b/core/page/Crypto.idl
similarity index 100%
rename from page/Crypto.idl
rename to core/page/Crypto.idl
diff --git a/page/DOMPoint.idl b/core/page/DOMPoint.idl
similarity index 97%
rename from page/DOMPoint.idl
rename to core/page/DOMPoint.idl
index 26148d5..f131917 100644
--- a/page/DOMPoint.idl
+++ b/core/page/DOMPoint.idl
@@ -25,6 +25,7 @@
 
 [
     CustomConstructor,
+    CustomConstructor(float x, float y),
     InterfaceName=WebKitPoint,
     ImplementationLacksVTable
 ] interface DOMPoint {
diff --git a/page/DOMSecurityPolicy.idl b/core/page/DOMSecurityPolicy.idl
similarity index 100%
rename from page/DOMSecurityPolicy.idl
rename to core/page/DOMSecurityPolicy.idl
diff --git a/page/DOMSelection.idl b/core/page/DOMSelection.idl
similarity index 67%
rename from page/DOMSelection.idl
rename to core/page/DOMSelection.idl
index 07d962b..f5a6828 100644
--- a/page/DOMSelection.idl
+++ b/core/page/DOMSelection.idl
@@ -40,22 +40,22 @@
     readonly attribute boolean isCollapsed;
     readonly attribute long rangeCount;
 
-    [RaisesException] void collapse([Optional=DefaultIsUndefined] Node node, 
-                  [Optional=DefaultIsUndefined] long index);
+    [RaisesException] void collapse([Default=Undefined] optional Node node, 
+                  [Default=Undefined] optional long index);
     [RaisesException] void collapseToEnd();
     [RaisesException] void collapseToStart();
 
     void deleteFromDocument();
-    boolean containsNode([Optional=DefaultIsUndefined] Node node, 
-                         [Optional=DefaultIsUndefined] boolean allowPartial);
-    [RaisesException] void selectAllChildren([Optional=DefaultIsUndefined] Node node);
+    boolean containsNode([Default=Undefined] optional Node node, 
+                         [Default=Undefined] optional boolean allowPartial);
+    [RaisesException] void selectAllChildren([Default=Undefined] optional Node node);
 
-    [RaisesException] void extend([Optional=DefaultIsUndefined] Node node, 
-                [Optional=DefaultIsUndefined] long offset);
+    [RaisesException] void extend([Default=Undefined] optional Node node, 
+                [Default=Undefined] optional long offset);
 
-    [RaisesException] Range getRangeAt([Optional=DefaultIsUndefined] long index);
+    [RaisesException] Range getRangeAt([Default=Undefined] optional long index);
     void removeAllRanges();
-    void addRange([Optional=DefaultIsUndefined] Range range);
+    void addRange([Default=Undefined] optional Range range);
 
     [NotEnumerable] DOMString toString();
 
@@ -69,15 +69,15 @@
     // IE's type accessor returns "none", "text" and "control"
     readonly attribute DOMString type;
 
-    void modify([Optional=DefaultIsUndefined] DOMString alter, 
-                [Optional=DefaultIsUndefined] DOMString direction, 
-                [Optional=DefaultIsUndefined] DOMString granularity);
-    [RaisesException] void setBaseAndExtent([Optional=DefaultIsUndefined] Node baseNode, 
-                          [Optional=DefaultIsUndefined] long baseOffset, 
-                          [Optional=DefaultIsUndefined] Node extentNode, 
-                          [Optional=DefaultIsUndefined] long extentOffset);
-    [RaisesException] void setPosition([Optional=DefaultIsUndefined] Node node, 
-                     [Optional=DefaultIsUndefined] long offset);
+    void modify([Default=Undefined] optional DOMString alter, 
+                [Default=Undefined] optional DOMString direction, 
+                [Default=Undefined] optional DOMString granularity);
+    [RaisesException] void setBaseAndExtent([Default=Undefined] optional Node baseNode, 
+                          [Default=Undefined] optional long baseOffset, 
+                          [Default=Undefined] optional Node extentNode, 
+                          [Default=Undefined] optional long extentOffset);
+    [RaisesException] void setPosition([Default=Undefined] optional Node node, 
+                     [Default=Undefined] optional long offset);
 
     // IE extentions
     // http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx
diff --git a/page/DOMWindow.idl b/core/page/DOMWindow.idl
similarity index 86%
rename from page/DOMWindow.idl
rename to core/page/DOMWindow.idl
index c9ed86f..8af422d 100644
--- a/page/DOMWindow.idl
+++ b/core/page/DOMWindow.idl
@@ -44,7 +44,7 @@
     [Replaceable] readonly attribute BarInfo scrollbars;
     [Replaceable] readonly attribute BarInfo statusbar;
     [Replaceable] readonly attribute BarInfo toolbar;
-    [Replaceable] readonly attribute Navigator navigator;
+    [Replaceable, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds] readonly attribute Navigator navigator;
     [Replaceable] readonly attribute Navigator clientInformation;
     readonly attribute Crypto crypto;
     [DoNotCheckSecurity, CustomSetter, Unforgeable] attribute Location location;
@@ -63,24 +63,24 @@
 
     [Custom] DOMWindow open(DOMString url,
                             DOMString name,
-                            [Optional] DOMString options);
+                            optional DOMString options);
 
     [Custom] any showModalDialog(DOMString url,
-                                       [Optional] any dialogArgs,
-                                       [Optional] DOMString featureArgs);
+                                       optional any dialogArgs,
+                                       optional DOMString featureArgs);
 
-    void alert([Optional=DefaultIsUndefined] DOMString message);
-    boolean confirm([Optional=DefaultIsUndefined] DOMString message);
-    [TreatReturnedNullStringAs=Null] DOMString prompt([Optional=DefaultIsUndefined] DOMString message,
-                                                [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString defaultValue);
+    void alert([Default=Undefined] optional DOMString message);
+    boolean confirm([Default=Undefined] optional DOMString message);
+    [TreatReturnedNullStringAs=Null] DOMString prompt([Default=Undefined] optional DOMString message,
+                                                [TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString defaultValue);
 
-    boolean find([Optional=DefaultIsUndefined] DOMString string,
-                 [Optional=DefaultIsUndefined] boolean caseSensitive,
-                 [Optional=DefaultIsUndefined] boolean backwards,
-                 [Optional=DefaultIsUndefined] boolean wrap,
-                 [Optional=DefaultIsUndefined] boolean wholeWord,
-                 [Optional=DefaultIsUndefined] boolean searchInFrames,
-                 [Optional=DefaultIsUndefined] boolean showDialog);
+    boolean find([Default=Undefined] optional DOMString string,
+                 [Default=Undefined] optional boolean caseSensitive,
+                 [Default=Undefined] optional boolean backwards,
+                 [Default=Undefined] optional boolean wrap,
+                 [Default=Undefined] optional boolean wholeWord,
+                 [Default=Undefined] optional boolean searchInFrames,
+                 [Default=Undefined] optional boolean showDialog);
 
     [Replaceable] readonly attribute  boolean offscreenBuffering;
 
@@ -97,13 +97,13 @@
     readonly attribute long pageXOffset;
     readonly attribute long pageYOffset;
 
-    void scrollBy([Optional=DefaultIsUndefined] long x, [Optional=DefaultIsUndefined] long y);
-    void scrollTo([Optional=DefaultIsUndefined] long x, [Optional=DefaultIsUndefined] long y);
-    void scroll([Optional=DefaultIsUndefined] long x, [Optional=DefaultIsUndefined] long y);
-    void moveBy([Optional=DefaultIsUndefined] float x, [Optional=DefaultIsUndefined] float y); // FIXME: this should take longs not floats.
-    void moveTo([Optional=DefaultIsUndefined] float x, [Optional=DefaultIsUndefined] float y); // FIXME: this should take longs not floats.
-    void resizeBy([Optional=DefaultIsUndefined] float x, [Optional=DefaultIsUndefined] float y); // FIXME: this should take longs not floats.
-    void resizeTo([Optional=DefaultIsUndefined] float width, [Optional=DefaultIsUndefined] float height); // FIXME: this should take longs not floats.
+    void scrollBy([Default=Undefined] optional long x, [Default=Undefined] optional long y);
+    void scrollTo([Default=Undefined] optional long x, [Default=Undefined] optional long y);
+    void scroll([Default=Undefined] optional long x, [Default=Undefined] optional long y);
+    void moveBy([Default=Undefined] optional float x, [Default=Undefined] optional float y); // FIXME: this should take longs not floats.
+    void moveTo([Default=Undefined] optional float x, [Default=Undefined] optional float y); // FIXME: this should take longs not floats.
+    void resizeBy([Default=Undefined] optional float x, [Default=Undefined] optional float y); // FIXME: this should take longs not floats.
+    void resizeTo([Default=Undefined] optional float width, [Default=Undefined] optional float height); // FIXME: this should take longs not floats.
 
     [DoNotCheckSecurity] readonly attribute boolean closed;
 
@@ -135,24 +135,24 @@
     readonly attribute StyleMedia styleMedia;
 
     // DOM Level 2 Style Interface
-    [PerWorldBindings] CSSStyleDeclaration getComputedStyle([Optional=DefaultIsUndefined] Element element,
-                                                              [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString pseudoElement);
+    [PerWorldBindings] CSSStyleDeclaration getComputedStyle([Default=Undefined] optional Element element,
+                                                              [TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString pseudoElement);
 
     // WebKit extensions
-    CSSRuleList getMatchedCSSRules([Optional=DefaultIsUndefined] Element element,
-                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString pseudoElement);
+    CSSRuleList getMatchedCSSRules([Default=Undefined] optional Element element,
+                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString pseudoElement);
 
     [Replaceable] readonly attribute double devicePixelRatio;
     
-    DOMPoint webkitConvertPointFromPageToNode([Optional=DefaultIsUndefined] Node node,
-                                              [Optional=DefaultIsUndefined] DOMPoint p);
-    DOMPoint webkitConvertPointFromNodeToPage([Optional=DefaultIsUndefined] Node node,
-                                              [Optional=DefaultIsUndefined] DOMPoint p);
+    DOMPoint webkitConvertPointFromPageToNode([Default=Undefined] optional Node node,
+                                              [Default=Undefined] optional DOMPoint p);
+    DOMPoint webkitConvertPointFromNodeToPage([Default=Undefined] optional Node node,
+                                              [Default=Undefined] optional DOMPoint p);
 
-    [EnabledAtRuntime] readonly attribute DOMApplicationCache applicationCache;
+    [EnabledAtRuntime, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds] readonly attribute DOMApplicationCache applicationCache;
 
-    [EnabledAtRuntime, GetterRaisesException] readonly attribute Storage sessionStorage;
-    [EnabledAtRuntime, GetterRaisesException] readonly attribute Storage localStorage;
+    [EnabledAtRuntime, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds, GetterRaisesException] readonly attribute Storage sessionStorage;
+    [EnabledAtRuntime, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds, GetterRaisesException] readonly attribute Storage localStorage;
 
 #if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS
     // This is the interface orientation in degrees. Some examples are:
@@ -164,15 +164,15 @@
     [Replaceable] readonly attribute Console console;
 
     // cross-document messaging
-    [DoNotCheckSecurity, Custom, RaisesException] void postMessage(SerializedScriptValue message, DOMString targetOrigin, [Optional] Array messagePorts);
+    [DoNotCheckSecurity, Custom, RaisesException] void postMessage(SerializedScriptValue message, DOMString targetOrigin, optional Array messagePorts);
 
     [Replaceable] readonly attribute Performance performance;
 
     // Timers
-    [Custom] long setTimeout(any handler, [Optional=DefaultIsUndefined] long timeout);
-    void clearTimeout([Optional=DefaultIsUndefined] long handle);
-    [Custom] long setInterval(any handler, [Optional=DefaultIsUndefined] long timeout);
-    void clearInterval([Optional=DefaultIsUndefined] long handle);
+    [Custom] long setTimeout(any handler, [Default=Undefined] optional long timeout);
+    void clearTimeout([Default=Undefined] optional long handle);
+    [Custom] long setInterval(any handler, [Default=Undefined] optional long timeout);
+    void clearInterval([Default=Undefined] optional long handle);
 
     [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame([Callback] RequestAnimationFrameCallback callback);
     void cancelAnimationFrame(long id);
@@ -181,8 +181,8 @@
     [ImplementedAs=cancelAnimationFrame] void webkitCancelRequestAnimationFrame(long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove this when removing vendor prefix.
 
     // Base64
-    [RaisesException] DOMString atob([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString string);
-    [RaisesException] DOMString btoa([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString string);
+    [RaisesException] DOMString atob([TreatNullAs=NullString,Default=Undefined] optional DOMString string);
+    [RaisesException] DOMString btoa([TreatNullAs=NullString,Default=Undefined] optional DOMString string);
 
     [Replaceable,Conditional=CSS3_CONDITIONAL_RULES] attribute DOMWindowCSS CSS;
 
@@ -268,23 +268,21 @@
 #if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS
     attribute EventListener onorientationchange;
 #endif
-    [Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch] attribute EventListener ontouchstart;
-    [Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch] attribute EventListener ontouchmove;
-    [Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch] attribute EventListener ontouchend;
-    [Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch] attribute EventListener ontouchcancel;
+    [EnabledAtRuntime=touch] attribute EventListener ontouchstart;
+    [EnabledAtRuntime=touch] attribute EventListener ontouchmove;
+    [EnabledAtRuntime=touch] attribute EventListener ontouchend;
+    [EnabledAtRuntime=touch] attribute EventListener ontouchcancel;
 
     [EnabledAtRuntime] attribute EventListener ondevicemotion;
     [EnabledAtRuntime] attribute EventListener ondeviceorientation;
 
-    [Conditional=PROXIMITY_EVENTS] attribute EventListener onwebkitdeviceproximity;
-
     // EventTarget interface
     [Custom] void addEventListener(DOMString type,
                                   EventListener listener,
-                                  [Optional] boolean useCapture);
+                                  optional boolean useCapture);
     [Custom] void removeEventListener(DOMString type,
                                       EventListener listener,
-                                      [Optional] boolean useCapture);
+                                      optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 
     [Custom] void captureEvents(/*in long eventFlags*/);
@@ -302,9 +300,7 @@
     attribute WebKitCSSFilterRuleConstructor WebKitCSSFilterRule;
     attribute WebKitCSSMixFunctionValueConstructor WebKitCSSMixFunctionValue;
 
-#if defined(ENABLE_CSS_FILTERS) && ENABLE_CSS_FILTERS
     attribute WebKitCSSFilterValueConstructor WebKitCSSFilterValue;
-#endif
 
 #if defined(ENABLE_CSS_DEVICE_ADAPTATION) && ENABLE_CSS_DEVICE_ADAPTATION
     attribute WebKitCSSViewportRuleConstructor WebKitCSSViewportRule;
@@ -340,7 +336,6 @@
     attribute DocumentConstructor Document;
     attribute NodeConstructor Node;
     attribute NodeListConstructor NodeList;
-    [Conditional=MICRODATA] attribute PropertyNodeListConstructor PropertyNodeList;
     attribute NamedNodeMapConstructor NamedNodeMap;
     attribute CharacterDataConstructor CharacterData;
     attribute AttrConstructor Attr;
@@ -374,7 +369,6 @@
     attribute HTMLAreaElementConstructor HTMLAreaElement;
     attribute HTMLBRElementConstructor HTMLBRElement;
     attribute HTMLBaseElementConstructor HTMLBaseElement;
-    attribute HTMLBaseFontElementConstructor HTMLBaseFontElement;
     attribute HTMLBodyElementConstructor HTMLBodyElement;
     attribute HTMLButtonElementConstructor HTMLButtonElement;
     attribute HTMLCanvasElementConstructor HTMLCanvasElement;
@@ -436,7 +430,6 @@
     attribute HTMLAllCollectionConstructor HTMLAllCollection;
     attribute HTMLFormControlsCollectionConstructor HTMLFormControlsCollection;
     attribute HTMLOptionsCollectionConstructor HTMLOptionsCollection;
-    [Conditional=MICRODATA] attribute HTMLPropertiesCollectionConstructor HTMLPropertiesCollection;
     attribute HTMLUnknownElementConstructor HTMLUnknownElement;
 
     [CustomConstructor] attribute HTMLImageElementConstructorConstructor Image; // Usable with new operator
@@ -448,13 +441,13 @@
     [Conditional=ENCRYPTED_MEDIA_V2, EnabledAtRuntime=encryptedMedia] attribute MediaKeyMessageEventConstructor MediaKeyMessageEvent;
     [Conditional=ENCRYPTED_MEDIA_V2, EnabledAtRuntime=encryptedMedia] attribute MediaKeyNeededEventConstructor MediaKeyNeededEvent;
 
-    [Conditional=VIDEO_TRACK, EnabledAtRuntime=webkitVideoTrack] attribute HTMLTrackElementConstructor HTMLTrackElement;
-    [Conditional=VIDEO_TRACK, EnabledAtRuntime=webkitVideoTrack] attribute TextTrackConstructor TextTrack;
-    [Conditional=VIDEO_TRACK, EnabledAtRuntime=webkitVideoTrack] attribute TextTrackCueConstructor TextTrackCue; // Usable with the new operator
-    [Conditional=VIDEO_TRACK, EnabledAtRuntime=webkitVideoTrack] attribute TextTrackCueListConstructor TextTrackCueList;
-    [Conditional=VIDEO_TRACK, EnabledAtRuntime=webkitVideoTrack] attribute TextTrackListConstructor TextTrackList;
-    [Conditional=VIDEO_TRACK & WEBVTT_REGIONS, EnabledAtRuntime=webkitVideoTrack] attribute TextTrackRegionConstructor TextTrackRegion; // Usable with the new operator
-    [Conditional=VIDEO_TRACK, EnabledAtRuntime=webkitVideoTrack] attribute TrackEventConstructor TrackEvent;
+    [EnabledAtRuntime=webkitVideoTrack] attribute HTMLTrackElementConstructor HTMLTrackElement;
+    [EnabledAtRuntime=webkitVideoTrack] attribute TextTrackConstructor TextTrack;
+    [EnabledAtRuntime=webkitVideoTrack] attribute TextTrackCueConstructor TextTrackCue; // Usable with the new operator
+    [EnabledAtRuntime=webkitVideoTrack] attribute TextTrackCueListConstructor TextTrackCueList;
+    [EnabledAtRuntime=webkitVideoTrack] attribute TextTrackListConstructor TextTrackList;
+    [Conditional=WEBVTT_REGIONS, EnabledAtRuntime=webkitVideoTrack] attribute TextTrackRegionConstructor TextTrackRegion; // Usable with the new operator
+    [EnabledAtRuntime=webkitVideoTrack] attribute TrackEventConstructor TrackEvent;
 
     [Conditional=VIDEO, EnabledAtRuntime] attribute HTMLAudioElementConstructorConstructor Audio; // Usable with the new operator
     [Conditional=VIDEO, EnabledAtRuntime] attribute HTMLAudioElementConstructor HTMLAudioElement;
@@ -523,13 +516,12 @@
     attribute XMLHttpRequestProgressEventConstructor XMLHttpRequestProgressEvent;
     [EnabledAtRuntime] attribute DeviceMotionEventConstructor DeviceMotionEvent;
     [EnabledAtRuntime] attribute DeviceOrientationEventConstructor DeviceOrientationEvent;
-    [Conditional=TOUCH_EVENTS, EnabledAtRuntime=touch] attribute TouchConstructor Touch;
-    [Conditional=TOUCH_EVENTS, EnabledAtRuntime=touch] attribute TouchEventConstructor TouchEvent;
-    [Conditional=TOUCH_EVENTS, EnabledAtRuntime=touch] attribute TouchListConstructor TouchList;
+    [EnabledAtRuntime=touch] attribute TouchConstructor Touch;
+    [EnabledAtRuntime=touch] attribute TouchEventConstructor TouchEvent;
+    [EnabledAtRuntime=touch] attribute TouchListConstructor TouchList;
     attribute StorageEventConstructor StorageEvent;
     [Conditional=INPUT_SPEECH] attribute SpeechInputEventConstructor SpeechInputEvent;
     [Conditional=WEBGL] attribute WebGLContextEventConstructor WebGLContextEvent;
-    [Conditional=PROXIMITY_EVENTS] attribute DeviceProximityEventConstructor DeviceProximityEvent;
     [EnabledAtRuntime=requestAutocomplete] attribute AutocompleteErrorEventConstructor AutocompleteErrorEvent;
     [EnabledAtRuntime=experimentalContentSecurityPolicyFeatures] attribute SecurityPolicyViolationEventConstructor SecurityPolicyViolationEvent;
 
@@ -566,7 +558,7 @@
     attribute XMLHttpRequestConstructor XMLHttpRequest; // Usable with the new operator
     attribute XMLHttpRequestUploadConstructor XMLHttpRequestUpload;
     attribute XMLHttpRequestExceptionConstructor XMLHttpRequestException;
-    [Conditional=XSLT] attribute XSLTProcessorConstructor XSLTProcessor; // Usable with the new operator
+    attribute XSLTProcessorConstructor XSLTProcessor; // Usable with the new operator
 
 #if defined(ENABLE_CHANNEL_MESSAGING) && ENABLE_CHANNEL_MESSAGING
     attribute MessagePortConstructor MessagePort;
diff --git a/page/DOMWindowPagePopup.idl b/core/page/DOMWindowPagePopup.idl
similarity index 100%
rename from page/DOMWindowPagePopup.idl
rename to core/page/DOMWindowPagePopup.idl
diff --git a/page/EventSource.idl b/core/page/EventSource.idl
similarity index 92%
rename from page/EventSource.idl
rename to core/page/EventSource.idl
index 0dd5c6d..5fb672d 100644
--- a/page/EventSource.idl
+++ b/core/page/EventSource.idl
@@ -31,7 +31,7 @@
 
 [
     ActiveDOMObject,
-    Constructor(DOMString url, [Optional] Dictionary eventSourceInit),
+    Constructor(DOMString url, optional Dictionary eventSourceInit),
     CallWith=ScriptExecutionContext,
     RaisesException,
     EventTarget
@@ -56,10 +56,10 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 
 };
diff --git a/page/History.idl b/core/page/History.idl
similarity index 91%
rename from page/History.idl
rename to core/page/History.idl
index 4f1e09e..92d889a 100644
--- a/page/History.idl
+++ b/core/page/History.idl
@@ -34,8 +34,8 @@
 
     [DoNotCheckSecurity, CallWith=ScriptExecutionContext] void back();
     [DoNotCheckSecurity, CallWith=ScriptExecutionContext] void forward();
-    [DoNotCheckSecurity, CallWith=ScriptExecutionContext] void go([Optional=DefaultIsUndefined] long distance);
+    [DoNotCheckSecurity, CallWith=ScriptExecutionContext] void go([Default=Undefined] optional long distance);
 
-    [Custom, EnabledPerContext=pushState, RaisesException] void pushState(any data, DOMString title, [Optional] DOMString url);
-    [Custom, EnabledPerContext=pushState, RaisesException] void replaceState(any data, DOMString title, [Optional] DOMString url);
+    [Custom, EnabledPerContext=pushState, RaisesException] void pushState(any data, DOMString title, optional DOMString url);
+    [Custom, EnabledPerContext=pushState, RaisesException] void replaceState(any data, DOMString title, optional DOMString url);
 };
diff --git a/page/Location.idl b/core/page/Location.idl
similarity index 89%
rename from page/Location.idl
rename to core/page/Location.idl
index 746ecb5..9bcae96 100644
--- a/page/Location.idl
+++ b/core/page/Location.idl
@@ -34,8 +34,8 @@
 ] interface Location {
     [DoNotCheckSecurityOnSetter, CustomSetter, Unforgeable] attribute DOMString href;
 
-    [Custom, Unforgeable] void assign([Optional=DefaultIsUndefined] DOMString url);
-    [Custom, Unforgeable] void replace([Optional=DefaultIsUndefined] DOMString url);
+    [Custom, Unforgeable, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void assign([Default=Undefined] optional DOMString url);
+    [Custom, Unforgeable, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void replace([Default=Undefined] optional DOMString url);
     [Custom, Unforgeable] void reload();
 
     // URI decomposition attributes
diff --git a/page/MemoryInfo.idl b/core/page/MemoryInfo.idl
similarity index 100%
rename from page/MemoryInfo.idl
rename to core/page/MemoryInfo.idl
diff --git a/page/Navigator.idl b/core/page/Navigator.idl
similarity index 100%
rename from page/Navigator.idl
rename to core/page/Navigator.idl
diff --git a/page/PagePopupController.idl b/core/page/PagePopupController.idl
similarity index 100%
rename from page/PagePopupController.idl
rename to core/page/PagePopupController.idl
diff --git a/page/Performance.idl b/core/page/Performance.idl
similarity index 81%
rename from page/Performance.idl
rename to core/page/Performance.idl
index 8f1f87a..6cc9ec6 100644
--- a/page/Performance.idl
+++ b/core/page/Performance.idl
@@ -37,9 +37,9 @@
     readonly attribute PerformanceTiming timing;
     readonly attribute MemoryInfo memory;
 
-    PerformanceEntryList webkitGetEntries();
-    PerformanceEntryList webkitGetEntriesByType(DOMString entryType);
-    PerformanceEntryList webkitGetEntriesByName(DOMString name, [Optional=DefaultIsNullString] DOMString entryType);
+    sequence<PerformanceEntry> webkitGetEntries();
+    sequence<PerformanceEntry> webkitGetEntriesByType(DOMString entryType);
+    sequence<PerformanceEntry> webkitGetEntriesByName(DOMString name, [Default=NullString] optional DOMString entryType);
 
     void webkitClearResourceTimings();
     void webkitSetResourceTimingBufferSize(unsigned long maxSize);
@@ -48,10 +48,10 @@
 
     // See http://www.w3.org/TR/2012/CR-user-timing-20120726/
     [RaisesException] void webkitMark(DOMString markName);
-    void webkitClearMarks([Optional=DefaultIsNullString]  DOMString markName);
+    void webkitClearMarks([Default=NullString] optional  DOMString markName);
 
-    [RaisesException] void webkitMeasure(DOMString measureName, [Optional=DefaultIsNullString] DOMString startMark, [Optional=DefaultIsNullString] DOMString endMark);
-    void webkitClearMeasures([Optional=DefaultIsNullString] DOMString measureName);
+    [RaisesException] void webkitMeasure(DOMString measureName, [Default=NullString] optional DOMString startMark, [Default=NullString] optional DOMString endMark);
+    void webkitClearMeasures([Default=NullString] optional DOMString measureName);
 
     // See http://www.w3.org/TR/hr-time/ for details.
     double now();
diff --git a/page/PerformanceEntry.idl b/core/page/PerformanceEntry.idl
similarity index 100%
rename from page/PerformanceEntry.idl
rename to core/page/PerformanceEntry.idl
diff --git a/page/PerformanceEntryList.idl b/core/page/PerformanceEntryList.idl
similarity index 100%
rename from page/PerformanceEntryList.idl
rename to core/page/PerformanceEntryList.idl
diff --git a/page/PerformanceMark.idl b/core/page/PerformanceMark.idl
similarity index 100%
rename from page/PerformanceMark.idl
rename to core/page/PerformanceMark.idl
diff --git a/page/PerformanceMeasure.idl b/core/page/PerformanceMeasure.idl
similarity index 100%
rename from page/PerformanceMeasure.idl
rename to core/page/PerformanceMeasure.idl
diff --git a/page/PerformanceNavigation.idl b/core/page/PerformanceNavigation.idl
similarity index 100%
rename from page/PerformanceNavigation.idl
rename to core/page/PerformanceNavigation.idl
diff --git a/page/PerformanceResourceTiming.idl b/core/page/PerformanceResourceTiming.idl
similarity index 100%
rename from page/PerformanceResourceTiming.idl
rename to core/page/PerformanceResourceTiming.idl
diff --git a/page/PerformanceTiming.idl b/core/page/PerformanceTiming.idl
similarity index 100%
rename from page/PerformanceTiming.idl
rename to core/page/PerformanceTiming.idl
diff --git a/page/Screen.idl b/core/page/Screen.idl
similarity index 100%
rename from page/Screen.idl
rename to core/page/Screen.idl
diff --git a/page/SpeechInputEvent.idl b/core/page/SpeechInputEvent.idl
similarity index 100%
rename from page/SpeechInputEvent.idl
rename to core/page/SpeechInputEvent.idl
diff --git a/page/SpeechInputResult.idl b/core/page/SpeechInputResult.idl
similarity index 100%
rename from page/SpeechInputResult.idl
rename to core/page/SpeechInputResult.idl
diff --git a/page/SpeechInputResultList.idl b/core/page/SpeechInputResultList.idl
similarity index 100%
rename from page/SpeechInputResultList.idl
rename to core/page/SpeechInputResultList.idl
diff --git a/page/WorkerNavigator.idl b/core/page/WorkerNavigator.idl
similarity index 100%
rename from page/WorkerNavigator.idl
rename to core/page/WorkerNavigator.idl
diff --git a/plugins/DOMMimeType.idl b/core/plugins/DOMMimeType.idl
similarity index 100%
rename from plugins/DOMMimeType.idl
rename to core/plugins/DOMMimeType.idl
diff --git a/plugins/DOMMimeTypeArray.idl b/core/plugins/DOMMimeTypeArray.idl
similarity index 87%
rename from plugins/DOMMimeTypeArray.idl
rename to core/plugins/DOMMimeTypeArray.idl
index 19c52ce..d17001a 100644
--- a/plugins/DOMMimeTypeArray.idl
+++ b/core/plugins/DOMMimeTypeArray.idl
@@ -24,7 +24,7 @@
     InterfaceName=MimeTypeArray
 ] interface DOMMimeTypeArray {
     readonly attribute unsigned long length;
-    DOMMimeType item([Optional=DefaultIsUndefined] unsigned long index);
-    DOMMimeType namedItem([Optional=DefaultIsUndefined] DOMString name);
+    DOMMimeType item([Default=Undefined] optional unsigned long index);
+    DOMMimeType namedItem([Default=Undefined] optional DOMString name);
 };
 
diff --git a/plugins/DOMPlugin.idl b/core/plugins/DOMPlugin.idl
similarity index 88%
rename from plugins/DOMPlugin.idl
rename to core/plugins/DOMPlugin.idl
index 37875bf..33ae079 100644
--- a/plugins/DOMPlugin.idl
+++ b/core/plugins/DOMPlugin.idl
@@ -27,7 +27,7 @@
     readonly attribute DOMString filename;
     readonly attribute DOMString description;
     readonly attribute unsigned long length;
-    DOMMimeType item([Optional=DefaultIsUndefined] unsigned long index);
-    DOMMimeType namedItem([Optional=DefaultIsUndefined] DOMString name);
+    DOMMimeType item([Default=Undefined] optional unsigned long index);
+    DOMMimeType namedItem([Default=Undefined] optional DOMString name);
 };
 
diff --git a/plugins/DOMPluginArray.idl b/core/plugins/DOMPluginArray.idl
similarity index 83%
rename from plugins/DOMPluginArray.idl
rename to core/plugins/DOMPluginArray.idl
index 8344fc1..48e4319 100644
--- a/plugins/DOMPluginArray.idl
+++ b/core/plugins/DOMPluginArray.idl
@@ -24,8 +24,8 @@
     InterfaceName=PluginArray
 ] interface DOMPluginArray {
     readonly attribute unsigned long length;
-    DOMPlugin item([Optional=DefaultIsUndefined] unsigned long index);
-    DOMPlugin namedItem([Optional=DefaultIsUndefined] DOMString name);
-    void refresh([Optional=DefaultIsUndefined] boolean reload);
+    DOMPlugin item([Default=Undefined] optional unsigned long index);
+    DOMPlugin namedItem([Default=Undefined] optional DOMString name);
+    void refresh([Default=Undefined] optional boolean reload);
 };
 
diff --git a/scripts/make-file-arrays.py b/core/scripts/make-file-arrays.py
similarity index 100%
rename from scripts/make-file-arrays.py
rename to core/scripts/make-file-arrays.py
diff --git a/storage/Storage.idl b/core/storage/Storage.idl
similarity index 76%
rename from storage/Storage.idl
rename to core/storage/Storage.idl
index 089f2fc..3d0364b 100644
--- a/storage/Storage.idl
+++ b/core/storage/Storage.idl
@@ -32,9 +32,9 @@
 ] interface Storage {
     [NotEnumerable, GetterRaisesException] readonly attribute unsigned long length;
     [NotEnumerable, TreatReturnedNullStringAs=Null, RaisesException] DOMString key(unsigned long index);
-    [NotEnumerable, TreatReturnedNullStringAs=Null, RaisesException] DOMString getItem(DOMString key);
-    [NotEnumerable, RaisesException] void setItem(DOMString key, DOMString data);
-    [NotEnumerable, RaisesException] void removeItem(DOMString key);
-    [NotEnumerable, RaisesException] void clear();
+    [NotEnumerable, TreatReturnedNullStringAs=Null, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] DOMString getItem(DOMString key);
+    [NotEnumerable, RaisesException, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void setItem(DOMString key, DOMString data);
+    [NotEnumerable, RaisesException, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void removeItem(DOMString key);
+    [NotEnumerable, RaisesException, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void clear();
 };
 
diff --git a/storage/StorageEvent.idl b/core/storage/StorageEvent.idl
similarity index 75%
rename from storage/StorageEvent.idl
rename to core/storage/StorageEvent.idl
index b40ec53..8624b06 100644
--- a/storage/StorageEvent.idl
+++ b/core/storage/StorageEvent.idl
@@ -32,14 +32,14 @@
     [InitializedByEventConstructor] readonly attribute DOMString url;
     [InitializedByEventConstructor] readonly attribute Storage storageArea;
 
-    void initStorageEvent([Optional=DefaultIsUndefined] DOMString typeArg, 
-                          [Optional=DefaultIsUndefined] boolean canBubbleArg, 
-                          [Optional=DefaultIsUndefined] boolean cancelableArg, 
-                          [Optional=DefaultIsUndefined] DOMString keyArg, 
-                          [Optional=DefaultIsUndefined,TreatNullAs=NullString] DOMString oldValueArg, 
-                          [Optional=DefaultIsUndefined,TreatNullAs=NullString] DOMString newValueArg, 
-                          [Optional=DefaultIsUndefined] DOMString urlArg, 
-                          [Optional=DefaultIsUndefined] Storage storageAreaArg);
+    void initStorageEvent([Default=Undefined] optional DOMString typeArg, 
+                          [Default=Undefined] optional boolean canBubbleArg, 
+                          [Default=Undefined] optional boolean cancelableArg, 
+                          [Default=Undefined] optional DOMString keyArg, 
+                          [Default=Undefined, TreatNullAs=NullString] optional DOMString oldValueArg, 
+                          [Default=Undefined, TreatNullAs=NullString] optional DOMString newValueArg, 
+                          [Default=Undefined] optional DOMString urlArg, 
+                          [Default=Undefined] optional Storage storageAreaArg);
 
     // Needed once we support init<blank>EventNS
     // void initStorageEventNS(DOMString namespaceURI, DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, DOMString keyArg, DOMString oldValueArg, DOMString newValueArg, DOMString urlArg, Storage storageAreaArg);
diff --git a/svg/ElementTimeControl.idl b/core/svg/ElementTimeControl.idl
similarity index 91%
rename from svg/ElementTimeControl.idl
rename to core/svg/ElementTimeControl.idl
index 42632cd..5307596 100644
--- a/svg/ElementTimeControl.idl
+++ b/core/svg/ElementTimeControl.idl
@@ -29,8 +29,8 @@
     
 ] interface ElementTimeControl { 
     void beginElement();
-    void beginElementAt([Optional=DefaultIsUndefined] float offset);
+    void beginElementAt([Default=Undefined] optional float offset);
     void endElement();
-    void endElementAt([Optional=DefaultIsUndefined] float offset);
+    void endElementAt([Default=Undefined] optional float offset);
 };
 
diff --git a/svg/SVGAElement.idl b/core/svg/SVGAElement.idl
similarity index 100%
rename from svg/SVGAElement.idl
rename to core/svg/SVGAElement.idl
diff --git a/svg/SVGAltGlyphDefElement.idl b/core/svg/SVGAltGlyphDefElement.idl
similarity index 100%
rename from svg/SVGAltGlyphDefElement.idl
rename to core/svg/SVGAltGlyphDefElement.idl
diff --git a/svg/SVGAltGlyphElement.idl b/core/svg/SVGAltGlyphElement.idl
similarity index 100%
rename from svg/SVGAltGlyphElement.idl
rename to core/svg/SVGAltGlyphElement.idl
diff --git a/svg/SVGAltGlyphItemElement.idl b/core/svg/SVGAltGlyphItemElement.idl
similarity index 100%
rename from svg/SVGAltGlyphItemElement.idl
rename to core/svg/SVGAltGlyphItemElement.idl
diff --git a/svg/SVGAngle.idl b/core/svg/SVGAngle.idl
similarity index 100%
rename from svg/SVGAngle.idl
rename to core/svg/SVGAngle.idl
diff --git a/svg/SVGAnimateColorElement.idl b/core/svg/SVGAnimateColorElement.idl
similarity index 100%
rename from svg/SVGAnimateColorElement.idl
rename to core/svg/SVGAnimateColorElement.idl
diff --git a/svg/SVGAnimateElement.idl b/core/svg/SVGAnimateElement.idl
similarity index 100%
rename from svg/SVGAnimateElement.idl
rename to core/svg/SVGAnimateElement.idl
diff --git a/svg/SVGAnimateMotionElement.idl b/core/svg/SVGAnimateMotionElement.idl
similarity index 100%
rename from svg/SVGAnimateMotionElement.idl
rename to core/svg/SVGAnimateMotionElement.idl
diff --git a/svg/SVGAnimateTransformElement.idl b/core/svg/SVGAnimateTransformElement.idl
similarity index 100%
rename from svg/SVGAnimateTransformElement.idl
rename to core/svg/SVGAnimateTransformElement.idl
diff --git a/svg/SVGAnimatedAngle.idl b/core/svg/SVGAnimatedAngle.idl
similarity index 100%
rename from svg/SVGAnimatedAngle.idl
rename to core/svg/SVGAnimatedAngle.idl
diff --git a/svg/SVGAnimatedBoolean.idl b/core/svg/SVGAnimatedBoolean.idl
similarity index 100%
rename from svg/SVGAnimatedBoolean.idl
rename to core/svg/SVGAnimatedBoolean.idl
diff --git a/svg/SVGAnimatedEnumeration.idl b/core/svg/SVGAnimatedEnumeration.idl
similarity index 100%
rename from svg/SVGAnimatedEnumeration.idl
rename to core/svg/SVGAnimatedEnumeration.idl
diff --git a/svg/SVGAnimatedInteger.idl b/core/svg/SVGAnimatedInteger.idl
similarity index 100%
rename from svg/SVGAnimatedInteger.idl
rename to core/svg/SVGAnimatedInteger.idl
diff --git a/svg/SVGAnimatedLength.idl b/core/svg/SVGAnimatedLength.idl
similarity index 100%
rename from svg/SVGAnimatedLength.idl
rename to core/svg/SVGAnimatedLength.idl
diff --git a/svg/SVGAnimatedLengthList.idl b/core/svg/SVGAnimatedLengthList.idl
similarity index 100%
rename from svg/SVGAnimatedLengthList.idl
rename to core/svg/SVGAnimatedLengthList.idl
diff --git a/svg/SVGAnimatedNumber.idl b/core/svg/SVGAnimatedNumber.idl
similarity index 100%
rename from svg/SVGAnimatedNumber.idl
rename to core/svg/SVGAnimatedNumber.idl
diff --git a/svg/SVGAnimatedNumberList.idl b/core/svg/SVGAnimatedNumberList.idl
similarity index 100%
rename from svg/SVGAnimatedNumberList.idl
rename to core/svg/SVGAnimatedNumberList.idl
diff --git a/svg/SVGAnimatedPreserveAspectRatio.idl b/core/svg/SVGAnimatedPreserveAspectRatio.idl
similarity index 100%
rename from svg/SVGAnimatedPreserveAspectRatio.idl
rename to core/svg/SVGAnimatedPreserveAspectRatio.idl
diff --git a/svg/SVGAnimatedRect.idl b/core/svg/SVGAnimatedRect.idl
similarity index 100%
rename from svg/SVGAnimatedRect.idl
rename to core/svg/SVGAnimatedRect.idl
diff --git a/svg/SVGAnimatedString.idl b/core/svg/SVGAnimatedString.idl
similarity index 100%
rename from svg/SVGAnimatedString.idl
rename to core/svg/SVGAnimatedString.idl
diff --git a/svg/SVGAnimatedTransformList.idl b/core/svg/SVGAnimatedTransformList.idl
similarity index 100%
rename from svg/SVGAnimatedTransformList.idl
rename to core/svg/SVGAnimatedTransformList.idl
diff --git a/svg/SVGAnimationElement.idl b/core/svg/SVGAnimationElement.idl
similarity index 100%
rename from svg/SVGAnimationElement.idl
rename to core/svg/SVGAnimationElement.idl
diff --git a/svg/SVGCircleElement.idl b/core/svg/SVGCircleElement.idl
similarity index 100%
rename from svg/SVGCircleElement.idl
rename to core/svg/SVGCircleElement.idl
diff --git a/svg/SVGClipPathElement.idl b/core/svg/SVGClipPathElement.idl
similarity index 100%
rename from svg/SVGClipPathElement.idl
rename to core/svg/SVGClipPathElement.idl
diff --git a/svg/SVGColor.idl b/core/svg/SVGColor.idl
similarity index 100%
rename from svg/SVGColor.idl
rename to core/svg/SVGColor.idl
diff --git a/svg/SVGComponentTransferFunctionElement.idl b/core/svg/SVGComponentTransferFunctionElement.idl
similarity index 100%
rename from svg/SVGComponentTransferFunctionElement.idl
rename to core/svg/SVGComponentTransferFunctionElement.idl
diff --git a/svg/SVGCursorElement.idl b/core/svg/SVGCursorElement.idl
similarity index 100%
rename from svg/SVGCursorElement.idl
rename to core/svg/SVGCursorElement.idl
diff --git a/svg/SVGDefsElement.idl b/core/svg/SVGDefsElement.idl
similarity index 100%
rename from svg/SVGDefsElement.idl
rename to core/svg/SVGDefsElement.idl
diff --git a/svg/SVGDescElement.idl b/core/svg/SVGDescElement.idl
similarity index 100%
rename from svg/SVGDescElement.idl
rename to core/svg/SVGDescElement.idl
diff --git a/svg/SVGDocument.idl b/core/svg/SVGDocument.idl
similarity index 92%
rename from svg/SVGDocument.idl
rename to core/svg/SVGDocument.idl
index 514f3e1..98f4114 100644
--- a/svg/SVGDocument.idl
+++ b/core/svg/SVGDocument.idl
@@ -26,6 +26,6 @@
     readonly attribute SVGSVGElement        rootElement;
 
     // Overwrite the one in events::DocumentEvent
-    [RaisesException] Event createEvent([Optional=DefaultIsUndefined] DOMString eventType);
+    [RaisesException] Event createEvent([Default=Undefined] optional DOMString eventType);
 };
 
diff --git a/svg/SVGElement.idl b/core/svg/SVGElement.idl
similarity index 100%
rename from svg/SVGElement.idl
rename to core/svg/SVGElement.idl
diff --git a/svg/SVGElementInstance.idl b/core/svg/SVGElementInstance.idl
similarity index 100%
rename from svg/SVGElementInstance.idl
rename to core/svg/SVGElementInstance.idl
diff --git a/svg/SVGElementInstanceList.idl b/core/svg/SVGElementInstanceList.idl
similarity index 94%
rename from svg/SVGElementInstanceList.idl
rename to core/svg/SVGElementInstanceList.idl
index 24af453..d6a2c9e 100644
--- a/svg/SVGElementInstanceList.idl
+++ b/core/svg/SVGElementInstanceList.idl
@@ -28,5 +28,5 @@
 ] interface SVGElementInstanceList {
     readonly attribute unsigned long length;
 
-    SVGElementInstance item([Optional=DefaultIsUndefined] unsigned long index);
+    SVGElementInstance item([Default=Undefined] optional unsigned long index);
 };
diff --git a/svg/SVGEllipseElement.idl b/core/svg/SVGEllipseElement.idl
similarity index 100%
rename from svg/SVGEllipseElement.idl
rename to core/svg/SVGEllipseElement.idl
diff --git a/svg/SVGException.idl b/core/svg/SVGException.idl
similarity index 100%
rename from svg/SVGException.idl
rename to core/svg/SVGException.idl
diff --git a/svg/SVGExternalResourcesRequired.idl b/core/svg/SVGExternalResourcesRequired.idl
similarity index 100%
rename from svg/SVGExternalResourcesRequired.idl
rename to core/svg/SVGExternalResourcesRequired.idl
diff --git a/svg/SVGFEBlendElement.idl b/core/svg/SVGFEBlendElement.idl
similarity index 100%
rename from svg/SVGFEBlendElement.idl
rename to core/svg/SVGFEBlendElement.idl
diff --git a/svg/SVGFEColorMatrixElement.idl b/core/svg/SVGFEColorMatrixElement.idl
similarity index 100%
rename from svg/SVGFEColorMatrixElement.idl
rename to core/svg/SVGFEColorMatrixElement.idl
diff --git a/svg/SVGFEComponentTransferElement.idl b/core/svg/SVGFEComponentTransferElement.idl
similarity index 100%
rename from svg/SVGFEComponentTransferElement.idl
rename to core/svg/SVGFEComponentTransferElement.idl
diff --git a/svg/SVGFECompositeElement.idl b/core/svg/SVGFECompositeElement.idl
similarity index 100%
rename from svg/SVGFECompositeElement.idl
rename to core/svg/SVGFECompositeElement.idl
diff --git a/svg/SVGFEConvolveMatrixElement.idl b/core/svg/SVGFEConvolveMatrixElement.idl
similarity index 100%
rename from svg/SVGFEConvolveMatrixElement.idl
rename to core/svg/SVGFEConvolveMatrixElement.idl
diff --git a/svg/SVGFEDiffuseLightingElement.idl b/core/svg/SVGFEDiffuseLightingElement.idl
similarity index 100%
rename from svg/SVGFEDiffuseLightingElement.idl
rename to core/svg/SVGFEDiffuseLightingElement.idl
diff --git a/svg/SVGFEDisplacementMapElement.idl b/core/svg/SVGFEDisplacementMapElement.idl
similarity index 100%
rename from svg/SVGFEDisplacementMapElement.idl
rename to core/svg/SVGFEDisplacementMapElement.idl
diff --git a/svg/SVGFEDistantLightElement.idl b/core/svg/SVGFEDistantLightElement.idl
similarity index 100%
rename from svg/SVGFEDistantLightElement.idl
rename to core/svg/SVGFEDistantLightElement.idl
diff --git a/svg/SVGFEDropShadowElement.idl b/core/svg/SVGFEDropShadowElement.idl
similarity index 88%
rename from svg/SVGFEDropShadowElement.idl
rename to core/svg/SVGFEDropShadowElement.idl
index 89abacf..4ad42e0 100644
--- a/svg/SVGFEDropShadowElement.idl
+++ b/core/svg/SVGFEDropShadowElement.idl
@@ -27,7 +27,7 @@
     readonly attribute SVGAnimatedNumber stdDeviationX;
     readonly attribute SVGAnimatedNumber stdDeviationY;
 
-    void setStdDeviation([Optional=DefaultIsUndefined] float stdDeviationX, 
-                         [Optional=DefaultIsUndefined] float stdDeviationY);
+    void setStdDeviation([Default=Undefined] optional float stdDeviationX, 
+                         [Default=Undefined] optional float stdDeviationY);
 };
 
diff --git a/svg/SVGFEFloodElement.idl b/core/svg/SVGFEFloodElement.idl
similarity index 100%
rename from svg/SVGFEFloodElement.idl
rename to core/svg/SVGFEFloodElement.idl
diff --git a/svg/SVGFEFuncAElement.idl b/core/svg/SVGFEFuncAElement.idl
similarity index 100%
rename from svg/SVGFEFuncAElement.idl
rename to core/svg/SVGFEFuncAElement.idl
diff --git a/svg/SVGFEFuncBElement.idl b/core/svg/SVGFEFuncBElement.idl
similarity index 100%
rename from svg/SVGFEFuncBElement.idl
rename to core/svg/SVGFEFuncBElement.idl
diff --git a/svg/SVGFEFuncGElement.idl b/core/svg/SVGFEFuncGElement.idl
similarity index 100%
rename from svg/SVGFEFuncGElement.idl
rename to core/svg/SVGFEFuncGElement.idl
diff --git a/svg/SVGFEFuncRElement.idl b/core/svg/SVGFEFuncRElement.idl
similarity index 100%
rename from svg/SVGFEFuncRElement.idl
rename to core/svg/SVGFEFuncRElement.idl
diff --git a/svg/SVGFEGaussianBlurElement.idl b/core/svg/SVGFEGaussianBlurElement.idl
similarity index 91%
rename from svg/SVGFEGaussianBlurElement.idl
rename to core/svg/SVGFEGaussianBlurElement.idl
index b3bc542..ccfdab6 100644
--- a/svg/SVGFEGaussianBlurElement.idl
+++ b/core/svg/SVGFEGaussianBlurElement.idl
@@ -31,7 +31,7 @@
     readonly attribute SVGAnimatedNumber stdDeviationX;
     readonly attribute SVGAnimatedNumber stdDeviationY;
 
-    void setStdDeviation([Optional=DefaultIsUndefined] float stdDeviationX, 
-                         [Optional=DefaultIsUndefined] float stdDeviationY);
+    void setStdDeviation([Default=Undefined] optional float stdDeviationX, 
+                         [Default=Undefined] optional float stdDeviationY);
 };
 
diff --git a/svg/SVGFEImageElement.idl b/core/svg/SVGFEImageElement.idl
similarity index 100%
rename from svg/SVGFEImageElement.idl
rename to core/svg/SVGFEImageElement.idl
diff --git a/svg/SVGFEMergeElement.idl b/core/svg/SVGFEMergeElement.idl
similarity index 100%
rename from svg/SVGFEMergeElement.idl
rename to core/svg/SVGFEMergeElement.idl
diff --git a/svg/SVGFEMergeNodeElement.idl b/core/svg/SVGFEMergeNodeElement.idl
similarity index 100%
rename from svg/SVGFEMergeNodeElement.idl
rename to core/svg/SVGFEMergeNodeElement.idl
diff --git a/svg/SVGFEMorphologyElement.idl b/core/svg/SVGFEMorphologyElement.idl
similarity index 93%
rename from svg/SVGFEMorphologyElement.idl
rename to core/svg/SVGFEMorphologyElement.idl
index fd22b94..78fbbaf 100644
--- a/svg/SVGFEMorphologyElement.idl
+++ b/core/svg/SVGFEMorphologyElement.idl
@@ -38,7 +38,7 @@
     readonly attribute SVGAnimatedNumber      radiusX;
     readonly attribute SVGAnimatedNumber      radiusY;
 
-    void setRadius([Optional=DefaultIsUndefined] float radiusX, 
-                   [Optional=DefaultIsUndefined] float radiusY);
+    void setRadius([Default=Undefined] optional float radiusX, 
+                   [Default=Undefined] optional float radiusY);
 };
 
diff --git a/svg/SVGFEOffsetElement.idl b/core/svg/SVGFEOffsetElement.idl
similarity index 100%
rename from svg/SVGFEOffsetElement.idl
rename to core/svg/SVGFEOffsetElement.idl
diff --git a/svg/SVGFEPointLightElement.idl b/core/svg/SVGFEPointLightElement.idl
similarity index 100%
rename from svg/SVGFEPointLightElement.idl
rename to core/svg/SVGFEPointLightElement.idl
diff --git a/svg/SVGFESpecularLightingElement.idl b/core/svg/SVGFESpecularLightingElement.idl
similarity index 100%
rename from svg/SVGFESpecularLightingElement.idl
rename to core/svg/SVGFESpecularLightingElement.idl
diff --git a/svg/SVGFESpotLightElement.idl b/core/svg/SVGFESpotLightElement.idl
similarity index 100%
rename from svg/SVGFESpotLightElement.idl
rename to core/svg/SVGFESpotLightElement.idl
diff --git a/svg/SVGFETileElement.idl b/core/svg/SVGFETileElement.idl
similarity index 100%
rename from svg/SVGFETileElement.idl
rename to core/svg/SVGFETileElement.idl
diff --git a/svg/SVGFETurbulenceElement.idl b/core/svg/SVGFETurbulenceElement.idl
similarity index 100%
rename from svg/SVGFETurbulenceElement.idl
rename to core/svg/SVGFETurbulenceElement.idl
diff --git a/svg/SVGFilterElement.idl b/core/svg/SVGFilterElement.idl
similarity index 92%
rename from svg/SVGFilterElement.idl
rename to core/svg/SVGFilterElement.idl
index bba4fbb..7e3ca7e 100644
--- a/svg/SVGFilterElement.idl
+++ b/core/svg/SVGFilterElement.idl
@@ -40,7 +40,7 @@
     readonly attribute SVGAnimatedInteger     filterResX;
     readonly attribute SVGAnimatedInteger     filterResY;
 
-    void setFilterRes([Optional=DefaultIsUndefined] unsigned long filterResX, 
-                      [Optional=DefaultIsUndefined] unsigned long filterResY);
+    void setFilterRes([Default=Undefined] optional unsigned long filterResX, 
+                      [Default=Undefined] optional unsigned long filterResY);
 };
 
diff --git a/svg/SVGFilterPrimitiveStandardAttributes.idl b/core/svg/SVGFilterPrimitiveStandardAttributes.idl
similarity index 100%
rename from svg/SVGFilterPrimitiveStandardAttributes.idl
rename to core/svg/SVGFilterPrimitiveStandardAttributes.idl
diff --git a/svg/SVGFitToViewBox.idl b/core/svg/SVGFitToViewBox.idl
similarity index 100%
rename from svg/SVGFitToViewBox.idl
rename to core/svg/SVGFitToViewBox.idl
diff --git a/svg/SVGFontElement.idl b/core/svg/SVGFontElement.idl
similarity index 100%
rename from svg/SVGFontElement.idl
rename to core/svg/SVGFontElement.idl
diff --git a/svg/SVGFontFaceElement.idl b/core/svg/SVGFontFaceElement.idl
similarity index 100%
rename from svg/SVGFontFaceElement.idl
rename to core/svg/SVGFontFaceElement.idl
diff --git a/svg/SVGFontFaceFormatElement.idl b/core/svg/SVGFontFaceFormatElement.idl
similarity index 100%
rename from svg/SVGFontFaceFormatElement.idl
rename to core/svg/SVGFontFaceFormatElement.idl
diff --git a/svg/SVGFontFaceNameElement.idl b/core/svg/SVGFontFaceNameElement.idl
similarity index 100%
rename from svg/SVGFontFaceNameElement.idl
rename to core/svg/SVGFontFaceNameElement.idl
diff --git a/svg/SVGFontFaceSrcElement.idl b/core/svg/SVGFontFaceSrcElement.idl
similarity index 100%
rename from svg/SVGFontFaceSrcElement.idl
rename to core/svg/SVGFontFaceSrcElement.idl
diff --git a/svg/SVGFontFaceUriElement.idl b/core/svg/SVGFontFaceUriElement.idl
similarity index 100%
rename from svg/SVGFontFaceUriElement.idl
rename to core/svg/SVGFontFaceUriElement.idl
diff --git a/svg/SVGForeignObjectElement.idl b/core/svg/SVGForeignObjectElement.idl
similarity index 100%
rename from svg/SVGForeignObjectElement.idl
rename to core/svg/SVGForeignObjectElement.idl
diff --git a/svg/SVGGElement.idl b/core/svg/SVGGElement.idl
similarity index 100%
rename from svg/SVGGElement.idl
rename to core/svg/SVGGElement.idl
diff --git a/svg/SVGGlyphElement.idl b/core/svg/SVGGlyphElement.idl
similarity index 100%
rename from svg/SVGGlyphElement.idl
rename to core/svg/SVGGlyphElement.idl
diff --git a/svg/SVGGlyphRefElement.idl b/core/svg/SVGGlyphRefElement.idl
similarity index 100%
rename from svg/SVGGlyphRefElement.idl
rename to core/svg/SVGGlyphRefElement.idl
diff --git a/svg/SVGGradientElement.idl b/core/svg/SVGGradientElement.idl
similarity index 100%
rename from svg/SVGGradientElement.idl
rename to core/svg/SVGGradientElement.idl
diff --git a/svg/SVGHKernElement.idl b/core/svg/SVGHKernElement.idl
similarity index 100%
rename from svg/SVGHKernElement.idl
rename to core/svg/SVGHKernElement.idl
diff --git a/svg/SVGImageElement.idl b/core/svg/SVGImageElement.idl
similarity index 100%
rename from svg/SVGImageElement.idl
rename to core/svg/SVGImageElement.idl
diff --git a/svg/SVGLangSpace.idl b/core/svg/SVGLangSpace.idl
similarity index 100%
rename from svg/SVGLangSpace.idl
rename to core/svg/SVGLangSpace.idl
diff --git a/svg/SVGLength.idl b/core/svg/SVGLength.idl
similarity index 100%
rename from svg/SVGLength.idl
rename to core/svg/SVGLength.idl
diff --git a/svg/SVGLengthList.idl b/core/svg/SVGLengthList.idl
similarity index 100%
rename from svg/SVGLengthList.idl
rename to core/svg/SVGLengthList.idl
diff --git a/svg/SVGLineElement.idl b/core/svg/SVGLineElement.idl
similarity index 100%
rename from svg/SVGLineElement.idl
rename to core/svg/SVGLineElement.idl
diff --git a/svg/SVGLinearGradientElement.idl b/core/svg/SVGLinearGradientElement.idl
similarity index 100%
rename from svg/SVGLinearGradientElement.idl
rename to core/svg/SVGLinearGradientElement.idl
diff --git a/svg/SVGLocatable.idl b/core/svg/SVGLocatable.idl
similarity index 93%
rename from svg/SVGLocatable.idl
rename to core/svg/SVGLocatable.idl
index 8f3ad05..ef547b8 100644
--- a/svg/SVGLocatable.idl
+++ b/core/svg/SVGLocatable.idl
@@ -35,6 +35,6 @@
     SVGRect   getBBox();
     SVGMatrix getCTM();
     SVGMatrix getScreenCTM();
-    [RaisesException] SVGMatrix getTransformToElement([Optional=DefaultIsUndefined] SVGElement element);
+    [RaisesException] SVGMatrix getTransformToElement([Default=Undefined] optional SVGElement element);
 };
 
diff --git a/svg/SVGMPathElement.idl b/core/svg/SVGMPathElement.idl
similarity index 100%
rename from svg/SVGMPathElement.idl
rename to core/svg/SVGMPathElement.idl
diff --git a/svg/SVGMarkerElement.idl b/core/svg/SVGMarkerElement.idl
similarity index 96%
rename from svg/SVGMarkerElement.idl
rename to core/svg/SVGMarkerElement.idl
index 696c22e..be1d003 100644
--- a/svg/SVGMarkerElement.idl
+++ b/core/svg/SVGMarkerElement.idl
@@ -48,6 +48,6 @@
     readonly attribute SVGAnimatedAngle       orientAngle;
 
     void setOrientToAuto();
-    void setOrientToAngle([Optional=DefaultIsUndefined] SVGAngle angle);
+    void setOrientToAngle([Default=Undefined] optional SVGAngle angle);
 };
 
diff --git a/svg/SVGMaskElement.idl b/core/svg/SVGMaskElement.idl
similarity index 100%
rename from svg/SVGMaskElement.idl
rename to core/svg/SVGMaskElement.idl
diff --git a/svg/SVGMatrix.idl b/core/svg/SVGMatrix.idl
similarity index 100%
rename from svg/SVGMatrix.idl
rename to core/svg/SVGMatrix.idl
diff --git a/svg/SVGMetadataElement.idl b/core/svg/SVGMetadataElement.idl
similarity index 100%
rename from svg/SVGMetadataElement.idl
rename to core/svg/SVGMetadataElement.idl
diff --git a/svg/SVGMissingGlyphElement.idl b/core/svg/SVGMissingGlyphElement.idl
similarity index 100%
rename from svg/SVGMissingGlyphElement.idl
rename to core/svg/SVGMissingGlyphElement.idl
diff --git a/svg/SVGNumber.idl b/core/svg/SVGNumber.idl
similarity index 100%
rename from svg/SVGNumber.idl
rename to core/svg/SVGNumber.idl
diff --git a/svg/SVGNumberList.idl b/core/svg/SVGNumberList.idl
similarity index 100%
rename from svg/SVGNumberList.idl
rename to core/svg/SVGNumberList.idl
diff --git a/svg/SVGPaint.idl b/core/svg/SVGPaint.idl
similarity index 100%
rename from svg/SVGPaint.idl
rename to core/svg/SVGPaint.idl
diff --git a/core/svg/SVGPathElement.idl b/core/svg/SVGPathElement.idl
new file mode 100644
index 0000000..9a7011d
--- /dev/null
+++ b/core/svg/SVGPathElement.idl
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ * Copyright (C) 2006 Apple 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 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 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. 
+ */
+
+[
+    Conditional=SVG
+] interface SVGPathElement : SVGStyledElement,
+                                             SVGTests,
+                                             SVGLangSpace,
+                                             SVGExternalResourcesRequired,
+                                             SVGTransformable {
+    readonly attribute SVGAnimatedNumber pathLength;
+
+    float getTotalLength();
+    SVGPoint getPointAtLength([Default=Undefined] optional float distance);
+    unsigned long getPathSegAtLength([Default=Undefined] optional float distance);
+
+    SVGPathSegClosePath createSVGPathSegClosePath();
+
+    SVGPathSegMovetoAbs createSVGPathSegMovetoAbs([Default=Undefined] optional float x, 
+                                                  [Default=Undefined] optional float y);
+    SVGPathSegMovetoRel createSVGPathSegMovetoRel([Default=Undefined] optional float x, 
+                                                  [Default=Undefined] optional float y);
+
+    SVGPathSegLinetoAbs createSVGPathSegLinetoAbs([Default=Undefined] optional float x, 
+                                                  [Default=Undefined] optional float y);
+    SVGPathSegLinetoRel createSVGPathSegLinetoRel([Default=Undefined] optional float x, 
+                                                  [Default=Undefined] optional float y);
+
+    SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs([Default=Undefined] optional float x, 
+                                                              [Default=Undefined] optional float y, 
+                                                              [Default=Undefined] optional float x1, 
+                                                              [Default=Undefined] optional float y1, 
+                                                              [Default=Undefined] optional float x2, 
+                                                              [Default=Undefined] optional float y2);
+    SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel([Default=Undefined] optional float x, 
+                                                              [Default=Undefined] optional float y, 
+                                                              [Default=Undefined] optional float x1, 
+                                                              [Default=Undefined] optional float y1, 
+                                                              [Default=Undefined] optional float x2, 
+                                                              [Default=Undefined] optional float y2);
+
+    SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs([Default=Undefined] optional float x, 
+                                                                      [Default=Undefined] optional float y, 
+                                                                      [Default=Undefined] optional float x1, 
+                                                                      [Default=Undefined] optional float y1);
+    SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel([Default=Undefined] optional float x, 
+                                                                      [Default=Undefined] optional float y, 
+                                                                      [Default=Undefined] optional float x1, 
+                                                                      [Default=Undefined] optional float y1);
+
+    SVGPathSegArcAbs createSVGPathSegArcAbs([Default=Undefined] optional float x, 
+                                            [Default=Undefined] optional float y, 
+                                            [Default=Undefined] optional float r1, 
+                                            [Default=Undefined] optional float r2, 
+                                            [Default=Undefined] optional float angle, 
+                                            [Default=Undefined] optional boolean largeArcFlag, 
+                                            [Default=Undefined] optional boolean sweepFlag);
+    SVGPathSegArcRel createSVGPathSegArcRel([Default=Undefined] optional float x, 
+                                            [Default=Undefined] optional float y, 
+                                            [Default=Undefined] optional float r1, 
+                                            [Default=Undefined] optional float r2, 
+                                            [Default=Undefined] optional float angle, 
+                                            [Default=Undefined] optional boolean largeArcFlag, 
+                                            [Default=Undefined] optional boolean sweepFlag);
+
+    SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs([Default=Undefined] optional float x);
+    SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel([Default=Undefined] optional float x);
+
+    SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs([Default=Undefined] optional float y);
+    SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel([Default=Undefined] optional float y);
+
+    SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs([Default=Undefined] optional float x, 
+                                                                          [Default=Undefined] optional float y, 
+                                                                          [Default=Undefined] optional float x2, 
+                                                                          [Default=Undefined] optional float y2);
+    SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel([Default=Undefined] optional float x, 
+                                                                          [Default=Undefined] optional float y, 
+                                                                          [Default=Undefined] optional float x2, 
+                                                                          [Default=Undefined] optional float y2);
+
+    SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs([Default=Undefined] optional float x, 
+                                                                                  [Default=Undefined] optional float y);
+    SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel([Default=Undefined] optional float x, 
+                                                                                  [Default=Undefined] optional float y);
+
+    readonly attribute SVGPathSegList pathSegList;
+    readonly attribute SVGPathSegList normalizedPathSegList;
+    readonly attribute SVGPathSegList animatedPathSegList;
+    readonly attribute SVGPathSegList animatedNormalizedPathSegList;
+};
+
diff --git a/svg/SVGPathSeg.idl b/core/svg/SVGPathSeg.idl
similarity index 100%
rename from svg/SVGPathSeg.idl
rename to core/svg/SVGPathSeg.idl
diff --git a/svg/SVGPathSegArcAbs.idl b/core/svg/SVGPathSegArcAbs.idl
similarity index 100%
rename from svg/SVGPathSegArcAbs.idl
rename to core/svg/SVGPathSegArcAbs.idl
diff --git a/svg/SVGPathSegArcRel.idl b/core/svg/SVGPathSegArcRel.idl
similarity index 100%
rename from svg/SVGPathSegArcRel.idl
rename to core/svg/SVGPathSegArcRel.idl
diff --git a/svg/SVGPathSegClosePath.idl b/core/svg/SVGPathSegClosePath.idl
similarity index 100%
rename from svg/SVGPathSegClosePath.idl
rename to core/svg/SVGPathSegClosePath.idl
diff --git a/svg/SVGPathSegCurvetoCubicAbs.idl b/core/svg/SVGPathSegCurvetoCubicAbs.idl
similarity index 100%
rename from svg/SVGPathSegCurvetoCubicAbs.idl
rename to core/svg/SVGPathSegCurvetoCubicAbs.idl
diff --git a/svg/SVGPathSegCurvetoCubicRel.idl b/core/svg/SVGPathSegCurvetoCubicRel.idl
similarity index 100%
rename from svg/SVGPathSegCurvetoCubicRel.idl
rename to core/svg/SVGPathSegCurvetoCubicRel.idl
diff --git a/svg/SVGPathSegCurvetoCubicSmoothAbs.idl b/core/svg/SVGPathSegCurvetoCubicSmoothAbs.idl
similarity index 100%
rename from svg/SVGPathSegCurvetoCubicSmoothAbs.idl
rename to core/svg/SVGPathSegCurvetoCubicSmoothAbs.idl
diff --git a/svg/SVGPathSegCurvetoCubicSmoothRel.idl b/core/svg/SVGPathSegCurvetoCubicSmoothRel.idl
similarity index 100%
rename from svg/SVGPathSegCurvetoCubicSmoothRel.idl
rename to core/svg/SVGPathSegCurvetoCubicSmoothRel.idl
diff --git a/svg/SVGPathSegCurvetoQuadraticAbs.idl b/core/svg/SVGPathSegCurvetoQuadraticAbs.idl
similarity index 100%
rename from svg/SVGPathSegCurvetoQuadraticAbs.idl
rename to core/svg/SVGPathSegCurvetoQuadraticAbs.idl
diff --git a/svg/SVGPathSegCurvetoQuadraticRel.idl b/core/svg/SVGPathSegCurvetoQuadraticRel.idl
similarity index 100%
rename from svg/SVGPathSegCurvetoQuadraticRel.idl
rename to core/svg/SVGPathSegCurvetoQuadraticRel.idl
diff --git a/svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl b/core/svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl
similarity index 100%
rename from svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl
rename to core/svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl
diff --git a/svg/SVGPathSegCurvetoQuadraticSmoothRel.idl b/core/svg/SVGPathSegCurvetoQuadraticSmoothRel.idl
similarity index 100%
rename from svg/SVGPathSegCurvetoQuadraticSmoothRel.idl
rename to core/svg/SVGPathSegCurvetoQuadraticSmoothRel.idl
diff --git a/svg/SVGPathSegLinetoAbs.idl b/core/svg/SVGPathSegLinetoAbs.idl
similarity index 100%
rename from svg/SVGPathSegLinetoAbs.idl
rename to core/svg/SVGPathSegLinetoAbs.idl
diff --git a/svg/SVGPathSegLinetoHorizontalAbs.idl b/core/svg/SVGPathSegLinetoHorizontalAbs.idl
similarity index 100%
rename from svg/SVGPathSegLinetoHorizontalAbs.idl
rename to core/svg/SVGPathSegLinetoHorizontalAbs.idl
diff --git a/svg/SVGPathSegLinetoHorizontalRel.idl b/core/svg/SVGPathSegLinetoHorizontalRel.idl
similarity index 100%
rename from svg/SVGPathSegLinetoHorizontalRel.idl
rename to core/svg/SVGPathSegLinetoHorizontalRel.idl
diff --git a/svg/SVGPathSegLinetoRel.idl b/core/svg/SVGPathSegLinetoRel.idl
similarity index 100%
rename from svg/SVGPathSegLinetoRel.idl
rename to core/svg/SVGPathSegLinetoRel.idl
diff --git a/svg/SVGPathSegLinetoVerticalAbs.idl b/core/svg/SVGPathSegLinetoVerticalAbs.idl
similarity index 100%
rename from svg/SVGPathSegLinetoVerticalAbs.idl
rename to core/svg/SVGPathSegLinetoVerticalAbs.idl
diff --git a/svg/SVGPathSegLinetoVerticalRel.idl b/core/svg/SVGPathSegLinetoVerticalRel.idl
similarity index 100%
rename from svg/SVGPathSegLinetoVerticalRel.idl
rename to core/svg/SVGPathSegLinetoVerticalRel.idl
diff --git a/svg/SVGPathSegList.idl b/core/svg/SVGPathSegList.idl
similarity index 100%
rename from svg/SVGPathSegList.idl
rename to core/svg/SVGPathSegList.idl
diff --git a/svg/SVGPathSegMovetoAbs.idl b/core/svg/SVGPathSegMovetoAbs.idl
similarity index 100%
rename from svg/SVGPathSegMovetoAbs.idl
rename to core/svg/SVGPathSegMovetoAbs.idl
diff --git a/svg/SVGPathSegMovetoRel.idl b/core/svg/SVGPathSegMovetoRel.idl
similarity index 100%
rename from svg/SVGPathSegMovetoRel.idl
rename to core/svg/SVGPathSegMovetoRel.idl
diff --git a/svg/SVGPatternElement.idl b/core/svg/SVGPatternElement.idl
similarity index 100%
rename from svg/SVGPatternElement.idl
rename to core/svg/SVGPatternElement.idl
diff --git a/svg/SVGPoint.idl b/core/svg/SVGPoint.idl
similarity index 100%
rename from svg/SVGPoint.idl
rename to core/svg/SVGPoint.idl
diff --git a/svg/SVGPointList.idl b/core/svg/SVGPointList.idl
similarity index 100%
rename from svg/SVGPointList.idl
rename to core/svg/SVGPointList.idl
diff --git a/svg/SVGPolygonElement.idl b/core/svg/SVGPolygonElement.idl
similarity index 100%
rename from svg/SVGPolygonElement.idl
rename to core/svg/SVGPolygonElement.idl
diff --git a/svg/SVGPolylineElement.idl b/core/svg/SVGPolylineElement.idl
similarity index 100%
rename from svg/SVGPolylineElement.idl
rename to core/svg/SVGPolylineElement.idl
diff --git a/svg/SVGPreserveAspectRatio.idl b/core/svg/SVGPreserveAspectRatio.idl
similarity index 100%
rename from svg/SVGPreserveAspectRatio.idl
rename to core/svg/SVGPreserveAspectRatio.idl
diff --git a/svg/SVGRadialGradientElement.idl b/core/svg/SVGRadialGradientElement.idl
similarity index 100%
rename from svg/SVGRadialGradientElement.idl
rename to core/svg/SVGRadialGradientElement.idl
diff --git a/svg/SVGRect.idl b/core/svg/SVGRect.idl
similarity index 100%
rename from svg/SVGRect.idl
rename to core/svg/SVGRect.idl
diff --git a/svg/SVGRectElement.idl b/core/svg/SVGRectElement.idl
similarity index 100%
rename from svg/SVGRectElement.idl
rename to core/svg/SVGRectElement.idl
diff --git a/svg/SVGRenderingIntent.idl b/core/svg/SVGRenderingIntent.idl
similarity index 100%
rename from svg/SVGRenderingIntent.idl
rename to core/svg/SVGRenderingIntent.idl
diff --git a/svg/SVGSVGElement.idl b/core/svg/SVGSVGElement.idl
similarity index 71%
rename from svg/SVGSVGElement.idl
rename to core/svg/SVGSVGElement.idl
index e73eb29..6d869d2 100644
--- a/svg/SVGSVGElement.idl
+++ b/core/svg/SVGSVGElement.idl
@@ -48,23 +48,23 @@
              attribute float currentScale;
     readonly attribute SVGPoint currentTranslate;
 
-    unsigned long suspendRedraw([Optional=DefaultIsUndefined] unsigned long maxWaitMilliseconds);
-    void unsuspendRedraw([Optional=DefaultIsUndefined] unsigned long suspendHandleId);
+    unsigned long suspendRedraw([Default=Undefined] optional unsigned long maxWaitMilliseconds);
+    void unsuspendRedraw([Default=Undefined] optional unsigned long suspendHandleId);
     void unsuspendRedrawAll();
     void forceRedraw();
     void pauseAnimations();
     void unpauseAnimations();
     boolean animationsPaused();
     float getCurrentTime();
-    void setCurrentTime([Optional=DefaultIsUndefined] float seconds);
-    NodeList getIntersectionList([Optional=DefaultIsUndefined] SVGRect rect, 
-                                 [Optional=DefaultIsUndefined] SVGElement referenceElement);
-    NodeList getEnclosureList([Optional=DefaultIsUndefined] SVGRect rect, 
-                              [Optional=DefaultIsUndefined] SVGElement referenceElement);
-    boolean checkIntersection([Optional=DefaultIsUndefined] SVGElement element, 
-                              [Optional=DefaultIsUndefined] SVGRect rect);
-    boolean checkEnclosure([Optional=DefaultIsUndefined] SVGElement element, 
-                           [Optional=DefaultIsUndefined] SVGRect rect);
+    void setCurrentTime([Default=Undefined] optional float seconds);
+    NodeList getIntersectionList([Default=Undefined] optional SVGRect rect, 
+                                 [Default=Undefined] optional SVGElement referenceElement);
+    NodeList getEnclosureList([Default=Undefined] optional SVGRect rect, 
+                              [Default=Undefined] optional SVGElement referenceElement);
+    boolean checkIntersection([Default=Undefined] optional SVGElement element, 
+                              [Default=Undefined] optional SVGRect rect);
+    boolean checkEnclosure([Default=Undefined] optional SVGElement element, 
+                           [Default=Undefined] optional SVGRect rect);
     void deselectAll();
 
     SVGNumber createSVGNumber();
@@ -74,7 +74,7 @@
     SVGMatrix createSVGMatrix();
     SVGRect createSVGRect();
     SVGTransform createSVGTransform();
-    SVGTransform createSVGTransformFromMatrix([Optional=DefaultIsUndefined] SVGMatrix matrix);
-    Element getElementById([Optional=DefaultIsUndefined] DOMString elementId);
+    SVGTransform createSVGTransformFromMatrix([Default=Undefined] optional SVGMatrix matrix);
+    Element getElementById([Default=Undefined] optional DOMString elementId);
 };
 
diff --git a/svg/SVGScriptElement.idl b/core/svg/SVGScriptElement.idl
similarity index 100%
rename from svg/SVGScriptElement.idl
rename to core/svg/SVGScriptElement.idl
diff --git a/svg/SVGSetElement.idl b/core/svg/SVGSetElement.idl
similarity index 100%
rename from svg/SVGSetElement.idl
rename to core/svg/SVGSetElement.idl
diff --git a/svg/SVGStopElement.idl b/core/svg/SVGStopElement.idl
similarity index 100%
rename from svg/SVGStopElement.idl
rename to core/svg/SVGStopElement.idl
diff --git a/svg/SVGStringList.idl b/core/svg/SVGStringList.idl
similarity index 100%
rename from svg/SVGStringList.idl
rename to core/svg/SVGStringList.idl
diff --git a/svg/SVGStyleElement.idl b/core/svg/SVGStyleElement.idl
similarity index 100%
rename from svg/SVGStyleElement.idl
rename to core/svg/SVGStyleElement.idl
diff --git a/svg/SVGStyledElement.idl b/core/svg/SVGStyledElement.idl
similarity index 94%
rename from svg/SVGStyledElement.idl
rename to core/svg/SVGStyledElement.idl
index 78418ba..44e61c8 100644
--- a/svg/SVGStyledElement.idl
+++ b/core/svg/SVGStyledElement.idl
@@ -31,6 +31,6 @@
     readonly attribute SVGAnimatedString className;
     readonly attribute CSSStyleDeclaration style;
 
-    CSSValue getPresentationAttribute([Optional=DefaultIsUndefined] DOMString name);
+    CSSValue getPresentationAttribute([Default=Undefined] optional DOMString name);
 };
 
diff --git a/svg/SVGSwitchElement.idl b/core/svg/SVGSwitchElement.idl
similarity index 100%
rename from svg/SVGSwitchElement.idl
rename to core/svg/SVGSwitchElement.idl
diff --git a/svg/SVGSymbolElement.idl b/core/svg/SVGSymbolElement.idl
similarity index 100%
rename from svg/SVGSymbolElement.idl
rename to core/svg/SVGSymbolElement.idl
diff --git a/svg/SVGTRefElement.idl b/core/svg/SVGTRefElement.idl
similarity index 100%
rename from svg/SVGTRefElement.idl
rename to core/svg/SVGTRefElement.idl
diff --git a/svg/SVGTSpanElement.idl b/core/svg/SVGTSpanElement.idl
similarity index 100%
rename from svg/SVGTSpanElement.idl
rename to core/svg/SVGTSpanElement.idl
diff --git a/svg/SVGTests.idl b/core/svg/SVGTests.idl
similarity index 95%
rename from svg/SVGTests.idl
rename to core/svg/SVGTests.idl
index 6d96757..6b33373 100644
--- a/svg/SVGTests.idl
+++ b/core/svg/SVGTests.idl
@@ -33,6 +33,6 @@
     readonly attribute SVGStringList requiredExtensions;
     readonly attribute SVGStringList systemLanguage;
 
-    boolean hasExtension([Optional=DefaultIsUndefined] DOMString extension);
+    boolean hasExtension([Default=Undefined] optional DOMString extension);
 };
 
diff --git a/svg/SVGTextContentElement.idl b/core/svg/SVGTextContentElement.idl
similarity index 68%
rename from svg/SVGTextContentElement.idl
rename to core/svg/SVGTextContentElement.idl
index 5c2491c..f87b1bf 100644
--- a/svg/SVGTextContentElement.idl
+++ b/core/svg/SVGTextContentElement.idl
@@ -39,14 +39,14 @@
 
     long getNumberOfChars();
     float getComputedTextLength();
-    [RaisesException] float getSubStringLength([Optional=DefaultIsUndefined,IsIndex] unsigned long offset, 
-                             [Optional=DefaultIsUndefined,IsIndex] unsigned long length);
-    [RaisesException] SVGPoint getStartPositionOfChar([Optional=DefaultIsUndefined,IsIndex] unsigned long offset);
-    [RaisesException] SVGPoint getEndPositionOfChar([Optional=DefaultIsUndefined,IsIndex] unsigned long offset);
-    [RaisesException] SVGRect getExtentOfChar([Optional=DefaultIsUndefined,IsIndex] unsigned long offset);
-    [RaisesException] float getRotationOfChar([Optional=DefaultIsUndefined,IsIndex] unsigned long offset);
-    long getCharNumAtPosition([Optional=DefaultIsUndefined] SVGPoint point);
-    [RaisesException] void selectSubString([Optional=DefaultIsUndefined,IsIndex] unsigned long offset, 
-                         [Optional=DefaultIsUndefined,IsIndex] unsigned long length);
+    [RaisesException] float getSubStringLength([Default=Undefined,IsIndex] optional unsigned long offset, 
+                             [Default=Undefined,IsIndex] optional unsigned long length);
+    [RaisesException] SVGPoint getStartPositionOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
+    [RaisesException] SVGPoint getEndPositionOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
+    [RaisesException] SVGRect getExtentOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
+    [RaisesException] float getRotationOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
+    long getCharNumAtPosition([Default=Undefined] optional SVGPoint point);
+    [RaisesException] void selectSubString([Default=Undefined,IsIndex] optional unsigned long offset, 
+                         [Default=Undefined,IsIndex] optional unsigned long length);
 };
 
diff --git a/svg/SVGTextElement.idl b/core/svg/SVGTextElement.idl
similarity index 100%
rename from svg/SVGTextElement.idl
rename to core/svg/SVGTextElement.idl
diff --git a/svg/SVGTextPathElement.idl b/core/svg/SVGTextPathElement.idl
similarity index 100%
rename from svg/SVGTextPathElement.idl
rename to core/svg/SVGTextPathElement.idl
diff --git a/svg/SVGTextPositioningElement.idl b/core/svg/SVGTextPositioningElement.idl
similarity index 100%
rename from svg/SVGTextPositioningElement.idl
rename to core/svg/SVGTextPositioningElement.idl
diff --git a/svg/SVGTitleElement.idl b/core/svg/SVGTitleElement.idl
similarity index 100%
rename from svg/SVGTitleElement.idl
rename to core/svg/SVGTitleElement.idl
diff --git a/svg/SVGTransform.idl b/core/svg/SVGTransform.idl
similarity index 100%
rename from svg/SVGTransform.idl
rename to core/svg/SVGTransform.idl
diff --git a/svg/SVGTransformList.idl b/core/svg/SVGTransformList.idl
similarity index 100%
rename from svg/SVGTransformList.idl
rename to core/svg/SVGTransformList.idl
diff --git a/svg/SVGTransformable.idl b/core/svg/SVGTransformable.idl
similarity index 100%
rename from svg/SVGTransformable.idl
rename to core/svg/SVGTransformable.idl
diff --git a/svg/SVGURIReference.idl b/core/svg/SVGURIReference.idl
similarity index 100%
rename from svg/SVGURIReference.idl
rename to core/svg/SVGURIReference.idl
diff --git a/svg/SVGUnitTypes.idl b/core/svg/SVGUnitTypes.idl
similarity index 100%
rename from svg/SVGUnitTypes.idl
rename to core/svg/SVGUnitTypes.idl
diff --git a/svg/SVGUseElement.idl b/core/svg/SVGUseElement.idl
similarity index 100%
rename from svg/SVGUseElement.idl
rename to core/svg/SVGUseElement.idl
diff --git a/svg/SVGVKernElement.idl b/core/svg/SVGVKernElement.idl
similarity index 100%
rename from svg/SVGVKernElement.idl
rename to core/svg/SVGVKernElement.idl
diff --git a/svg/SVGViewElement.idl b/core/svg/SVGViewElement.idl
similarity index 100%
rename from svg/SVGViewElement.idl
rename to core/svg/SVGViewElement.idl
diff --git a/svg/SVGViewSpec.idl b/core/svg/SVGViewSpec.idl
similarity index 100%
rename from svg/SVGViewSpec.idl
rename to core/svg/SVGViewSpec.idl
diff --git a/svg/SVGZoomAndPan.idl b/core/svg/SVGZoomAndPan.idl
similarity index 100%
rename from svg/SVGZoomAndPan.idl
rename to core/svg/SVGZoomAndPan.idl
diff --git a/svg/SVGZoomEvent.idl b/core/svg/SVGZoomEvent.idl
similarity index 100%
rename from svg/SVGZoomEvent.idl
rename to core/svg/SVGZoomEvent.idl
diff --git a/testing/InternalSettings.idl b/core/testing/InternalSettings.idl
similarity index 91%
rename from testing/InternalSettings.idl
rename to core/testing/InternalSettings.idl
index 97e9fb2..a4e83c5 100644
--- a/testing/InternalSettings.idl
+++ b/core/testing/InternalSettings.idl
@@ -29,6 +29,7 @@
     [RaisesException] void setTouchEventEmulationEnabled(boolean enabled);
     [RaisesException] void setShadowDOMEnabled(boolean enabled);
     void setAuthorShadowDOMForAnyElementEnabled(boolean isEnabled);
+    void setExperimentalShadowDOMEnabled(boolean isEnabled);
     void setStyleScopedEnabled(boolean isEnabled);
     [RaisesException] void setStandardFontFamily(DOMString family, DOMString script);
     [RaisesException] void setSerifFontFamily(DOMString family, DOMString script);
@@ -50,10 +51,9 @@
     [RaisesException] void setDialogElementEnabled(boolean enabled);
     void setLangAttributeAwareFormControlUIEnabled(boolean enabled);
 
-    [Conditional=VIDEO_TRACK, RaisesException] void setShouldDisplayTrackKind(DOMString kind, boolean enabled);
-    [Conditional=VIDEO_TRACK, RaisesException] boolean shouldDisplayTrackKind(DOMString trackKind);
+    [RaisesException] void setShouldDisplayTrackKind(DOMString kind, boolean enabled);
+    [RaisesException] boolean shouldDisplayTrackKind(DOMString trackKind);
     [RaisesException] void setImagesEnabled(boolean enabled);
     [RaisesException] void setMinimumTimerInterval(double intervalInSeconds);
     [RaisesException] void setDefaultVideoPosterURL(DOMString poster);
-    [RaisesException] void setTimeWithoutMouseMovementBeforeHidingControls(double time);
 };
diff --git a/testing/Internals.idl b/core/testing/Internals.idl
similarity index 95%
rename from testing/Internals.idl
rename to core/testing/Internals.idl
index 3aa5b96..17d5bff 100644
--- a/testing/Internals.idl
+++ b/core/testing/Internals.idl
@@ -102,7 +102,7 @@
 
     [RaisesException] void setScrollViewPosition(Document document, long x, long y);
 
-    [RaisesException] void setPagination(Document document, DOMString mode, long gap, [Optional] long pageLength);
+    [RaisesException] void setPagination(Document document, DOMString mode, long gap, optional long pageLength);
 
     [RaisesException] DOMString configurationForViewport(Document document,
                                        float devicePixelRatio,
@@ -143,9 +143,7 @@
 
     [RaisesException] unsigned long wheelEventHandlerCount(Document document);
     [RaisesException] unsigned long touchEventHandlerCount(Document document);
-#if defined(ENABLE_TOUCH_EVENT_TRACKING) && ENABLE_TOUCH_EVENT_TRACKING
     [RaisesException] ClientRectList touchEventTargetClientRects(Document document);
-#endif
 
     [RaisesException] NodeList nodesFromRect(Document document, long x, long y,
         unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding,
@@ -174,7 +172,7 @@
     const unsigned short LAYER_TREE_INCLUDES_TILE_CACHES = 2;
     const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 4;
     const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 8;
-    [RaisesException] DOMString layerTreeAsText(Document document, [Optional] unsigned short flags);
+    [RaisesException] DOMString layerTreeAsText(Document document, optional unsigned short flags);
 
     [RaisesException] DOMString scrollingStateTreeAsText(Document document);
     [RaisesException] DOMString mainThreadScrollingReasons(Document document);
@@ -193,10 +191,6 @@
     [RaisesException] void setBatteryStatus(Document document, DOMString eventType, boolean charging, double chargingTime, double dischargingTime, double level);
 #endif
 
-#if defined(ENABLE_PROXIMITY_EVENTS) && ENABLE_PROXIMITY_EVENTS
-    [RaisesException] void setDeviceProximity(Document document, DOMString eventType, double value, double min, double max);
-#endif
-
     unsigned long numberOfLiveNodes();
     unsigned long numberOfLiveDocuments();
     sequence<DOMString> consoleMessageArgumentCounts(Document document);
@@ -206,10 +200,10 @@
     [RaisesException] void setJavaScriptProfilingEnabled(boolean creates);
 
     DOMString counterValue(Element element);
-    long pageNumber(Element element, [Optional] float pageWidth, [Optional] float pageHeight);
+    long pageNumber(Element element, optional float pageWidth, optional float pageHeight);
     DOMString[] shortcutIconURLs(Document document);
     DOMString[] allIconURLs(Document document);
-    long numberOfPages([Optional] double pageWidthInPixels, [Optional] double pageHeightInPixels);
+    long numberOfPages(optional double pageWidthInPixels, optional double pageHeightInPixels);
     [RaisesException] DOMString pageProperty(DOMString propertyName, long pageNumber);
     [RaisesException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long width, long height, long marginTop, long marginRight, long marginBottom, long marginLeft);
 
diff --git a/testing/MallocStatistics.idl b/core/testing/MallocStatistics.idl
similarity index 100%
rename from testing/MallocStatistics.idl
rename to core/testing/MallocStatistics.idl
diff --git a/testing/TypeConversions.idl b/core/testing/TypeConversions.idl
similarity index 100%
rename from testing/TypeConversions.idl
rename to core/testing/TypeConversions.idl
diff --git a/workers/AbstractWorker.idl b/core/workers/AbstractWorker.idl
similarity index 94%
rename from workers/AbstractWorker.idl
rename to core/workers/AbstractWorker.idl
index 942c498..cd06688 100644
--- a/workers/AbstractWorker.idl
+++ b/core/workers/AbstractWorker.idl
@@ -38,10 +38,10 @@
 
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
 
diff --git a/workers/DedicatedWorkerContext.idl b/core/workers/DedicatedWorkerContext.idl
similarity index 94%
rename from workers/DedicatedWorkerContext.idl
rename to core/workers/DedicatedWorkerContext.idl
index bf6ad34..69573c4 100644
--- a/workers/DedicatedWorkerContext.idl
+++ b/core/workers/DedicatedWorkerContext.idl
@@ -32,7 +32,7 @@
     IsWorkerContext,
 ] interface DedicatedWorkerContext : WorkerContext {
 
-    [Custom, RaisesException] void postMessage(any message, [Optional] Array messagePorts);
+    [Custom, RaisesException] void postMessage(any message, optional Array messagePorts);
 
     attribute EventListener onmessage;
 };
diff --git a/workers/SharedWorker.idl b/core/workers/SharedWorker.idl
similarity index 95%
rename from workers/SharedWorker.idl
rename to core/workers/SharedWorker.idl
index 3d0f3ee..9fbb2ca 100644
--- a/workers/SharedWorker.idl
+++ b/core/workers/SharedWorker.idl
@@ -31,7 +31,7 @@
 
 [
     Conditional=SHARED_WORKERS,
-    Constructor(DOMString scriptURL, [Optional=DefaultIsNullString] DOMString name),
+    Constructor(DOMString scriptURL, [Default=NullString] optional DOMString name),
     CallWith=ScriptExecutionContext,
     RaisesException
 ] interface SharedWorker : AbstractWorker {
diff --git a/workers/SharedWorkerContext.idl b/core/workers/SharedWorkerContext.idl
similarity index 100%
rename from workers/SharedWorkerContext.idl
rename to core/workers/SharedWorkerContext.idl
diff --git a/workers/Worker.idl b/core/workers/Worker.idl
similarity index 97%
rename from workers/Worker.idl
rename to core/workers/Worker.idl
index ec5105f..2b15b36 100644
--- a/workers/Worker.idl
+++ b/core/workers/Worker.idl
@@ -33,7 +33,7 @@
 
     attribute EventListener onmessage;
 
-    [Custom, RaisesException] void postMessage(SerializedScriptValue message, [Optional] Array messagePorts);
+    [Custom, RaisesException] void postMessage(SerializedScriptValue message, optional Array messagePorts);
     void terminate();
 };
 
diff --git a/workers/WorkerContext.idl b/core/workers/WorkerContext.idl
similarity index 89%
rename from workers/WorkerContext.idl
rename to core/workers/WorkerContext.idl
index 888f35b..88ef1a0 100644
--- a/workers/WorkerContext.idl
+++ b/core/workers/WorkerContext.idl
@@ -42,19 +42,19 @@
              [Replaceable] readonly attribute WorkerNavigator navigator;
 
     // Timers
-    [Custom] long setTimeout(any handler, [Optional=DefaultIsUndefined] long timeout);
-    void clearTimeout([Optional=DefaultIsUndefined] long handle);
-    [Custom] long setInterval(any handler, [Optional=DefaultIsUndefined] long timeout);
-    void clearInterval([Optional=DefaultIsUndefined] long handle);
+    [Custom] long setTimeout(any handler, [Default=Undefined] optional long timeout);
+    void clearTimeout([Default=Undefined] optional long handle);
+    [Custom] long setInterval(any handler, [Default=Undefined] optional long timeout);
+    void clearInterval([Default=Undefined] optional long handle);
 
 
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 
     // Constructors
diff --git a/workers/WorkerLocation.idl b/core/workers/WorkerLocation.idl
similarity index 100%
rename from workers/WorkerLocation.idl
rename to core/workers/WorkerLocation.idl
diff --git a/xml/DOMParser.idl b/core/xml/DOMParser.idl
similarity index 84%
rename from xml/DOMParser.idl
rename to core/xml/DOMParser.idl
index b4338b8..c602a59 100644
--- a/xml/DOMParser.idl
+++ b/core/xml/DOMParser.idl
@@ -21,6 +21,6 @@
     Constructor,
     ImplementationLacksVTable
 ] interface DOMParser {
-    Document parseFromString([Optional=DefaultIsUndefined] DOMString str, 
-                             [Optional=DefaultIsUndefined] DOMString contentType);
+    Document parseFromString([Default=Undefined] optional DOMString str, 
+                             [Default=Undefined] optional DOMString contentType);
 };
diff --git a/xml/XMLHttpRequest.idl b/core/xml/XMLHttpRequest.idl
similarity index 89%
rename from xml/XMLHttpRequest.idl
rename to core/xml/XMLHttpRequest.idl
index 0011357..cb0dc9e 100644
--- a/xml/XMLHttpRequest.idl
+++ b/core/xml/XMLHttpRequest.idl
@@ -40,7 +40,7 @@
     ActiveDOMObject,
     Constructor,
     CallWith=ScriptExecutionContext,
-    CustomConstructor,
+    CustomConstructor(optional XMLHttpRequestOptions options),
     EventTarget
 ] interface XMLHttpRequest {
     // From XMLHttpRequestEventTarget
@@ -68,9 +68,9 @@
 
     [SetterRaisesException] attribute boolean withCredentials;
 
-    [Custom, RaisesException] void open(DOMString method, DOMString url, [Optional] boolean async, [Optional] DOMString user, [Optional] DOMString password);
+    [Custom, ActivityLog=Access, RaisesException] void open(DOMString method, DOMString url, optional boolean async, optional DOMString user, optional DOMString password);
 
-    [RaisesException] void setRequestHeader(DOMString header, DOMString value);
+    [ActivityLog=Access, RaisesException] void setRequestHeader(DOMString header, DOMString value);
 
     [Custom, RaisesException] void send();
 
@@ -96,9 +96,9 @@
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/xml/XMLHttpRequestException.idl b/core/xml/XMLHttpRequestException.idl
similarity index 100%
rename from xml/XMLHttpRequestException.idl
rename to core/xml/XMLHttpRequestException.idl
diff --git a/xml/XMLHttpRequestProgressEvent.idl b/core/xml/XMLHttpRequestProgressEvent.idl
similarity index 100%
rename from xml/XMLHttpRequestProgressEvent.idl
rename to core/xml/XMLHttpRequestProgressEvent.idl
diff --git a/xml/XMLHttpRequestUpload.idl b/core/xml/XMLHttpRequestUpload.idl
similarity index 94%
rename from xml/XMLHttpRequestUpload.idl
rename to core/xml/XMLHttpRequestUpload.idl
index 1f5dc5a..2262201 100644
--- a/xml/XMLHttpRequestUpload.idl
+++ b/core/xml/XMLHttpRequestUpload.idl
@@ -41,10 +41,10 @@
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
 
diff --git a/xml/XMLSerializer.idl b/core/xml/XMLSerializer.idl
similarity index 90%
rename from xml/XMLSerializer.idl
rename to core/xml/XMLSerializer.idl
index eeb9b5d..5e174e1 100644
--- a/xml/XMLSerializer.idl
+++ b/core/xml/XMLSerializer.idl
@@ -22,6 +22,6 @@
     Constructor,
     ImplementationLacksVTable
 ] interface XMLSerializer {
-    [RaisesException] DOMString serializeToString([Optional=DefaultIsUndefined] Node node);
+    [RaisesException] DOMString serializeToString([Default=Undefined] optional Node node);
 };
 
diff --git a/core/xml/XPathEvaluator.idl b/core/xml/XPathEvaluator.idl
new file mode 100644
index 0000000..457663f
--- /dev/null
+++ b/core/xml/XPathEvaluator.idl
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.
+ *
+ * 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.
+ */
+
+[
+    Constructor,
+    ImplementationLacksVTable
+] interface XPathEvaluator {
+    [RaisesException] XPathExpression createExpression([Default=Undefined] optional DOMString expression,
+                                     [Default=Undefined] optional XPathNSResolver resolver);
+
+    XPathNSResolver createNSResolver([Default=Undefined] optional Node nodeResolver);
+
+    [RaisesException] XPathResult evaluate([Default=Undefined] optional DOMString expression,
+                         [Default=Undefined] optional Node contextNode, 
+                         [Default=Undefined] optional XPathNSResolver resolver,
+                         [Default=Undefined] optional unsigned short type,
+                         [Default=Undefined] optional XPathResult inResult);
+};
diff --git a/xml/XPathException.idl b/core/xml/XPathException.idl
similarity index 100%
rename from xml/XPathException.idl
rename to core/xml/XPathException.idl
diff --git a/xml/XPathExpression.idl b/core/xml/XPathExpression.idl
similarity index 77%
rename from xml/XPathExpression.idl
rename to core/xml/XPathExpression.idl
index 16258c7..0ba88c5 100644
--- a/xml/XPathExpression.idl
+++ b/core/xml/XPathExpression.idl
@@ -20,8 +20,8 @@
 [
      ImplementationLacksVTable
 ] interface XPathExpression {
-     [RaisesException] XPathResult evaluate([Optional=DefaultIsUndefined] Node contextNode, 
-                                        [Optional=DefaultIsUndefined] unsigned short type, 
-                                        [Optional=DefaultIsUndefined] XPathResult inResult);
+     [RaisesException] XPathResult evaluate([Default=Undefined] optional Node contextNode, 
+                                        [Default=Undefined] optional unsigned short type, 
+                                        [Default=Undefined] optional XPathResult inResult);
 };
 
diff --git a/xml/XPathNSResolver.idl b/core/xml/XPathNSResolver.idl
similarity index 94%
rename from xml/XPathNSResolver.idl
rename to core/xml/XPathNSResolver.idl
index 6b40a8a..f746891 100644
--- a/xml/XPathNSResolver.idl
+++ b/core/xml/XPathNSResolver.idl
@@ -22,6 +22,6 @@
     
     SkipVTableValidation
 ] interface XPathNSResolver {
-    [TreatReturnedNullStringAs=Null] DOMString lookupNamespaceURI([Optional=DefaultIsUndefined] DOMString prefix);
+    [TreatReturnedNullStringAs=Null] DOMString lookupNamespaceURI([Default=Undefined] optional DOMString prefix);
 };
 
diff --git a/xml/XPathResult.idl b/core/xml/XPathResult.idl
similarity index 95%
rename from xml/XPathResult.idl
rename to core/xml/XPathResult.idl
index 698b955..0e21736 100644
--- a/xml/XPathResult.idl
+++ b/core/xml/XPathResult.idl
@@ -44,6 +44,6 @@
     [GetterRaisesException] readonly attribute unsigned long   snapshotLength;
         
     [RaisesException] Node iterateNext();
-    [RaisesException] Node snapshotItem([Optional=DefaultIsUndefined] unsigned long index);
+    [RaisesException] Node snapshotItem([Default=Undefined] optional unsigned long index);
 };
 
diff --git a/xml/XSLTProcessor.idl b/core/xml/XSLTProcessor.idl
similarity index 87%
rename from xml/XSLTProcessor.idl
rename to core/xml/XSLTProcessor.idl
index 436bb0f..3dc316d 100644
--- a/xml/XSLTProcessor.idl
+++ b/core/xml/XSLTProcessor.idl
@@ -31,14 +31,13 @@
 // http://bugs.webkit.org/show_bug.cgi?id=5446
 
 [
-    Conditional=XSLT,
     Constructor,
     ImplementationLacksVTable
 ] interface XSLTProcessor {
     
-    void importStylesheet([Optional=DefaultIsUndefined] Node stylesheet);
-    DocumentFragment transformToFragment([Optional=DefaultIsUndefined] Node source, [Optional=DefaultIsUndefined] Document docVal);
-    Document transformToDocument([Optional=DefaultIsUndefined] Node source);
+    void importStylesheet([Default=Undefined] optional Node stylesheet);
+    DocumentFragment transformToFragment([Default=Undefined] optional Node source, [Default=Undefined] optional Document docVal);
+    Document transformToDocument([Default=Undefined] optional Node source);
 
     [Custom] void setParameter(DOMString namespaceURI, DOMString localName, DOMString value);
     [Custom, TreatReturnedNullStringAs=Undefined] DOMString getParameter(DOMString namespaceURI, DOMString localName);
diff --git a/dom/CharacterData.idl b/dom/CharacterData.idl
deleted file mode 100644
index 15fd1ce..0000000
--- a/dom/CharacterData.idl
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- *
- * 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 CharacterData : Node {
-
-    [TreatNullAs=NullString, SetterRaisesException] attribute DOMString data;
-
-    readonly attribute unsigned long length;
-    
-    [TreatReturnedNullStringAs=Null, RaisesException] DOMString substringData([IsIndex,Optional=DefaultIsUndefined] unsigned long offset, [IsIndex,Optional=DefaultIsUndefined] unsigned long length);
-
-    [RaisesException] void appendData([Optional=DefaultIsUndefined] DOMString data);
-
-     [RaisesException] void insertData([IsIndex,Optional=DefaultIsUndefined] unsigned long offset, 
-                                   [Optional=DefaultIsUndefined] DOMString data);
-
-     [RaisesException] void deleteData([IsIndex,Optional=DefaultIsUndefined] unsigned long offset, 
-                                   [IsIndex,Optional=DefaultIsUndefined] unsigned long length);
-
-     [RaisesException] void replaceData([IsIndex,Optional=DefaultIsUndefined] unsigned long offset, 
-                                    [IsIndex,Optional=DefaultIsUndefined] unsigned long length,
-                                    [Optional=DefaultIsUndefined] DOMString data);
-
-    // DOM 4
-    [RaisesException] void remove();
-};
-
diff --git a/dom/MessageEvent.idl b/dom/MessageEvent.idl
deleted file mode 100644
index fc8688d..0000000
--- a/dom/MessageEvent.idl
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2007 Henry Mason <hmason@mac.com>
- * 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.
- *
- * 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. 
- *
- */
-
-[
-    ConstructorTemplate=Event
-] interface MessageEvent : Event {
-    [InitializedByEventConstructor] readonly attribute DOMString origin;
-    [InitializedByEventConstructor] readonly attribute DOMString lastEventId;
-    [InitializedByEventConstructor] readonly attribute DOMWindow source;
-    [InitializedByEventConstructor, CachedAttribute, CustomGetter] readonly attribute any data;
-    [InitializedByEventConstructor, CustomGetter] readonly attribute Array ports;
-
-    [Custom] void initMessageEvent([Optional=DefaultIsUndefined] DOMString typeArg, 
-                                   [Optional=DefaultIsUndefined] boolean canBubbleArg, 
-                                   [Optional=DefaultIsUndefined] boolean cancelableArg, 
-                                   [Optional=DefaultIsUndefined] any dataArg, 
-                                   [Optional=DefaultIsUndefined] DOMString originArg, 
-                                   [Optional=DefaultIsUndefined] DOMString lastEventIdArg, 
-                                   [Optional=DefaultIsUndefined] DOMWindow sourceArg, 
-                                   [Optional=DefaultIsUndefined] Array messagePorts);
-
-    [Custom] void webkitInitMessageEvent([Optional=DefaultIsUndefined] DOMString typeArg,
-                                         [Optional=DefaultIsUndefined] boolean canBubbleArg,
-                                         [Optional=DefaultIsUndefined] boolean cancelableArg,
-                                         [Optional=DefaultIsUndefined] any dataArg,
-                                         [Optional=DefaultIsUndefined] DOMString originArg,
-                                         [Optional=DefaultIsUndefined] DOMString lastEventIdArg,
-                                         [Optional=DefaultIsUndefined] DOMWindow sourceArg,
-                                         [Optional=DefaultIsUndefined] Array transferables);
-};
-
diff --git a/dom/Range.idl b/dom/Range.idl
deleted file mode 100644
index 9f38059..0000000
--- a/dom/Range.idl
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Computer, Inc.
- * 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.
- */
-
-// Introduced in DOM Level 2:
-[
-    ImplementationLacksVTable
-] interface Range {
-
-    [GetterRaisesException] readonly attribute Node startContainer;
-    [GetterRaisesException] readonly attribute long startOffset;
-    [GetterRaisesException] readonly attribute Node endContainer;
-    [GetterRaisesException] readonly attribute long endOffset;
-    [GetterRaisesException] readonly attribute boolean collapsed;
-    [GetterRaisesException] readonly attribute Node commonAncestorContainer;
-
-     [RaisesException] void setStart([Optional=DefaultIsUndefined] Node refNode, 
-                                 [Optional=DefaultIsUndefined] long offset);
-     [RaisesException] void setEnd([Optional=DefaultIsUndefined] Node refNode, 
-                               [Optional=DefaultIsUndefined] long offset);
-    [RaisesException] void setStartBefore([Optional=DefaultIsUndefined] Node refNode);
-    [RaisesException] void setStartAfter([Optional=DefaultIsUndefined] Node refNode);
-    [RaisesException] void setEndBefore([Optional=DefaultIsUndefined] Node refNode);
-    [RaisesException] void setEndAfter([Optional=DefaultIsUndefined] Node refNode);
-    [RaisesException] void collapse([Optional=DefaultIsUndefined] boolean toStart);
-    [RaisesException] void selectNode([Optional=DefaultIsUndefined] Node refNode);
-    [RaisesException] void selectNodeContents([Optional=DefaultIsUndefined] Node refNode);
-
-    // CompareHow
-    const unsigned short START_TO_START = 0;
-    const unsigned short START_TO_END   = 1;
-    const unsigned short END_TO_END     = 2;
-    const unsigned short END_TO_START   = 3;
-
-     [RaisesException] short compareBoundaryPoints([Optional=DefaultIsUndefined] CompareHow how,
-                                               [Optional=DefaultIsUndefined] Range sourceRange);
-
-    [RaisesException] void deleteContents();
-    [RaisesException] DocumentFragment extractContents();
-    [RaisesException] DocumentFragment cloneContents();
-    [RaisesException] void insertNode([Optional=DefaultIsUndefined] Node newNode);
-    [RaisesException] void surroundContents([Optional=DefaultIsUndefined] Node newParent);
-    [RaisesException] Range cloneRange();
-    [RaisesException] DOMString toString();
-
-    [RaisesException] void detach();
-
-    // CSSOM View Module API extensions
-
-    ClientRectList getClientRects();
-    ClientRect getBoundingClientRect();
-
-    // extensions
-
-    [RaisesException] DocumentFragment createContextualFragment([Optional=DefaultIsUndefined] DOMString html);
-
-    // WebKit extensions
-
-    [RaisesException] boolean intersectsNode([Optional=DefaultIsUndefined] Node refNode);
-
-    [RaisesException] short compareNode([Optional=DefaultIsUndefined] Node refNode);
-
-    // CompareResults
-    const unsigned short NODE_BEFORE           = 0;
-    const unsigned short NODE_AFTER            = 1;
-    const unsigned short NODE_BEFORE_AND_AFTER = 2;
-    const unsigned short NODE_INSIDE           = 3;
-
-    [RaisesException] short comparePoint([Optional=DefaultIsUndefined] Node refNode, 
-                       [Optional=DefaultIsUndefined] long offset);
-
-    [RaisesException] boolean isPointInRange([Optional=DefaultIsUndefined] Node refNode, 
-                           [Optional=DefaultIsUndefined] long offset);
-
-    [RaisesException] void expand([Optional=DefaultIsUndefined] DOMString unit);
-};
-
diff --git a/html/canvas/CanvasRenderingContext2D.idl b/html/canvas/CanvasRenderingContext2D.idl
deleted file mode 100644
index cbd4032..0000000
--- a/html/canvas/CanvasRenderingContext2D.idl
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Computer, 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.
- */
-
-enum CanvasWindingRule { "nonzero", "evenodd" };
-
-interface CanvasRenderingContext2D : CanvasRenderingContext {
-
-    void save();
-    void restore();
-
-    void scale([Optional=DefaultIsUndefined] float sx,
-               [Optional=DefaultIsUndefined] float sy);
-    void rotate([Optional=DefaultIsUndefined] float angle);
-    void translate([Optional=DefaultIsUndefined] float tx,
-                   [Optional=DefaultIsUndefined] float ty);
-    void transform([Optional=DefaultIsUndefined] float m11,
-                   [Optional=DefaultIsUndefined] float m12,
-                   [Optional=DefaultIsUndefined] float m21,
-                   [Optional=DefaultIsUndefined] float m22,
-                   [Optional=DefaultIsUndefined] float dx,
-                   [Optional=DefaultIsUndefined] float dy);
-    void setTransform([Optional=DefaultIsUndefined] float m11,
-                      [Optional=DefaultIsUndefined] float m12,
-                      [Optional=DefaultIsUndefined] float m21,
-                      [Optional=DefaultIsUndefined] float m22,
-                      [Optional=DefaultIsUndefined] float dx,
-                      [Optional=DefaultIsUndefined] float dy);
-
-    attribute float globalAlpha;
-    [TreatNullAs=NullString] attribute DOMString globalCompositeOperation;
-
-    [RaisesException] CanvasGradient createLinearGradient([Optional=DefaultIsUndefined] float x0,
-                                        [Optional=DefaultIsUndefined] float y0,
-                                        [Optional=DefaultIsUndefined] float x1,
-                                        [Optional=DefaultIsUndefined] float y1);
-    [RaisesException] CanvasGradient createRadialGradient([Optional=DefaultIsUndefined] float x0,
-                                        [Optional=DefaultIsUndefined] float y0,
-                                        [Optional=DefaultIsUndefined] float r0,
-                                        [Optional=DefaultIsUndefined] float x1,
-                                        [Optional=DefaultIsUndefined] float y1,
-                                        [Optional=DefaultIsUndefined] float r1);
-
-    attribute float lineWidth;
-    [TreatNullAs=NullString] attribute DOMString lineCap;
-    [TreatNullAs=NullString] attribute DOMString lineJoin;
-    attribute float miterLimit;
-
-    attribute float shadowOffsetX;
-    attribute float shadowOffsetY;
-    attribute float shadowBlur;
-    [TreatNullAs=NullString] attribute DOMString shadowColor;
-
-    void setLineDash(sequence<float> dash);
-    sequence<float> getLineDash();
-    attribute float lineDashOffset;
-
-    // FIXME: These attributes should be implemented.
-    // [Custom] attribute Array webkitLineDash;
-    // attribute float webkitLineDashOffset;
-
-    void clearRect([Optional=DefaultIsUndefined] float x,
-                   [Optional=DefaultIsUndefined] float y,
-                   [Optional=DefaultIsUndefined] float width,
-                   [Optional=DefaultIsUndefined] float height);
-    void fillRect([Optional=DefaultIsUndefined] float x,
-                  [Optional=DefaultIsUndefined] float y,
-                  [Optional=DefaultIsUndefined] float width,
-                  [Optional=DefaultIsUndefined] float height);
-
-    void beginPath();
-
-    attribute DOMPath currentPath;
-
-    // FIXME: These methods should be shared with CanvasRenderingContext2D in the CanvasPathMethods interface.
-    void closePath();
-    void moveTo([Optional=DefaultIsUndefined] float x,
-                [Optional=DefaultIsUndefined] float y);
-    void lineTo([Optional=DefaultIsUndefined] float x,
-                [Optional=DefaultIsUndefined] float y);
-    void quadraticCurveTo([Optional=DefaultIsUndefined] float cpx,
-                          [Optional=DefaultIsUndefined] float cpy,
-                          [Optional=DefaultIsUndefined] float x,
-                          [Optional=DefaultIsUndefined] float y);
-    void bezierCurveTo([Optional=DefaultIsUndefined] float cp1x,
-                       [Optional=DefaultIsUndefined] float cp1y,
-                       [Optional=DefaultIsUndefined] float cp2x,
-                       [Optional=DefaultIsUndefined] float cp2y,
-                       [Optional=DefaultIsUndefined] float x,
-                       [Optional=DefaultIsUndefined] float y);
-    [RaisesException] void arcTo([Optional=DefaultIsUndefined] float x1,
-               [Optional=DefaultIsUndefined] float y1,
-               [Optional=DefaultIsUndefined] float x2,
-               [Optional=DefaultIsUndefined] float y2,
-               [Optional=DefaultIsUndefined] float radius);
-    void rect([Optional=DefaultIsUndefined] float x,
-              [Optional=DefaultIsUndefined] float y,
-              [Optional=DefaultIsUndefined] float width,
-              [Optional=DefaultIsUndefined] float height);
-    [RaisesException] void arc([Optional=DefaultIsUndefined] float x,
-             [Optional=DefaultIsUndefined] float y,
-             [Optional=DefaultIsUndefined] float radius,
-             [Optional=DefaultIsUndefined] float startAngle,
-             [Optional=DefaultIsUndefined] float endAngle,
-             [Optional=DefaultIsUndefined] boolean anticlockwise);
-
-    void fill([Optional] CanvasWindingRule winding);
-    void stroke();
-    void clip([Optional] CanvasWindingRule winding);
-    boolean isPointInPath([Optional=DefaultIsUndefined] float x,
-                          [Optional=DefaultIsUndefined] float y,
-                          [Optional] CanvasWindingRule winding);
-    boolean isPointInStroke([Optional=DefaultIsUndefined] float x,
-                            [Optional=DefaultIsUndefined] float y);
-
-    // text
-    attribute DOMString font;
-    attribute DOMString textAlign;
-    attribute DOMString textBaseline;
-
-    TextMetrics measureText([Optional=DefaultIsUndefined] DOMString text);
-
-    // other
-
-    void setAlpha([Optional=DefaultIsUndefined] float alpha);
-    void setCompositeOperation([Optional=DefaultIsUndefined] DOMString compositeOperation);
-
-    void setLineWidth([Optional=DefaultIsUndefined] float width);
-    void setLineCap([Optional=DefaultIsUndefined] DOMString cap);
-    void setLineJoin([Optional=DefaultIsUndefined] DOMString join);
-    void setMiterLimit([Optional=DefaultIsUndefined] float limit);
-
-    void clearShadow();
-
-    void fillText(DOMString text, float x, float y, [Optional] float maxWidth);
-    void strokeText(DOMString text, float x, float y, [Optional] float maxWidth);
-
-    void setStrokeColor([StrictTypeChecking] DOMString color, [Optional] float alpha);
-    void setStrokeColor(float grayLevel, [Optional] float alpha);
-    void setStrokeColor(float r, float g, float b, float a);
-    void setStrokeColor(float c, float m, float y, float k, float a);
-
-    void setFillColor([StrictTypeChecking] DOMString color, [Optional] float alpha);
-    void setFillColor(float grayLevel, [Optional] float alpha);
-    void setFillColor(float r, float g, float b, float a);
-    void setFillColor(float c, float m, float y, float k, float a);
-
-    void strokeRect([Optional=DefaultIsUndefined] float x,
-                    [Optional=DefaultIsUndefined] float y,
-                    [Optional=DefaultIsUndefined] float width,
-                    [Optional=DefaultIsUndefined] float height,
-                    [Optional] float lineWidth);
-
-    [RaisesException] void drawImage(HTMLImageElement? image, float x, float y);
-    [RaisesException] void drawImage(HTMLImageElement? image, float x, float y, float width, float height);
-    [RaisesException] void drawImage(HTMLImageElement? image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
-    [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y);
-    [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y, float width, float height);
-    [RaisesException] void drawImage(HTMLCanvasElement? canvas, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
-#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
-    [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y);
-    [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y, float width, float height);
-    [RaisesException] void drawImage(HTMLVideoElement? video, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
-#endif
-
-    void drawImageFromRect(HTMLImageElement image,
-                           [Optional] float sx, [Optional] float sy, [Optional] float sw, [Optional] float sh,
-                           [Optional] float dx, [Optional] float dy, [Optional] float dw, [Optional] float dh,
-                           [Optional] DOMString compositeOperation);
-
-    void setShadow(float width, float height, float blur, [Optional, StrictTypeChecking] DOMString color, [Optional] float alpha);
-    void setShadow(float width, float height, float blur, float grayLevel, [Optional] float alpha);
-    void setShadow(float width, float height, float blur, float r, float g, float b, float a);
-    void setShadow(float width, float height, float blur, float c, float m, float y, float k, float a);
-
-    [RaisesException] void putImageData(ImageData? imagedata, float dx, float dy);
-    [RaisesException] void putImageData(ImageData? imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
-
-    [RaisesException] void webkitPutImageDataHD(ImageData? imagedata, float dx, float dy);
-    [RaisesException] void webkitPutImageDataHD(ImageData? imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
-
-    [RaisesException] CanvasPattern createPattern(HTMLCanvasElement? canvas, [TreatNullAs=NullString] DOMString repetitionType);
-    [RaisesException] CanvasPattern createPattern(HTMLImageElement? image, [TreatNullAs=NullString] DOMString repetitionType);
-    [RaisesException] ImageData createImageData(ImageData? imagedata);
-    [RaisesException] ImageData createImageData(float sw, float sh);
-
-    [Custom] attribute custom strokeStyle;
-    [Custom] attribute custom fillStyle;
-
-    // pixel manipulation
-    [RaisesException] ImageData getImageData([Optional=DefaultIsUndefined] float sx, [Optional=DefaultIsUndefined] float sy,
-                           [Optional=DefaultIsUndefined] float sw, [Optional=DefaultIsUndefined] float sh);
-
-    [RaisesException] ImageData webkitGetImageDataHD([Optional=DefaultIsUndefined] float sx, [Optional=DefaultIsUndefined] float sy,
-                                   [Optional=DefaultIsUndefined] float sw, [Optional=DefaultIsUndefined] float sh);
-
-    readonly attribute float webkitBackingStorePixelRatio;
-
-    attribute boolean webkitImageSmoothingEnabled;
-};
-
diff --git a/html/canvas/DOMPath.idl b/html/canvas/DOMPath.idl
deleted file mode 100644
index ae4a06a..0000000
--- a/html/canvas/DOMPath.idl
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
- * Copyright (C) 2012, 2013 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER "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 HOLDER 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.
- */
-
-interface [
-    EnabledAtRuntime=canvasPath,
-    Constructor,
-    Constructor(DOMPath path),
-#if defined(ENABLE_SVG) && ENABLE_SVG
-    Constructor(DOMString text),
-#endif
-    InterfaceName=Path
-] DOMPath {
-
-    // FIXME: These methods should be shared with CanvasRenderingContext2D in the CanvasPathMethods interface.
-    void closePath();
-    void moveTo([Optional=DefaultIsUndefined] float x,
-                [Optional=DefaultIsUndefined] float y);
-    void lineTo([Optional=DefaultIsUndefined] float x,
-                [Optional=DefaultIsUndefined] float y);
-    void quadraticCurveTo([Optional=DefaultIsUndefined] float cpx,
-                          [Optional=DefaultIsUndefined] float cpy,
-                          [Optional=DefaultIsUndefined] float x,
-                          [Optional=DefaultIsUndefined] float y);
-    void bezierCurveTo([Optional=DefaultIsUndefined] float cp1x,
-                       [Optional=DefaultIsUndefined] float cp1y,
-                       [Optional=DefaultIsUndefined] float cp2x,
-                       [Optional=DefaultIsUndefined] float cp2y,
-                       [Optional=DefaultIsUndefined] float x,
-                       [Optional=DefaultIsUndefined] float y);
-    [RaisesException] void arcTo([Optional=DefaultIsUndefined] float x1,
-               [Optional=DefaultIsUndefined] float y1,
-               [Optional=DefaultIsUndefined] float x2,
-               [Optional=DefaultIsUndefined] float y2,
-               [Optional=DefaultIsUndefined] float radius);
-    void rect([Optional=DefaultIsUndefined] float x,
-              [Optional=DefaultIsUndefined] float y,
-              [Optional=DefaultIsUndefined] float width,
-              [Optional=DefaultIsUndefined] float height);
-    [RaisesException] void arc([Optional=DefaultIsUndefined] float x,
-             [Optional=DefaultIsUndefined] float y,
-             [Optional=DefaultIsUndefined] float radius,
-             [Optional=DefaultIsUndefined] float startAngle,
-             [Optional=DefaultIsUndefined] float endAngle,
-             [Optional=DefaultIsUndefined] boolean anticlockwise);
-};
diff --git a/modules/README b/modules/README
index fb8e9c0..081bdf4 100644
--- a/modules/README
+++ b/modules/README
@@ -6,4 +6,4 @@
 
 The current version corresponds to:
 URL: http://src.chromium.org/multivm/trunk/webkit
-Current revision: 1184
+Current revision: 1206
diff --git a/modules/battery/BatteryManager.idl b/modules/battery/BatteryManager.idl
index 1b90e50..b8d2b99 100644
--- a/modules/battery/BatteryManager.idl
+++ b/modules/battery/BatteryManager.idl
@@ -36,10 +36,10 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
 
diff --git a/modules/donottrack/NavigatorDoNotTrack.idl b/modules/donottrack/NavigatorDoNotTrack.idl
index 446a46e..1fe0b8a 100644
--- a/modules/donottrack/NavigatorDoNotTrack.idl
+++ b/modules/donottrack/NavigatorDoNotTrack.idl
@@ -31,6 +31,6 @@
 [
     Supplemental=Navigator
 ] interface NavigatorDoNotTrack {
-    [EnabledAtRuntime,TreatReturnedNullStringAs=Null] readonly attribute DOMString doNotTrack;
+    [TreatReturnedNullStringAs=Null] readonly attribute DOMString doNotTrack;
 };
 
diff --git a/modules/encryptedmedia/MediaKeyMessageEvent.idl b/modules/encryptedmedia/MediaKeyMessageEvent.idl
index 22a2720..513b910 100644
--- a/modules/encryptedmedia/MediaKeyMessageEvent.idl
+++ b/modules/encryptedmedia/MediaKeyMessageEvent.idl
@@ -23,11 +23,11 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-interface [
+[
     Conditional=ENCRYPTED_MEDIA_V2,
     EnabledAtRuntime=encryptedMedia,
     ConstructorTemplate=Event 
-] MediaKeyMessageEvent : Event {
+] interface MediaKeyMessageEvent : Event {
     readonly attribute Uint8Array message;
     [InitializedByEventConstructor] readonly attribute DOMString destinationURL;
 };
diff --git a/modules/encryptedmedia/MediaKeyNeededEvent.idl b/modules/encryptedmedia/MediaKeyNeededEvent.idl
index aeba4e4..0c1b42b 100644
--- a/modules/encryptedmedia/MediaKeyNeededEvent.idl
+++ b/modules/encryptedmedia/MediaKeyNeededEvent.idl
@@ -23,11 +23,11 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-interface [
+[
     Conditional=ENCRYPTED_MEDIA_V2,
     EnabledAtRuntime=encryptedMedia,
     ConstructorTemplate=Event 
-] MediaKeyNeededEvent : Event {
+] interface MediaKeyNeededEvent : Event {
     readonly attribute Uint8Array initData;
 };
 
diff --git a/modules/encryptedmedia/MediaKeySession.idl b/modules/encryptedmedia/MediaKeySession.idl
index fec26db..ba4d1cb 100644
--- a/modules/encryptedmedia/MediaKeySession.idl
+++ b/modules/encryptedmedia/MediaKeySession.idl
@@ -23,11 +23,11 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
      */
 
-interface [
+[
     Conditional=ENCRYPTED_MEDIA_V2,
     EnabledAtRuntime=encryptedMedia,
     EventTarget,
-] MediaKeySession {
+] interface MediaKeySession {
     // error state
     readonly attribute MediaKeyError error;
 
@@ -47,9 +47,9 @@
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/modules/encryptedmedia/MediaKeys.idl b/modules/encryptedmedia/MediaKeys.idl
index a9cc30e..b6ef196 100644
--- a/modules/encryptedmedia/MediaKeys.idl
+++ b/modules/encryptedmedia/MediaKeys.idl
@@ -23,13 +23,13 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
  
-interface [
+[
     Conditional=ENCRYPTED_MEDIA_V2,
     EnabledAtRuntime=encryptedMedia,
     Constructor(DOMString keySystem),
     RaisesException
-] MediaKeys {
-    [CallWith=ScriptExecutionContext, RaisesException] MediaKeySession createSession([Optional=DefaultIsUndefined] DOMString type, [Optional=DefaultIsUndefined] Uint8Array initData);
+] interface MediaKeys {
+    [CallWith=ScriptExecutionContext, RaisesException] MediaKeySession createSession([Default=Undefined] optional DOMString type, [Default=Undefined] optional Uint8Array initData);
 
     readonly attribute DOMString keySystem;
 };
diff --git a/modules/filesystem/DOMWindowFileSystem.idl b/modules/filesystem/DOMWindowFileSystem.idl
index 9f79514..333b4dd 100644
--- a/modules/filesystem/DOMWindowFileSystem.idl
+++ b/modules/filesystem/DOMWindowFileSystem.idl
@@ -31,8 +31,8 @@
     const unsigned short PERSISTENT = 1;
 
     [EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(unsigned short type, long long size,
-            [Callback] FileSystemCallback successCallback, [Callback, Optional] ErrorCallback errorCallback);
+            [Callback] FileSystemCallback successCallback, [Callback] optional ErrorCallback errorCallback);
     [EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(DOMString url,
-            [Callback] EntryCallback successCallback, [Callback, Optional] ErrorCallback errorCallback);
+            [Callback] EntryCallback successCallback, [Callback] optional ErrorCallback errorCallback);
 };
 
diff --git a/modules/filesystem/DirectoryEntry.idl b/modules/filesystem/DirectoryEntry.idl
index 42ed895..9a44cf6 100644
--- a/modules/filesystem/DirectoryEntry.idl
+++ b/modules/filesystem/DirectoryEntry.idl
@@ -30,7 +30,7 @@
 
 interface DirectoryEntry : Entry {
     DirectoryReader createReader();
-    void getFile([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, [Optional] Dictionary options, [Optional, Callback] EntryCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
-    void getDirectory([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, [Optional] Dictionary options, [Optional, Callback] EntryCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
-    void removeRecursively([Callback] VoidCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
+    void getFile([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, optional Dictionary options, [Callback] optional EntryCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+    void getDirectory([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, optional Dictionary options, [Callback] optional EntryCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+    void removeRecursively([Callback] VoidCallback successCallback, [Callback] optional ErrorCallback errorCallback);
 };
diff --git a/modules/filesystem/DirectoryReader.idl b/modules/filesystem/DirectoryReader.idl
index 1dd07c6..b6930b5 100644
--- a/modules/filesystem/DirectoryReader.idl
+++ b/modules/filesystem/DirectoryReader.idl
@@ -31,5 +31,5 @@
 [
     ImplementationLacksVTable
 ] interface DirectoryReader {
-    void readEntries([Callback] EntriesCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
+    void readEntries([Callback] EntriesCallback successCallback, [Callback] optional ErrorCallback errorCallback);
 };
diff --git a/modules/filesystem/Entry.idl b/modules/filesystem/Entry.idl
index 32f2e9e..4f4a316 100644
--- a/modules/filesystem/Entry.idl
+++ b/modules/filesystem/Entry.idl
@@ -37,10 +37,10 @@
     readonly attribute DOMString fullPath;
     readonly attribute DOMFileSystem filesystem;
 
-    void getMetadata([Callback] MetadataCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
-    void moveTo(DirectoryEntry parent, [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString name, [Optional, Callback] EntryCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
-    void copyTo(DirectoryEntry parent, [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString name, [Optional, Callback] EntryCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
+    void getMetadata([Callback] MetadataCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+    void moveTo(DirectoryEntry parent, [TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString name, [Callback] optional EntryCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+    void copyTo(DirectoryEntry parent, [TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString name, [Callback] optional EntryCallback successCallback, [Callback] optional ErrorCallback errorCallback);
     DOMString toURL();
-    void remove([Callback] VoidCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
-    void getParent([Optional, Callback] EntryCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
+    void remove([Callback] VoidCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+    void getParent([Callback] optional EntryCallback successCallback, [Callback] optional ErrorCallback errorCallback);
 };
diff --git a/modules/filesystem/FileEntry.idl b/modules/filesystem/FileEntry.idl
index 44419ea..4e8b09d 100644
--- a/modules/filesystem/FileEntry.idl
+++ b/modules/filesystem/FileEntry.idl
@@ -29,6 +29,6 @@
  */
 
 interface FileEntry : Entry {
-    void createWriter([Callback] FileWriterCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
-    void file([Callback] FileCallback successCallback, [Optional, Callback] ErrorCallback errorCallback);
+    void createWriter([Callback] FileWriterCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+    void file([Callback] FileCallback successCallback, [Callback] optional ErrorCallback errorCallback);
 };
diff --git a/modules/filesystem/FileWriter.idl b/modules/filesystem/FileWriter.idl
index ed15ae0..843bc2e 100644
--- a/modules/filesystem/FileWriter.idl
+++ b/modules/filesystem/FileWriter.idl
@@ -61,9 +61,9 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/modules/filesystem/WorkerContextFileSystem.idl b/modules/filesystem/WorkerContextFileSystem.idl
index fecde24..6bc4775 100644
--- a/modules/filesystem/WorkerContextFileSystem.idl
+++ b/modules/filesystem/WorkerContextFileSystem.idl
@@ -30,9 +30,9 @@
     const unsigned short TEMPORARY = 0;
     const unsigned short PERSISTENT = 1;
 
-    [EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(unsigned short type, long long size, [Callback, Optional] FileSystemCallback successCallback, [Callback, Optional] ErrorCallback errorCallback);
+    [EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(unsigned short type, long long size, [Callback] optional FileSystemCallback successCallback, [Callback] optional ErrorCallback errorCallback);
     [EnabledAtRuntime=FileSystem, RaisesException] DOMFileSystemSync webkitRequestFileSystemSync(unsigned short type, long long size);
-    [EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(DOMString url, [Callback] EntryCallback successCallback, [Callback, Optional] ErrorCallback errorCallback);
+    [EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(DOMString url, [Callback] EntryCallback successCallback, [Callback] optional ErrorCallback errorCallback);
     [EnabledAtRuntime=FileSystem, RaisesException] EntrySync webkitResolveLocalFileSystemSyncURL(DOMString url);
 
     [EnabledAtRuntime=FileSystem] attribute FileErrorConstructor FileError;
diff --git a/modules/gamepad/GamepadList.idl b/modules/gamepad/GamepadList.idl
index 70442ac..82c8367 100644
--- a/modules/gamepad/GamepadList.idl
+++ b/modules/gamepad/GamepadList.idl
@@ -29,6 +29,6 @@
     ImplementationLacksVTable
 ] interface GamepadList {
     readonly attribute unsigned long length;
-    Gamepad item([Optional=DefaultIsUndefined] unsigned long index);
+    Gamepad item([Default=Undefined] optional unsigned long index);
 };
 
diff --git a/modules/geolocation/Geolocation.idl b/modules/geolocation/Geolocation.idl
index 25efdef..c0f7130 100644
--- a/modules/geolocation/Geolocation.idl
+++ b/modules/geolocation/Geolocation.idl
@@ -26,13 +26,13 @@
 // http://www.w3.org/TR/geolocation-API/#geolocation_interface
 [
 ] interface Geolocation {
-    [Custom] void getCurrentPosition(PositionCallback successCallback,
-                                     [Optional] PositionErrorCallback errorCallback,
-                                     [Optional] PositionOptions options);
+    [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void getCurrentPosition(PositionCallback successCallback,
+                                     optional PositionErrorCallback errorCallback,
+                                     optional PositionOptions options);
 
-    [Custom] long watchPosition(PositionCallback successCallback,
-                                [Optional] PositionErrorCallback errorCallback,
-                                [Optional] PositionOptions options);
+    [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] long watchPosition(PositionCallback successCallback,
+                                optional PositionErrorCallback errorCallback,
+                                optional PositionOptions options);
 
     void clearWatch(long watchID);
 };
diff --git a/modules/indexeddb/IDBCursor.idl b/modules/indexeddb/IDBCursor.idl
index f21097b..2e375c0 100644
--- a/modules/indexeddb/IDBCursor.idl
+++ b/modules/indexeddb/IDBCursor.idl
@@ -32,6 +32,6 @@
 
     [CallWith=ScriptState, RaisesException] IDBRequest update(any value);
     [RaisesException] void advance([EnforceRange] unsigned long count);
-    [CallWith=ScriptExecutionContext, ImplementedAs=continueFunction, RaisesException] void continue([Optional] any key);
+    [CallWith=ScriptExecutionContext, ImplementedAs=continueFunction, RaisesException] void continue([Default=Undefined] optional any key);
     [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete();
 };
diff --git a/modules/indexeddb/IDBDatabase.idl b/modules/indexeddb/IDBDatabase.idl
index 908f700..c6a8e28 100644
--- a/modules/indexeddb/IDBDatabase.idl
+++ b/modules/indexeddb/IDBDatabase.idl
@@ -36,20 +36,20 @@
     attribute EventListener onerror;
     attribute EventListener onversionchange;
 
-    [RaisesException] IDBObjectStore createObjectStore(DOMString name, [Optional] Dictionary options);
+    [RaisesException] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options);
     [RaisesException] void deleteObjectStore(DOMString name);
-    [CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(DOMStringList storeNames, [Optional=DefaultIsNullString] DOMString mode);
-    [CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(sequence<DOMString> storeNames, [Optional=DefaultIsNullString] DOMString mode);
-    [CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(DOMString storeName, [Optional=DefaultIsNullString] DOMString mode);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(DOMStringList storeNames, [Default=NullString] optional DOMString mode);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(sequence<DOMString> storeNames, [Default=NullString] optional DOMString mode);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(DOMString storeName, [Default=NullString] optional DOMString mode);
 
     void close();
 
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/modules/indexeddb/IDBFactory.idl b/modules/indexeddb/IDBFactory.idl
index 8258959..052c191 100644
--- a/modules/indexeddb/IDBFactory.idl
+++ b/modules/indexeddb/IDBFactory.idl
@@ -28,7 +28,7 @@
 ] interface IDBFactory {
     [CallWith=ScriptExecutionContext, ImplementedAs=getDatabaseNames, RaisesException] IDBRequest webkitGetDatabaseNames();
 
-    [CallWith=ScriptExecutionContext, RaisesException] IDBOpenDBRequest open(DOMString name, [EnforceRange, Optional] unsigned long long version);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version);
     [CallWith=ScriptExecutionContext, RaisesException] IDBOpenDBRequest deleteDatabase(DOMString name);
 
     [CallWith=ScriptExecutionContext, RaisesException] short cmp(any first, any second);
diff --git a/modules/indexeddb/IDBIndex.idl b/modules/indexeddb/IDBIndex.idl
index 8f69ebd..78ef8af 100644
--- a/modules/indexeddb/IDBIndex.idl
+++ b/modules/indexeddb/IDBIndex.idl
@@ -32,16 +32,18 @@
     readonly attribute boolean unique;
     readonly attribute boolean multiEntry;
 
-    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor([Optional] IDBKeyRange? range, [Optional] DOMString direction);
-    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor(any key, [Optional] DOMString direction);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor([Default=Undefined] optional IDBKeyRange? range, [Default=NullString] optional DOMString direction);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor(any key, [Default=NullString] optional DOMString direction);
 
-    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openKeyCursor([Optional] IDBKeyRange? range, [Optional] DOMString  direction);
-    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openKeyCursor(any key, [Optional] DOMString direction);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openKeyCursor([Default=Undefined] optional IDBKeyRange? range, [Default=NullString] optional DOMString  direction);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openKeyCursor(any key, [Default=NullString] optional DOMString direction);
 
     [CallWith=ScriptExecutionContext, RaisesException] IDBRequest get(IDBKeyRange? key);
     [CallWith=ScriptExecutionContext, RaisesException] IDBRequest get(any key);
+
     [CallWith=ScriptExecutionContext, RaisesException] IDBRequest getKey(IDBKeyRange? key);
     [CallWith=ScriptExecutionContext, RaisesException] IDBRequest getKey(any key);
-    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count([Optional] IDBKeyRange? range);
+
+    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count([Default=Undefined] optional IDBKeyRange? range);
     [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count(any key);
 };
diff --git a/modules/indexeddb/IDBKeyRange.idl b/modules/indexeddb/IDBKeyRange.idl
index 2d853e1..cc3900e 100644
--- a/modules/indexeddb/IDBKeyRange.idl
+++ b/modules/indexeddb/IDBKeyRange.idl
@@ -32,7 +32,7 @@
     readonly attribute boolean upperOpen;
 
     [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange only(any value);
-    [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange lowerBound(any bound, [Optional] boolean open);
-    [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange upperBound(any bound, [Optional] boolean open);
-    [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange bound(any lower, any upper, [Optional] boolean lowerOpen, [Optional] boolean upperOpen);
+    [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange lowerBound(any bound, [Default=Undefined] optional boolean open);
+    [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange upperBound(any bound, [Default=Undefined] optional boolean open);
+    [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange bound(any lower, any upper, [Default=Undefined] optional boolean lowerOpen, [Default=Undefined] optional boolean upperOpen);
 };
diff --git a/modules/indexeddb/IDBObjectStore.idl b/modules/indexeddb/IDBObjectStore.idl
index caafd96..941bf99 100644
--- a/modules/indexeddb/IDBObjectStore.idl
+++ b/modules/indexeddb/IDBObjectStore.idl
@@ -32,20 +32,20 @@
     readonly attribute IDBTransaction transaction;
     readonly attribute boolean autoIncrement;
 
-    [CallWith=ScriptState, RaisesException] IDBRequest put(any value, [Optional] any key);
-    [CallWith=ScriptState, RaisesException] IDBRequest add(any value, [Optional] any key);
+    [CallWith=ScriptState, RaisesException] IDBRequest put(any value, [Default=Undefined] optional any key);
+    [CallWith=ScriptState, RaisesException] IDBRequest add(any value, [Default=Undefined] optional any key);
     [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(IDBKeyRange? keyRange);
     [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(any key);
     [CallWith=ScriptExecutionContext, RaisesException] IDBRequest clear();
     [CallWith=ScriptExecutionContext, RaisesException] IDBRequest get(IDBKeyRange? key);
     [CallWith=ScriptExecutionContext, RaisesException] IDBRequest get(any key);
-    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor([Optional] IDBKeyRange? range, [Optional] DOMString direction);
-    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor(any key, [Optional] DOMString direction);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor([Default=Undefined] optional IDBKeyRange? range, [Default=NullString] optional DOMString direction);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor(any key, [Default=NullString] optional DOMString direction);
 
-    [CallWith=ScriptExecutionContext, RaisesException] IDBIndex createIndex(DOMString name, sequence<DOMString> keyPath, [Optional] Dictionary options);
-    [CallWith=ScriptExecutionContext, RaisesException] IDBIndex createIndex(DOMString name, DOMString keyPath, [Optional] Dictionary options);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBIndex createIndex(DOMString name, sequence<DOMString> keyPath, optional Dictionary options);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBIndex createIndex(DOMString name, DOMString keyPath, optional Dictionary options);
     [RaisesException] IDBIndex index(DOMString name);
     [RaisesException] void deleteIndex(DOMString name);
-    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count([Optional] IDBKeyRange? range);
+    [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count([Default=Undefined] optional IDBKeyRange? range);
     [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count(any key);
 };
diff --git a/modules/indexeddb/IDBRequest.idl b/modules/indexeddb/IDBRequest.idl
index b75e7ce..3f8020a 100644
--- a/modules/indexeddb/IDBRequest.idl
+++ b/modules/indexeddb/IDBRequest.idl
@@ -48,9 +48,9 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/modules/indexeddb/IDBTransaction.idl b/modules/indexeddb/IDBTransaction.idl
index 555d2fb..ec9995b 100644
--- a/modules/indexeddb/IDBTransaction.idl
+++ b/modules/indexeddb/IDBTransaction.idl
@@ -46,9 +46,9 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/modules/mediasource/MediaSource.idl b/modules/mediasource/MediaSource.idl
index 09274ff..29c6f0d 100644
--- a/modules/mediasource/MediaSource.idl
+++ b/modules/mediasource/MediaSource.idl
@@ -48,17 +48,17 @@
 
     readonly attribute DOMString readyState;
     
-    [RaisesException] void endOfStream([Optional=DefaultIsNullString] DOMString error);
+    [RaisesException] void endOfStream([Default=NullString] optional DOMString error);
 
     static boolean isTypeSupported (DOMString type);
 
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
 
diff --git a/modules/mediasource/SourceBufferList.idl b/modules/mediasource/SourceBufferList.idl
index 1f5d88b..f8531ed 100644
--- a/modules/mediasource/SourceBufferList.idl
+++ b/modules/mediasource/SourceBufferList.idl
@@ -40,10 +40,10 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
 
diff --git a/modules/mediastream/MediaStream.idl b/modules/mediastream/MediaStream.idl
index be2e41c..01be9c1 100644
--- a/modules/mediastream/MediaStream.idl
+++ b/modules/mediastream/MediaStream.idl
@@ -52,10 +52,10 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
 
diff --git a/modules/mediastream/MediaStreamTrack.idl b/modules/mediastream/MediaStreamTrack.idl
index 975c752..48495fd 100644
--- a/modules/mediastream/MediaStreamTrack.idl
+++ b/modules/mediastream/MediaStreamTrack.idl
@@ -41,10 +41,10 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
 
diff --git a/modules/mediastream/NavigatorMediaStream.idl b/modules/mediastream/NavigatorMediaStream.idl
index fd0b6fe..ec67fd7 100644
--- a/modules/mediastream/NavigatorMediaStream.idl
+++ b/modules/mediastream/NavigatorMediaStream.idl
@@ -23,6 +23,6 @@
 ] interface NavigatorMediaStream {
     [EnabledAtRuntime, RaisesException] void webkitGetUserMedia(Dictionary options,
                                                  [Callback] NavigatorUserMediaSuccessCallback successCallback,
-                                                 [Callback, Optional] NavigatorUserMediaErrorCallback errorCallback);
+                                                 [Callback] optional NavigatorUserMediaErrorCallback errorCallback);
 };
 
diff --git a/modules/mediastream/RTCDTMFSender.idl b/modules/mediastream/RTCDTMFSender.idl
index 7c193f0..6c3f419 100644
--- a/modules/mediastream/RTCDTMFSender.idl
+++ b/modules/mediastream/RTCDTMFSender.idl
@@ -34,16 +34,16 @@
     readonly attribute long duration;
     readonly attribute long interToneGap;
 
-    [RaisesException] void insertDTMF(DOMString tones, [Optional] long duration, [Optional] long interToneGap);
+    [RaisesException] void insertDTMF(DOMString tones, optional long duration, optional long interToneGap);
 
     attribute EventListener ontonechange;
 
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
diff --git a/modules/mediastream/RTCDataChannel.idl b/modules/mediastream/RTCDataChannel.idl
index 4f2ffe5..265c822 100644
--- a/modules/mediastream/RTCDataChannel.idl
+++ b/modules/mediastream/RTCDataChannel.idl
@@ -48,9 +48,9 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
diff --git a/modules/mediastream/RTCPeerConnection.idl b/modules/mediastream/RTCPeerConnection.idl
index c13facd..7f251f6 100644
--- a/modules/mediastream/RTCPeerConnection.idl
+++ b/modules/mediastream/RTCPeerConnection.idl
@@ -31,24 +31,24 @@
 [
     Conditional=MEDIA_STREAM,
     ActiveDOMObject,
-    Constructor(Dictionary rtcIceServers, [Optional] Dictionary mediaConstraints),
+    Constructor(Dictionary rtcIceServers, optional Dictionary mediaConstraints),
     RaisesException,
     CallWith=ScriptExecutionContext,
     EventTarget
 ] interface RTCPeerConnection {
-    [RaisesException] void createOffer([Callback] RTCSessionDescriptionCallback successCallback, [Callback,Optional=DefaultIsUndefined] RTCErrorCallback failureCallback, [Optional] Dictionary mediaConstraints);
+    [RaisesException] void createOffer([Callback] RTCSessionDescriptionCallback successCallback, [Callback,Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary mediaConstraints);
 
-    [RaisesException] void createAnswer([Callback] RTCSessionDescriptionCallback successCallback, [Callback, Optional=DefaultIsUndefined] RTCErrorCallback failureCallback, [Optional] Dictionary mediaConstraints);
+    [RaisesException] void createAnswer([Callback] RTCSessionDescriptionCallback successCallback, [Callback, Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary mediaConstraints);
 
-    [RaisesException] void setLocalDescription(RTCSessionDescription description, [Callback, Optional=DefaultIsUndefined] VoidCallback successCallback, [Callback, Optional=DefaultIsUndefined] RTCErrorCallback failureCallback);
+    [RaisesException] void setLocalDescription(RTCSessionDescription description, [Callback, Default=Undefined] optional VoidCallback successCallback, [Callback, Default=Undefined] optional RTCErrorCallback failureCallback);
     [GetterRaisesException] readonly attribute RTCSessionDescription localDescription;
 
-    [RaisesException] void setRemoteDescription(RTCSessionDescription description, [Callback, Optional=DefaultIsUndefined] VoidCallback successCallback, [Callback, Optional=DefaultIsUndefined] RTCErrorCallback failureCallback);
+    [RaisesException] void setRemoteDescription(RTCSessionDescription description, [Callback, Default=Undefined] optional VoidCallback successCallback, [Callback, Default=Undefined] optional RTCErrorCallback failureCallback);
     [GetterRaisesException] readonly attribute RTCSessionDescription remoteDescription;
 
     readonly attribute DOMString signalingState;
 
-    [RaisesException] void updateIce([Optional] Dictionary configuration, [Optional] Dictionary mediaConstraints);
+    [RaisesException] void updateIce(optional Dictionary configuration, optional Dictionary mediaConstraints);
 
     [RaisesException] void addIceCandidate(RTCIceCandidate candidate);
 
@@ -59,12 +59,12 @@
     sequence<MediaStream> getRemoteStreams();
     MediaStream getStreamById(DOMString streamId);
 
-    [StrictTypeChecking, RaisesException] void addStream(MediaStream stream, [Optional] Dictionary mediaConstraints);
+    [StrictTypeChecking, RaisesException] void addStream(MediaStream stream, optional Dictionary mediaConstraints);
     [StrictTypeChecking, RaisesException] void removeStream(MediaStream stream);
 
-    void getStats([Callback] RTCStatsCallback successCallback, [Optional=DefaultIsUndefined] MediaStreamTrack selector);
+    void getStats([Callback] RTCStatsCallback successCallback, [Default=Undefined] optional MediaStreamTrack selector);
 
-    [RaisesException] RTCDataChannel createDataChannel([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString label, [Optional] Dictionary options);
+    [RaisesException] RTCDataChannel createDataChannel([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString label, optional Dictionary options);
 
     [RaisesException] RTCDTMFSender createDTMFSender(MediaStreamTrack track);
 
@@ -81,10 +81,10 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event event);
 };
 
diff --git a/modules/mediastream/RTCStatsResponse.idl b/modules/mediastream/RTCStatsResponse.idl
index 4dfaee7..5d66b3e 100644
--- a/modules/mediastream/RTCStatsResponse.idl
+++ b/modules/mediastream/RTCStatsResponse.idl
@@ -27,5 +27,5 @@
     NamedGetter
 ] interface RTCStatsResponse {
     sequence<RTCStatsReport> result();
-    RTCStatsReport namedItem([Optional=DefaultIsUndefined] DOMString name);
+    RTCStatsReport namedItem([Default=Undefined] optional DOMString name);
 };
diff --git a/modules/notifications/DOMWindowNotifications.idl b/modules/notifications/DOMWindowNotifications.idl
index 7e270ce..f126a03 100644
--- a/modules/notifications/DOMWindowNotifications.idl
+++ b/modules/notifications/DOMWindowNotifications.idl
@@ -29,7 +29,7 @@
     Supplemental=DOMWindow
 ] interface DOMWindowNotifications {
 #if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
-    [EnabledAtRuntime, MeasureAs=LegacyNotifications] readonly attribute NotificationCenter webkitNotifications;
+    [EnabledAtRuntime, MeasureAs=LegacyNotifications, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds] readonly attribute NotificationCenter webkitNotifications;
 #endif
 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
     attribute NotificationConstructor Notification;
diff --git a/modules/notifications/Notification.idl b/modules/notifications/Notification.idl
index 5ef69cf..42c8b68 100644
--- a/modules/notifications/Notification.idl
+++ b/modules/notifications/Notification.idl
@@ -34,7 +34,7 @@
     ActiveDOMObject,
     EventTarget,
 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
-    Constructor(DOMString title, [Optional=DefaultIsUndefined] Dictionary options),
+    Constructor(DOMString title, [Default=Undefined] optional Dictionary options),
     CallWith=ScriptExecutionContext,
 #else
 #endif
@@ -50,7 +50,7 @@
 
 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
     [CallWith=ScriptExecutionContext] static readonly attribute DOMString permission;
-    [CallWith=ScriptExecutionContext] static void requestPermission([Optional, Callback] NotificationPermissionCallback callback);
+    [CallWith=ScriptExecutionContext] static void requestPermission([Callback] optional NotificationPermissionCallback callback);
 #endif
 
     attribute EventListener onshow;
@@ -72,10 +72,10 @@
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type, 
                              EventListener listener, 
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
 
diff --git a/modules/notifications/NotificationCenter.idl b/modules/notifications/NotificationCenter.idl
index 9fb6101..2846598 100644
--- a/modules/notifications/NotificationCenter.idl
+++ b/modules/notifications/NotificationCenter.idl
@@ -34,11 +34,11 @@
     ActiveDOMObject,
 ] interface NotificationCenter {
 #if !defined(ENABLE_TEXT_NOTIFICATIONS_ONLY) || !ENABLE_TEXT_NOTIFICATIONS_ONLY
-   [EnabledPerContext=htmlNotifications, MeasureAs=LegacyHTMLNotifications, RaisesException] Notification createHTMLNotification(DOMString url);
+   [EnabledPerContext=htmlNotifications, MeasureAs=LegacyHTMLNotifications, ActivityLog=Access, RaisesException] Notification createHTMLNotification(DOMString url);
 #endif
-   [MeasureAs=LegacyTextNotifications, RaisesException] Notification createNotification(DOMString iconUrl, DOMString title, DOMString body);
+   [MeasureAs=LegacyTextNotifications, ActivityLog=Access, RaisesException] Notification createNotification(DOMString iconUrl, DOMString title, DOMString body);
 
    int checkPermission();
-   void requestPermission([Optional, Callback] VoidCallback callback);
+   void requestPermission([Callback] optional VoidCallback callback);
 };
 
diff --git a/modules/quota/StorageInfo.idl b/modules/quota/StorageInfo.idl
index 253623d..ba72a2d 100644
--- a/modules/quota/StorageInfo.idl
+++ b/modules/quota/StorageInfo.idl
@@ -29,6 +29,6 @@
     const unsigned short TEMPORARY = 0;
     const unsigned short PERSISTENT = 1;
 
-    [CallWith=ScriptExecutionContext] void queryUsageAndQuota(unsigned short storageType, [Callback, Optional] StorageUsageCallback usageCallback, [Callback, Optional] StorageErrorCallback errorCallback);
-    [CallWith=ScriptExecutionContext] void requestQuota(unsigned short storageType, unsigned long long newQuotaInBytes, [Callback, Optional] StorageQuotaCallback quotaCallback, [Callback, Optional] StorageErrorCallback errorCallback);
+    [CallWith=ScriptExecutionContext] void queryUsageAndQuota(unsigned short storageType, [Callback] optional StorageUsageCallback usageCallback, [Callback] optional StorageErrorCallback errorCallback);
+    [CallWith=ScriptExecutionContext] void requestQuota(unsigned short storageType, unsigned long long newQuotaInBytes, [Callback] optional StorageQuotaCallback quotaCallback, [Callback] optional StorageErrorCallback errorCallback);
 };
diff --git a/modules/quota/StorageQuota.idl b/modules/quota/StorageQuota.idl
index d4c16e0..1275a92 100644
--- a/modules/quota/StorageQuota.idl
+++ b/modules/quota/StorageQuota.idl
@@ -26,6 +26,6 @@
 [
     ImplementationLacksVTable
 ] interface StorageQuota {
-    [CallWith=ScriptExecutionContext] void queryUsageAndQuota([Callback] StorageUsageCallback usageCallback, [Callback, Optional] StorageErrorCallback errorCallback);
-    [CallWith=ScriptExecutionContext] void requestQuota(unsigned long long newQuotaInBytes, [Callback, Optional] StorageQuotaCallback quotaCallback, [Callback, Optional] StorageErrorCallback errorCallback);
+    [CallWith=ScriptExecutionContext] void queryUsageAndQuota([Callback] StorageUsageCallback usageCallback, [Callback] optional StorageErrorCallback errorCallback);
+    [CallWith=ScriptExecutionContext] void requestQuota(unsigned long long newQuotaInBytes, [Callback] optional StorageQuotaCallback quotaCallback, [Callback] optional StorageErrorCallback errorCallback);
 };
diff --git a/modules/speech/DOMWindowSpeech.idl b/modules/speech/DOMWindowSpeech.idl
index 1822593..424daa3 100644
--- a/modules/speech/DOMWindowSpeech.idl
+++ b/modules/speech/DOMWindowSpeech.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=SCRIPTED_SPEECH,
     Supplemental=DOMWindow
 ] interface DOMWindowSpeech {
     [EnabledAtRuntime] attribute SpeechRecognitionConstructor webkitSpeechRecognition;
diff --git a/modules/speech/SpeechGrammar.idl b/modules/speech/SpeechGrammar.idl
index 9b2a2a7..d273948 100644
--- a/modules/speech/SpeechGrammar.idl
+++ b/modules/speech/SpeechGrammar.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=SCRIPTED_SPEECH,
     Constructor,
     ImplementationLacksVTable
 ] interface SpeechGrammar {
diff --git a/modules/speech/SpeechGrammarList.idl b/modules/speech/SpeechGrammarList.idl
index eba1914..18ae829 100644
--- a/modules/speech/SpeechGrammarList.idl
+++ b/modules/speech/SpeechGrammarList.idl
@@ -24,13 +24,12 @@
  */
 
 [
-    Conditional=SCRIPTED_SPEECH,
     IndexedGetter,
     Constructor,
     ImplementationLacksVTable
 ] interface SpeechGrammarList {
     readonly attribute unsigned long length;
     SpeechGrammar item([IsIndex] unsigned long index);
-    [CallWith=ScriptExecutionContext] void addFromUri(DOMString src, [Optional] float weight);
-    void addFromString(DOMString string, [Optional] float weight);
+    [CallWith=ScriptExecutionContext] void addFromUri(DOMString src, optional float weight);
+    void addFromString(DOMString string, optional float weight);
 };
diff --git a/modules/speech/SpeechRecognition.idl b/modules/speech/SpeechRecognition.idl
index 2d735af..9118634 100644
--- a/modules/speech/SpeechRecognition.idl
+++ b/modules/speech/SpeechRecognition.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=SCRIPTED_SPEECH,
     ActiveDOMObject,
     Constructor,
     CallWith=ScriptExecutionContext,
@@ -55,9 +54,9 @@
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/modules/speech/SpeechRecognitionAlternative.idl b/modules/speech/SpeechRecognitionAlternative.idl
index 719dce2..fb786dd 100644
--- a/modules/speech/SpeechRecognitionAlternative.idl
+++ b/modules/speech/SpeechRecognitionAlternative.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=SCRIPTED_SPEECH,
     ImplementationLacksVTable
 ] interface SpeechRecognitionAlternative {
     readonly attribute DOMString transcript;
diff --git a/modules/speech/SpeechRecognitionError.idl b/modules/speech/SpeechRecognitionError.idl
index f3f91d8..d62ac18 100644
--- a/modules/speech/SpeechRecognitionError.idl
+++ b/modules/speech/SpeechRecognitionError.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=SCRIPTED_SPEECH,
     ConstructorTemplate=Event
 ] interface SpeechRecognitionError : Event {
     [InitializedByEventConstructor] readonly attribute DOMString error;
diff --git a/modules/speech/SpeechRecognitionEvent.idl b/modules/speech/SpeechRecognitionEvent.idl
index 0f22f32..8027f82 100644
--- a/modules/speech/SpeechRecognitionEvent.idl
+++ b/modules/speech/SpeechRecognitionEvent.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=SCRIPTED_SPEECH,
     ConstructorTemplate=Event,
 ] interface SpeechRecognitionEvent : Event {
     [InitializedByEventConstructor] readonly attribute unsigned long resultIndex;
diff --git a/modules/speech/SpeechRecognitionResult.idl b/modules/speech/SpeechRecognitionResult.idl
index 2abfc16..9abd376 100644
--- a/modules/speech/SpeechRecognitionResult.idl
+++ b/modules/speech/SpeechRecognitionResult.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=SCRIPTED_SPEECH,
     IndexedGetter,
     ImplementationLacksVTable
 ] interface SpeechRecognitionResult {
diff --git a/modules/speech/SpeechRecognitionResultList.idl b/modules/speech/SpeechRecognitionResultList.idl
index ffd79f0..51a83ae 100644
--- a/modules/speech/SpeechRecognitionResultList.idl
+++ b/modules/speech/SpeechRecognitionResultList.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=SCRIPTED_SPEECH,
     IndexedGetter,
     ImplementationLacksVTable
 ] interface SpeechRecognitionResultList {
diff --git a/modules/speech/SpeechSynthesisUtterance.idl b/modules/speech/SpeechSynthesisUtterance.idl
index 0b438dc..f42ca61 100644
--- a/modules/speech/SpeechSynthesisUtterance.idl
+++ b/modules/speech/SpeechSynthesisUtterance.idl
@@ -27,7 +27,7 @@
     Conditional=SPEECH_SYNTHESIS,
     EventTarget,
     CallWith=ScriptExecutionContext,
-    Constructor([Optional=DefaultIsNullString] DOMString text)
+    Constructor([Default=NullString] optional DOMString text)
 ] interface SpeechSynthesisUtterance {
     attribute DOMString text;
     attribute DOMString lang;
diff --git a/modules/webaudio/AudioContext.idl b/modules/webaudio/AudioContext.idl
index d5a47e9..d616d18 100644
--- a/modules/webaudio/AudioContext.idl
+++ b/modules/webaudio/AudioContext.idl
@@ -48,7 +48,7 @@
     [RaisesException] AudioBuffer createBuffer(ArrayBuffer? buffer, boolean mixToMono);
 
     // Asynchronous audio file data decoding.
-    [RaisesException] void decodeAudioData(ArrayBuffer audioData, [Callback] AudioBufferCallback successCallback, [Optional, Callback] AudioBufferCallback errorCallback);
+    [RaisesException] void decodeAudioData(ArrayBuffer audioData, [Callback] AudioBufferCallback successCallback, [Callback] optional AudioBufferCallback errorCallback);
 
     // Sources
     AudioBufferSourceNode createBufferSource();
@@ -64,20 +64,20 @@
 
     // Processing nodes
     GainNode createGain();
-    [RaisesException] DelayNode createDelay([Optional] double maxDelayTime);
+    [RaisesException] DelayNode createDelay(optional double maxDelayTime);
     BiquadFilterNode createBiquadFilter();
     WaveShaperNode createWaveShaper();
     PannerNode createPanner();
     ConvolverNode createConvolver();
     DynamicsCompressorNode createDynamicsCompressor();
     AnalyserNode createAnalyser();
-    [RaisesException] ScriptProcessorNode createScriptProcessor(unsigned long bufferSize, [Optional] unsigned long numberOfInputChannels, [Optional] unsigned long numberOfOutputChannels);
+    [RaisesException] ScriptProcessorNode createScriptProcessor(unsigned long bufferSize, optional unsigned long numberOfInputChannels, optional unsigned long numberOfOutputChannels);
     OscillatorNode createOscillator();
     [RaisesException] WaveTable createWaveTable(Float32Array real, Float32Array imag);
 
     // Channel splitting and merging
-    [RaisesException] ChannelSplitterNode createChannelSplitter([Optional] unsigned long numberOfOutputs);
-    [RaisesException] ChannelMergerNode createChannelMerger([Optional] unsigned long numberOfInputs);
+    [RaisesException] ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs);
+    [RaisesException] ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs);
 
     // Offline rendering
     // void prepareOfflineBufferRendering(unsigned long numberOfChannels, unsigned long numberOfFrames, float sampleRate);
@@ -86,9 +86,9 @@
 
 #if defined(ENABLE_LEGACY_WEB_AUDIO) && ENABLE_LEGACY_WEB_AUDIO
     [MeasureAs=LegacyWebAudio, ImplementedAs=createGain] GainNode createGainNode();
-    [MeasureAs=LegacyWebAudio, ImplementedAs=createDelay, RaisesException] DelayNode createDelayNode([Optional] double maxDelayTime);
+    [MeasureAs=LegacyWebAudio, ImplementedAs=createDelay, RaisesException] DelayNode createDelayNode(optional double maxDelayTime);
 
-    [MeasureAs=LegacyWebAudio, ImplementedAs=createScriptProcessor, RaisesException] ScriptProcessorNode createJavaScriptNode(unsigned long bufferSize, [Optional] unsigned long numberOfInputChannels, [Optional] unsigned long numberOfOutputChannels);
+    [MeasureAs=LegacyWebAudio, ImplementedAs=createScriptProcessor, RaisesException] ScriptProcessorNode createJavaScriptNode(unsigned long bufferSize, optional unsigned long numberOfInputChannels, optional unsigned long numberOfOutputChannels);
 #endif
 
 };
diff --git a/modules/webaudio/AudioNode.idl b/modules/webaudio/AudioNode.idl
index cdc1b75..a2448c0 100644
--- a/modules/webaudio/AudioNode.idl
+++ b/modules/webaudio/AudioNode.idl
@@ -35,9 +35,9 @@
 
     [SetterRaisesException] attribute DOMString channelInterpretation;
 
-    [RaisesException] void connect(AudioNode? destination, [Optional=DefaultIsUndefined] unsigned long output, [Optional=DefaultIsUndefined] unsigned long input);
+    [RaisesException] void connect(AudioNode? destination, [Default=Undefined] optional unsigned long output, [Default=Undefined] optional unsigned long input);
 
-    [RaisesException] void connect(AudioParam? destination, [Optional=DefaultIsUndefined] unsigned long output);
+    [RaisesException] void connect(AudioParam? destination, [Default=Undefined] optional unsigned long output);
 
-    [RaisesException] void disconnect([Optional=DefaultIsUndefined] unsigned long output);
+    [RaisesException] void disconnect([Default=Undefined] optional unsigned long output);
 };
diff --git a/modules/webdatabase/DOMWindowWebDatabase.idl b/modules/webdatabase/DOMWindowWebDatabase.idl
index 1804834..62be805 100644
--- a/modules/webdatabase/DOMWindowWebDatabase.idl
+++ b/modules/webdatabase/DOMWindowWebDatabase.idl
@@ -27,7 +27,7 @@
 [
     Supplemental=DOMWindow
 ] interface DOMWindowWebDatabase {
-    [EnabledAtRuntime, MeasureAs=OpenWebDatabase, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, [Callback, Optional] DatabaseCallback creationCallback);
+    [EnabledAtRuntime, MeasureAs=OpenWebDatabase, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, [Callback] optional DatabaseCallback creationCallback);
     attribute SQLExceptionConstructor SQLException;
 };
 
diff --git a/modules/webdatabase/Database.idl b/modules/webdatabase/Database.idl
index ef2c05c..4148569 100644
--- a/modules/webdatabase/Database.idl
+++ b/modules/webdatabase/Database.idl
@@ -29,8 +29,8 @@
 [
 ] interface Database {
     readonly attribute DOMString version;
-    void changeVersion(DOMString oldVersion, DOMString newVersion, [Callback, Optional] SQLTransactionCallback callback, [Callback, Optional] SQLTransactionErrorCallback errorCallback, [Callback, Optional] VoidCallback successCallback);
-    void transaction([Callback] SQLTransactionCallback callback, [Callback, Optional] SQLTransactionErrorCallback errorCallback, [Callback, Optional] VoidCallback successCallback);
-    void readTransaction([Callback] SQLTransactionCallback callback, [Callback, Optional] SQLTransactionErrorCallback errorCallback, [Callback, Optional] VoidCallback successCallback);
+    void changeVersion(DOMString oldVersion, DOMString newVersion, [Callback] optional SQLTransactionCallback callback, [Callback] optional SQLTransactionErrorCallback errorCallback, [Callback] optional VoidCallback successCallback);
+    void transaction([Callback] SQLTransactionCallback callback, [Callback] optional SQLTransactionErrorCallback errorCallback, [Callback] optional VoidCallback successCallback);
+    void readTransaction([Callback] SQLTransactionCallback callback, [Callback] optional SQLTransactionErrorCallback errorCallback, [Callback] optional VoidCallback successCallback);
 };
 
diff --git a/modules/webdatabase/DatabaseSync.idl b/modules/webdatabase/DatabaseSync.idl
index 0d98977..bd6b890 100644
--- a/modules/webdatabase/DatabaseSync.idl
+++ b/modules/webdatabase/DatabaseSync.idl
@@ -32,7 +32,7 @@
 ] interface DatabaseSync {
     readonly attribute DOMString version;
     readonly attribute DOMString lastErrorMessage;
-    [RaisesException] void changeVersion(DOMString oldVersion, DOMString newVersion, [Callback, Optional] SQLTransactionSyncCallback callback);
+    [RaisesException] void changeVersion(DOMString oldVersion, DOMString newVersion, [Callback] optional SQLTransactionSyncCallback callback);
     [RaisesException] void transaction([Callback] SQLTransactionSyncCallback callback);
     [RaisesException] void readTransaction([Callback] SQLTransactionSyncCallback callback);
 };
diff --git a/modules/webdatabase/SQLTransaction.idl b/modules/webdatabase/SQLTransaction.idl
index cc3ec72..3bb3984 100644
--- a/modules/webdatabase/SQLTransaction.idl
+++ b/modules/webdatabase/SQLTransaction.idl
@@ -31,6 +31,6 @@
 ] interface SQLTransaction {
     [Custom] void executeSql(DOMString sqlStatement,
                              ObjectArray arguments,
-                             [Optional, Callback] SQLStatementCallback callback,
-                             [Optional, Callback] SQLStatementErrorCallback errorCallback);
+                             [Callback] optional SQLStatementCallback callback,
+                             [Callback] optional SQLStatementErrorCallback errorCallback);
 };
diff --git a/modules/webdatabase/WorkerContextWebDatabase.idl b/modules/webdatabase/WorkerContextWebDatabase.idl
index 2a48058..cc74f23 100644
--- a/modules/webdatabase/WorkerContextWebDatabase.idl
+++ b/modules/webdatabase/WorkerContextWebDatabase.idl
@@ -27,8 +27,8 @@
 [
     Supplemental=WorkerContext
 ] interface WorkerContextWebDatabase {
-    [EnabledAtRuntime, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, [Callback, Optional] DatabaseCallback creationCallback);
+    [EnabledAtRuntime, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, [Callback] optional DatabaseCallback creationCallback);
 
-    [EnabledAtRuntime, RaisesException] DatabaseSync openDatabaseSync(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, [Callback, Optional] DatabaseCallback creationCallback);
+    [EnabledAtRuntime, RaisesException] DatabaseSync openDatabaseSync(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, [Callback] optional DatabaseCallback creationCallback);
 };
 
diff --git a/modules/websockets/WebSocket.idl b/modules/websockets/WebSocket.idl
index e8bf2d1..0973a42 100644
--- a/modules/websockets/WebSocket.idl
+++ b/modules/websockets/WebSocket.idl
@@ -66,14 +66,14 @@
     [RaisesException] boolean send(Blob data);
     [RaisesException] boolean send(DOMString data);
 
-    [RaisesException] void close([Clamp, Optional] unsigned short code, [Optional] DOMString reason);
+    [RaisesException] void close([Clamp] optional unsigned short code, optional DOMString reason);
 
     // EventTarget interface
     void addEventListener(DOMString type,
                           EventListener listener,
-                          [Optional] boolean useCapture);
+                          optional boolean useCapture);
     void removeEventListener(DOMString type,
                              EventListener listener,
-                             [Optional] boolean useCapture);
+                             optional boolean useCapture);
     [RaisesException] boolean dispatchEvent(Event evt);
 };
diff --git a/svg/SVGPathElement.idl b/svg/SVGPathElement.idl
deleted file mode 100644
index dd08316..0000000
--- a/svg/SVGPathElement.idl
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
- * Copyright (C) 2006 Apple 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 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 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. 
- */
-
-[
-    Conditional=SVG
-] interface SVGPathElement : SVGStyledElement,
-                                             SVGTests,
-                                             SVGLangSpace,
-                                             SVGExternalResourcesRequired,
-                                             SVGTransformable {
-    readonly attribute SVGAnimatedNumber pathLength;
-
-    float getTotalLength();
-    SVGPoint getPointAtLength([Optional=DefaultIsUndefined] float distance);
-    unsigned long getPathSegAtLength([Optional=DefaultIsUndefined] float distance);
-
-    SVGPathSegClosePath createSVGPathSegClosePath();
-
-    SVGPathSegMovetoAbs createSVGPathSegMovetoAbs([Optional=DefaultIsUndefined] float x, 
-                                                  [Optional=DefaultIsUndefined] float y);
-    SVGPathSegMovetoRel createSVGPathSegMovetoRel([Optional=DefaultIsUndefined] float x, 
-                                                  [Optional=DefaultIsUndefined] float y);
-
-    SVGPathSegLinetoAbs createSVGPathSegLinetoAbs([Optional=DefaultIsUndefined] float x, 
-                                                  [Optional=DefaultIsUndefined] float y);
-    SVGPathSegLinetoRel createSVGPathSegLinetoRel([Optional=DefaultIsUndefined] float x, 
-                                                  [Optional=DefaultIsUndefined] float y);
-
-    SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs([Optional=DefaultIsUndefined] float x, 
-                                                              [Optional=DefaultIsUndefined] float y, 
-                                                              [Optional=DefaultIsUndefined] float x1, 
-                                                              [Optional=DefaultIsUndefined] float y1, 
-                                                              [Optional=DefaultIsUndefined] float x2, 
-                                                              [Optional=DefaultIsUndefined] float y2);
-    SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel([Optional=DefaultIsUndefined] float x, 
-                                                              [Optional=DefaultIsUndefined] float y, 
-                                                              [Optional=DefaultIsUndefined] float x1, 
-                                                              [Optional=DefaultIsUndefined] float y1, 
-                                                              [Optional=DefaultIsUndefined] float x2, 
-                                                              [Optional=DefaultIsUndefined] float y2);
-
-    SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs([Optional=DefaultIsUndefined] float x, 
-                                                                      [Optional=DefaultIsUndefined] float y, 
-                                                                      [Optional=DefaultIsUndefined] float x1, 
-                                                                      [Optional=DefaultIsUndefined] float y1);
-    SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel([Optional=DefaultIsUndefined] float x, 
-                                                                      [Optional=DefaultIsUndefined] float y, 
-                                                                      [Optional=DefaultIsUndefined] float x1, 
-                                                                      [Optional=DefaultIsUndefined] float y1);
-
-    SVGPathSegArcAbs createSVGPathSegArcAbs([Optional=DefaultIsUndefined] float x, 
-                                            [Optional=DefaultIsUndefined] float y, 
-                                            [Optional=DefaultIsUndefined] float r1, 
-                                            [Optional=DefaultIsUndefined] float r2, 
-                                            [Optional=DefaultIsUndefined] float angle, 
-                                            [Optional=DefaultIsUndefined] boolean largeArcFlag, 
-                                            [Optional=DefaultIsUndefined] boolean sweepFlag);
-    SVGPathSegArcRel createSVGPathSegArcRel([Optional=DefaultIsUndefined] float x, 
-                                            [Optional=DefaultIsUndefined] float y, 
-                                            [Optional=DefaultIsUndefined] float r1, 
-                                            [Optional=DefaultIsUndefined] float r2, 
-                                            [Optional=DefaultIsUndefined] float angle, 
-                                            [Optional=DefaultIsUndefined] boolean largeArcFlag, 
-                                            [Optional=DefaultIsUndefined] boolean sweepFlag);
-
-    SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs([Optional=DefaultIsUndefined] float x);
-    SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel([Optional=DefaultIsUndefined] float x);
-
-    SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs([Optional=DefaultIsUndefined] float y);
-    SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel([Optional=DefaultIsUndefined] float y);
-
-    SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs([Optional=DefaultIsUndefined] float x, 
-                                                                          [Optional=DefaultIsUndefined] float y, 
-                                                                          [Optional=DefaultIsUndefined] float x2, 
-                                                                          [Optional=DefaultIsUndefined] float y2);
-    SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel([Optional=DefaultIsUndefined] float x, 
-                                                                          [Optional=DefaultIsUndefined] float y, 
-                                                                          [Optional=DefaultIsUndefined] float x2, 
-                                                                          [Optional=DefaultIsUndefined] float y2);
-
-    SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs([Optional=DefaultIsUndefined] float x, 
-                                                                                  [Optional=DefaultIsUndefined] float y);
-    SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel([Optional=DefaultIsUndefined] float x, 
-                                                                                  [Optional=DefaultIsUndefined] float y);
-
-    readonly attribute SVGPathSegList pathSegList;
-    readonly attribute SVGPathSegList normalizedPathSegList;
-    readonly attribute SVGPathSegList animatedPathSegList;
-    readonly attribute SVGPathSegList animatedNormalizedPathSegList;
-};
-
diff --git a/xml/XPathEvaluator.idl b/xml/XPathEvaluator.idl
deleted file mode 100644
index 3bd168d..0000000
--- a/xml/XPathEvaluator.idl
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Computer, Inc.
- *
- * 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.
- */
-
-[
-    Constructor,
-    ImplementationLacksVTable
-] interface XPathEvaluator {
-    [RaisesException] XPathExpression createExpression([Optional=DefaultIsUndefined] DOMString expression,
-                                     [Optional=DefaultIsUndefined] XPathNSResolver resolver);
-
-    XPathNSResolver createNSResolver([Optional=DefaultIsUndefined] Node nodeResolver);
-
-    [RaisesException] XPathResult evaluate([Optional=DefaultIsUndefined] DOMString expression,
-                         [Optional=DefaultIsUndefined] Node contextNode, 
-                         [Optional=DefaultIsUndefined] XPathNSResolver resolver,
-                         [Optional=DefaultIsUndefined] unsigned short type,
-                         [Optional=DefaultIsUndefined] XPathResult inResult);
-};