After being introduced to Firefox development last semester in the DPS909 – Topics in Open Source Development and now being enrolled in the DPS911 – Open Source Project it’s time to get some bugs fixed
Besides continuing the work started last semester in the implemention of the MouseLock Spec on Firefox, I picked a few other bugs to work on.
My first Firefox patch originated from Bug 715141. The bug was to add a keyboard shorcut to resize the zoom level of an image to a 1:1 scale. When Firefox serves an image file and the image is bigger than the boundaries of the browser, the image gets resize to fully fit in the browser window. A magnifying glass with a +/- sign appears when the mouse hover overs an image if the image can be resized.
So the goal of the bug was to add support to manipulate the zoom level with only the keyboard.
In one of the comments of the bug, Jared suggested that the changes would probably happen on the ImageDocument.cpp file
At first I thought to look for the code that changed the browser zoom level, the Ctrl +/- shortcut. I found what I thought was the code for switching zoom levels in the HandleEvent method. However, it turned out to be the code that was resizing an mage to a 1:1 scale! The shortcut already existed, was Shift +/- I then spoke with Jared and he talked to gavin and in the end was decided that since noboby ever used, or even knew about the shortcut, it would be better to remove it due code maintance in the future, so Bug 715141 was closed and a new bug to remove the code was created, Bug 718133.
On Bug 718133, knowing where the code for the shortcut was located, all I had to do was remove it, and that was my first contribution to Firefox
My second contribution was Bug 713383. On Bug 376997, when the browser serves an image file instead of the image being displayed on the top left corner in a white background it began being displayed in the center of the page with a greyish background. However, if somedoy wanted to print an image, most likely they don’t want the greyish background or the image to be centered on the page. After some suggestions, was agreeded that the best solution would be to wrap all the new styles introduced in Bug 376997 on a [sourcecode languages=”css”]@media not print[/sourcecode] rule and preserving the new styles for displaying an image but not applying them when the image is being printed.
Bug 633602 – Implement Pointer Lock (Mouse Lock) API
Bug 715141 – Using keyboard to switch zoom level when viewing images directly
Bug 718133 – Remove keyboard shortcuts for zooming to 1:1 scale when viewing standalone images
Bug 713383 – Directly viewed images should be printed with a transparent background on the body
Bug 714071 – The Show Statistics setting is not preserved when toggling the full screen mode
Bug 712225 – When element is in fullscreen mode, window.innerHeight is bigger than window.outerHeight
Bug 581866 – outerWidth / outerHeight features in window.openDialog do not include window manager decorations
Bug 581863 – gtk2/nsWindow::GetScreenBounds returns client window size instead of outer (frame) size