Firefox doesn't fire resize events when using aero snap feature of GNOME-Shell

Bug #912239 reported by Ben Konrath
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
New
Undecided
Unassigned

Bug Description

% lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

% apt-cache policy firefox
firefox:
  Installed: 8.0+build1-0ubuntu0.11.10.3
  Candidate: 8.0+build1-0ubuntu0.11.10.3
  Version table:
 *** 8.0+build1-0ubuntu0.11.10.3 0
        500 http://security.ubuntu.com/ubuntu/ oneiric-security/main amd64 Packages
        500 http://nl.archive.ubuntu.com/ubuntu/ oneiric-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     7.0.1+build1+nobinonly-0ubuntu2 0
        500 http://nl.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages

Here are instructions for reproducing the bug:

1. Load the following page in an unsnapped Firefox window:

http://bagu.org:8080/OnlineGlomDemoFirefoxBug/#details:document=debian_repository_analyzer&table=packages

2. Expand the Firefox window to be horizontally smaller and larger. The value of the Description field will expand and contract as the browser is window size is increased and decreased.

3. Now snap the Firefox to the left side of the screen and then unsnap it.

Expected Result:

The Description field contract to the correct size because the resize event is fired.

Actual Result:

The Description field is not contracted because the resize event isn't fired.

The GWT source code that reacts to the resize event can be found in this bug:

https://bugzilla.gnome.org/show_bug.cgi?id=667269

Specifically, this patch:

http://bugzilla-attachments.gnome.org/attachment.cgi?id=204585

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: firefox 8.0+build1-0ubuntu0.11.10.3
ProcVersionSignature: Ubuntu 3.0.0-14.23-generic 3.0.9
Uname: Linux 3.0.0-14-generic x86_64
AddonCompatCheckDisabled: False
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: ben 2164 F.... pulseaudio
 /dev/snd/controlC0: ben 2164 F.... pulseaudio
BuildID: 20111115183813
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xc9400000 irq 51'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:10ec0275,104d5000,00100005 HDA:80862805,104d5000,00100000'
   Controls : 21
   Simple ctrls : 10
Card1.Amixer.info:
 Card hw:1 'Headset'/'Logitech Logitech USB Headset at usb-0000:00:1d.0-1.3, full speed'
   Mixer name : 'USB Mixer'
   Components : 'USB046d:0a0c'
   Controls : 6
   Simple ctrls : 2
Channel: release
Date: Thu Jan 5 13:30:41 2012
ForcedLayersAccel: False
IfupdownConfig:
 auto lo
 iface lo inet loopback
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
IpRoute:
 default via 192.168.2.1 dev eth0 proto static
 169.254.0.0/16 dev eth0 scope link metric 1000
 192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.146 metric 1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/usr/bin/zsh
Profiles: Profile0 (Default) - LastVersion=8.0/20111115183813 (Running)
RunningIncompatibleAddons: False
SourcePackage: firefox
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/13/2011
dmi.bios.vendor: INSYDE
dmi.bios.version: R2084H4
dmi.board.asset.tag: N/A
dmi.board.name: VAIO
dmi.board.vendor: Sony Corporation
dmi.board.version: N/A
dmi.chassis.asset.tag: N/A
dmi.chassis.type: 10
dmi.chassis.vendor: Sony Corporation
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnINSYDE:bvrR2084H4:bd10/13/2011:svnSonyCorporation:pnVPCSA2C5E:pvrC6099NJL:rvnSonyCorporation:rnVAIO:rvrN/A:cvnSonyCorporation:ct10:cvrN/A:
dmi.product.name: VPCSA2C5E
dmi.product.version: C6099NJL
dmi.sys.vendor: Sony Corporation

Revision history for this message
Ben Konrath (ben-bagu) wrote :
Revision history for this message
Murray Cumming (murrayc) wrote :

> 3. Now snap the Firefox to the left side of the screen and then unsnap it.
>
> Expected Result:
> The Description field contract to the correct size because the resize event is fired.
>
> Actual Result:
> The Description field is not contracted because the resize event isn't fired.

I can confirm this too. But I must check if this happens in Unity too, which apparently has this aero snap feature too.

Hopefully this can be reproduced with a simpler web page, maybe even without javascript.

Revision history for this message
Ben Konrath (ben-bagu) wrote : Re: [Bug 912239] Re: Firefox doesn't fire resize events when using aero snap feature of GNOME-Shell

With this minimal javascript test case, it seems that the resize event
is being fired:

<html>
<script language="javascript">
var numResize = 0;
function setMessage() {
  numResize++;
  document.getElementById('message').innerHTML = "Resize events
received: " + numResize;
}
</script>
<body onresize="setMessage(this)">
<div id="message">Resize events received: 0</div>
</body>
</html>

The next step would be to try to come up with a html / javascript test
case from the javascript that GWT produces. I definitely know it's
more complex than this simple test case. The javascript output of
Online Glom will need to be temporarily changed to pretty or detailed
to be able to read it.

Revision history for this message
Ben Konrath (ben-bagu) wrote :

The resize event is being received when unsnapping the firefox window with this small GWT program. This needs to be debugged using Online Glom with the patch applied.

TestResize.java:

package org.bagu.org.test.resize.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;

public class TestResize implements EntryPoint {
       private int numResize = 0;
       public void onModuleLoad() {
               final Label label = new Label("Resize events received: 0");
               RootPanel.get("body").add(label);
               Window.addResizeHandler(new ResizeHandler() {
                       @Override
                       public void onResize(ResizeEvent event) {
                               numResize++;
                               label.setText("Resize events received: " + numResize);
                       }
               });
       }
}

TestResize.html:

<!doctype html>
<html>
 <head>
   <meta http-equiv="content-type" content="text/html; charset=UTF-8">
   <script type="text/javascript" language="javascript"
src="testresize/testresize.nocache.js"></script>
 </head>
 <body id="body">
 </body>
</html>

TestResize.gwt.xml:

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='testresize'>
 <inherits name='com.google.gwt.user.User'/>
 <inherits name='com.google.gwt.user.theme.clean.Clean'/>
 <entry-point class='org.bagu.org.test.resize.client.TestResize'/>
 <source path='client'/>
</module>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.