Merge pull request #5616 from electron/inherit-zoom

Inherit zoomFactor in webview
This commit is contained in:
Cheng Zhao 2016-05-20 00:27:06 +00:00
commit 8ac93e02c6
5 changed files with 33 additions and 5 deletions

View file

@ -47,8 +47,7 @@ var WebViewImpl = (function () {
WebViewImpl.prototype.createBrowserPluginNode = function () {
// We create BrowserPlugin as a custom element in order to observe changes
// to attributes synchronously.
var browserPluginNode
browserPluginNode = new WebViewImpl.BrowserPlugin()
var browserPluginNode = new WebViewImpl.BrowserPlugin()
v8Util.setHiddenValue(browserPluginNode, 'internal', this)
return browserPluginNode
}
@ -224,7 +223,8 @@ var WebViewImpl = (function () {
var attribute, attributeName, css, elementRect, params, ref1
params = {
instanceId: this.viewInstanceId,
userAgentOverride: this.userAgentOverride
userAgentOverride: this.userAgentOverride,
zoomFactor: webFrame.getZoomFactor()
}
ref1 = this.attributes
for (attributeName in ref1) {
@ -259,8 +259,7 @@ var WebViewImpl = (function () {
// Registers browser plugin <object> custom element.
var registerBrowserPluginElement = function () {
var proto
proto = Object.create(HTMLObjectElement.prototype)
var proto = Object.create(HTMLObjectElement.prototype)
proto.createdCallback = function () {
this.setAttribute('type', 'application/browser-plugin')
this.setAttribute('id', 'browser-plugin-' + getNextId())