<commit_before>#!/usr/bin/python
# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

html_interface_renames = {
    'DOMCoreException': 'DOMException',
    'DOMFormData': 'FormData',
    'DOMWindow': 'LocalWindow',
    'History': 'LocalHistory',
    'Location': 'LocalLocation',
    'WebKitAnimation': 'Animation',
    'WebKitAnimationEvent': 'AnimationEvent',
    'WebKitBlobBuilder': 'BlobBuilder',
    'WebKitCSSKeyframeRule': 'CSSKeyframeRule',
    'WebKitCSSKeyframesRule': 'CSSKeyframesRule',
    'WebKitCSSMatrix': 'CSSMatrix',
    'WebKitCSSTransformValue': 'CSSTransformValue',
    'WebKitFlags': 'Flags',
    'WebKitLoseContext': 'LoseContext',
    'WebKitPoint': 'Point',
    'WebKitTransitionEvent': 'TransitionEvent',
    'XMLHttpRequest': 'HttpRequest',
    'XMLHttpRequestException': 'HttpRequestException',
    'XMLHttpRequestProgressEvent': 'HttpRequestProgressEvent',
    'XMLHttpRequestUpload': 'HttpRequestUpload',
}

# Members from the standard dom that should not be exposed publicly in dart:html
# but need to be exposed internally to implement dart:html on top of a standard
# browser.
_private_html_members = set([
  'CustomEvent.initCustomEvent',
  'Document.createElement',
  'Document.createElementNS',
  'Document.createEvent',
  'Document.createTextNode',
  'Document.createTouchList',
  'DocumentFragment.querySelector',
  'DocumentFragment.querySelectorAll',
  'Document.getElementById',
  'Document.getElementsByClassName',
  'Document.getElementsByName',
  'Document.getElementsByTagName',
  'Document.querySelector',
  'Document.querySelectorAll',
  'Element.childElementCount',
  'Element.children',
  'Element.className',
  'Element.firstElementChild',
  'Element.getAttribute',
  'Element.getElementsByClassName',
  'Element.getElementsByTagName',
  'Element.hasAttribute',
  'Element.lastElementChild',
  'Element.querySelector',
  'Element.querySelectorAll',
  'Element.removeAttribute',
  'Element.setAttribute',
  'Event.initEvent',
  'EventTarget.addEventListener',
  'EventTarget.dispatchEvent',
  'EventTarget.removeEventListener',
  'LocalWindow.getComputedStyle',
  'MouseEvent.initMouseEvent',
  'Node.appendChild',
  'Node.attributes',
  'Node.childNodes',
  'Node.firstChild',
  'Node.lastChild',
  "Node.nodeType",
  'Node.removeChild',
  'Node.replaceChild',
  'ShadowRoot.getElementById',
  'ShadowRoot.getElementsByClassName',
  'ShadowRoot.getElementsByTagName',
  'Storage.clear',
  'Storage.getItem',
  'Storage.key',
  'Storage.length',
  'Storage.removeItem',
  'Storage.setItem',
  'WheelEvent.wheelDeltaX',
  'WheelEvent.wheelDeltaY',
])

# Members from the standard dom that exist in the dart:html library with
# identical functionality but with cleaner names.
_renamed_html_members = {
    'Document.defaultView': 'window',
    'Element.webkitMatchesSelector' : 'matchesSelector',
    'Element.scrollIntoViewIfNeeded': 'scrollIntoView',
    'Node.cloneNode': 'clone',
    'Node.nextSibling': 'nextNode',
    'Node.ownerDocument': 'document',
    'Node.parentNode': 'parent',
    'Node.previousSibling': 'previousNode',
    'Node.textContent': 'text',
    'SVGElement.className': '$dom_svgClassName',
    'SVGAnimatedString.className': '$dom_svgClassName',
    'SVGStylable.className': '$dom_svgClassName',
    'LocalWindow.webkitCancelAnimationFrame': 'cancelAnimationFrame',
    'LocalWindow.webkitCancelRequestAnimationFrame': 'cancelRequestAnimationFrame',
    'LocalWindow.webkitRequestAnimationFrame': 'requestAnimationFrame',
}

# Members and classes from the dom that should be removed completely from
# dart:html.  These could be expressed in the IDL instead but expressing this
# as a simple table instead is more concise.
# Syntax is: ClassName.(get\.|set\.)?MemberName
# Using get: and set: is optional and should only be used when a getter needs
# to be suppressed but not the setter, etc.
# TODO(jacobr): cleanup and augment this list.
_removed_html_members = set([
    'NodeList.item',
    "Attr.*",
#    "BarProp.*",
#    "BarInfo.*",
#    "Blob.webkitSlice",
#    "CDATASection.*",
#    "Comment.*",
#    "DOMImplementation.*",
    "CanvasRenderingContext2D.setFillColor",
    "CanvasRenderingContext2D.setStrokeColor",
    "Document.get:forms",
#    "Document.get:selectedStylesheetSet",
#    "Document.set:selectedStylesheetSet",
#    "Document.get:preferredStylesheetSet",
    "Document.get:links",
    "Document.set:domain",
    "Document.createAttributeNS",
    "Document.get:inputEncoding",<commit_msg>Remove now unnecessary renames.<commit_after>#!/usr/bin/python
# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

html_interface_renames = {
    'DOMCoreException': 'DOMException',
    'DOMFormData': 'FormData',
    'DOMWindow': 'LocalWindow',
    'History': 'LocalHistory',
    'Location': 'LocalLocation',
    'WebKitAnimation': 'Animation',
    'WebKitAnimationEvent': 'AnimationEvent',
    'WebKitBlobBuilder': 'BlobBuilder',
    'WebKitCSSKeyframeRule': 'CSSKeyframeRule',
    'WebKitCSSKeyframesRule': 'CSSKeyframesRule',
    'WebKitCSSMatrix': 'CSSMatrix',
    'WebKitCSSTransformValue': 'CSSTransformValue',
    'WebKitFlags': 'Flags',
    'WebKitLoseContext': 'LoseContext',
    'WebKitPoint': 'Point',
    'WebKitTransitionEvent': 'TransitionEvent',
    'XMLHttpRequest': 'HttpRequest',
    'XMLHttpRequestException': 'HttpRequestException',
    'XMLHttpRequestProgressEvent': 'HttpRequestProgressEvent',
    'XMLHttpRequestUpload': 'HttpRequestUpload',
}

# Members from the standard dom that should not be exposed publicly in dart:html
# but need to be exposed internally to implement dart:html on top of a standard
# browser.
_private_html_members = set([
  'CustomEvent.initCustomEvent',
  'Document.createElement',
  'Document.createElementNS',
  'Document.createEvent',
  'Document.createTextNode',
  'Document.createTouchList',
  'DocumentFragment.querySelector',
  'DocumentFragment.querySelectorAll',
  'Document.getElementById',
  'Document.getElementsByClassName',
  'Document.getElementsByName',
  'Document.getElementsByTagName',
  'Document.querySelector',
  'Document.querySelectorAll',
  'Element.childElementCount',
  'Element.children',
  'Element.className',
  'Element.firstElementChild',
  'Element.getAttribute',
  'Element.getElementsByClassName',
  'Element.getElementsByTagName',
  'Element.hasAttribute',
  'Element.lastElementChild',
  'Element.querySelector',
  'Element.querySelectorAll',
  'Element.removeAttribute',
  'Element.setAttribute',
  'Event.initEvent',
  'EventTarget.addEventListener',
  'EventTarget.dispatchEvent',
  'EventTarget.removeEventListener',
  'LocalWindow.getComputedStyle',
  'MouseEvent.initMouseEvent',
  'Node.appendChild',
  'Node.attributes',
  'Node.childNodes',
  'Node.firstChild',
  'Node.lastChild',
  "Node.nodeType",
  'Node.removeChild',
  'Node.replaceChild',
  'ShadowRoot.getElementById',
  'ShadowRoot.getElementsByClassName',
  'ShadowRoot.getElementsByTagName',
  'Storage.clear',
  'Storage.getItem',
  'Storage.key',
  'Storage.length',
  'Storage.removeItem',
  'Storage.setItem',
  'WheelEvent.wheelDeltaX',
  'WheelEvent.wheelDeltaY',
])

# Members from the standard dom that exist in the dart:html library with
# identical functionality but with cleaner names.
_renamed_html_members = {
    'Document.defaultView': 'window',
    'Element.webkitMatchesSelector' : 'matchesSelector',
    'Element.scrollIntoViewIfNeeded': 'scrollIntoView',
    'Node.cloneNode': 'clone',
    'Node.nextSibling': 'nextNode',
    'Node.ownerDocument': 'document',
    'Node.parentNode': 'parent',
    'Node.previousSibling': 'previousNode',
    'Node.textContent': 'text',
    'SVGElement.className': '$dom_svgClassName',
    'SVGAnimatedString.className': '$dom_svgClassName',
    'SVGStylable.className': '$dom_svgClassName',
}

# Members and classes from the dom that should be removed completely from
# dart:html.  These could be expressed in the IDL instead but expressing this
# as a simple table instead is more concise.
# Syntax is: ClassName.(get\.|set\.)?MemberName
# Using get: and set: is optional and should only be used when a getter needs
# to be suppressed but not the setter, etc.
# TODO(jacobr): cleanup and augment this list.
_removed_html_members = set([
    'NodeList.item',
    "Attr.*",
#    "BarProp.*",
#    "BarInfo.*",
#    "Blob.webkitSlice",
#    "CDATASection.*",
#    "Comment.*",
#    "DOMImplementation.*",
    "CanvasRenderingContext2D.setFillColor",
    "CanvasRenderingContext2D.setStrokeColor",
    "Document.get:forms",
#    "Document.get:selectedStylesheetSet",
#    "Document.set:selectedStylesheetSet",
#    "Document.get:preferredStylesheetSet",
    "Document.get:links",
    "Document.set:domain",
    "Document.createAttributeNS",
    "Document.get:inputEncoding",
{'fraction_non_alphanumeric': 0.13003300330033005, 'fraction_numerical': 0.0013201320132013201, 'mean_word_length': 5.184353741496599, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6178008', 'n_tokens_mistral': 2726, 'n_tokens_neox': 2720, 'n_words': 582}