aboutsummaryrefslogtreecommitdiff
path: root/www/waterfox/files/patch-bug1403466
blob: 434752911bd19876ceedd991a377d4d946f403db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
commit 0d4a6317df44
Author: Mike de Boer <mdeboer@mozilla.com>
Date:   Tue Oct 10 12:44:04 2017 +0200

    Bug 1403466 - Don't set a max-height on panelviews used by WebExtensions, because it causes browser contents to be cut-off. r=Gijs, a=ritu
    
    Setting a max-height caused the '_handleDOMChange' method in ext-browser-content.js
    to consistently lie about the scrollHeight, since it was never allowed to grow
    beyond the maxHeight - even when the document needs to be larger to fit its contents.
    We don't need this aggressiveness in Photon panels anyway, so that makes it
    doubly safe to remove this code.
    
    MozReview-Commit-ID: HJVMXXHS4By
    
    --HG--
    extra : source : cd62fb50fe61504937ff3d37db3852bae0d73d0c
---
 browser/components/extensions/ExtensionPopups.jsm | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git browser/components/extensions/ExtensionPopups.jsm browser/components/extensions/ExtensionPopups.jsm
index 5ac4f43943f1..cc02e48b32dd 100644
--- browser/components/extensions/ExtensionPopups.jsm
+++ browser/components/extensions/ExtensionPopups.jsm
@@ -123,7 +123,6 @@ class BasePopup {
 
       if (this.viewNode) {
         this.viewNode.removeEventListener(this.DESTROY_EVENT, this);
-        this.viewNode.style.maxHeight = "";
         delete this.viewNode.customRectGetter;
       }
 
@@ -331,16 +330,9 @@ class BasePopup {
       height = Math.min(height, maxHeight);
       this.browser.style.height = `${height}px`;
 
-      // Set a maximum height on the <panelview> element to our preferred
-      // maximum height, so that the PanelUI resizing code can make an accurate
-      // calculation. If we don't do this, the flex sizing logic will prevent us
-      // from ever reporting a preferred size smaller than the height currently
-      // available to us in the panel.
-      height = Math.max(height, this.viewHeight);
-      this.viewNode.style.maxHeight = `${height}px`;
       // Used by the panelmultiview code to figure out sizing without reparenting
       // (which would destroy the browser and break us).
-      this.lastCalculatedInViewHeight = height;
+      this.lastCalculatedInViewHeight = Math.max(height, this.viewHeight);
     } else {
       this.browser.style.width = `${width}px`;
       this.browser.style.minWidth = `${width}px`;