IDL roll to multivm@1242

TBR=blois

Review URL: https://codereview.appspot.com/9418050

git-svn-id: http://dart.googlecode.com/svn/third_party/WebCore@22811 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/core/README b/core/README
index 081bdf4..e18cf12 100644
--- a/core/README
+++ b/core/README
@@ -6,4 +6,4 @@
 
 The current version corresponds to:
 URL: http://src.chromium.org/multivm/trunk/webkit
-Current revision: 1206
+Current revision: 1242
diff --git a/core/core.gyp/scripts/action_csspropertynames.py b/core/core.gyp/scripts/action_csspropertynames.py
new file mode 100644
index 0000000..b95540d
--- /dev/null
+++ b/core/core.gyp/scripts/action_csspropertynames.py
@@ -0,0 +1,174 @@
+#!/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/core/core.gyp/scripts/action_cssvaluekeywords.py b/core/core.gyp/scripts/action_cssvaluekeywords.py
new file mode 100644
index 0000000..8232fb4
--- /dev/null
+++ b/core/core.gyp/scripts/action_cssvaluekeywords.py
@@ -0,0 +1,178 @@
+#!/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/core/core.gyp/scripts/action_derivedsourcesallinone.py b/core/core.gyp/scripts/action_derivedsourcesallinone.py
new file mode 100644
index 0000000..bac8081
--- /dev/null
+++ b/core/core.gyp/scripts/action_derivedsourcesallinone.py
@@ -0,0 +1,225 @@
+#!/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.
+
+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/core/core.gyp/scripts/action_makenames.py b/core/core.gyp/scripts/action_makenames.py
new file mode 100644
index 0000000..4cf45cd
--- /dev/null
+++ b/core/core.gyp/scripts/action_makenames.py
@@ -0,0 +1,182 @@
+#!/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/core/core.gyp/scripts/action_useragentstylesheets.py b/core/core.gyp/scripts/action_useragentstylesheets.py
new file mode 100644
index 0000000..850dd07
--- /dev/null
+++ b/core/core.gyp/scripts/action_useragentstylesheets.py
@@ -0,0 +1,124 @@
+#!/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/core/core.gyp/scripts/rule_bison.py b/core/core.gyp/scripts/rule_bison.py
new file mode 100644
index 0000000..952165a
--- /dev/null
+++ b/core/core.gyp/scripts/rule_bison.py
@@ -0,0 +1,105 @@
+#!/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/core/core.gyp/scripts/supplemental_idl_files.py b/core/core.gyp/scripts/supplemental_idl_files.py
new file mode 100644
index 0000000..eaf0270
--- /dev/null
+++ b/core/core.gyp/scripts/supplemental_idl_files.py
@@ -0,0 +1,45 @@
+#!/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 IDL files that contain a partial interface."""
+
+import re
+import sys
+
+partial_interface_regex = re.compile(r'partial\s+interface\s+(\w+).+\]', re.M | re.S)
+
+def DoMain(filenames):
+    partial_files = set()
+    for filename in filenames:
+        with open(filename) as f:
+            match = re.search(partial_interface_regex, f.read())
+            if match:
+                partial_files.add(filename)
+    return '\n'.join(partial_files)
diff --git a/core/css/CSSFontFaceLoadEvent.idl b/core/css/CSSFontFaceLoadEvent.idl
index 54994a1..c4bd55e 100644
--- a/core/css/CSSFontFaceLoadEvent.idl
+++ b/core/css/CSSFontFaceLoadEvent.idl
@@ -29,7 +29,6 @@
  */
 
 [
-    Conditional=FONT_LOAD_EVENTS,
     EnabledAtRuntime=fontLoadEvents,
     ConstructorTemplate=Event
 ] interface CSSFontFaceLoadEvent : Event {
diff --git a/core/css/CSSHostRule.idl b/core/css/CSSHostRule.idl
index f28dc50..1f78088 100644
--- a/core/css/CSSHostRule.idl
+++ b/core/css/CSSHostRule.idl
@@ -19,9 +19,7 @@
  */
 
 // Introduced in Shadow DOM spec:
-[
-    EnabledAtRuntime=shadowDOM
-] interface CSSHostRule : CSSRule {
+interface CSSHostRule : CSSRule {
     readonly attribute CSSRuleList cssRules;
     
     [RaisesException] unsigned long      insertRule([Default=Undefined] optional DOMString rule, 
diff --git a/core/css/CSSRule.idl b/core/css/CSSRule.idl
index 9766de3..8a5d615 100644
--- a/core/css/CSSRule.idl
+++ b/core/css/CSSRule.idl
@@ -36,9 +36,7 @@
     const unsigned short PAGE_RULE = 6;
     const unsigned short WEBKIT_KEYFRAMES_RULE = 7;
     const unsigned short WEBKIT_KEYFRAME_RULE = 8;
-#if defined(ENABLE_CSS3_CONDITIONAL_RULES) && ENABLE_CSS3_CONDITIONAL_RULES
     const unsigned short SUPPORTS_RULE = 12;
-#endif
 #if defined(ENABLE_CSS_DEVICE_ADAPTATION) && ENABLE_CSS_DEVICE_ADAPTATION
     const unsigned short WEBKIT_VIEWPORT_RULE = 15;
 #endif
diff --git a/core/css/CSSSupportsRule.idl b/core/css/CSSSupportsRule.idl
index 1c4173d..13e0efd 100644
--- a/core/css/CSSSupportsRule.idl
+++ b/core/css/CSSSupportsRule.idl
@@ -26,9 +26,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Conditional=CSS3_CONDITIONAL_RULES
-] interface CSSSupportsRule : CSSRule {
+interface CSSSupportsRule : CSSRule {
     readonly attribute CSSRuleList cssRules;
     readonly attribute DOMString conditionText;
 
@@ -36,4 +34,3 @@
                              [Default=Undefined] optional unsigned long index);
     [RaisesException] void deleteRule([Default=Undefined] optional unsigned long index);
 };
-
diff --git a/core/css/DOMWindowCSS.idl b/core/css/DOMWindowCSS.idl
index aed4cf7..742a152 100644
--- a/core/css/DOMWindowCSS.idl
+++ b/core/css/DOMWindowCSS.idl
@@ -29,11 +29,10 @@
 
 [
     InterfaceName=CSS,
-    Conditional=CSS3_CONDITIONAL_RULES
+    ImplementationLacksVTable
 ] interface DOMWindowCSS {
 
     boolean supports(DOMString property, DOMString value);
     boolean supports(DOMString conditionText);
 
 };
-
diff --git a/core/css/FontLoader.idl b/core/css/FontLoader.idl
index b39c40e..ae6fbf1 100644
--- a/core/css/FontLoader.idl
+++ b/core/css/FontLoader.idl
@@ -29,7 +29,6 @@
  */
 
 [
-    Conditional=FONT_LOAD_EVENTS,
     EnabledAtRuntime=fontLoadEvents,
     ActiveDOMObject,
     EventTarget,
@@ -44,7 +43,7 @@
 
     boolean checkFont(DOMString font, [Default=NullString] optional DOMString text);
     void loadFont(Dictionary params);
-    void notifyWhenFontsReady([Callback] VoidCallback callback);
+    void notifyWhenFontsReady(VoidCallback callback);
     readonly attribute boolean loading;
 
     void addEventListener(DOMString type,
diff --git a/core/dom/CustomElementConstructor.idl b/core/dom/CustomElementConstructor.idl
index 864d40d..0460874 100644
--- a/core/dom/CustomElementConstructor.idl
+++ b/core/dom/CustomElementConstructor.idl
@@ -23,7 +23,6 @@
  */
 
 [
-    Conditional=CUSTOM_ELEMENTS,
     EnabledAtRuntime=customDOMElements,
     WrapAsFunction,
     CustomCall
diff --git a/core/dom/DOMNamedFlowCollection.idl b/core/dom/DOMNamedFlowCollection.idl
index cc6103c..2e3c353 100644
--- a/core/dom/DOMNamedFlowCollection.idl
+++ b/core/dom/DOMNamedFlowCollection.idl
@@ -32,10 +32,9 @@
     EnabledAtRuntime=cssRegions,
     InterfaceName=WebKitNamedFlowCollection,
     IndexedGetter,
-    NamedGetter,
     ImplementationLacksVTable
 ] interface DOMNamedFlowCollection {
     readonly attribute unsigned long length;
     NamedFlow item(unsigned long index);
-    NamedFlow namedItem(DOMString name);
+    getter NamedFlow namedItem(DOMString name);
 };
diff --git a/core/dom/DataTransferItem.idl b/core/dom/DataTransferItem.idl
index 8096ce6..227e5a5 100644
--- a/core/dom/DataTransferItem.idl
+++ b/core/dom/DataTransferItem.idl
@@ -34,7 +34,7 @@
     readonly attribute DOMString kind;
     readonly attribute DOMString type;
 
-    void getAsString([Callback,Default=Undefined] optional StringCallback callback);
+    void getAsString([Default=Undefined] optional StringCallback callback);
     Blob getAsFile();
 };
 
diff --git a/core/dom/Document.idl b/core/dom/Document.idl
index f5d405b..2d621eb 100644
--- a/core/dom/Document.idl
+++ b/core/dom/Document.idl
@@ -145,9 +145,9 @@
     [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString defaultCharset;
     [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString readyState;
 
-    Element            elementFromPoint([Default=Undefined] optional long x, 
+    Element            elementFromPoint([Default=Undefined] optional long x,
                                         [Default=Undefined] optional long y);
-    Range              caretRangeFromPoint([Default=Undefined] optional long x, 
+    Range              caretRangeFromPoint([Default=Undefined] optional long x,
                                            [Default=Undefined] optional long y);
 
     // Mozilla extensions
@@ -171,22 +171,22 @@
     [RaisesException] NodeList querySelectorAll(DOMString selectors);
 
     // Mozilla version
-    [EnabledAtRuntime] readonly attribute boolean webkitIsFullScreen;
-    [EnabledAtRuntime] readonly attribute boolean webkitFullScreenKeyboardInputAllowed;
-    [EnabledAtRuntime] readonly attribute Element webkitCurrentFullScreenElement;
-    [EnabledAtRuntime] void webkitCancelFullScreen();
+    [EnabledAtRuntime=fullscreen] readonly attribute boolean webkitIsFullScreen;
+    [EnabledAtRuntime=fullscreen] readonly attribute boolean webkitFullScreenKeyboardInputAllowed;
+    [EnabledAtRuntime=fullscreen] readonly attribute Element webkitCurrentFullScreenElement;
+    [EnabledAtRuntime=fullscreen] void webkitCancelFullScreen();
 
     // W3C version
-    [EnabledAtRuntime] readonly attribute boolean webkitFullscreenEnabled;
-    [EnabledAtRuntime] readonly attribute Element webkitFullscreenElement;
-    [EnabledAtRuntime] void webkitExitFullscreen();
+    [EnabledAtRuntime=fullscreen] readonly attribute boolean webkitFullscreenEnabled;
+    [EnabledAtRuntime=fullscreen] readonly attribute Element webkitFullscreenElement;
+    [EnabledAtRuntime=fullscreen] void webkitExitFullscreen();
 
     void webkitExitPointerLock();
     readonly attribute Element webkitPointerLockElement;
 
     [Conditional=CSS_REGIONS, EnabledAtRuntime=cssRegions] DOMNamedFlowCollection webkitGetNamedFlows();
 
-    [Conditional=FONT_LOAD_EVENTS, EnabledAtRuntime=fontLoadEvents] readonly attribute FontLoader fontloader;
+    [EnabledAtRuntime=fontLoadEvents] readonly attribute FontLoader fontloader;
 
     // Event handler DOM attributes
     [NotEnumerable] attribute EventListener onabort;
@@ -277,12 +277,10 @@
                                                      [Default=Undefined] optional float webkitForce);
     [ReturnNewObject, EnabledAtRuntime=touch, Custom, RaisesException] TouchList createTouchList();
 
-#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);
+    [EnabledAtRuntime=customDOMElements, 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
 
     // Page visibility API.
     readonly attribute DOMString webkitVisibilityState;
diff --git a/core/dom/Element.idl b/core/dom/Element.idl
index fb3bd5a..30c5155 100644
--- a/core/dom/Element.idl
+++ b/core/dom/Element.idl
@@ -45,7 +45,7 @@
      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 qualifiedName,
                                        [Default=Undefined] optional DOMString value);
      void removeAttributeNS([TreatNullAs=NullString] DOMString namespaceURI,
                                           DOMString localName);
@@ -109,10 +109,10 @@
     [PerWorldBindings] readonly attribute unsigned long childElementCount;
 
     // ShadowAware API
-    [Reflect=pseudo, EnabledAtRuntime=shadowDOM, ImplementedAs=pseudo, PerWorldBindings] attribute DOMString webkitPseudo;
-    [EnabledAtRuntime=shadowDOM, ImplementedAs=createShadowRoot, RaisesException] ShadowRoot webkitCreateShadowRoot();
-    [EnabledAtRuntime=shadowDOM, ImplementedAs=shadowRoot, PerWorldBindings] readonly attribute ShadowRoot webkitShadowRoot;
-    [EnabledAtRuntime=shadowDOM, ImplementedAs=insertionParentForBinding, PerWorldBindings] readonly attribute Node webkitInsertionParent;
+    [Reflect=pseudo, ImplementedAs=pseudo, PerWorldBindings] attribute DOMString webkitPseudo;
+    [ImplementedAs=createShadowRoot, RaisesException] ShadowRoot webkitCreateShadowRoot();
+    [ImplementedAs=shadowRoot, PerWorldBindings] readonly attribute ShadowRoot webkitShadowRoot;
+    [ImplementedAs=insertionParentForBinding, PerWorldBindings] readonly attribute Node webkitInsertionParent;
 
     // DOM 4
     [RaisesException] void remove();
@@ -123,10 +123,10 @@
 
     // Mozilla version
     const unsigned short ALLOW_KEYBOARD_INPUT = 1;
-    [EnabledAtRuntime] void webkitRequestFullScreen([Default=Undefined] optional unsigned short flags);
+    [EnabledAtRuntime=fullscreen] void webkitRequestFullScreen([Default=Undefined] optional unsigned short flags);
 
     // W3C version
-    [EnabledAtRuntime] void webkitRequestFullscreen();
+    [EnabledAtRuntime=fullscreen] void webkitRequestFullscreen();
 
     void webkitRequestPointerLock();
 
diff --git a/core/dom/RequestAnimationFrameCallback.idl b/core/dom/RequestAnimationFrameCallback.idl
index 790bb6e..d2f1d22 100644
--- a/core/dom/RequestAnimationFrameCallback.idl
+++ b/core/dom/RequestAnimationFrameCallback.idl
@@ -28,9 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback,
-] interface RequestAnimationFrameCallback{
+callback interface RequestAnimationFrameCallback{
     // highResTime is passed as high resolution timestamp, see
     // http://www.w3.org/TR/hr-time/ for details.
     boolean handleEvent(double highResTime);
diff --git a/core/dom/SecurityPolicyViolationEvent.idl b/core/dom/SecurityPolicyViolationEvent.idl
index 09edded..590d8e6 100644
--- a/core/dom/SecurityPolicyViolationEvent.idl
+++ b/core/dom/SecurityPolicyViolationEvent.idl
@@ -33,4 +33,5 @@
     [InitializedByEventConstructor] readonly attribute DOMString originalPolicy;
     [InitializedByEventConstructor] readonly attribute DOMString sourceFile;
     [InitializedByEventConstructor] readonly attribute long      lineNumber;
+    [InitializedByEventConstructor] readonly attribute long      columnNumber;
 };
diff --git a/core/dom/StringCallback.idl b/core/dom/StringCallback.idl
index 9ed416f..9ab79c1 100644
--- a/core/dom/StringCallback.idl
+++ b/core/dom/StringCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface StringCallback {
+callback interface StringCallback {
     boolean handleEvent(DOMString data);
 };
diff --git a/core/dom/Text.idl b/core/dom/Text.idl
index 62d6ca3..f420593 100644
--- a/core/dom/Text.idl
+++ b/core/dom/Text.idl
@@ -16,7 +16,8 @@
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
-[ 
+[
+    CustomToJSObject,
     SkipVTableValidation,
 ] interface Text : CharacterData {
 
@@ -28,7 +29,7 @@
     readonly attribute DOMString       wholeText;
     [RaisesException] Text               replaceWholeText([Default=Undefined] optional DOMString content);
     // ShadowAware API
-    [EnabledAtRuntime=shadowDOM, ImplementedAs=insertionParentForBinding, PerWorldBindings] readonly attribute Node webkitInsertionParent;
+    [ImplementedAs=insertionParentForBinding, PerWorldBindings] readonly attribute Node webkitInsertionParent;
 
 };
 
diff --git a/core/html/HTMLAudioElement.idl b/core/html/HTMLAudioElement.idl
index 1f2f903..3be47e5 100644
--- a/core/html/HTMLAudioElement.idl
+++ b/core/html/HTMLAudioElement.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO,
     NamedConstructor=Audio([Default=NullString] optional DOMString src)
 ] interface HTMLAudioElement : HTMLMediaElement {
 };
diff --git a/core/html/HTMLCollection.idl b/core/html/HTMLCollection.idl
index 037b6f0..4d33c09 100644
--- a/core/html/HTMLCollection.idl
+++ b/core/html/HTMLCollection.idl
@@ -20,7 +20,6 @@
 
 [
     IndexedGetter,
-    NamedGetter,
     CustomToJSObject,
     GenerateIsReachable=ImplOwnerNodeRoot,
     DependentLifetime,
@@ -29,6 +28,6 @@
 ] interface HTMLCollection {
     readonly attribute unsigned long length;
     Node item([Default=Undefined] optional unsigned long index);
-    Node namedItem([Default=Undefined] optional DOMString name);
+    getter Node namedItem([Default=Undefined] optional DOMString name);
 };
 
diff --git a/core/html/HTMLDialogElement.idl b/core/html/HTMLDialogElement.idl
index 13b494e..874cbcf 100644
--- a/core/html/HTMLDialogElement.idl
+++ b/core/html/HTMLDialogElement.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=DIALOG_ELEMENT,
     SkipVTableValidation
 ] interface HTMLDialogElement : HTMLElement {
     [Reflect] attribute boolean open;
diff --git a/core/html/HTMLInputElement.idl b/core/html/HTMLInputElement.idl
index 76a8e6e..2a4184c 100644
--- a/core/html/HTMLInputElement.idl
+++ b/core/html/HTMLInputElement.idl
@@ -82,8 +82,8 @@
                         unsigned long end,
                         [Default=NullString] optional DOMString selectionMode);
 
-    [Custom] void setSelectionRange([Default=Undefined] optional long start, 
-                                    [Default=Undefined] optional long end, 
+    [Custom] void setSelectionRange([Default=Undefined] optional long start,
+                                    [Default=Undefined] optional long end,
                                     optional DOMString direction);
 
     // Non-standard attributes
@@ -91,8 +91,8 @@
     [Reflect, EnabledAtRuntime=directoryUpload] attribute boolean webkitdirectory;
     [Reflect] attribute DOMString useMap;
     [Reflect] attribute boolean incremental;
-    [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime] attribute boolean webkitSpeech;
-    [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime] attribute boolean webkitGrammar;
+    [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime=speechInput] attribute boolean webkitSpeech;
+    [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime=speechInput] attribute boolean webkitGrammar;
     [Conditional=INPUT_SPEECH, NotEnumerable] attribute EventListener onwebkitspeechchange;
 
     // See http://www.w3.org/TR/html-media-capture/
diff --git a/core/html/HTMLMediaElement.idl b/core/html/HTMLMediaElement.idl
index 13cc91b..0dbe3ed 100644
--- a/core/html/HTMLMediaElement.idl
+++ b/core/html/HTMLMediaElement.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO,
     ActiveDOMObject
 ] interface HTMLMediaElement : HTMLElement {
 
@@ -94,8 +93,14 @@
 readonly attribute unsigned long webkitVideoDecodedByteCount;
 
 #if defined(ENABLE_ENCRYPTED_MEDIA) && ENABLE_ENCRYPTED_MEDIA
+
+#if defined(ENABLE_ENCRYPTED_MEDIA_V2) && ENABLE_ENCRYPTED_MEDIA_V2
+[EnabledAtRuntime=encryptedMedia, RaisesException, DeprecateAs=PrefixedMediaGenerateKeyRequest] void webkitGenerateKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, optional Uint8Array initData);
+[EnabledAtRuntime=encryptedMedia, RaisesException, DeprecateAs=PrefixedMediaAddKey] void webkitAddKey([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, Uint8Array key, optional Uint8Array initData, [Default=NullString] optional DOMString sessionId);
+#else
 [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);
+#endif
 [EnabledAtRuntime=encryptedMedia, RaisesException] void webkitCancelKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, [Default=NullString] optional DOMString sessionId);
 
     [EnabledAtRuntime=encryptedMedia] attribute EventListener onwebkitkeyadded;
diff --git a/core/html/HTMLSourceElement.idl b/core/html/HTMLSourceElement.idl
index 4d23c79..67e69f7 100644
--- a/core/html/HTMLSourceElement.idl
+++ b/core/html/HTMLSourceElement.idl
@@ -23,10 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-[
-    Conditional=VIDEO,
-] interface HTMLSourceElement : HTMLElement {
+interface HTMLSourceElement : HTMLElement {
 [Reflect, URL] attribute DOMString src;
-attribute DOMString type;
-attribute DOMString media;
+    attribute DOMString type;
+    attribute DOMString media;
 };
diff --git a/core/html/HTMLVideoElement.idl b/core/html/HTMLVideoElement.idl
index 0600d80..5b0cf38 100644
--- a/core/html/HTMLVideoElement.idl
+++ b/core/html/HTMLVideoElement.idl
@@ -23,9 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-[
-    Conditional=VIDEO
-] interface HTMLVideoElement : HTMLMediaElement {
+interface HTMLVideoElement : HTMLMediaElement {
     [Reflect] attribute unsigned long width;
     [Reflect] attribute unsigned long height;
     readonly attribute unsigned long videoWidth;
diff --git a/core/html/MediaController.idl b/core/html/MediaController.idl
index b6b8f01..675cc4d 100644
--- a/core/html/MediaController.idl
+++ b/core/html/MediaController.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO,
     Constructor,
     CallWith=ScriptExecutionContext,
     EventTarget
diff --git a/core/html/MediaError.idl b/core/html/MediaError.idl
index 5dfeda0..cbc4eb2 100644
--- a/core/html/MediaError.idl
+++ b/core/html/MediaError.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO,
     ImplementationLacksVTable
 ] interface MediaError {
       const unsigned short MEDIA_ERR_ABORTED = 1;
diff --git a/core/html/TimeRanges.idl b/core/html/TimeRanges.idl
index c2e7d05..3847b7a 100644
--- a/core/html/TimeRanges.idl
+++ b/core/html/TimeRanges.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=VIDEO,
     ImplementationLacksVTable
 ] interface TimeRanges {
     readonly attribute unsigned long length;
diff --git a/core/html/VoidCallback.idl b/core/html/VoidCallback.idl
index 31a2215..577fcf5 100644
--- a/core/html/VoidCallback.idl
+++ b/core/html/VoidCallback.idl
@@ -23,8 +23,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-[
-    Callback
-] interface VoidCallback {
+callback interface VoidCallback {
     boolean handleEvent();
 };
diff --git a/core/html/canvas/CanvasProxy.idl b/core/html/canvas/Canvas2DContextAttributes.idl
similarity index 76%
rename from core/html/canvas/CanvasProxy.idl
rename to core/html/canvas/Canvas2DContextAttributes.idl
index bda8ad8..f266a57 100644
--- a/core/html/canvas/CanvasProxy.idl
+++ b/core/html/canvas/Canvas2DContextAttributes.idl
@@ -4,12 +4,12 @@
  * 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 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.
+ * 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 HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -24,7 +24,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Conditional=CANVAS_PROXY
-] interface CanvasProxy {
+[EnabledAtRuntime=experimentalCanvasFeatures] interface Canvas2DContextAttributes {
+    attribute boolean alpha;
 };
diff --git a/core/html/canvas/CanvasRenderingContext2D.idl b/core/html/canvas/CanvasRenderingContext2D.idl
index 3e91c82..98df7fa 100644
--- a/core/html/canvas/CanvasRenderingContext2D.idl
+++ b/core/html/canvas/CanvasRenderingContext2D.idl
@@ -178,11 +178,9 @@
     [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,
@@ -218,5 +216,7 @@
     readonly attribute float webkitBackingStorePixelRatio;
 
     attribute boolean webkitImageSmoothingEnabled;
+
+    [EnabledAtRuntime=experimentalCanvasFeatures] Canvas2DContextAttributes getContextAttributes();
 };
 
diff --git a/core/html/canvas/Float32Array.idl b/core/html/canvas/Float32Array.idl
index a679309..b438e24 100644
--- a/core/html/canvas/Float32Array.idl
+++ b/core/html/canvas/Float32Array.idl
@@ -26,8 +26,6 @@
 
 [
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
-    CustomIndexedSetter,
     CustomToJSObject,
     DoNotCheckConstants,
     TypedArray=float,
diff --git a/core/html/canvas/Float64Array.idl b/core/html/canvas/Float64Array.idl
index fd6618b..e6076b5 100644
--- a/core/html/canvas/Float64Array.idl
+++ b/core/html/canvas/Float64Array.idl
@@ -26,8 +26,6 @@
 
 [
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
-    CustomIndexedSetter,
     CustomToJSObject,
     DoNotCheckConstants,
     TypedArray=double,
diff --git a/core/html/canvas/Int16Array.idl b/core/html/canvas/Int16Array.idl
index 4efe054..a7740ec 100644
--- a/core/html/canvas/Int16Array.idl
+++ b/core/html/canvas/Int16Array.idl
@@ -25,8 +25,6 @@
 
 [
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
-    CustomIndexedSetter,
     CustomToJSObject,
     DoNotCheckConstants,
     TypedArray=short,
diff --git a/core/html/canvas/Int32Array.idl b/core/html/canvas/Int32Array.idl
index befea19..c893f8f 100644
--- a/core/html/canvas/Int32Array.idl
+++ b/core/html/canvas/Int32Array.idl
@@ -26,8 +26,6 @@
 
 [
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
-    CustomIndexedSetter,
     CustomToJSObject,
     DoNotCheckConstants,
     TypedArray=int,
diff --git a/core/html/canvas/Int8Array.idl b/core/html/canvas/Int8Array.idl
index cbaecb5..f0bd812 100644
--- a/core/html/canvas/Int8Array.idl
+++ b/core/html/canvas/Int8Array.idl
@@ -26,8 +26,6 @@
 
 [
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
-    CustomIndexedSetter,
     CustomToJSObject,
     DoNotCheckConstants,
     TypedArray=signed char,
diff --git a/core/html/canvas/OESTextureHalfFloat.idl b/core/html/canvas/OESTextureHalfFloat.idl
index 9e6dd9f..d95898c 100644
--- a/core/html/canvas/OESTextureHalfFloat.idl
+++ b/core/html/canvas/OESTextureHalfFloat.idl
@@ -23,7 +23,11 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+typedef unsigned long GLenum;
+
 [
     Conditional=WEBGL,
+    DoNotCheckConstants
 ] interface OESTextureHalfFloat {
+    const GLenum HALF_FLOAT_OES                 = 0x8D61;
 };
diff --git a/core/html/canvas/Uint16Array.idl b/core/html/canvas/Uint16Array.idl
index ece7cde..ca376a1 100644
--- a/core/html/canvas/Uint16Array.idl
+++ b/core/html/canvas/Uint16Array.idl
@@ -26,8 +26,6 @@
 
 [
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
-    CustomIndexedSetter,
     CustomToJSObject,
     DoNotCheckConstants,
     TypedArray=unsigned short,
diff --git a/core/html/canvas/Uint32Array.idl b/core/html/canvas/Uint32Array.idl
index 155d587..cd5bf20 100644
--- a/core/html/canvas/Uint32Array.idl
+++ b/core/html/canvas/Uint32Array.idl
@@ -26,8 +26,6 @@
 
 [
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
-    CustomIndexedSetter,
     CustomToJSObject,
     DoNotCheckConstants,
     TypedArray=unsigned int,
diff --git a/core/html/canvas/Uint8Array.idl b/core/html/canvas/Uint8Array.idl
index f946f09..a1c3f1b 100644
--- a/core/html/canvas/Uint8Array.idl
+++ b/core/html/canvas/Uint8Array.idl
@@ -26,8 +26,6 @@
 
 [
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
-    CustomIndexedSetter,
     CustomToJSObject,
     DoNotCheckConstants,
     TypedArray=unsigned char,
diff --git a/core/html/canvas/Uint8ClampedArray.idl b/core/html/canvas/Uint8ClampedArray.idl
index c114643..230e33f 100644
--- a/core/html/canvas/Uint8ClampedArray.idl
+++ b/core/html/canvas/Uint8ClampedArray.idl
@@ -26,8 +26,6 @@
 
 [
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
-    CustomIndexedSetter,
     CustomToJSObject,
     DoNotCheckConstants,
     TypedArray=unsigned char,
diff --git a/core/html/canvas/WebGLRenderingContext.idl b/core/html/canvas/WebGLRenderingContext.idl
index 850dc16..dc5761f 100644
--- a/core/html/canvas/WebGLRenderingContext.idl
+++ b/core/html/canvas/WebGLRenderingContext.idl
@@ -236,7 +236,6 @@
     const GLenum INT                            = 0x1404;
     const GLenum UNSIGNED_INT                   = 0x1405;
     const GLenum FLOAT                          = 0x1406;
-    const GLenum HALF_FLOAT_OES                 = 0x8D61;
 
     /* PixelFormat */
     const GLenum DEPTH_COMPONENT                = 0x1902;
@@ -587,7 +586,6 @@
 
     [StrictTypeChecking, RaisesException] void         readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, ArrayBufferView pixels);
     
-    [StrictTypeChecking] void         releaseShaderCompiler();
     [StrictTypeChecking] void         renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
     [StrictTypeChecking] void         sampleCoverage(GLclampf value, GLboolean invert);
     [StrictTypeChecking] void         scissor(GLint x, GLint y, GLsizei width, GLsizei height);
@@ -611,10 +609,8 @@
                                                  GLenum format, GLenum type, HTMLImageElement? image);
     [StrictTypeChecking, RaisesException] void         texImage2D(GLenum target, GLint level, GLenum internalformat,
                                                  GLenum format, GLenum type, HTMLCanvasElement? canvas);
-#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
     [StrictTypeChecking, RaisesException] void         texImage2D(GLenum target, GLint level, GLenum internalformat,
                                                  GLenum format, GLenum type, HTMLVideoElement? video);
-#endif
 
     [StrictTypeChecking, RaisesException] void         texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 
                                                     GLsizei width, GLsizei height, 
@@ -625,10 +621,8 @@
                                                     GLenum format, GLenum type, HTMLImageElement? image);
     [StrictTypeChecking, RaisesException] void         texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
                                                     GLenum format, GLenum type, HTMLCanvasElement? canvas);
-#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
     [StrictTypeChecking, RaisesException] void         texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
                                                     GLenum format, GLenum type, HTMLVideoElement? video);
-#endif
 
     [StrictTypeChecking, RaisesException] void uniform1f(WebGLUniformLocation location, GLfloat x);
     [StrictTypeChecking, Custom, RaisesException] void uniform1fv(WebGLUniformLocation location, Float32Array v);
diff --git a/core/html/shadow/HTMLContentElement.idl b/core/html/shadow/HTMLContentElement.idl
index e231ba6..e5c20d8 100644
--- a/core/html/shadow/HTMLContentElement.idl
+++ b/core/html/shadow/HTMLContentElement.idl
@@ -25,7 +25,6 @@
  */
 
 [
-    EnabledAtRuntime=shadowDOM,
     SkipVTableValidation
 ] interface HTMLContentElement : HTMLElement {
     [Reflect] attribute DOMString select;
diff --git a/core/html/shadow/HTMLShadowElement.idl b/core/html/shadow/HTMLShadowElement.idl
index f5a64d2..a252e14 100644
--- a/core/html/shadow/HTMLShadowElement.idl
+++ b/core/html/shadow/HTMLShadowElement.idl
@@ -28,9 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    EnabledAtRuntime=shadowDOM
-] interface HTMLShadowElement : HTMLElement {
+interface HTMLShadowElement : HTMLElement {
     attribute boolean resetStyleInheritance;
     readonly attribute ShadowRoot olderShadowRoot;
 };
diff --git a/core/inspector/CodeGeneratorInspector.py b/core/inspector/CodeGeneratorInspector.py
index 3eed902..481682b 100755
--- a/core/inspector/CodeGeneratorInspector.py
+++ b/core/inspector/CodeGeneratorInspector.py
@@ -2205,16 +2205,24 @@
             out_file.close()
 
 
+def output_file(file_name):
+    # For now, disable the incremental build optimisation in all cases.
+    if False:
+        return SmartOutput(file_name)
+    else:
+        return open(file_name, "w")
+
+
 Generator.go()
 
-backend_h_file = SmartOutput(output_header_dirname + "/InspectorBackendDispatcher.h")
-backend_cpp_file = SmartOutput(output_cpp_dirname + "/InspectorBackendDispatcher.cpp")
+backend_h_file = output_file(output_header_dirname + "/InspectorBackendDispatcher.h")
+backend_cpp_file = output_file(output_cpp_dirname + "/InspectorBackendDispatcher.cpp")
 
-frontend_h_file = SmartOutput(output_header_dirname + "/InspectorFrontend.h")
-frontend_cpp_file = SmartOutput(output_cpp_dirname + "/InspectorFrontend.cpp")
+frontend_h_file = output_file(output_header_dirname + "/InspectorFrontend.h")
+frontend_cpp_file = output_file(output_cpp_dirname + "/InspectorFrontend.cpp")
 
-typebuilder_h_file = SmartOutput(output_header_dirname + "/InspectorTypeBuilder.h")
-typebuilder_cpp_file = SmartOutput(output_cpp_dirname + "/InspectorTypeBuilder.cpp")
+typebuilder_h_file = output_file(output_header_dirname + "/InspectorTypeBuilder.h")
+typebuilder_cpp_file = output_file(output_cpp_dirname + "/InspectorTypeBuilder.cpp")
 
 
 backend_h_file.write(Templates.backend_h.substitute(None,
diff --git a/core/inspector/CodeGeneratorInspectorStrings.py b/core/inspector/CodeGeneratorInspectorStrings.py
index 0f0aae2..6c3fe05 100644
--- a/core/inspector/CodeGeneratorInspectorStrings.py
+++ b/core/inspector/CodeGeneratorInspectorStrings.py
@@ -87,7 +87,7 @@
 #define InspectorFrontend_h
 
 #include "InspectorTypeBuilder.h"
-#include "InspectorValues.h"
+#include "core/inspector/InspectorValues.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/text/WTFString.h>
 
@@ -198,9 +198,9 @@
 #include "InspectorBackendDispatcher.h"
 
 
-#include "InspectorAgent.h"
-#include "InspectorFrontendChannel.h"
-#include "InspectorValues.h"
+#include "core/inspector/InspectorAgent.h"
+#include "core/inspector/InspectorFrontendChannel.h"
+#include "core/inspector/InspectorValues.h"
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
@@ -501,8 +501,8 @@
 #include "config.h"
 
 #include "InspectorFrontend.h"
-#include "InspectorFrontendChannel.h"
-#include "InspectorValues.h"
+#include "core/inspector/InspectorFrontendChannel.h"
+#include "core/inspector/InspectorValues.h"
 
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
@@ -524,7 +524,7 @@
 #ifndef InspectorTypeBuilder_h
 #define InspectorTypeBuilder_h
 
-#include "InspectorValues.h"
+#include "core/inspector/InspectorValues.h"
 
 #include <wtf/Assertions.h>
 #include <wtf/PassRefPtr.h>
diff --git a/core/page/DOMWindow.idl b/core/page/DOMWindow.idl
index 8af422d..633839c 100644
--- a/core/page/DOMWindow.idl
+++ b/core/page/DOMWindow.idl
@@ -26,9 +26,7 @@
 
 [
     CheckSecurity,
-    CustomDeleteProperty,
     CustomGetOwnPropertySlot,
-    CustomEnumerateProperty,
     EventTarget,
     CustomToJSObject,
     NoWrapperCache,
@@ -48,7 +46,7 @@
     [Replaceable] readonly attribute Navigator clientInformation;
     readonly attribute Crypto crypto;
     [DoNotCheckSecurity, CustomSetter, Unforgeable] attribute Location location;
-    [Replaceable, CustomGetter, CustomSetter] readonly attribute Event event;
+    [MeasureAs=WindowEvent, NotEnumerable, Replaceable, CustomGetter, CustomSetter] readonly attribute Event event;
 
     DOMSelection getSelection();
 
@@ -143,7 +141,7 @@
                                    [TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString pseudoElement);
 
     [Replaceable] readonly attribute double devicePixelRatio;
-    
+
     DOMPoint webkitConvertPointFromPageToNode([Default=Undefined] optional Node node,
                                               [Default=Undefined] optional DOMPoint p);
     DOMPoint webkitConvertPointFromNodeToPage([Default=Undefined] optional Node node,
@@ -174,9 +172,9 @@
     [Custom] long setInterval(any handler, [Default=Undefined] optional long timeout);
     void clearInterval([Default=Undefined] optional long handle);
 
-    [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame([Callback] RequestAnimationFrameCallback callback);
+    [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(RequestAnimationFrameCallback callback);
     void cancelAnimationFrame(long id);
-    [MeasureAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame([Callback] RequestAnimationFrameCallback callback);
+    [MeasureAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame(RequestAnimationFrameCallback callback);
     [ImplementedAs=cancelAnimationFrame] void webkitCancelAnimationFrame(long id);
     [ImplementedAs=cancelAnimationFrame] void webkitCancelRequestAnimationFrame(long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove this when removing vendor prefix.
 
@@ -184,7 +182,7 @@
     [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;
+    [Replaceable] attribute DOMWindowCSS CSS;
 
     // Events
     attribute EventListener onabort;
@@ -273,8 +271,8 @@
     [EnabledAtRuntime=touch] attribute EventListener ontouchend;
     [EnabledAtRuntime=touch] attribute EventListener ontouchcancel;
 
-    [EnabledAtRuntime] attribute EventListener ondevicemotion;
-    [EnabledAtRuntime] attribute EventListener ondeviceorientation;
+    [EnabledAtRuntime=deviceMotion] attribute EventListener ondevicemotion;
+    [EnabledAtRuntime=deviceOrientation] attribute EventListener ondeviceorientation;
 
     // EventTarget interface
     [Custom] void addEventListener(DOMString type,
@@ -314,7 +312,7 @@
     attribute CSSMediaRuleConstructor CSSMediaRule;
     attribute CSSPageRuleConstructor CSSPageRule;
     attribute CSSStyleRuleConstructor CSSStyleRule;
-    
+
     attribute CSSStyleDeclarationConstructor CSSStyleDeclaration;
     attribute MediaListConstructor MediaList;
     attribute CounterConstructor Counter;
@@ -355,9 +353,9 @@
     attribute EntityReferenceConstructor EntityReference;
     [EnabledAtRuntime=canvasPath] attribute DOMPathConstructor Path;
     attribute ProcessingInstructionConstructor ProcessingInstruction;
-    [EnabledAtRuntime=shadowDOM] attribute ShadowRootConstructor WebKitShadowRoot;
-    [EnabledAtRuntime=shadowDOM] attribute HTMLContentElementConstructor HTMLContentElement;
-    [EnabledAtRuntime=shadowDOM] attribute HTMLShadowElementConstructor HTMLShadowElement;
+    attribute ShadowRootConstructor WebKitShadowRoot;
+    attribute HTMLContentElementConstructor HTMLContentElement;
+    attribute HTMLShadowElementConstructor HTMLShadowElement;
 
     attribute DOMSelectionConstructor Selection;
     attribute DOMWindowConstructor Window;
@@ -374,7 +372,7 @@
     attribute HTMLCanvasElementConstructor HTMLCanvasElement;
     attribute HTMLDListElementConstructor HTMLDListElement;
     [Conditional=DATALIST_ELEMENT] attribute HTMLDataListElementConstructor HTMLDataListElement;
-    [Conditional=DIALOG_ELEMENT, EnabledPerContext=dialogElement] attribute HTMLDialogElementConstructor HTMLDialogElement;
+    [EnabledPerContext=dialogElement] attribute HTMLDialogElementConstructor HTMLDialogElement;
     attribute HTMLDirectoryElementConstructor HTMLDirectoryElement;
     attribute HTMLDivElementConstructor HTMLDivElement;
     attribute HTMLEmbedElementConstructor HTMLEmbedElement;
@@ -449,14 +447,14 @@
     [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;
-    [Conditional=VIDEO, EnabledAtRuntime] attribute HTMLMediaElementConstructor HTMLMediaElement;
-    [Conditional=VIDEO, EnabledAtRuntime] attribute HTMLVideoElementConstructor HTMLVideoElement;
-    [Conditional=VIDEO, EnabledAtRuntime] attribute MediaErrorConstructor MediaError;
-    [Conditional=VIDEO, EnabledAtRuntime] attribute TimeRangesConstructor TimeRanges;
-    [Conditional=VIDEO, EnabledAtRuntime] attribute HTMLSourceElementConstructor HTMLSourceElement;
-    [Conditional=VIDEO, EnabledAtRuntime] attribute MediaControllerConstructor MediaController;
+    [EnabledAtRuntime=media] attribute HTMLAudioElementConstructorConstructor Audio; // Usable with the new operator
+    [EnabledAtRuntime=media] attribute HTMLAudioElementConstructor HTMLAudioElement;
+    [EnabledAtRuntime=media] attribute HTMLMediaElementConstructor HTMLMediaElement;
+    [EnabledAtRuntime=media] attribute HTMLVideoElementConstructor HTMLVideoElement;
+    [EnabledAtRuntime=media] attribute MediaErrorConstructor MediaError;
+    [EnabledAtRuntime=media] attribute TimeRangesConstructor TimeRanges;
+    [EnabledAtRuntime=media] attribute HTMLSourceElementConstructor HTMLSourceElement;
+    [EnabledAtRuntime=media] attribute MediaControllerConstructor MediaController;
 
     attribute CanvasPatternConstructor CanvasPattern;
     attribute CanvasGradientConstructor CanvasGradient;
@@ -514,8 +512,8 @@
     attribute TransitionEventConstructor WebKitTransitionEvent;
     attribute WheelEventConstructor WheelEvent;
     attribute XMLHttpRequestProgressEventConstructor XMLHttpRequestProgressEvent;
-    [EnabledAtRuntime] attribute DeviceMotionEventConstructor DeviceMotionEvent;
-    [EnabledAtRuntime] attribute DeviceOrientationEventConstructor DeviceOrientationEvent;
+    [EnabledAtRuntime=deviceMotion] attribute DeviceMotionEventConstructor DeviceMotionEvent;
+    [EnabledAtRuntime=deviceOrientation] attribute DeviceOrientationEventConstructor DeviceOrientationEvent;
     [EnabledAtRuntime=touch] attribute TouchConstructor Touch;
     [EnabledAtRuntime=touch] attribute TouchEventConstructor TouchEvent;
     [EnabledAtRuntime=touch] attribute TouchListConstructor TouchList;
@@ -538,7 +536,7 @@
     attribute ClipboardConstructor Clipboard;
 
     attribute WorkerConstructor Worker; // Usable with the new operator
-    [Conditional=SHARED_WORKERS, EnabledAtRuntime] attribute SharedWorkerConstructor SharedWorker; // Usable with the new operator
+    [EnabledAtRuntime] attribute SharedWorkerConstructor SharedWorker; // Usable with the new operator
 
     attribute FileConstructor File;
     attribute FileListConstructor FileList;
@@ -550,7 +548,7 @@
 
     attribute EventSourceConstructor EventSource; // Usable with new the operator
 
-    // Mozilla has a separate XMLDocument object for XML documents. 
+    // Mozilla has a separate XMLDocument object for XML documents.
     // We just use Document for this.
     attribute DocumentConstructor XMLDocument;
     attribute DOMParserConstructor DOMParser;
diff --git a/core/page/DOMWindowPagePopup.idl b/core/page/DOMWindowPagePopup.idl
index 5cd9abf..b942747 100644
--- a/core/page/DOMWindowPagePopup.idl
+++ b/core/page/DOMWindowPagePopup.idl
@@ -30,7 +30,6 @@
 
 [
     Conditional=PAGE_POPUP,
-    Supplemental=DOMWindow
-] interface DOMWindowPagePopup {
+] partial interface DOMWindow {
     [EnabledPerContext=pagePopup] readonly attribute PagePopupController pagePopupController;
 };
diff --git a/core/page/Performance.idl b/core/page/Performance.idl
index 6cc9ec6..cb9d805 100644
--- a/core/page/Performance.idl
+++ b/core/page/Performance.idl
@@ -37,9 +37,12 @@
     readonly attribute PerformanceTiming timing;
     readonly attribute MemoryInfo memory;
 
-    sequence<PerformanceEntry> webkitGetEntries();
-    sequence<PerformanceEntry> webkitGetEntriesByType(DOMString entryType);
-    sequence<PerformanceEntry> webkitGetEntriesByName(DOMString name, [Default=NullString] optional DOMString entryType);
+    [MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntries();
+    [MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntriesByType(DOMString entryType);
+    [MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntriesByName(DOMString name, [Default=NullString] optional DOMString entryType);
+    [DeprecateAs=PrefixedPerformanceTimeline,ImplementedAs=getEntries] sequence<PerformanceEntry> webkitGetEntries();
+    [DeprecateAs=PrefixedPerformanceTimeline,ImplementedAs=getEntriesByType] sequence<PerformanceEntry> webkitGetEntriesByType(DOMString entryType);
+    [DeprecateAs=PrefixedPerformanceTimeline,ImplementedAs=getEntriesByName] sequence<PerformanceEntry> webkitGetEntriesByName(DOMString name, [Default=NullString] optional DOMString entryType);
 
     void webkitClearResourceTimings();
     void webkitSetResourceTimingBufferSize(unsigned long maxSize);
@@ -47,11 +50,17 @@
     attribute EventListener onwebkitresourcetimingbufferfull;
 
     // See http://www.w3.org/TR/2012/CR-user-timing-20120726/
-    [RaisesException] void webkitMark(DOMString markName);
-    void webkitClearMarks([Default=NullString] optional  DOMString markName);
+    [RaisesException,MeasureAs=UnprefixedUserTiming] void mark(DOMString markName);
+    [MeasureAs=UnprefixedUserTiming] void clearMarks([Default=NullString] optional  DOMString markName);
 
-    [RaisesException] void webkitMeasure(DOMString measureName, [Default=NullString] optional DOMString startMark, [Default=NullString] optional DOMString endMark);
-    void webkitClearMeasures([Default=NullString] optional DOMString measureName);
+    [RaisesException,MeasureAs=UnprefixedUserTiming] void measure(DOMString measureName, [Default=NullString] optional DOMString startMark, [Default=NullString] optional DOMString endMark);
+    [MeasureAs=UnprefixedUserTiming] void clearMeasures([Default=NullString] optional DOMString measureName);
+
+    [RaisesException,DeprecateAs=PrefixedUserTiming,ImplementedAs=mark] void webkitMark(DOMString markName);
+    [DeprecateAs=PrefixedUserTiming,ImplementedAs=clearMarks] void webkitClearMarks([Default=NullString] optional  DOMString markName);
+
+    [RaisesException,DeprecateAs=PrefixedUserTiming,ImplementedAs=measure] void webkitMeasure(DOMString measureName, [Default=NullString] optional DOMString startMark, [Default=NullString] optional DOMString endMark);
+    [DeprecateAs=PrefixedUserTiming,ImplementedAs=clearMeasures] void webkitClearMeasures([Default=NullString] optional DOMString measureName);
 
     // See http://www.w3.org/TR/hr-time/ for details.
     double now();
diff --git a/core/plugins/DOMMimeTypeArray.idl b/core/plugins/DOMMimeTypeArray.idl
index d17001a..cefde58 100644
--- a/core/plugins/DOMMimeTypeArray.idl
+++ b/core/plugins/DOMMimeTypeArray.idl
@@ -19,12 +19,11 @@
 */
 
 [
-    NamedGetter,
     IndexedGetter,
     InterfaceName=MimeTypeArray
 ] interface DOMMimeTypeArray {
     readonly attribute unsigned long length;
     DOMMimeType item([Default=Undefined] optional unsigned long index);
-    DOMMimeType namedItem([Default=Undefined] optional DOMString name);
+    getter DOMMimeType namedItem([Default=Undefined] optional DOMString name);
 };
 
diff --git a/core/plugins/DOMPlugin.idl b/core/plugins/DOMPlugin.idl
index 33ae079..f4ac45c 100644
--- a/core/plugins/DOMPlugin.idl
+++ b/core/plugins/DOMPlugin.idl
@@ -19,7 +19,6 @@
 */
 
 [
-    NamedGetter,
     IndexedGetter,
     InterfaceName=Plugin
 ] interface DOMPlugin {
@@ -28,6 +27,6 @@
     readonly attribute DOMString description;
     readonly attribute unsigned long length;
     DOMMimeType item([Default=Undefined] optional unsigned long index);
-    DOMMimeType namedItem([Default=Undefined] optional DOMString name);
+    getter DOMMimeType namedItem([Default=Undefined] optional DOMString name);
 };
 
diff --git a/core/plugins/DOMPluginArray.idl b/core/plugins/DOMPluginArray.idl
index 48e4319..08b9cab 100644
--- a/core/plugins/DOMPluginArray.idl
+++ b/core/plugins/DOMPluginArray.idl
@@ -19,13 +19,12 @@
 */
 
 [
-    NamedGetter,
     IndexedGetter,
     InterfaceName=PluginArray
 ] interface DOMPluginArray {
     readonly attribute unsigned long length;
     DOMPlugin item([Default=Undefined] optional unsigned long index);
-    DOMPlugin namedItem([Default=Undefined] optional DOMString name);
+    getter DOMPlugin namedItem([Default=Undefined] optional DOMString name);
     void refresh([Default=Undefined] optional boolean reload);
 };
 
diff --git a/core/scripts/in_file.py b/core/scripts/in_file.py
new file mode 100644
index 0000000..fa71064
--- /dev/null
+++ b/core/scripts/in_file.py
@@ -0,0 +1,119 @@
+# 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.
+
+import copy
+import os
+
+# NOTE: This has only been used to parse
+# core/page/RuntimeEnabledFeatures.in and may not be capable
+# of parsing other .in files correctly.
+
+# .in file format is:
+# // comment
+# name1 arg=value, arg2=value2, arg2=value3
+#
+# InFile must be passed a dictionary of default values
+# with which to validate arguments against known names.
+# Sequence types as default values will produce sequences
+# as parse results.
+# Bare arguments (no '=') are treated as names with value True.
+# The first field will always be labeled 'name'.
+#
+# InFile.load_from_path('file.in', {'arg': None, 'arg2': []})
+#
+# Parsing produces an array of dictionaries:
+# [ { 'name' : 'name1', 'arg' :' value', arg2=['value2', 'value3'] }
+
+def _is_comment(line):
+    return line.startswith("//") or line.startswith("#")
+
+class InFile(object):
+    def __init__(self, lines, defaults, default_parameters):
+        self.name_dictionaries = []
+        self.parameters = copy.deepcopy(default_parameters if default_parameters else {})
+        self._defaults = defaults
+        self._parse(map(str.strip, lines))
+
+    @classmethod
+    def load_from_path(self, path, defaults, default_parameters):
+        with open(os.path.abspath(path)) as in_file:
+            return InFile(in_file.readlines(), defaults, default_parameters)
+
+    def _is_sequence(self, arg):
+        return (not hasattr(arg, "strip")
+                and hasattr(arg, "__getitem__")
+                or hasattr(arg, "__iter__"))
+
+    def _parse(self, lines):
+        parsing_parameters = True
+        for line in lines:
+            if _is_comment(line):
+                continue
+            if not line:
+                parsing_parameters = False
+                continue
+            if parsing_parameters:
+                self._parse_parameter(line)
+            else:
+                self.name_dictionaries.append(self._parse_line(line))
+
+    def _parse_parameter(self, line):
+        if '=' in line:
+            name, value = line.split('=')
+        else:
+            name, value = line, True
+        if not name in self.parameters:
+            self._fatal("Unknown parameter: '%s' in line:\n%s\nKnown parameters: %s" % (name, line, self.parameters.keys()))
+        self.parameters[name] = value
+
+    def _parse_line(self, line):
+        args = copy.deepcopy(self._defaults)
+        parts = line.split(' ')
+        args['name'] = parts[0]
+        # re-join the rest of the line and split on ','
+        args_list = ' '.join(parts[1:]).strip().split(',')
+        for arg_string in args_list:
+            arg_string = arg_string.strip()
+            if not arg_string: # Ignore empty args
+                continue
+            if '=' in arg_string:
+                arg_name, arg_value = arg_string.split('=')
+            else:
+                arg_name, arg_value = arg_string, True
+            if arg_name not in self._defaults:
+                self._fatal("Unknown argument: '%s' in line:\n%s\nKnown arguments: %s" % (arg_name, line, self._defaults.keys()))
+            if self._is_sequence(args[arg_name]):
+                args[arg_name].append(arg_value)
+            else:
+                args[arg_name] = arg_value
+        return args
+
+    def _fatal(self, message):
+        # FIXME: This should probably raise instead of exit(1)
+        print message
+        exit(1)
diff --git a/core/scripts/in_file_unittest.py b/core/scripts/in_file_unittest.py
new file mode 100644
index 0000000..e065d44
--- /dev/null
+++ b/core/scripts/in_file_unittest.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env 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.
+
+import unittest
+
+from in_file import InFile
+
+class InFileTest(unittest.TestCase):
+    def test_basic_parse(self):
+        contents = """
+name1 arg=value, arg2=value2, arg2=value3
+name2
+"""
+        lines = contents.split("\n")
+        defaults = {
+            'arg': None,
+            'arg2': [],
+        }
+        in_file = InFile(lines, defaults, None)
+        expected_values = [
+            {'name': 'name1', 'arg': 'value', 'arg2': ['value2', 'value3']},
+            {'name': 'name2', 'arg': None, 'arg2': []},
+        ]
+        self.assertEquals(in_file.name_dictionaries, expected_values)
+
+    def test_with_parameters(self):
+        contents = """namespace=TestNamespace
+fruit
+
+name1 arg=value, arg2=value2, arg2=value3
+name2
+"""
+        lines = contents.split("\n")
+        defaults = {
+            'arg': None,
+            'arg2': [],
+        }
+        default_parameters = {
+            'namespace': '',
+            'fruit': False,
+        }
+        in_file = InFile(lines, defaults, default_parameters)
+        expected_parameters = {
+            'namespace': 'TestNamespace',
+            'fruit': True,
+        }
+        self.assertEquals(in_file.parameters, expected_parameters)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/core/scripts/in_generator.py b/core/scripts/in_generator.py
new file mode 100644
index 0000000..1ee994a
--- /dev/null
+++ b/core/scripts/in_generator.py
@@ -0,0 +1,90 @@
+# 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.
+
+import os.path
+import shutil
+
+from in_file import InFile
+
+
+class Writer(object):
+    # Subclasses should override.
+    class_name = None
+    defaults = None
+    default_parameters = None
+
+    def __init__(self, in_file_path):
+        self.in_file = InFile.load_from_path(in_file_path, self.defaults, self.default_parameters)
+
+    # Subclasses should override.
+    def generate_header(self):
+        raise NotImplementedError
+
+    # Subclasses should override.
+    def generate_implementation(self):
+        raise NotImplementedError
+
+    def _forcibly_create_text_file_at_path_with_contents(self, file_path, contents):
+        # FIXME: This method can be made less force-full anytime after 6/1/2013.
+        # A gyp error was briefly checked into the tree, causing
+        # a directory to have been generated in place of one of
+        # our output files.  Clean up after that error so that
+        # all users don't need to clobber their output directories.
+        shutil.rmtree(file_path, ignore_errors=True)
+        # The build system should ensure our output directory exists, but just in case.
+        directory = os.path.dirname(file_path)
+        if not os.path.exists(directory):
+            os.makedirs(directory)
+
+        with open(file_path, "w") as file_to_write:
+            file_to_write.write(contents)
+
+    def write_header(self, output_dir):
+        header_path = os.path.join(output_dir, self.class_name + ".h")
+        self._forcibly_create_text_file_at_path_with_contents(header_path, self.generate_header())
+
+    def write_implmentation(self, output_dir):
+        implmentation_path = os.path.join(output_dir, self.class_name + ".cpp")
+        self._forcibly_create_text_file_at_path_with_contents(implmentation_path, self.generate_implementation())
+
+
+class Maker(object):
+    def __init__(self, writer_class):
+        self._writer_class = writer_class
+
+    def main(self, argv):
+        script_name = os.path.basename(argv[0])
+        args = argv[1:]
+        if len(args) < 1:
+            print "USAGE: %i INPUT_FILE [OUTPUT_DIRECTORY]" % script_name
+            exit(1)
+        output_dir = args[1] if len(args) > 1 else os.getcwd()
+
+        writer = self._writer_class(args[0])
+        writer.write_header(output_dir)
+        writer.write_implmentation(output_dir)
diff --git a/core/scripts/license.py b/core/scripts/license.py
new file mode 100644
index 0000000..32da980
--- /dev/null
+++ b/core/scripts/license.py
@@ -0,0 +1,62 @@
+# 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.
+
+# FIXME: We should either not use license blocks in generated files
+# or we should read this from some central license file.
+
+def license_for_generated_cpp():
+    return """/*
+ * 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.
+ */
+"""
diff --git a/core/scripts/make_runtime_features.py b/core/scripts/make_runtime_features.py
new file mode 100755
index 0000000..3890a61
--- /dev/null
+++ b/core/scripts/make_runtime_features.py
@@ -0,0 +1,144 @@
+#!/usr/bin/env 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.
+
+import os.path
+import sys
+
+from in_file import InFile
+import in_generator
+import license
+
+
+HEADER_TEMPLATE = """%(license)s
+#ifndef %(class_name)s_h
+#define %(class_name)s_h
+
+namespace WebCore {
+
+// A class that stores static enablers for all experimental features.
+
+class %(class_name)s {
+public:
+%(method_declarations)s
+private:
+    %(class_name)s() { }
+
+%(storage_declarations)s
+};
+
+} // namespace WebCore
+
+#endif // %(class_name)s_h
+"""
+
+IMPLEMENTATION_TEMPLATE = """%(license)s
+#include "config.h"
+#include "%(class_name)s.h"
+
+namespace WebCore {
+
+%(storage_definitions)s
+
+} // namespace WebCore
+"""
+
+class RuntimeFeatureWriter(in_generator.Writer):
+    class_name = "RuntimeEnabledFeatures"
+    defaults = {
+        'condition' : None,
+        'depends_on' : [],
+        'default': 'false',
+        'custom': False,
+    }
+
+    def __init__(self, in_file_path):
+        super(RuntimeFeatureWriter, self).__init__(in_file_path)
+        self._all_features = self.in_file.name_dictionaries
+        # Make sure the resulting dictionaries have all the keys we expect.
+        for feature in self._all_features:
+            feature['first_lowered_name'] = self._lower_first(feature['name'])
+            # Most features just check their isFooEnabled bool
+            # but some depend on more than one bool.
+            enabled_condition = "is%sEnabled" % feature['name']
+            for dependant_name in feature['depends_on']:
+                enabled_condition += " && is%sEnabled" % dependant_name
+            feature['enabled_condition'] = enabled_condition
+        self._non_custom_features = filter(lambda feature: not feature['custom'], self._all_features)
+
+    def _lower_first(self, string):
+        lowered = string[0].lower() + string[1:]
+        lowered = lowered.replace("cSS", "css")
+        lowered = lowered.replace("iME", "ime")
+        return lowered
+
+    def _wrap_with_condition(self, string, condition):
+        if not condition:
+            return string
+        return "#if ENABLE(%(condition)s)\n%(string)s\n#endif" % { 'condition' : condition, 'string' : string }
+
+    def _method_declaration(self, feature):
+        if feature['custom']:
+            return "    static bool %(first_lowered_name)sEnabled();\n" % feature
+        unconditional = """    static void set%(name)sEnabled(bool isEnabled) { is%(name)sEnabled = isEnabled; }
+    static bool %(first_lowered_name)sEnabled() { return %(enabled_condition)s; }
+"""
+        conditional = "#if ENABLE(%(condition)s)\n" + unconditional + """#else
+    static void set%(name)sEnabled(bool) { }
+    static bool %(first_lowered_name)sEnabled() { return false; }
+#endif
+"""
+        template = conditional if feature['condition'] else unconditional
+        return template % feature
+
+    def _storage_declarations(self, feature):
+        declaration = "    static bool is%(name)sEnabled;" % feature
+        return self._wrap_with_condition(declaration, feature['condition'])
+
+    def generate_header(self):
+        return HEADER_TEMPLATE % {
+            'class_name' : self.class_name,
+            'license' : license.license_for_generated_cpp(),
+            'method_declarations' : "\n".join(map(self._method_declaration, self._all_features)),
+            'storage_declarations' : "\n".join(map(self._storage_declarations, self._non_custom_features)),
+        }
+
+    def _storage_definition(self, feature):
+        definition = "bool RuntimeEnabledFeatures::is%(name)sEnabled = %(default)s;" % feature
+        return self._wrap_with_condition(definition, feature['condition'])
+
+    def generate_implementation(self):
+        return IMPLEMENTATION_TEMPLATE % {
+            'class_name' : self.class_name,
+            'license' : license.license_for_generated_cpp(),
+            'storage_definitions' : "\n".join(map(self._storage_definition, self._non_custom_features)),
+        }
+
+
+if __name__ == "__main__":
+    in_generator.Maker(RuntimeFeatureWriter).main(sys.argv)
diff --git a/core/testing/InternalSettings.idl b/core/testing/InternalSettings.idl
index a4e83c5..6359c27 100644
--- a/core/testing/InternalSettings.idl
+++ b/core/testing/InternalSettings.idl
@@ -27,7 +27,6 @@
 ] interface InternalSettings : InternalSettingsGenerated {
     [RaisesException] void setMockScrollbarsEnabled(boolean enabled);
     [RaisesException] void setTouchEventEmulationEnabled(boolean enabled);
-    [RaisesException] void setShadowDOMEnabled(boolean enabled);
     void setAuthorShadowDOMForAnyElementEnabled(boolean isEnabled);
     void setExperimentalShadowDOMEnabled(boolean isEnabled);
     void setStyleScopedEnabled(boolean isEnabled);
@@ -49,11 +48,11 @@
     [RaisesException] void setCanStartMedia(boolean enabled);
     [RaisesException] void setEditingBehavior(DOMString behavior);
     [RaisesException] void setDialogElementEnabled(boolean enabled);
+    [RaisesException] void setLazyLayoutEnabled(boolean enabled);
     void setLangAttributeAwareFormControlUIEnabled(boolean enabled);
 
     [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);
 };
diff --git a/core/testing/Internals.idl b/core/testing/Internals.idl
index 17d5bff..89ab3d5 100644
--- a/core/testing/Internals.idl
+++ b/core/testing/Internals.idl
@@ -32,6 +32,8 @@
     boolean isPreloaded(DOMString url);
     boolean isLoadingFromMemoryCache(DOMString url);
 
+    void crash();
+
     [RaisesException] unsigned long numberOfScopedHTMLStyleChildren(Node scope);
     [RaisesException] CSSStyleDeclaration computedStyleIncludingVisitedInfo(Node node);
 
@@ -127,13 +129,11 @@
     [RaisesException] unsigned long lengthFromRange(Element scope, Range range);
     [RaisesException] DOMString rangeAsText(Range range);
 
-#if defined(ENABLE_TOUCH_ADJUSTMENT) && ENABLE_TOUCH_ADJUSTMENT
     [RaisesException] DOMPoint touchPositionAdjustedToBestClickableNode(long x, long y, long width, long height, Document document);
     [RaisesException] Node touchNodeAdjustedToBestClickableNode(long x, long y, long width, long height, Document document);
     [RaisesException] DOMPoint touchPositionAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document document);
     [RaisesException] Node touchNodeAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document document);
     [RaisesException] ClientRect bestZoomableAreaForTouchPoint(long x, long y, long width, long height, Document document);
-#endif
 
     [RaisesException] long lastSpellCheckRequestSequence(Document document);
     [RaisesException] long lastSpellCheckProcessedSequence(Document document);
@@ -174,6 +174,9 @@
     const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 8;
     [RaisesException] DOMString layerTreeAsText(Document document, optional unsigned short flags);
 
+    [RaisesException] NodeList paintOrderListBeforePromote(Element element);
+    [RaisesException] NodeList paintOrderListAfterPromote(Element element);
+
     [RaisesException] DOMString scrollingStateTreeAsText(Document document);
     [RaisesException] DOMString mainThreadScrollingReasons(Document document);
     [RaisesException] ClientRectList nonFastScrollableRects(Document document);
@@ -209,9 +212,6 @@
 
     [RaisesException] void setPageScaleFactor(float scaleFactor, long x, long y);
 
-    void setHeaderHeight(Document document, float height);
-    void setFooterHeight(Document document, float height);
-
     void webkitWillEnterFullScreenForElement(Document document, Element element);
     void webkitDidEnterFullScreenForElement(Document document, Element element);
     void webkitWillExitFullScreenForElement(Document document, Element element);
@@ -242,8 +242,6 @@
 
     void forceReload(boolean endToEnd);
 
-    [Conditional=VIDEO] void simulateAudioInterruption(Node node);
-
     [Conditional=ENCRYPTED_MEDIA_V2] void initializeMockCDM();
 
     [Conditional=SPEECH_SYNTHESIS] void enableMockSpeechSynthesizer();
diff --git a/core/workers/DedicatedWorkerContext.idl b/core/workers/DedicatedWorkerContext.idl
index 69573c4..d204859 100644
--- a/core/workers/DedicatedWorkerContext.idl
+++ b/core/workers/DedicatedWorkerContext.idl
@@ -28,12 +28,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    IsWorkerContext,
-] interface DedicatedWorkerContext : WorkerContext {
-
+interface DedicatedWorkerContext : WorkerContext {
     [Custom, RaisesException] void postMessage(any message, optional Array messagePorts);
-
     attribute EventListener onmessage;
 };
 
diff --git a/core/workers/SharedWorker.idl b/core/workers/SharedWorker.idl
index 9fbb2ca..c69690f 100644
--- a/core/workers/SharedWorker.idl
+++ b/core/workers/SharedWorker.idl
@@ -30,7 +30,6 @@
  */
 
 [
-    Conditional=SHARED_WORKERS,
     Constructor(DOMString scriptURL, [Default=NullString] optional DOMString name),
     CallWith=ScriptExecutionContext,
     RaisesException
diff --git a/core/workers/SharedWorkerContext.idl b/core/workers/SharedWorkerContext.idl
index dd0c267..4f0d991 100644
--- a/core/workers/SharedWorkerContext.idl
+++ b/core/workers/SharedWorkerContext.idl
@@ -28,13 +28,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Conditional=SHARED_WORKERS,
-    IsWorkerContext,
-] interface SharedWorkerContext : WorkerContext {
-
+interface SharedWorkerContext : WorkerContext {
     readonly attribute DOMString name;
              attribute EventListener onconnect;
-
 };
 
diff --git a/core/workers/WorkerContext.idl b/core/workers/WorkerContext.idl
index 88ef1a0..eaa6313 100644
--- a/core/workers/WorkerContext.idl
+++ b/core/workers/WorkerContext.idl
@@ -26,7 +26,6 @@
 
 [
     EventTarget,
-    IsWorkerContext,
     CustomToJSObject,
     NoWrapperCache
 ] interface WorkerContext {
diff --git a/modules/README b/modules/README
index 081bdf4..e18cf12 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: 1206
+Current revision: 1242
diff --git a/modules/battery/NavigatorBattery.idl b/modules/battery/NavigatorBattery.idl
index a1da4c7..7c02503 100644
--- a/modules/battery/NavigatorBattery.idl
+++ b/modules/battery/NavigatorBattery.idl
@@ -19,8 +19,7 @@
 
 [
     Conditional=BATTERY_STATUS,
-    Supplemental=Navigator
-] interface NavigatorBattery {
+] partial interface Navigator {
     readonly attribute BatteryManager webkitBattery;
 };
 
diff --git a/core/dom/DeviceAcceleration.idl b/modules/device_orientation/DeviceAcceleration.idl
similarity index 100%
rename from core/dom/DeviceAcceleration.idl
rename to modules/device_orientation/DeviceAcceleration.idl
diff --git a/core/dom/DeviceMotionEvent.idl b/modules/device_orientation/DeviceMotionEvent.idl
similarity index 100%
rename from core/dom/DeviceMotionEvent.idl
rename to modules/device_orientation/DeviceMotionEvent.idl
diff --git a/core/dom/DeviceRotationRate.idl b/modules/device_orientation/DeviceRotationRate.idl
similarity index 100%
rename from core/dom/DeviceRotationRate.idl
rename to modules/device_orientation/DeviceRotationRate.idl
diff --git a/modules/donottrack/NavigatorDoNotTrack.idl b/modules/donottrack/NavigatorDoNotTrack.idl
index 1fe0b8a..f1626bf 100644
--- a/modules/donottrack/NavigatorDoNotTrack.idl
+++ b/modules/donottrack/NavigatorDoNotTrack.idl
@@ -28,9 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Supplemental=Navigator
-] interface NavigatorDoNotTrack {
+partial interface Navigator {
     [TreatReturnedNullStringAs=Null] readonly attribute DOMString doNotTrack;
 };
 
diff --git a/modules/filesystem/DOMWindowFileSystem.idl b/modules/filesystem/DOMWindowFileSystem.idl
index 333b4dd..c42fe21 100644
--- a/modules/filesystem/DOMWindowFileSystem.idl
+++ b/modules/filesystem/DOMWindowFileSystem.idl
@@ -24,15 +24,13 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Supplemental=DOMWindow
-] interface DOMWindowFileSystem {
+partial interface DOMWindow {
     const unsigned short TEMPORARY = 0;
     const unsigned short PERSISTENT = 1;
 
     [EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(unsigned short type, long long size,
-            [Callback] FileSystemCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+            FileSystemCallback successCallback, optional ErrorCallback errorCallback);
     [EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(DOMString url,
-            [Callback] EntryCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+            EntryCallback successCallback, optional ErrorCallback errorCallback);
 };
 
diff --git a/modules/filesystem/DataTransferItemFileSystem.idl b/modules/filesystem/DataTransferItemFileSystem.idl
index dedcde7..f41429f 100644
--- a/modules/filesystem/DataTransferItemFileSystem.idl
+++ b/modules/filesystem/DataTransferItemFileSystem.idl
@@ -28,9 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Supplemental=DataTransferItem
-] interface DataTransferItemFileSystem {
+partial interface DataTransferItem {
     [CallWith=ScriptExecutionContext] Entry webkitGetAsEntry();
 };
 
diff --git a/modules/filesystem/DirectoryEntry.idl b/modules/filesystem/DirectoryEntry.idl
index 9a44cf6..f77a4e9 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, [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);
+    void getFile([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, optional Dictionary options, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
+    void getDirectory([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, optional Dictionary options, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
+    void removeRecursively(VoidCallback successCallback, optional ErrorCallback errorCallback);
 };
diff --git a/modules/filesystem/DirectoryReader.idl b/modules/filesystem/DirectoryReader.idl
index b6930b5..b93aa62 100644
--- a/modules/filesystem/DirectoryReader.idl
+++ b/modules/filesystem/DirectoryReader.idl
@@ -31,5 +31,5 @@
 [
     ImplementationLacksVTable
 ] interface DirectoryReader {
-    void readEntries([Callback] EntriesCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+    void readEntries(EntriesCallback successCallback, optional ErrorCallback errorCallback);
 };
diff --git a/modules/filesystem/EntriesCallback.idl b/modules/filesystem/EntriesCallback.idl
index ade0171..ef89851 100644
--- a/modules/filesystem/EntriesCallback.idl
+++ b/modules/filesystem/EntriesCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface EntriesCallback {
+callback interface EntriesCallback {
     boolean handleEvent(EntryArray entries);
 };
diff --git a/modules/filesystem/Entry.idl b/modules/filesystem/Entry.idl
index 4f4a316..e6638ab 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, [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);
+    void getMetadata(MetadataCallback successCallback, optional ErrorCallback errorCallback);
+    void moveTo(DirectoryEntry parent, [TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString name, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
+    void copyTo(DirectoryEntry parent, [TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString name, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
     DOMString toURL();
-    void remove([Callback] VoidCallback successCallback, [Callback] optional ErrorCallback errorCallback);
-    void getParent([Callback] optional EntryCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+    void remove(VoidCallback successCallback, optional ErrorCallback errorCallback);
+    void getParent(optional EntryCallback successCallback, optional ErrorCallback errorCallback);
 };
diff --git a/modules/filesystem/EntryCallback.idl b/modules/filesystem/EntryCallback.idl
index 94728d8..21ebf4f 100644
--- a/modules/filesystem/EntryCallback.idl
+++ b/modules/filesystem/EntryCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface EntryCallback {
+callback interface EntryCallback {
     boolean handleEvent(Entry entry);
 };
diff --git a/modules/filesystem/ErrorCallback.idl b/modules/filesystem/ErrorCallback.idl
index 0a74a67..69ad1db 100644
--- a/modules/filesystem/ErrorCallback.idl
+++ b/modules/filesystem/ErrorCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface ErrorCallback {
+callback interface ErrorCallback {
     boolean handleEvent(FileError error);
 };
diff --git a/modules/filesystem/FileCallback.idl b/modules/filesystem/FileCallback.idl
index f51738c..b231bf5 100644
--- a/modules/filesystem/FileCallback.idl
+++ b/modules/filesystem/FileCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface FileCallback {
+callback interface FileCallback {
     boolean handleEvent(File file);
 };
diff --git a/modules/filesystem/FileEntry.idl b/modules/filesystem/FileEntry.idl
index 4e8b09d..63bff0a 100644
--- a/modules/filesystem/FileEntry.idl
+++ b/modules/filesystem/FileEntry.idl
@@ -29,6 +29,6 @@
  */
 
 interface FileEntry : Entry {
-    void createWriter([Callback] FileWriterCallback successCallback, [Callback] optional ErrorCallback errorCallback);
-    void file([Callback] FileCallback successCallback, [Callback] optional ErrorCallback errorCallback);
+    void createWriter(FileWriterCallback successCallback, optional ErrorCallback errorCallback);
+    void file(FileCallback successCallback, optional ErrorCallback errorCallback);
 };
diff --git a/modules/filesystem/FileSystemCallback.idl b/modules/filesystem/FileSystemCallback.idl
index c4eb76b..ebb0521 100644
--- a/modules/filesystem/FileSystemCallback.idl
+++ b/modules/filesystem/FileSystemCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface FileSystemCallback {
+callback interface FileSystemCallback {
     boolean handleEvent(DOMFileSystem fileSystem);
 };
diff --git a/modules/filesystem/FileWriterCallback.idl b/modules/filesystem/FileWriterCallback.idl
index 2db5dd7..a2d78b0 100644
--- a/modules/filesystem/FileWriterCallback.idl
+++ b/modules/filesystem/FileWriterCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface FileWriterCallback {
+callback interface FileWriterCallback {
     boolean handleEvent(FileWriter fileWriter);
 };
diff --git a/modules/filesystem/HTMLInputElementFileSystem.idl b/modules/filesystem/HTMLInputElementFileSystem.idl
index a0d8ac6..fc4a29d 100644
--- a/modules/filesystem/HTMLInputElementFileSystem.idl
+++ b/modules/filesystem/HTMLInputElementFileSystem.idl
@@ -28,9 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Supplemental=HTMLInputElement
-] interface HTMLInputElementFileSystem {
+partial interface HTMLInputElement {
     [EnabledAtRuntime=FileSystem,CallWith=ScriptExecutionContext] readonly attribute EntryArray webkitEntries;
 };
 
diff --git a/modules/filesystem/MetadataCallback.idl b/modules/filesystem/MetadataCallback.idl
index 70dd993..f58d7b4 100644
--- a/modules/filesystem/MetadataCallback.idl
+++ b/modules/filesystem/MetadataCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface MetadataCallback {
+callback interface MetadataCallback {
     boolean handleEvent(Metadata metadata);
 };
diff --git a/modules/filesystem/WorkerContextFileSystem.idl b/modules/filesystem/WorkerContextFileSystem.idl
index 6bc4775..744681c 100644
--- a/modules/filesystem/WorkerContextFileSystem.idl
+++ b/modules/filesystem/WorkerContextFileSystem.idl
@@ -24,15 +24,13 @@
  *
  */
 
-[
-    Supplemental=WorkerContext
-] interface WorkerContextFileSystem {
+partial interface WorkerContext {
     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, optional FileSystemCallback successCallback, 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, EntryCallback successCallback, optional ErrorCallback errorCallback);
     [EnabledAtRuntime=FileSystem, RaisesException] EntrySync webkitResolveLocalFileSystemSyncURL(DOMString url);
 
     [EnabledAtRuntime=FileSystem] attribute FileErrorConstructor FileError;
diff --git a/modules/gamepad/Gamepad.idl b/modules/gamepad/Gamepad.idl
index 0c5b8d5..33f5616 100644
--- a/modules/gamepad/Gamepad.idl
+++ b/modules/gamepad/Gamepad.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=GAMEPAD,
     ImplementationLacksVTable
 ] interface Gamepad {
     readonly attribute DOMString id;
diff --git a/modules/gamepad/GamepadList.idl b/modules/gamepad/GamepadList.idl
index 82c8367..2eb45f9 100644
--- a/modules/gamepad/GamepadList.idl
+++ b/modules/gamepad/GamepadList.idl
@@ -24,7 +24,6 @@
  */
 
 [
-    Conditional=GAMEPAD,
     IndexedGetter,
     ImplementationLacksVTable
 ] interface GamepadList {
diff --git a/modules/gamepad/NavigatorGamepad.idl b/modules/gamepad/NavigatorGamepad.idl
index 98f4677..eea135f 100644
--- a/modules/gamepad/NavigatorGamepad.idl
+++ b/modules/gamepad/NavigatorGamepad.idl
@@ -17,10 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-[
-    Conditional=GAMEPAD,
-    Supplemental=Navigator
-] interface NavigatorGamepad {
+partial interface Navigator {
     [EnabledAtRuntime] GamepadList webkitGetGamepads();
 };
 
diff --git a/modules/geolocation/NavigatorGeolocation.idl b/modules/geolocation/NavigatorGeolocation.idl
index b6471d0..afdce13 100644
--- a/modules/geolocation/NavigatorGeolocation.idl
+++ b/modules/geolocation/NavigatorGeolocation.idl
@@ -17,9 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-[
-    Supplemental=Navigator
-] interface NavigatorGeolocation {
+partial interface Navigator {
     [EnabledAtRuntime] readonly attribute Geolocation geolocation;
 };
 
diff --git a/modules/geolocation/PositionCallback.idl b/modules/geolocation/PositionCallback.idl
index d754273..ca5a7be 100644
--- a/modules/geolocation/PositionCallback.idl
+++ b/modules/geolocation/PositionCallback.idl
@@ -22,8 +22,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface PositionCallback {
+callback interface PositionCallback {
     boolean handleEvent(Geoposition position);
 };
diff --git a/modules/geolocation/PositionErrorCallback.idl b/modules/geolocation/PositionErrorCallback.idl
index 38eb402..a0f471f 100644
--- a/modules/geolocation/PositionErrorCallback.idl
+++ b/modules/geolocation/PositionErrorCallback.idl
@@ -22,8 +22,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface PositionErrorCallback {
+callback interface PositionErrorCallback {
     boolean handleEvent(PositionError error);
 };
diff --git a/modules/indexeddb/DOMWindowIndexedDatabase.idl b/modules/indexeddb/DOMWindowIndexedDatabase.idl
index c1a2e29..18c3724 100644
--- a/modules/indexeddb/DOMWindowIndexedDatabase.idl
+++ b/modules/indexeddb/DOMWindowIndexedDatabase.idl
@@ -24,9 +24,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Supplemental=DOMWindow
-] interface DOMWindowIndexedDatabase {
+partial interface DOMWindow {
     [ImplementedAs=indexedDB,MeasureAs=PrefixedIndexedDB] readonly attribute IDBFactory webkitIndexedDB;
 
     attribute IDBCursorConstructor webkitIDBCursor;
diff --git a/modules/indexeddb/WorkerContextIndexedDatabase.idl b/modules/indexeddb/WorkerContextIndexedDatabase.idl
index 3abf8a6..bc1c4f3 100644
--- a/modules/indexeddb/WorkerContextIndexedDatabase.idl
+++ b/modules/indexeddb/WorkerContextIndexedDatabase.idl
@@ -20,14 +20,12 @@
  * 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. 
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-[
-    Supplemental=WorkerContext
-] interface WorkerContextIndexedDatabase {
-    [ImplementedAs=indexedDB,EnabledAtRuntime] readonly attribute IDBFactory webkitIndexedDB;
+partial interface WorkerContext {
+    [ImplementedAs=indexedDB,EnabledAtRuntime=indexedDB] readonly attribute IDBFactory webkitIndexedDB;
 
     attribute IDBCursorConstructor webkitIDBCursor;
     attribute IDBDatabaseConstructor webkitIDBDatabase;
diff --git a/core/page/PerformanceEntryList.idl b/modules/inputmethod/Composition.idl
similarity index 81%
copy from core/page/PerformanceEntryList.idl
copy to modules/inputmethod/Composition.idl
index 342e463..155d74b 100644
--- a/core/page/PerformanceEntryList.idl
+++ b/modules/inputmethod/Composition.idl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * 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
@@ -28,12 +28,10 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
+// http://www.w3.org/TR/ime-api/
 [
-    IndexedGetter,
-    ImplementationLacksVTable
-] interface PerformanceEntryList {
-    readonly attribute unsigned long length;
-    PerformanceEntry item(unsigned long index);
+  ImplementationLacksVTable
+] interface Composition {
+    readonly attribute Node text;
+    readonly attribute Range caret;
 };
-
diff --git a/core/page/PerformanceEntryList.idl b/modules/inputmethod/InputMethodContext.idl
similarity index 77%
copy from core/page/PerformanceEntryList.idl
copy to modules/inputmethod/InputMethodContext.idl
index 342e463..0a6a23a 100644
--- a/core/page/PerformanceEntryList.idl
+++ b/modules/inputmethod/InputMethodContext.idl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * 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
@@ -28,12 +28,16 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
+// http://www.w3.org/TR/ime-api/
 [
-    IndexedGetter,
     ImplementationLacksVTable
-] interface PerformanceEntryList {
-    readonly attribute unsigned long length;
-    PerformanceEntry item(unsigned long index);
-};
+] interface InputMethodContext {
+    readonly attribute Composition composition;
+    attribute boolean enabled;
+    readonly attribute DOMString locale;
 
+    void confirmComposition();
+    void setCaretRectangle(Node anchor, long x, long y, long w, long h);
+    void setExclusionRectangle(Node anchor, long x, long y, long w, long h);
+    boolean open();
+};
diff --git a/modules/mediastream/DOMWindowMediaStream.idl b/modules/mediastream/DOMWindowMediaStream.idl
index 14992be..c492de4 100644
--- a/modules/mediastream/DOMWindowMediaStream.idl
+++ b/modules/mediastream/DOMWindowMediaStream.idl
@@ -26,10 +26,9 @@
 
 [
     Conditional=MEDIA_STREAM,
-    Supplemental=DOMWindow
-] interface DOMWindowMediaStream {
-    [EnabledAtRuntime] attribute MediaStreamConstructor webkitMediaStream;
-    [EnabledAtRuntime] attribute RTCPeerConnectionConstructor webkitRTCPeerConnection;
+] partial interface DOMWindow {
+    [EnabledAtRuntime=mediaStream] attribute MediaStreamConstructor webkitMediaStream;
+    [EnabledAtRuntime=peerConnection] attribute RTCPeerConnectionConstructor webkitRTCPeerConnection;
     attribute RTCSessionDescriptionConstructor RTCSessionDescription;
     attribute RTCIceCandidateConstructor RTCIceCandidate;
     attribute MediaStreamEventConstructor MediaStreamEvent;
diff --git a/modules/mediastream/LocalMediaStream.idl b/modules/mediastream/LocalMediaStream.idl
deleted file mode 100644
index 6d95162..0000000
--- a/modules/mediastream/LocalMediaStream.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
-    Conditional=MEDIA_STREAM,
-    EventTarget
-] interface LocalMediaStream : MediaStream {
-    void stop();
-};
-
diff --git a/modules/mediastream/MediaStream.idl b/modules/mediastream/MediaStream.idl
index 01be9c1..e41ea5c 100644
--- a/modules/mediastream/MediaStream.idl
+++ b/modules/mediastream/MediaStream.idl
@@ -29,7 +29,6 @@
     Constructor(MediaStream stream),
     Constructor(MediaStreamTrack[] tracks),
     CallWith=ScriptExecutionContext,
-    SkipVTableValidation
 ] interface MediaStream {
     // DEPRECATED
     readonly attribute DOMString label;
@@ -44,6 +43,7 @@
     MediaStreamTrack getTrackById(DOMString trackId);
 
     readonly attribute boolean ended;
+    void stop();
 
     attribute EventListener onended;
     attribute EventListener onaddtrack;
diff --git a/modules/mediastream/NavigatorMediaStream.idl b/modules/mediastream/NavigatorMediaStream.idl
index ec67fd7..5da3ed9 100644
--- a/modules/mediastream/NavigatorMediaStream.idl
+++ b/modules/mediastream/NavigatorMediaStream.idl
@@ -19,10 +19,9 @@
 
 [
     Conditional=MEDIA_STREAM,
-    Supplemental=Navigator
-] interface NavigatorMediaStream {
-    [EnabledAtRuntime, RaisesException] void webkitGetUserMedia(Dictionary options,
-                                                 [Callback] NavigatorUserMediaSuccessCallback successCallback,
-                                                 [Callback] optional NavigatorUserMediaErrorCallback errorCallback);
+] partial interface Navigator {
+    [EnabledAtRuntime=mediaStream, RaisesException] void webkitGetUserMedia(Dictionary options,
+                                                 NavigatorUserMediaSuccessCallback successCallback,
+                                                 optional NavigatorUserMediaErrorCallback errorCallback);
 };
 
diff --git a/modules/mediastream/NavigatorUserMediaErrorCallback.idl b/modules/mediastream/NavigatorUserMediaErrorCallback.idl
index 4e42d7a..da94ad8 100644
--- a/modules/mediastream/NavigatorUserMediaErrorCallback.idl
+++ b/modules/mediastream/NavigatorUserMediaErrorCallback.idl
@@ -23,9 +23,8 @@
  */
 
 [
-    Conditional=MEDIA_STREAM,
-    Callback
-] interface NavigatorUserMediaErrorCallback {
+    Conditional=MEDIA_STREAM
+] callback interface NavigatorUserMediaErrorCallback {
     boolean handleEvent(NavigatorUserMediaError error);
 };
 
diff --git a/modules/mediastream/NavigatorUserMediaSuccessCallback.idl b/modules/mediastream/NavigatorUserMediaSuccessCallback.idl
index 9674459..3912797 100644
--- a/modules/mediastream/NavigatorUserMediaSuccessCallback.idl
+++ b/modules/mediastream/NavigatorUserMediaSuccessCallback.idl
@@ -24,8 +24,7 @@
 
 [
     Conditional=MEDIA_STREAM,
-    Callback
-] interface NavigatorUserMediaSuccessCallback {
-    boolean handleEvent(LocalMediaStream stream);
+] callback interface NavigatorUserMediaSuccessCallback {
+    boolean handleEvent(MediaStream stream);
 };
 
diff --git a/modules/mediastream/RTCErrorCallback.idl b/modules/mediastream/RTCErrorCallback.idl
index 1be5df2..5af5bfc 100644
--- a/modules/mediastream/RTCErrorCallback.idl
+++ b/modules/mediastream/RTCErrorCallback.idl
@@ -29,9 +29,8 @@
  */
 
 [
-    Conditional=MEDIA_STREAM,
-    Callback
-] interface RTCErrorCallback {
+    Conditional=MEDIA_STREAM
+] callback interface RTCErrorCallback {
     boolean handleEvent(DOMString errorInformation);
 };
 
diff --git a/modules/mediastream/RTCPeerConnection.idl b/modules/mediastream/RTCPeerConnection.idl
index 7f251f6..940e96c 100644
--- a/modules/mediastream/RTCPeerConnection.idl
+++ b/modules/mediastream/RTCPeerConnection.idl
@@ -36,14 +36,14 @@
     CallWith=ScriptExecutionContext,
     EventTarget
 ] interface RTCPeerConnection {
-    [RaisesException] void createOffer([Callback] RTCSessionDescriptionCallback successCallback, [Callback,Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary mediaConstraints);
+    [RaisesException] void createOffer(RTCSessionDescriptionCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary mediaConstraints);
 
-    [RaisesException] void createAnswer([Callback] RTCSessionDescriptionCallback successCallback, [Callback, Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary mediaConstraints);
+    [RaisesException] void createAnswer(RTCSessionDescriptionCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary mediaConstraints);
 
-    [RaisesException] void setLocalDescription(RTCSessionDescription description, [Callback, Default=Undefined] optional VoidCallback successCallback, [Callback, Default=Undefined] optional RTCErrorCallback failureCallback);
+    [RaisesException] void setLocalDescription(RTCSessionDescription description, [Default=Undefined] optional VoidCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback);
     [GetterRaisesException] readonly attribute RTCSessionDescription localDescription;
 
-    [RaisesException] void setRemoteDescription(RTCSessionDescription description, [Callback, Default=Undefined] optional VoidCallback successCallback, [Callback, Default=Undefined] optional RTCErrorCallback failureCallback);
+    [RaisesException] void setRemoteDescription(RTCSessionDescription description, [Default=Undefined] optional VoidCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback);
     [GetterRaisesException] readonly attribute RTCSessionDescription remoteDescription;
 
     readonly attribute DOMString signalingState;
@@ -62,7 +62,7 @@
     [StrictTypeChecking, RaisesException] void addStream(MediaStream stream, optional Dictionary mediaConstraints);
     [StrictTypeChecking, RaisesException] void removeStream(MediaStream stream);
 
-    void getStats([Callback] RTCStatsCallback successCallback, [Default=Undefined] optional MediaStreamTrack selector);
+    void getStats(RTCStatsCallback successCallback, [Default=Undefined] optional MediaStreamTrack selector);
 
     [RaisesException] RTCDataChannel createDataChannel([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString label, optional Dictionary options);
 
diff --git a/modules/mediastream/RTCSessionDescriptionCallback.idl b/modules/mediastream/RTCSessionDescriptionCallback.idl
index 1b50c00..2fb8560 100644
--- a/modules/mediastream/RTCSessionDescriptionCallback.idl
+++ b/modules/mediastream/RTCSessionDescriptionCallback.idl
@@ -29,9 +29,8 @@
  */
 
 [
-    Conditional=MEDIA_STREAM,
-    Callback
-] interface RTCSessionDescriptionCallback {
+    Conditional=MEDIA_STREAM
+] callback interface RTCSessionDescriptionCallback {
     boolean handleEvent(RTCSessionDescription sdp);
 };
 
diff --git a/modules/mediastream/RTCStatsCallback.idl b/modules/mediastream/RTCStatsCallback.idl
index 5ac0db8..437e03f 100644
--- a/modules/mediastream/RTCStatsCallback.idl
+++ b/modules/mediastream/RTCStatsCallback.idl
@@ -23,9 +23,8 @@
  */
 
 [
-    Conditional=MEDIA_STREAM,
-    Callback
-] interface RTCStatsCallback {
+    Conditional=MEDIA_STREAM
+] callback interface RTCStatsCallback {
     boolean handleEvent(RTCStatsResponse response);
 };
 
diff --git a/modules/mediastream/RTCStatsResponse.idl b/modules/mediastream/RTCStatsResponse.idl
index 5d66b3e..bbec09b 100644
--- a/modules/mediastream/RTCStatsResponse.idl
+++ b/modules/mediastream/RTCStatsResponse.idl
@@ -23,9 +23,8 @@
  */
 
 [
-    Conditional=MEDIA_STREAM,
-    NamedGetter
+    Conditional=MEDIA_STREAM
 ] interface RTCStatsResponse {
     sequence<RTCStatsReport> result();
-    RTCStatsReport namedItem([Default=Undefined] optional DOMString name);
+    getter RTCStatsReport namedItem([Default=Undefined] optional DOMString name);
 };
diff --git a/modules/navigatorcontentutils/NavigatorContentUtils.idl b/modules/navigatorcontentutils/NavigatorContentUtils.idl
index fee30da..a9f4b31 100644
--- a/modules/navigatorcontentutils/NavigatorContentUtils.idl
+++ b/modules/navigatorcontentutils/NavigatorContentUtils.idl
@@ -19,9 +19,7 @@
 */
 
 // http://www.w3.org/TR/html5/system-state-and-capabilities.html#custom-handlers
-[
-    Supplemental=Navigator
-] interface NavigatorContentUtils {
+partial interface Navigator {
     [Conditional=NAVIGATOR_CONTENT_UTILS, RaisesException] void registerProtocolHandler(DOMString scheme, DOMString url, DOMString title);
     [Conditional=NAVIGATOR_CONTENT_UTILS&CUSTOM_SCHEME_HANDLER, RaisesException] DOMString isProtocolHandlerRegistered(DOMString scheme, DOMString url);
     [Conditional=NAVIGATOR_CONTENT_UTILS&CUSTOM_SCHEME_HANDLER, RaisesException] void unregisterProtocolHandler(DOMString scheme, DOMString url);
diff --git a/modules/notifications/DOMWindowNotifications.idl b/modules/notifications/DOMWindowNotifications.idl
index f126a03..ca5e3b9 100644
--- a/modules/notifications/DOMWindowNotifications.idl
+++ b/modules/notifications/DOMWindowNotifications.idl
@@ -26,8 +26,7 @@
 
 [
     Conditional=NOTIFICATIONS|LEGACY_NOTIFICATIONS,
-    Supplemental=DOMWindow
-] interface DOMWindowNotifications {
+] partial interface DOMWindow {
 #if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
     [EnabledAtRuntime, MeasureAs=LegacyNotifications, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds] readonly attribute NotificationCenter webkitNotifications;
 #endif
diff --git a/modules/notifications/Notification.idl b/modules/notifications/Notification.idl
index 42c8b68..22b76f5 100644
--- a/modules/notifications/Notification.idl
+++ b/modules/notifications/Notification.idl
@@ -50,7 +50,7 @@
 
 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
     [CallWith=ScriptExecutionContext] static readonly attribute DOMString permission;
-    [CallWith=ScriptExecutionContext] static void requestPermission([Callback] optional NotificationPermissionCallback callback);
+    [CallWith=ScriptExecutionContext] static void requestPermission(optional NotificationPermissionCallback callback);
 #endif
 
     attribute EventListener onshow;
diff --git a/modules/notifications/NotificationCenter.idl b/modules/notifications/NotificationCenter.idl
index 2846598..0263f91 100644
--- a/modules/notifications/NotificationCenter.idl
+++ b/modules/notifications/NotificationCenter.idl
@@ -39,6 +39,6 @@
    [MeasureAs=LegacyTextNotifications, ActivityLog=Access, RaisesException] Notification createNotification(DOMString iconUrl, DOMString title, DOMString body);
 
    int checkPermission();
-   void requestPermission([Callback] optional VoidCallback callback);
+   void requestPermission(optional VoidCallback callback);
 };
 
diff --git a/modules/notifications/NotificationPermissionCallback.idl b/modules/notifications/NotificationPermissionCallback.idl
index 66526de..9b0a72b 100644
--- a/modules/notifications/NotificationPermissionCallback.idl
+++ b/modules/notifications/NotificationPermissionCallback.idl
@@ -24,9 +24,8 @@
  */
 
 [
-    Conditional=NOTIFICATIONS,
-    Callback
-] interface NotificationPermissionCallback {
+    Conditional=NOTIFICATIONS
+] callback interface NotificationPermissionCallback {
     boolean handleEvent(DOMString permission);
 };
 
diff --git a/modules/notifications/WorkerContextNotifications.idl b/modules/notifications/WorkerContextNotifications.idl
index 518aba3..4e2aade 100644
--- a/modules/notifications/WorkerContextNotifications.idl
+++ b/modules/notifications/WorkerContextNotifications.idl
@@ -26,8 +26,7 @@
 
 [
     Conditional=NOTIFICATIONS|LEGACY_NOTIFICATIONS,
-    Supplemental=WorkerContext
-] interface WorkerContextNotifications {
+] partial interface WorkerContext {
 #if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
     [EnabledAtRuntime] readonly attribute NotificationCenter webkitNotifications;
 #endif
diff --git a/modules/quota/DOMWindowQuota.idl b/modules/quota/DOMWindowQuota.idl
index 225efef..c71f863 100644
--- a/modules/quota/DOMWindowQuota.idl
+++ b/modules/quota/DOMWindowQuota.idl
@@ -23,9 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Supplemental=DOMWindow
-] interface DOMWindowQuota {
-    [MeasureAs=StorageInfo] readonly attribute StorageInfo webkitStorageInfo;
+partial interface DOMWindow {
+    [DeprecateAs=StorageInfo] readonly attribute StorageInfo webkitStorageInfo;
 };
 
diff --git a/modules/quota/NavigatorStorageQuota.idl b/modules/quota/NavigatorStorageQuota.idl
index fd60b6e..43869b0 100644
--- a/modules/quota/NavigatorStorageQuota.idl
+++ b/modules/quota/NavigatorStorageQuota.idl
@@ -17,9 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-[
-    Supplemental=Navigator
-] interface NavigatorStorageQuota {
+partial interface Navigator {
     readonly attribute StorageQuota webkitTemporaryStorage;
     readonly attribute StorageQuota webkitPersistentStorage;
 };
diff --git a/modules/quota/StorageErrorCallback.idl b/modules/quota/StorageErrorCallback.idl
index 972216b..0d65450 100644
--- a/modules/quota/StorageErrorCallback.idl
+++ b/modules/quota/StorageErrorCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface StorageErrorCallback {
+callback interface StorageErrorCallback {
     boolean handleEvent(DOMCoreException error);
 };
diff --git a/modules/quota/StorageInfo.idl b/modules/quota/StorageInfo.idl
index ba72a2d..7a0bbcc 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, optional StorageUsageCallback usageCallback, optional StorageErrorCallback errorCallback);
+    [CallWith=ScriptExecutionContext] void requestQuota(unsigned short storageType, unsigned long long newQuotaInBytes, optional StorageQuotaCallback quotaCallback, optional StorageErrorCallback errorCallback);
 };
diff --git a/modules/quota/StorageQuota.idl b/modules/quota/StorageQuota.idl
index 1275a92..74ab50e 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(StorageUsageCallback usageCallback, optional StorageErrorCallback errorCallback);
+    [CallWith=ScriptExecutionContext] void requestQuota(unsigned long long newQuotaInBytes, optional StorageQuotaCallback quotaCallback, optional StorageErrorCallback errorCallback);
 };
diff --git a/modules/quota/StorageQuotaCallback.idl b/modules/quota/StorageQuotaCallback.idl
index f8dd254..8cd2df7 100644
--- a/modules/quota/StorageQuotaCallback.idl
+++ b/modules/quota/StorageQuotaCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface StorageQuotaCallback {
+callback interface StorageQuotaCallback {
     boolean handleEvent(unsigned long long grantedQuotaInBytes);
 };
diff --git a/modules/quota/StorageUsageCallback.idl b/modules/quota/StorageUsageCallback.idl
index c688bf6..b05213b 100644
--- a/modules/quota/StorageUsageCallback.idl
+++ b/modules/quota/StorageUsageCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface StorageUsageCallback {
+callback interface StorageUsageCallback {
     boolean handleEvent(unsigned long long currentUsageInBytes, unsigned long long currentQuotaInBytes);
 };
diff --git a/modules/quota/WorkerNavigatorStorageQuota.idl b/modules/quota/WorkerNavigatorStorageQuota.idl
index 9c17182..be61756 100644
--- a/modules/quota/WorkerNavigatorStorageQuota.idl
+++ b/modules/quota/WorkerNavigatorStorageQuota.idl
@@ -17,9 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-[
-    Supplemental=WorkerNavigator
-] interface WorkerNavigatorStorageQuota {
+partial interface WorkerNavigator {
     readonly attribute StorageQuota webkitTemporaryStorage;
     readonly attribute StorageQuota webkitPersistentStorage;
 };
diff --git a/modules/speech/DOMWindowSpeech.idl b/modules/speech/DOMWindowSpeech.idl
index 424daa3..c4d7e64 100644
--- a/modules/speech/DOMWindowSpeech.idl
+++ b/modules/speech/DOMWindowSpeech.idl
@@ -23,12 +23,10 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Supplemental=DOMWindow
-] interface DOMWindowSpeech {
-    [EnabledAtRuntime] attribute SpeechRecognitionConstructor webkitSpeechRecognition;
-    [EnabledAtRuntime] attribute SpeechRecognitionErrorConstructor webkitSpeechRecognitionError;
-    [EnabledAtRuntime] attribute SpeechRecognitionEventConstructor webkitSpeechRecognitionEvent;
-    [EnabledAtRuntime] attribute SpeechGrammarConstructor webkitSpeechGrammar;
-    [EnabledAtRuntime] attribute SpeechGrammarListConstructor webkitSpeechGrammarList;
+partial interface DOMWindow {
+    [EnabledAtRuntime=scriptedSpeech] attribute SpeechRecognitionConstructor webkitSpeechRecognition;
+    [EnabledAtRuntime=scriptedSpeech] attribute SpeechRecognitionErrorConstructor webkitSpeechRecognitionError;
+    [EnabledAtRuntime=scriptedSpeech] attribute SpeechRecognitionEventConstructor webkitSpeechRecognitionEvent;
+    [EnabledAtRuntime=scriptedSpeech] attribute SpeechGrammarConstructor webkitSpeechGrammar;
+    [EnabledAtRuntime=scriptedSpeech] attribute SpeechGrammarListConstructor webkitSpeechGrammarList;
 };
diff --git a/modules/speech/DOMWindowSpeechSynthesis.idl b/modules/speech/DOMWindowSpeechSynthesis.idl
index de8a699..5ce418e 100644
--- a/modules/speech/DOMWindowSpeechSynthesis.idl
+++ b/modules/speech/DOMWindowSpeechSynthesis.idl
@@ -24,10 +24,8 @@
  */
 
 [
-    Conditional=SPEECH_SYNTHESIS,
-    Supplemental=DOMWindow
-] interface DOMWindowSpeechSynthesis {
-
+    EnabledAtRuntime=speechSynthesis
+] partial interface DOMWindow {
     readonly attribute SpeechSynthesis speechSynthesis;
     attribute SpeechSynthesisEventConstructor SpeechSynthesisEvent;
     attribute SpeechSynthesisUtteranceConstructor SpeechSynthesisUtterance;
diff --git a/modules/speech/SpeechSynthesis.idl b/modules/speech/SpeechSynthesis.idl
index a125b95..6fb3fbc 100644
--- a/modules/speech/SpeechSynthesis.idl
+++ b/modules/speech/SpeechSynthesis.idl
@@ -24,7 +24,7 @@
  */
  
 [
-    Conditional=SPEECH_SYNTHESIS
+    EnabledAtRuntime=speechSynthesis
 ] interface SpeechSynthesis  {
     readonly attribute boolean pending;
     readonly attribute boolean speaking;
diff --git a/modules/speech/SpeechSynthesisEvent.idl b/modules/speech/SpeechSynthesisEvent.idl
index fbc7514..a0f896e 100644
--- a/modules/speech/SpeechSynthesisEvent.idl
+++ b/modules/speech/SpeechSynthesisEvent.idl
@@ -24,7 +24,7 @@
  */
  
 [
-    Conditional=SPEECH_SYNTHESIS
+    EnabledAtRuntime=speechSynthesis
 ] interface SpeechSynthesisEvent : Event {
     readonly attribute unsigned long charIndex;
     readonly attribute float elapsedTime;
diff --git a/modules/speech/SpeechSynthesisUtterance.idl b/modules/speech/SpeechSynthesisUtterance.idl
index f42ca61..4e602a9 100644
--- a/modules/speech/SpeechSynthesisUtterance.idl
+++ b/modules/speech/SpeechSynthesisUtterance.idl
@@ -24,7 +24,7 @@
  */
  
 [
-    Conditional=SPEECH_SYNTHESIS,
+    EnabledAtRuntime=speechSynthesis,
     EventTarget,
     CallWith=ScriptExecutionContext,
     Constructor([Default=NullString] optional DOMString text)
diff --git a/modules/speech/SpeechSynthesisVoice.idl b/modules/speech/SpeechSynthesisVoice.idl
index 7155d10..8886ac1 100644
--- a/modules/speech/SpeechSynthesisVoice.idl
+++ b/modules/speech/SpeechSynthesisVoice.idl
@@ -24,7 +24,7 @@
  */
  
 [
-    Conditional=SPEECH_SYNTHESIS
+    EnabledAtRuntime=speechSynthesis
 ] interface SpeechSynthesisVoice {
     readonly attribute DOMString voiceURI;
     readonly attribute DOMString name;
diff --git a/modules/vibration/NavigatorVibration.idl b/modules/vibration/NavigatorVibration.idl
index 1ba708a..09ef38e 100644
--- a/modules/vibration/NavigatorVibration.idl
+++ b/modules/vibration/NavigatorVibration.idl
@@ -19,8 +19,7 @@
 
 [
     Conditional=VIBRATION,
-    Supplemental=Navigator
-] interface NavigatorVibration {
+] partial interface Navigator {
     [RaisesException] void vibrate(sequence<unsigned long> pattern);
     [RaisesException] void vibrate(unsigned long time);
 };
diff --git a/modules/webaudio/AudioBufferCallback.idl b/modules/webaudio/AudioBufferCallback.idl
index 3b83c36..e91b119 100644
--- a/modules/webaudio/AudioBufferCallback.idl
+++ b/modules/webaudio/AudioBufferCallback.idl
@@ -23,8 +23,7 @@
  */
 
 [
-    Conditional=WEB_AUDIO,
-    Callback
-] interface AudioBufferCallback {
+    Conditional=WEB_AUDIO
+] callback interface AudioBufferCallback {
     boolean handleEvent(AudioBuffer audioBuffer);
 };
diff --git a/modules/webaudio/AudioBufferSourceNode.idl b/modules/webaudio/AudioBufferSourceNode.idl
index 36d15dc..5a817de 100644
--- a/modules/webaudio/AudioBufferSourceNode.idl
+++ b/modules/webaudio/AudioBufferSourceNode.idl
@@ -48,11 +48,9 @@
     [MeasureAs=WebAudioStart, ImplementedAs=startGrain] void start(double when, double grainOffset, double grainDuration);
     void stop(double when);
 
-#if defined(ENABLE_LEGACY_WEB_AUDIO) && ENABLE_LEGACY_WEB_AUDIO
-    attribute boolean looping; // This is an alias for the .loop attribute for backwards compatibility.
+    [DeprecateAs=WebAudioLooping, ImplementedAs=loop] attribute boolean looping; // This is an alias for the .loop attribute for backwards compatibility.
 
     [MeasureAs=LegacyWebAudio] void noteOn(double when);
     [MeasureAs=LegacyWebAudio] void noteGrainOn(double when, double grainOffset, double grainDuration);
     void noteOff(double when);
-#endif
 };
diff --git a/modules/webaudio/AudioContext.idl b/modules/webaudio/AudioContext.idl
index d616d18..6326afa 100644
--- a/modules/webaudio/AudioContext.idl
+++ b/modules/webaudio/AudioContext.idl
@@ -48,14 +48,12 @@
     [RaisesException] AudioBuffer createBuffer(ArrayBuffer? buffer, boolean mixToMono);
 
     // Asynchronous audio file data decoding.
-    [RaisesException] void decodeAudioData(ArrayBuffer audioData, [Callback] AudioBufferCallback successCallback, [Callback] optional AudioBufferCallback errorCallback);
+    [RaisesException] void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback successCallback, optional AudioBufferCallback errorCallback);
 
     // Sources
     AudioBufferSourceNode createBufferSource();
 
-#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
     [RaisesException] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
-#endif
 
 #if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM
     [RaisesException] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
@@ -84,11 +82,9 @@
     attribute EventListener oncomplete;
     void startRendering();
 
-#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=createScriptProcessor, RaisesException] ScriptProcessorNode createJavaScriptNode(unsigned long bufferSize, optional unsigned long numberOfInputChannels, optional unsigned long numberOfOutputChannels);
-#endif
 
 };
diff --git a/modules/webaudio/AudioParam.idl b/modules/webaudio/AudioParam.idl
index 196cbf4..8f5773f 100644
--- a/modules/webaudio/AudioParam.idl
+++ b/modules/webaudio/AudioParam.idl
@@ -54,8 +54,6 @@
     // Cancels all scheduled parameter changes with times greater than or equal to startTime.
     void cancelScheduledValues(float startTime);
 
-#if defined(ENABLE_LEGACY_WEB_AUDIO) && ENABLE_LEGACY_WEB_AUDIO
     [MeasureAs=LegacyWebAudio, ImplementedAs=setTargetAtTime] void setTargetValueAtTime(float targetValue, float time, float timeConstant);
-#endif
 
 };
diff --git a/modules/webaudio/DOMWindowWebAudio.idl b/modules/webaudio/DOMWindowWebAudio.idl
index 2857b98..abdbaa2 100644
--- a/modules/webaudio/DOMWindowWebAudio.idl
+++ b/modules/webaudio/DOMWindowWebAudio.idl
@@ -26,10 +26,9 @@
 
 [
     Conditional=WEB_AUDIO,
-    Supplemental=DOMWindow
-] interface DOMWindowWebAudio {
-    [EnabledAtRuntime] attribute AudioContextConstructor webkitAudioContext;
-    [EnabledAtRuntime] attribute OfflineAudioContextConstructor webkitOfflineAudioContext;
+] partial interface DOMWindow {
+    [EnabledAtRuntime=audioContext] attribute AudioContextConstructor webkitAudioContext;
+    [EnabledAtRuntime=audioContext] attribute OfflineAudioContextConstructor webkitOfflineAudioContext;
     attribute PannerNodeConstructor webkitAudioPannerNode;
     attribute AudioProcessingEventConstructor AudioProcessingEvent;
     attribute OfflineAudioCompletionEventConstructor OfflineAudioCompletionEvent;
diff --git a/modules/webaudio/MediaElementAudioSourceNode.idl b/modules/webaudio/MediaElementAudioSourceNode.idl
index f9ef1a3..196eddd 100644
--- a/modules/webaudio/MediaElementAudioSourceNode.idl
+++ b/modules/webaudio/MediaElementAudioSourceNode.idl
@@ -23,7 +23,7 @@
  */
 
 [
-    Conditional=WEB_AUDIO&VIDEO
+    Conditional=WEB_AUDIO
 ] interface MediaElementAudioSourceNode : AudioSourceNode {
     readonly attribute HTMLMediaElement mediaElement;
 };
diff --git a/modules/webaudio/OscillatorNode.idl b/modules/webaudio/OscillatorNode.idl
index 7a93ea9..158d0c3 100644
--- a/modules/webaudio/OscillatorNode.idl
+++ b/modules/webaudio/OscillatorNode.idl
@@ -50,10 +50,8 @@
     void start(double when);
     void stop(double when);
 
-#if defined(ENABLE_LEGACY_WEB_AUDIO) && ENABLE_LEGACY_WEB_AUDIO
     void noteOn(double when);
     void noteOff(double when);
-#endif
 
     void setWaveTable(WaveTable waveTable);
 
diff --git a/modules/webdatabase/DOMWindowWebDatabase.idl b/modules/webdatabase/DOMWindowWebDatabase.idl
index 62be805..02c011c 100644
--- a/modules/webdatabase/DOMWindowWebDatabase.idl
+++ b/modules/webdatabase/DOMWindowWebDatabase.idl
@@ -24,10 +24,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Supplemental=DOMWindow
-] interface DOMWindowWebDatabase {
-    [EnabledAtRuntime, MeasureAs=OpenWebDatabase, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, [Callback] optional DatabaseCallback creationCallback);
+partial interface DOMWindow {
+    [EnabledAtRuntime=database, MeasureAs=OpenWebDatabase, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback creationCallback);
     attribute SQLExceptionConstructor SQLException;
 };
 
diff --git a/modules/webdatabase/Database.idl b/modules/webdatabase/Database.idl
index 4148569..1b516c0 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, optional SQLTransactionCallback callback, optional SQLTransactionErrorCallback errorCallback, optional VoidCallback successCallback);
+    void transaction(SQLTransactionCallback callback, optional SQLTransactionErrorCallback errorCallback, optional VoidCallback successCallback);
+    void readTransaction(SQLTransactionCallback callback, optional SQLTransactionErrorCallback errorCallback, optional VoidCallback successCallback);
 };
 
diff --git a/modules/webdatabase/DatabaseCallback.idl b/modules/webdatabase/DatabaseCallback.idl
index 35518e8..807bd3f 100644
--- a/modules/webdatabase/DatabaseCallback.idl
+++ b/modules/webdatabase/DatabaseCallback.idl
@@ -26,9 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface DatabaseCallback {
+callback interface DatabaseCallback {
     boolean handleEvent(Database database);
     boolean handleEvent(DatabaseSync database);
 };
diff --git a/modules/webdatabase/DatabaseSync.idl b/modules/webdatabase/DatabaseSync.idl
index bd6b890..5581e48 100644
--- a/modules/webdatabase/DatabaseSync.idl
+++ b/modules/webdatabase/DatabaseSync.idl
@@ -32,8 +32,8 @@
 ] interface DatabaseSync {
     readonly attribute DOMString version;
     readonly attribute DOMString lastErrorMessage;
-    [RaisesException] void changeVersion(DOMString oldVersion, DOMString newVersion, [Callback] optional SQLTransactionSyncCallback callback);
-    [RaisesException] void transaction([Callback] SQLTransactionSyncCallback callback);
-    [RaisesException] void readTransaction([Callback] SQLTransactionSyncCallback callback);
+    [RaisesException] void changeVersion(DOMString oldVersion, DOMString newVersion, optional SQLTransactionSyncCallback callback);
+    [RaisesException] void transaction(SQLTransactionSyncCallback callback);
+    [RaisesException] void readTransaction(SQLTransactionSyncCallback callback);
 };
 
diff --git a/modules/webdatabase/SQLStatementCallback.idl b/modules/webdatabase/SQLStatementCallback.idl
index c984b5b..48078af 100644
--- a/modules/webdatabase/SQLStatementCallback.idl
+++ b/modules/webdatabase/SQLStatementCallback.idl
@@ -26,8 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface SQLStatementCallback {
+callback interface SQLStatementCallback {
     boolean handleEvent(SQLTransaction transaction, SQLResultSet resultSet);
 };
diff --git a/modules/webdatabase/SQLStatementErrorCallback.idl b/modules/webdatabase/SQLStatementErrorCallback.idl
index 9867b47..117431d 100644
--- a/modules/webdatabase/SQLStatementErrorCallback.idl
+++ b/modules/webdatabase/SQLStatementErrorCallback.idl
@@ -26,8 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface SQLStatementErrorCallback {
+callback interface SQLStatementErrorCallback {
     [Custom] boolean handleEvent(SQLTransaction transaction, SQLError error);
 };
diff --git a/modules/webdatabase/SQLTransaction.idl b/modules/webdatabase/SQLTransaction.idl
index 3bb3984..472e1b9 100644
--- a/modules/webdatabase/SQLTransaction.idl
+++ b/modules/webdatabase/SQLTransaction.idl
@@ -31,6 +31,7 @@
 ] interface SQLTransaction {
     [Custom] void executeSql(DOMString sqlStatement,
                              ObjectArray arguments,
-                             [Callback] optional SQLStatementCallback callback,
-                             [Callback] optional SQLStatementErrorCallback errorCallback);
+                             optional SQLStatementCallback callback,
+                             optional SQLStatementErrorCallback errorCallback);
+
 };
diff --git a/modules/webdatabase/SQLTransactionCallback.idl b/modules/webdatabase/SQLTransactionCallback.idl
index cd224aa..41cac85 100644
--- a/modules/webdatabase/SQLTransactionCallback.idl
+++ b/modules/webdatabase/SQLTransactionCallback.idl
@@ -26,8 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface SQLTransactionCallback {
+callback interface SQLTransactionCallback {
     boolean handleEvent(SQLTransaction transaction);
 };
diff --git a/modules/webdatabase/SQLTransactionErrorCallback.idl b/modules/webdatabase/SQLTransactionErrorCallback.idl
index 59df1a8..efe64a0 100644
--- a/modules/webdatabase/SQLTransactionErrorCallback.idl
+++ b/modules/webdatabase/SQLTransactionErrorCallback.idl
@@ -26,8 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface SQLTransactionErrorCallback {
+callback interface SQLTransactionErrorCallback {
     boolean handleEvent(SQLError error);
 };
diff --git a/modules/webdatabase/SQLTransactionSyncCallback.idl b/modules/webdatabase/SQLTransactionSyncCallback.idl
index cfc8c58..08bd0b3 100644
--- a/modules/webdatabase/SQLTransactionSyncCallback.idl
+++ b/modules/webdatabase/SQLTransactionSyncCallback.idl
@@ -28,8 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Callback
-] interface SQLTransactionSyncCallback {
+callback interface SQLTransactionSyncCallback {
     boolean handleEvent(SQLTransactionSync transaction);
 };
diff --git a/modules/webdatabase/WorkerContextWebDatabase.idl b/modules/webdatabase/WorkerContextWebDatabase.idl
index cc74f23..bcefffa 100644
--- a/modules/webdatabase/WorkerContextWebDatabase.idl
+++ b/modules/webdatabase/WorkerContextWebDatabase.idl
@@ -20,15 +20,13 @@
  * 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. 
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-[
-    Supplemental=WorkerContext
-] interface WorkerContextWebDatabase {
-    [EnabledAtRuntime, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, [Callback] optional DatabaseCallback creationCallback);
+partial interface WorkerContext {
+    [EnabledAtRuntime=database, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback creationCallback);
 
-    [EnabledAtRuntime, RaisesException] DatabaseSync openDatabaseSync(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, [Callback] optional DatabaseCallback creationCallback);
+    [EnabledAtRuntime=database, RaisesException] DatabaseSync openDatabaseSync(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback creationCallback);
 };
 
diff --git a/core/page/PerformanceEntryList.idl b/modules/webmidi/DOMWindowWebMIDI.idl
similarity index 81%
rename from core/page/PerformanceEntryList.idl
rename to modules/webmidi/DOMWindowWebMIDI.idl
index 342e463..1d07d1e 100644
--- a/core/page/PerformanceEntryList.idl
+++ b/modules/webmidi/DOMWindowWebMIDI.idl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * 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
@@ -28,12 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
-[
-    IndexedGetter,
-    ImplementationLacksVTable
-] interface PerformanceEntryList {
-    readonly attribute unsigned long length;
-    PerformanceEntry item(unsigned long index);
+partial interface DOMWindow {
+    [EnabledAtRuntime=webMIDI] attribute MIDIConnectionEventConstructor MIDIConnectionEvent;
+    [EnabledAtRuntime=webMIDI] attribute MIDIMessageEventConstructor MIDIMessageEvent;
 };
-
diff --git a/core/page/PerformanceEntryList.idl b/modules/webmidi/MIDIConnectionEvent.idl
similarity index 81%
copy from core/page/PerformanceEntryList.idl
copy to modules/webmidi/MIDIConnectionEvent.idl
index 342e463..3946564 100644
--- a/core/page/PerformanceEntryList.idl
+++ b/modules/webmidi/MIDIConnectionEvent.idl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * 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
@@ -28,12 +28,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
 [
-    IndexedGetter,
-    ImplementationLacksVTable
-] interface PerformanceEntryList {
-    readonly attribute unsigned long length;
-    PerformanceEntry item(unsigned long index);
+    ConstructorTemplate=Event
+] interface MIDIConnectionEvent : Event {
+    [InitializedByEventConstructor] readonly attribute MIDIPort port;
 };
-
diff --git a/core/page/PerformanceEntryList.idl b/modules/webmidi/MIDIErrorCallback.idl
similarity index 81%
copy from core/page/PerformanceEntryList.idl
copy to modules/webmidi/MIDIErrorCallback.idl
index 342e463..0591bf6 100644
--- a/core/page/PerformanceEntryList.idl
+++ b/modules/webmidi/MIDIErrorCallback.idl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * 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
@@ -28,12 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
-[
-    IndexedGetter,
-    ImplementationLacksVTable
-] interface PerformanceEntryList {
-    readonly attribute unsigned long length;
-    PerformanceEntry item(unsigned long index);
+callback interface MIDIErrorCallback {
+    boolean handleEvent(DOMError error);
 };
-
diff --git a/core/page/PerformanceEntryList.idl b/modules/webmidi/MIDIMessageEvent.idl
similarity index 78%
copy from core/page/PerformanceEntryList.idl
copy to modules/webmidi/MIDIMessageEvent.idl
index 342e463..9373011 100644
--- a/core/page/PerformanceEntryList.idl
+++ b/modules/webmidi/MIDIMessageEvent.idl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * 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
@@ -28,12 +28,11 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
+// FIXME: The spec doesn't provide details about constructor, yet.
+// See also, https://github.com/WebAudio/web-midi-api/issues/1 .
 [
-    IndexedGetter,
-    ImplementationLacksVTable
-] interface PerformanceEntryList {
-    readonly attribute unsigned long length;
-    PerformanceEntry item(unsigned long index);
+    ConstructorTemplate=Event
+] interface MIDIMessageEvent : Event {
+    [InitializedByEventConstructor] readonly attribute double receivedTime;
+    [InitializedByEventConstructor] readonly attribute Uint8Array data;
 };
-
diff --git a/core/page/PerformanceEntryList.idl b/modules/webmidi/MIDIPort.idl
similarity index 64%
copy from core/page/PerformanceEntryList.idl
copy to modules/webmidi/MIDIPort.idl
index 342e463..226387c 100644
--- a/core/page/PerformanceEntryList.idl
+++ b/modules/webmidi/MIDIPort.idl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * 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
@@ -28,12 +28,29 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
-[
-    IndexedGetter,
-    ImplementationLacksVTable
-] interface PerformanceEntryList {
-    readonly attribute unsigned long length;
-    PerformanceEntry item(unsigned long index);
+enum MIDIPortType {
+    "input",
+    "output"
 };
 
+[
+    ActiveDOMObject,
+    EventTarget
+] interface MIDIPort {
+    readonly attribute DOMString id;
+    readonly attribute DOMString manufacturer;
+    readonly attribute DOMString name;
+    readonly attribute MIDIPortType type;
+    readonly attribute DOMString version;
+
+    attribute EventListener ondisconnect;
+
+    // EventTarget interface
+    void addEventListener(DOMString type,
+                          EventListener listener,
+                          optional boolean useCapture);
+    void removeEventListener(DOMString type,
+                             EventListener listener,
+                             optional boolean useCapture);
+    [RaisesException] boolean dispatchEvent(Event event);
+};
diff --git a/modules/websockets/DOMWindowWebSocket.idl b/modules/websockets/DOMWindowWebSocket.idl
index 7e183c4..c8d2d64 100644
--- a/modules/websockets/DOMWindowWebSocket.idl
+++ b/modules/websockets/DOMWindowWebSocket.idl
@@ -24,9 +24,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[
-    Supplemental=DOMWindow
-] interface DOMWindowWebSocket {
+partial interface DOMWindow {
     attribute CloseEventConstructor CloseEvent;
     attribute WebSocketConstructor WebSocket; // Usable with the new operator
 };
diff --git a/modules/websockets/WorkerContextWebSocket.idl b/modules/websockets/WorkerContextWebSocket.idl
index b03867b..7a2a19a 100644
--- a/modules/websockets/WorkerContextWebSocket.idl
+++ b/modules/websockets/WorkerContextWebSocket.idl
@@ -24,9 +24,7 @@
  *
  */
 
-[
-    Supplemental=WorkerContext
-] interface WorkerContextWebSocket {
+partial interface WorkerContext {
     attribute WebSocketConstructor WebSocket; // Usable with the new operator
 };