chore: address TODO for WebContents.prototype.setSize / reportRemovedAttribute removal (#14517)

* chore: remove WebContents.prototype.setSize

* chore: remove reportRemovedAttribute

* chore: remove unused fixtures
This commit is contained in:
Milan Burda 2018-09-11 09:58:57 +02:00 committed by Samuel Attard
parent f5aac36421
commit 38419e3a6a
4 changed files with 0 additions and 71 deletions

View file

@ -16,13 +16,6 @@ const getNextId = function () {
return ++nextId
}
// A list of removed attributes from 3.0.
const removedAttributes = [
'autoresize',
'disableguestresize',
'guestinstance'
]
// Represents the internal state of the WebView node.
class WebViewImpl {
constructor (webviewNode) {
@ -32,13 +25,6 @@ class WebViewImpl {
this.beforeFirstNavigation = true
this.hasFocus = false
// Check for removed attributes.
for (const attributeName of removedAttributes) {
if (this.webviewNode.hasAttribute(attributeName)) {
this.reportRemovedAttribute(attributeName)
}
}
// on* Event handlers.
this.on = {}
@ -106,11 +92,6 @@ class WebViewImpl {
// attribute, if necessary. See BrowserPlugin::UpdateDOMAttribute for more
// details.
handleWebviewAttributeMutation (attributeName, oldValue, newValue) {
if (removedAttributes.includes(attributeName)) {
this.reportRemovedAttribute(attributeName)
return
}
if (!this.attributes[attributeName] || this.attributes[attributeName].ignoreMutation) {
return
}
@ -215,12 +196,6 @@ class WebViewImpl {
// even documented.
this.resizeObserver = new ResizeObserver(this.onElementResize.bind(this)).observe(this.internalElement)
}
// TODO(zcbenz): Remove the warning in 4.0.
reportRemovedAttribute (attributeName) {
console.error(`The "${attributeName}" attribute has been removed from the <webview> tag,`,
'see https://github.com/electron/electron/issues/14120 for more.')
}
}
// Registers <webview> custom element.