diff options
author | Pale Moon <git-repo@palemoon.org> | 2014-07-15 13:52:30 +0200 |
---|---|---|
committer | Pale Moon <git-repo@palemoon.org> | 2014-07-15 13:52:30 +0200 |
commit | 9eaca167669ddf18c82b97d6ea872bba23283f29 (patch) | |
tree | 0535d8a8c9bb7c4ee150d52e401725cd637e48d1 | |
parent | 5968bdb924f96a7f44177dc908b161024a1b20c2 (diff) | |
download | palemoon-gre-9eaca167669ddf18c82b97d6ea872bba23283f29.tar.gz |
Fix missing click-to-play overlay on some zoom levels for plugins embedded in an iframe.
-rw-r--r-- | browser/base/content/browser-plugins.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/browser/base/content/browser-plugins.js b/browser/base/content/browser-plugins.js index 02c299d39..46e28bdb6 100644 --- a/browser/base/content/browser-plugins.js +++ b/browser/base/content/browser-plugins.js @@ -90,8 +90,10 @@ var gPluginHandler = { let pluginRect = plugin.getBoundingClientRect(); // XXX bug 446693. The text-shadow on the submitted-report text at // the bottom causes scrollHeight to be larger than it should be. - let overflows = (overlay.scrollWidth > pluginRect.width) || - (overlay.scrollHeight - 5 > pluginRect.height); + // Clamp width/height to properly show CTP overlay on different + // zoom levels when embedded in iframes (rounding bug). (Bug 972237) + let overflows = (overlay.scrollWidth > Math.ceil(pluginRect.width)) || + (overlay.scrollHeight - 5 > Math.ceil(pluginRect.height)); return overflows; }, |