If the widget request a new window throught the new_window callback, the application doesn't know what size to make the window, only what chrome to use. This is by design. After the dom window has requested the widget (via nsIBaseWindow) to create a new window, the dom window (implemented in nsGlobalWindow::OpenInternal()), ask the widget (again through nsIBaseWindow) to resize to the requested size. Our widget code just updates member variable with the new sizes and does nothing else. What we need is another callback that the application registers with the widget to catch these request and do as the application sees fit. My tree (at work) currently has this implemented but in an out-of-date tree, so I need to update my patch to the cvs tip. I will attach an up to date patch soon.