canmove, Confirmed users
2,056
edits
(document the controller API) |
(document the text zoom handler) |
||
| Line 203: | Line 203: | ||
=== Controller API === | === Controller API === | ||
The controller API is implemented as a JavaScript object in the chrome window context of browser windows. | The controller API is implemented as a ContentPrefController JavaScript object in the chrome window context of browser windows. | ||
Question: is "controller" conceptually an accurate description of this component? | Question: is "controller" conceptually an accurate description of this component? | ||
| Line 276: | Line 276: | ||
To the extent that this functionality makes it easier to write extensions that add content prefs, however, it may cause the number of such extensions, and thus the danger of security holes in them, to increase. | To the extent that this functionality makes it easier to write extensions that add content prefs, however, it may cause the number of such extensions, and thus the danger of security holes in them, to increase. | ||
== Privacy == | == Privacy == | ||
| Line 295: | Line 294: | ||
== Other == | == Other == | ||
=== Text Zoom Handler === | |||
The text zoom handler is a TextZoomHandler JavaScript object in the chrome window context of browser windows. It registers itself with the controller as a "text.zoom" preference handler and takes over responsibility for handling the View > Text Size commands (both menu items and keyboard shortcuts for them) as well as scrollwheel events that are configured to signify text zoom changes. | |||
When the user changes the text zoom for the current page via any mechanism, the handler applies the change to the text zoom setting and then sets the site-specific "text.zoom" preference for the page to the new value of the setting. | |||
Question: should we provide a mechanism for setting a global text zoom preference? | |||
Question: if we provide a mechanism for setting a global text zoom preference, should that preference be applied in addition a site-specific preference or instead of one? For example, if the global preference is 120% and the site-specific preference for a given site is 130%, should we set the text zoom for the site to 130% or 156% (100 * 1.3 * 1.2)? | |||
When the user browses to a different page (i.e. the location of the tab browser widget changes) the handler applies the site-specific preference, if any, handed to it by the controller. Otherwise, it applies the global preference, if any. Otherwise it applies the default preference. | |||
= Discussion & Implications = | = Discussion & Implications = | ||