Open Bug 871434 Opened 11 years ago Updated 2 years ago

sizeToContent on a 100 x 100 window will resize the content but not the window


(Core :: DOM: Core & HTML, defect, P5)





(Reporter: tnikkel, Unassigned)




(1 file)

Attached file testcase
Open a window that is 100 x 100, call sizeToContent on it. If the content is smaller than 100 x 100 the content will be resized to it's "content" size, but the window will stay at 100x100.

This was caused by bug 764240. We ask the document viewer for the content size, it then changes the visible area of the prescontext and returns the content size. Global window then makes it at least 100 x 100, but does nothing to adjust the visible area or reflow the document. If the window isn't 100 x 100 to start with then the resize down to 100x100 will induce reflow and fix up the problem.
OS: Linux → All
Hardware: x86_64 → All
The reason I found this is because /dom/tests/mochitest/bugs/test_resize_move_windows.html only passes because of this bug. It sizes the window to 100x100 then calls sizeToContent and waits for a size change. The window never changes size but window.innerWidth/Height do change because they get their info from the visible area of the prescontext.

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.