Changes

Jump to: navigation, search

Add an Infobar style warning for window resize/move

7,635 bytes added, 15:14, 24 September 2009
Project Details
== Description ==
Many (poorly behaved) web sites attempt to move and/or resize your browser window. It is possible to stop this behaviour (cf. dom.disable_window_move_resize) but it would be nice to have an infobar that informed the user that a web page attempted to move/resize the window, and allow it or ignore it (default). This behaviour is similar to the current Pop-up Blocker already present in Firefox. NOTE: it is not clear whether such a feature would be accepted in the tree or if this would need to be done as an extension.
== Releases ==
'''Version 1.0a''' <br />
* This patch addresses a simple issue of placing all label required "text" into the properties/dtd files.
* Addresses localization issues
* Patch can be found on bugzilla <br />
'''Version 1.0''' <br />
* This patch is mostly changes to the code to make it work in the latest firefox repository
* Changed the event number to 39. This number will need to be changed if 39 is taken later
* Changed the order of the nsClassInfo.cpp declarations (leaving mine always at the bottom)
* Fixed a number of issues where code conflicted with the newer code in the newer repository.
'''Version 0.9''' <br />
Use '''patch -p1 < InfobarFrontend0.9.txt''' for Front end code <br />
USe '''patch -p1 < InfobarBackEnd0.9.txt''' for Back end code <br />
'''Release Notes'''
* In the Options, Content Tab:
** Added a checkbox to options: Notify Move/Resize. This governs the resizeWindow.show_infobar preference
** Added Exceptions button beside it, which opens the permissions manager to add sites to the allow/block list
* This patch ties all the work together and gives the features a fully accessible interface
* Added one new test to Mochitest which tests the preference
* Fixed a bug where there were two of the same preference names in about:config (pref was added to the wrong file)
* Changed some variable naming conventions (in nsGlobalWindow.cpp is isAbsolute)
* Fixed a bug where isAbsolute is flipped when sent from nsGlobalWindow.cpp
* Added a confirmation to "Allow Once", and it shows the x and y coordinates as well as the command being blocked
** Reason being users weren't able to see what parameters were blocked.
** To allow users some freedom and knowledge about what the blocked command was before allowing it
* Fixed a bug where javascript can crash if you called "Edit options", because it was missing a try and catch block
Bug can be found in the bug info above<br />
'''Version 0.8:''' <br />
Use '''patch -1 < InfobarFrontend0.8.txt''' for Front end code <br />
'''Release Notes'''<br />
* Mochitest added, replaces the test.html used.
* There are 28 tests total.
* This test is mostly a test from the browser end.
This will be uploaded to the bug above<br />
'''Version 0.7:''' <br />
Use '''patch -1 < InfobarBackend0.7.txt''' for Back end code <br />
Use '''patch -1 < InfobarFrontend0.7.txt''' for Front end code <br />
You may find my patches in my bug info above: <br />
'''Release Notes:'''<br />
* Fixed a compilation error in the locales makefile that was overlooked last patch
* Events are now fired regardless if the uri is stored in permissionmanager or not
* Renamed several labels and menu options
* Removed a lot of whitespace/80 line column problems in front end code
* Removed extra text in browser.dtd
* Removed "Do not show infobar", "Allow sites to move/resize window", "Disable Sites moving/resizing window" options from the infobar
* Removed 4 functions from gWindowResizedObserver
'''Version 0.6:''' <br />
Use '''patch -1 < InfobarBackend0.6.txt''' for Back end code (events) <br />
Use '''patch -1 < InfobarFrontend0.6.txt''' for Front end code (UI) <br />
[[Media:InfobarBackend0.6.zip]] <br />
[[Media:InfobarFrontend0.6.zip]] <br />
'''Release Notes:''' <br />
* Fixed all lines with more than 80 chars (moved em to next line!) in the backend code.
* Added new backend code: Checks a URI for its permissions and capacity before firing event.
* Allows URIs with "Allow_Action" to bypass "CanMoveResizeWindow()" function
* Added new in UI, permissions management for move/resizes.
* New menu items in the Infobar: Always Allow, Always Deny. Adds the current URI into the permissions management
* Removed resizedWindow.xul. We don't need it... really.
'''Version 0.5:''' <br />
Use '''patch -1 < InfobarBackend0.5.txt''' for Back end <br />
Use '''patch -1 < InfobarFrontend0.5.txt''' for Front end code<br />
[[Media:InfobarBackend0You can find my patch at my bug release above.5.zip]] <br />[[Media:InfobarFrontend0.5.zip]] <br />
'''Release Notes:''' <br />
* Fixed all spurious white space changes
== Project Details ==
'''09/04/2009''' -
* Removed "NOTE: it is not clear whether such a feature would be accepted in the tree or if this would need to be done as an extension." from project description
* Awaiting for review
'''07/04/2009''' -
* Apologies for the long break:
* Made a fix to the patch: Removed text strings and placed in a properties file.
* Update can be found on bug
'''04/25/2009''' -
* After some many many rebuilds and weird Assertion errors fixed...
* Release 1.0! Its here!! Its here!!!
'''04/24/2009''' -
* Fixed a huge array of problems migrating to the latest version of firefox
** Merged all code with kdiff3 (several conflicts)
** Event number changed from 4000 back to 39 (instead of 36)
** Reordered nsClassInfo.cpp (was throwing constructor errors at me)
** Fixed a bug where the event type was mismatching causing no actual data to be passed
'''04/23/2009''' -
* Changed Event number to 4000 (cause 36 is used in the latest version of FireFox)
* This number will be changed when this patch is official (to a more stable number)
'''04/17/2009''' -
* Video Tutorial for 0.9: http://www.youtube.com/watch?v=pOtZs4k54jg
'''04/11/2009''' -
* Not entirely related to the project, yesterday and today was spent on poster.
* Releasing 0.9 as well.
* The details can be found above.
'''04/09/2009''' -
* Added one new test to Mochitest testing resizeWindow.show_infobar
* Added try/catch block to addEntry URI (So it doesn't throw an exception)
* Changed some variable names to better reflect their usage
** warningLabel changed to warningLabelKey seeing how this is a key
** isByCommand changed to isAbsolute in nsGlobalWindow.cpp
** fixed a bug where moveTo and moveBy was flipped around when using allowOnce
* Deleted "showEditDialog()" from browser.js gResizedWindowObserver
* Added a confirmation dialog to "allow once", with the x and y / command type info
** That way users can choose to see if they want the window resized/moved.
** And they can see if the numbers are okay first before they click accept.
'''04/08/2009''' -
* Added options to "Content.xul" to open exceptions, and to display the resize/move infobar.
* Changed preferences.properties to reflect other exceptions types
* Removed resizedWindow preference from firefox.js, and added to all.js
'''03/31/2009''' -
* Released 0.8 release for "Front End"
* This patch contains a Mochitest specifically for replacing manual testing.
'''03/29/2009''' -
* Bug caused by an unsafe check for an existing infobar, and removing a null infobar.
* Further testing continues
* Replaced all removeNotificationByValue with removeAllNotifications(immediate) in test
* removeNotificationByValue might have been conflicting with the code in browser.js which gets by value
'''03/28/2009''' -
* Discovered a bug with Mochitest test_bug413792.html which caused the infobar to become invisible
'''03/27/2009''' -
* Wrote the beginning of a mochitest
* Changed access key of edit options, it was conflicting with Options
'''03/12/2009''' -
* Removed fillResizeList, removed "onpopupshowing"
* Removed all text related to the above
* Since Allow / Disable is gone, a and d access keys are freed. Reapplied to Allow/Deny (on options)
* Fixed most lines greater than 80 columns in the frontend patch
* Removed unwanted white space changes in frontend patch (previously only backend was done)
* Changed label texts for better descriptions.
* Removed resizeWindow.dtd from jar.mn in locales (Previous bug unfound!)
* Allow Once is now the top menu choice (rearranged)
'''03/11/2009''' -
* The event is thrown now regardless of permissions.
* However, the permissions still work in effect on nsGlobalWindow.cpp
* So now even if the permissions states that a site can resize/can't resize, a user can still capture the event.
* Removed "Disable Infobar option" from the menu
* Removed Add/Disable disable_window_move_resize options
* fillResizeList is currently empty
'''02/19/2009''' -
* Removed some code in browser.js which is no longer used (code which displayed even if disable_window_move_resize is off)
* Fixed a bug where no matter what the command to trigger the infobar was, the infobar would say the page tried to "resize" the browser (now it says move, if a move command was used)
* Removed all end white spaces after lines
* Fixed all lines that were longer than 80 characters long in the backend
* Released 0.6. Read release notes above!
'''02/18/2009''' -
* New file called resizedWindow.js created in browser/content/preferences/
1
edit

Navigation menu