Index: extensions/renderer/resources/guest_view/guest_view_container.js |
diff --git a/extensions/renderer/resources/guest_view/guest_view_container.js b/extensions/renderer/resources/guest_view/guest_view_container.js |
index 35c6991039cec6152b94e483f75a1c3e0cc547fa..a0df2a56470265ec6db5b5dc7dc0fa4eee4fb2d5 100644 |
--- a/extensions/renderer/resources/guest_view/guest_view_container.js |
+++ b/extensions/renderer/resources/guest_view/guest_view_container.js |
@@ -157,9 +157,12 @@ GuestViewContainer.prototype.onElementResize = function(oldWidth, oldHeight, |
GuestViewContainer.prototype.buildParams = function() { |
var params = this.buildContainerParams(); |
params['instanceId'] = this.viewInstanceId; |
+ var css = window.getComputedStyle(this.element, null); |
paulmeyer
2015/03/24 20:57:00
I think it would be useful to add a comment here a
Fady Samuel
2015/03/26 17:50:38
Done.
|
var elementRect = this.element.getBoundingClientRect(); |
- params['elementWidth'] = parseInt(elementRect.width); |
- params['elementHeight'] = parseInt(elementRect.height); |
+ params['elementWidth'] = parseInt(elementRect.width) || |
+ parseInt(css.getPropertyValue('width')); |
+ params['elementHeight'] = parseInt(elementRect.height) || |
+ parseInt(css.getPropertyValue('height')); |
return params; |
}; |