Chromium Code Reviews| Index: tools/dom/scripts/htmlrenamer.py |
| diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py |
| index fbd42f1c7cf0cc6693807299df63723b8986c15b..020ca219b6534ea9563092814c544451468c1db4 100644 |
| --- a/tools/dom/scripts/htmlrenamer.py |
| +++ b/tools/dom/scripts/htmlrenamer.py |
| @@ -102,25 +102,21 @@ _private_html_members = set([ |
| 'ElementTraversal.firstElementChild', |
| 'ElementTraversal.lastElementChild', |
| 'Event.initEvent', |
| - 'UIEvent.initUIEvent', |
| 'EventTarget.addEventListener', |
| 'EventTarget.dispatchEvent', |
| 'EventTarget.removeEventListener', |
| - 'KeyboardEvent.keyIdentifier', |
| 'KeyboardEvent.initKeyboardEvent', |
| - 'Window.getComputedStyle', |
| + 'KeyboardEvent.keyIdentifier', |
| 'MouseEvent.initMouseEvent', |
| 'Node.appendChild', |
| 'Node.attributes', |
| 'Node.childNodes', |
| 'Node.firstChild', |
| 'Node.lastChild', |
| - "Node.localName", |
| + 'Node.localName', |
| 'Node.namespaceURI', |
| 'Node.removeChild', |
| 'Node.replaceChild', |
| - 'UIEvent.keyCode', |
| - 'UIEvent.charCode', |
| 'ShadowRoot.getElementById', |
| 'ShadowRoot.getElementsByClassName', |
| 'ShadowRoot.getElementsByTagName', |
| @@ -130,27 +126,31 @@ _private_html_members = set([ |
| 'Storage.length', |
| 'Storage.removeItem', |
| 'Storage.setItem', |
| + 'UIEvent.charCode', |
| + 'UIEvent.initUIEvent', |
| + 'UIEvent.keyCode', |
| 'WheelEvent.wheelDeltaX', |
| 'WheelEvent.wheelDeltaY', |
| + 'Window.getComputedStyle', |
| ]) |
| # Members from the standard dom that exist in the dart:html library with |
| # identical functionality but with cleaner names. |
| _renamed_html_members = { |
| + 'AnimatedString.className': '$dom_svgClassName', |
| 'Document.createCDATASection': 'createCDataSection', |
| 'Document.defaultView': 'window', |
| + 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', |
| 'Element.webkitCreateShadowRoot': 'createShadowRoot', |
| 'Element.webkitMatchesSelector' : 'matchesSelector', |
| - 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', |
| 'Node.cloneNode': 'clone', |
| 'Node.nextSibling': 'nextNode', |
| 'Node.ownerDocument': 'document', |
| 'Node.parentElement': 'parent', |
| 'Node.previousSibling': 'previousNode', |
| 'Node.textContent': 'text', |
| - 'SvgElement.className': '$dom_svgClassName', |
| - 'AnimatedString.className': '$dom_svgClassName', |
| 'Stylable.className': '$dom_svgClassName', |
| + 'SvgElement.className': '$dom_svgClassName', |
| 'Url.createObjectURL': 'createObjectUrl', |
| 'Url.revokeObjectURL': 'revokeObjectUrl', |
| } |
| @@ -163,182 +163,171 @@ _renamed_html_members = { |
| # to be suppressed but not the setter, etc. |
| # TODO(jacobr): cleanup and augment this list. |
| _removed_html_members = set([ |
| - 'NodeList.item', |
| - "Attr.*", |
| -# "BarProp.*", |
|
Emily Fortuna
2013/01/03 21:04:08
was there a reason these were commented out but no
Andrei Mouravski
2013/01/03 21:04:57
No idea, but they're in the repo, so we can always
|
| -# "BarInfo.*", |
| -# "Blob.webkitSlice", |
| -# "CDATASection.*", |
| -# "Comment.*", |
| -# "DOMImplementation.*", |
| - "CanvasRenderingContext2D.clearShadow", |
| - "CanvasRenderingContext2D.drawImageFromRect", |
| - "CanvasRenderingContext2D.setAlpha", |
| - "CanvasRenderingContext2D.setCompositeOperation", |
| - "CanvasRenderingContext2D.setFillColor", |
| - "CanvasRenderingContext2D.setLineCap", |
| - "CanvasRenderingContext2D.setLineJoin", |
| - "CanvasRenderingContext2D.setLineWidth", |
| - "CanvasRenderingContext2D.setMiterLimit", |
| - "CanvasRenderingContext2D.setShadow", |
| - "CanvasRenderingContext2D.setStrokeColor", |
| - "DivElement.align", |
| + 'AnchorElement.text', |
| + 'Attr.*', |
| + 'BodyElement.text', |
| + 'CanvasRenderingContext2D.clearShadow', |
| + 'CanvasRenderingContext2D.drawImageFromRect', |
| + 'CanvasRenderingContext2D.setAlpha', |
| + 'CanvasRenderingContext2D.setCompositeOperation', |
| + 'CanvasRenderingContext2D.setFillColor', |
| + 'CanvasRenderingContext2D.setLineCap', |
| + 'CanvasRenderingContext2D.setLineJoin', |
| + 'CanvasRenderingContext2D.setLineWidth', |
| + 'CanvasRenderingContext2D.setMiterLimit', |
| + 'CanvasRenderingContext2D.setShadow', |
| + 'CanvasRenderingContext2D.setStrokeColor', |
| + 'Cursor.NEXT', |
| + 'Cursor.NEXT_NO_DUPLICATE', |
| + 'Cursor.PREV', |
| + 'Cursor.PREV_NO_DUPLICATE', |
| + 'DivElement.align', |
| + 'Document.adoptNode', |
| + 'Document.alinkColor', |
| + 'Document.all', |
| 'Document.applets', |
| - "Document.get:forms", |
| -# "Document.get:selectedStylesheetSet", |
| -# "Document.set:selectedStylesheetSet", |
| -# "Document.get:preferredStylesheetSet", |
| - "Document.get:links", |
| - "Document.set:domain", |
| - "Document.createAttributeNS", |
| - "Document.get:inputEncoding", |
| - "Document.get:height", |
| - "Document.get:width", |
| - "Element.getElementsByTagNameNS", |
| - "Document.get:compatMode", |
| + 'Document.bgColor', |
| + 'Document.captureEvents', |
| + 'Document.clear', |
| + 'Document.createAttribute', |
| + 'Document.createAttributeNS', |
| + 'Document.createComment', |
| + 'Document.createEntityReference', |
| + 'Document.createExpression', |
| + 'Document.createNSResolver', |
| + 'Document.createNodeIterator', |
| + 'Document.createProcessingInstruction', |
| + 'Document.createTreeWalker', |
| + 'Document.designMode', |
| + 'Document.dir', |
| + 'Document.evaluate', |
| + 'Document.fgColor', |
| + 'Document.get:URL', |
| + 'Document.get:anchors', |
| + 'Document.get:applets', |
| + 'Document.get:characterSet', |
| + 'Document.get:compatMode', |
| + 'Document.get:compatMode', |
| + 'Document.get:defaultCharset', |
| + 'Document.get:doctype', |
| + 'Document.get:documentURI', |
| + 'Document.get:embeds', |
| + 'Document.get:forms', |
| + 'Document.get:height', |
| + 'Document.get:images', |
| + 'Document.get:inputEncoding', |
| + 'Document.get:links', |
| + 'Document.get:plugins', |
| + 'Document.get:scripts', |
| + 'Document.get:width', |
| + 'Document.get:xmlEncoding', |
| + 'Document.getElementsByTagNameNS', |
| + 'Document.getOverrideStyle', |
| + 'Document.getSelection', |
| 'Document.images', |
| - "Document.importNode", |
| - "Document.evaluate", |
| - "Document.get:images", |
| - "Document.createExpression", |
| - "Document.getOverrideStyle", |
| - "Document.xmlStandalone", |
| - "Document.createComment", |
| - "Document.adoptNode", |
| - "Document.get:characterSet", |
| - "Document.createAttribute", |
| - "Document.get:URL", |
| - "Document.createEntityReference", |
| - "Document.get:documentURI", |
| - "Document.set:documentURI", |
| - "Document.createNodeIterator", |
| - "Document.createProcessingInstruction", |
| - "Document.get:doctype", |
| - "Document.createTreeWalker", |
| - "Document.location", |
| - "Document.createNSResolver", |
| - "Document.get:xmlEncoding", |
| - "Document.get:defaultCharset", |
| - "Document.get:applets", |
| - "Document.getSelection", |
| - "Document.xmlVersion", |
| - "Document.get:anchors", |
| - "Document.getElementsByTagNameNS", |
| + 'Document.importNode', |
| + 'Document.linkColor', |
| + 'Document.location', |
| + 'Document.manifest', |
| + 'Document.open', |
| + 'Document.releaseEvents', |
| + 'Document.set:documentURI', |
| + 'Document.set:domain', |
| + 'Document.version', |
| + 'Document.vlinkColor', |
| 'Document.webkitCurrentFullScreenElement', |
| 'Document.webkitFullScreenKeyboardInputAllowed', |
| - "DocumentType.*", |
| - "Element.setAttributeNode", |
| - "Element.getAttributeNode", |
| - "Element.removeAttributeNode", |
| - "Element.setAttributeNodeNS", |
| - "Element.getAttributeNodeNS", |
| - "Event.srcElement", |
| - "EventSource.URL", |
| - "BodyElement.text", |
| - "AnchorElement.text", |
| - "OptionElement.text", |
| - "ScriptElement.text", |
| - "TitleElement.text", |
| -# "EventSource.get:url", |
| -# TODO(jacobr): should these be removed? |
| - "Document.close", |
| - "Document.hasFocus", |
| - |
| - "Document.vlinkColor", |
| - "Document.captureEvents", |
| - "Document.releaseEvents", |
| - "Document.get:compatMode", |
| - "Document.designMode", |
| - "Document.dir", |
| - "Document.all", |
| - "Document.write", |
| - "Document.fgColor", |
| - "Document.bgColor", |
| - "Document.get:plugins", |
| - "Document.alinkColor", |
| - "Document.get:embeds", |
| - "Document.open", |
| - "Document.clear", |
| - "Document.get:scripts", |
| - "Document.writeln", |
| - "Document.linkColor", |
| - "Element.get:itemRef", |
| - "Element.outerText", |
| - "Element.accessKey", |
| - "Element.get:itemType", |
| - "Element.innerText", |
| - "Element.set:outerHTML", |
| - "Element.itemScope", |
| - "Element.itemValue", |
| - "Element.itemId", |
| - "Element.get:itemProp", |
| - 'Element.scrollIntoView', |
| + 'Document.write', |
| + 'Document.writeln', |
| + 'Document.xmlStandalone', |
| + 'Document.xmlVersion', |
| + 'DocumentType.*', |
| + 'Element.accessKey', |
| 'Element.get:classList', |
| - "FormElement.get:elements", |
| - "HTMLFrameElement.*", |
| - "HTMLFrameSetElement.*", |
| - "HtmlElement.version", |
| - "HtmlElement.manifest", |
| + 'Element.get:itemProp', |
| + 'Element.get:itemRef', |
| + 'Element.get:itemType', |
| + 'Element.getAttributeNode', |
| + 'Element.getAttributeNodeNS', |
| + 'Element.getElementsByTagNameNS', |
| + 'Element.innerText', |
| + 'Element.itemId', |
| + 'Element.itemScope', |
| + 'Element.itemValue', |
| + 'Element.outerText', |
| + 'Element.removeAttributeNode', |
| + 'Element.scrollIntoView', |
| + 'Element.set:outerHTML', |
| + 'Element.setAttributeNode', |
| + 'Element.setAttributeNodeNS', |
| + 'Event.srcElement', |
| + 'EventSource.URL', |
| + 'FormElement.get:elements', |
| + 'HTMLFrameElement.*', |
| + 'HTMLFrameSetElement.*', |
| + 'HTMLIsIndexElement.*', |
| + 'HTMLOptionsCollection.*', |
| + 'HTMLPropertiesCollection.*', |
| + 'HtmlElement.manifest', |
| + 'HtmlElement.version', |
| + 'MenuElement.compact', |
| + 'NamedNodeMap.*', |
| + 'Node.compareDocumentPosition', |
| + 'Node.get:ATTRIBUTE_NODE', |
| + 'Node.get:CDATA_SECTION_NODE', |
| + 'Node.get:COMMENT_NODE', |
| + 'Node.get:DOCUMENT_FRAGMENT_NODE', |
| + 'Node.get:DOCUMENT_NODE', |
| + 'Node.get:DOCUMENT_POSITION_CONTAINED_BY', |
| + 'Node.get:DOCUMENT_POSITION_CONTAINS', |
| + 'Node.get:DOCUMENT_POSITION_DISCONNECTED', |
| + 'Node.get:DOCUMENT_POSITION_FOLLOWING', |
| + 'Node.get:DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC', |
| + 'Node.get:DOCUMENT_POSITION_PRECEDING', |
| + 'Node.get:DOCUMENT_TYPE_NODE', |
| + 'Node.get:ELEMENT_NODE', |
| + 'Node.get:ENTITY_NODE', |
| + 'Node.get:ENTITY_REFERENCE_NODE', |
| + 'Node.get:NOTATION_NODE', |
| + 'Node.get:PROCESSING_INSTRUCTION_NODE', |
| + 'Node.get:TEXT_NODE', |
| + 'Node.get:baseURI', |
| + 'Node.get:nodeName', |
| + 'Node.get:nodeValue', |
| + 'Node.get:prefix', |
| + 'Node.hasAttributes', |
| + 'Node.isDefaultNamespace', |
| + 'Node.isEqualNode', |
| + 'Node.isSameNode', |
| + 'Node.isSupported', |
| + 'Node.lookupNamespaceURI', |
| + 'Node.lookupPrefix', |
| + 'Node.normalize', |
| + 'Node.set:nodeValue', |
| + 'Node.set:prefix', |
| + 'NodeList.item', |
| + 'OptionElement.text', |
| + 'ScriptElement.text', |
| 'SelectElement.options', |
| + 'SelectElement.remove', |
| 'SelectElement.selectedOptions', |
| - "Cursor.PREV", |
| - "Cursor.PREV_NO_DUPLICATE", |
| - "Cursor.NEXT", |
| - "Cursor.NEXT_NO_DUPLICATE", |
| - "Transaction.READ_ONLY", |
| - "Transaction.READ_WRITE", |
| - "Document.version", |
| - "Document.manifest", |
| - "HTMLIsIndexElement.*", |
| - "MenuElement.compact", |
| - "HTMLOptionsCollection.*", |
| - "HTMLPropertiesCollection.*", |
| - "SelectElement.remove", |
| - "NamedNodeMap.*", |
| - "Node.isEqualNode", |
| - "Node.get:TEXT_NODE", |
| - "Node.hasAttributes", |
| - "Node.get:DOCUMENT_TYPE_NODE", |
| - "Node.get:DOCUMENT_POSITION_FOLLOWING", |
| - "Node.lookupNamespaceURI", |
| - "Node.get:ELEMENT_NODE", |
| - "Node.get:DOCUMENT_FRAGMENT_NODE", |
| - "Node.isDefaultNamespace", |
| - "Node.compareDocumentPosition", |
| - "Node.get:baseURI", |
| - "Node.isSameNode", |
| - "Node.get:DOCUMENT_POSITION_DISCONNECTED", |
| - "Node.get:DOCUMENT_NODE", |
| - "Node.get:DOCUMENT_POSITION_CONTAINS", |
| - "Node.get:COMMENT_NODE", |
| - "Node.get:ENTITY_REFERENCE_NODE", |
| - "Node.isSupported", |
| - "Node.get:DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", |
| - "Node.get:NOTATION_NODE", |
| - "Node.normalize", |
| - "Node.get:ATTRIBUTE_NODE", |
| - "Node.get:ENTITY_NODE", |
| - "Node.get:DOCUMENT_POSITION_CONTAINED_BY", |
| - "Node.get:prefix", |
| - "Node.set:prefix", |
| - "Node.get:DOCUMENT_POSITION_PRECEDING", |
| - "Node.get:nodeValue", |
| - "Node.set:nodeValue", |
| - "Node.get:CDATA_SECTION_NODE", |
| - "Node.get:nodeName", |
| - "Node.lookupPrefix", |
| - "Node.get:PROCESSING_INSTRUCTION_NODE", |
| 'ShadowRoot.getElementsByTagNameNS', |
| - "Window.blur", |
| - "Window.clientInformation", |
| - "Window.get:frames", |
| - "Window.get:length", |
| - "Window.focus", |
| - "Window.prompt", |
| - "Window.webkitIndexedDB", |
| - "Window.webkitCancelRequestAnimationFrame", |
| - "WheelEvent.wheelDelta", |
| - "WorkerContext.webkitIndexedDB", |
| + 'TitleElement.text', |
| + 'Transaction.READ_ONLY', |
| + 'Transaction.READ_WRITE', |
| + 'WheelEvent.wheelDelta', |
| + 'Window.blur', |
| + 'Window.clientInformation', |
| + 'Window.focus', |
| + 'Window.get:frames', |
| + 'Window.get:length', |
| + 'Window.prompt', |
| + 'Window.webkitCancelRequestAnimationFrame', |
| + 'Window.webkitIndexedDB', |
| + 'WorkerContext.webkitIndexedDB', |
| +# TODO(jacobr): should these be removed? |
| + 'Document.close', |
| + 'Document.hasFocus', |
| ]) |
| class HtmlRenamer(object): |