[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #12684 [Firefox Patch Issues]: Make "Not Now" the default button for TorBrowser's canvas permission dialogue
#12684: Make "Not Now" the default button for TorBrowser's canvas permission
dialogue
-------------------------------------+-------------------------------------
Reporter: isis | Owner: isis
Type: defect | Status: needs_information
Priority: critical | Milestone:
Component: Firefox Patch | Version:
Issues | Keywords: tbb-usability, tbb-
Resolution: | linkability, MikePerry201408R,
Actual Points: | TorBrowserTeam201408
Points: | Parent ID:
-------------------------------------+-------------------------------------
Changes (by isis):
* status: needs_review => needs_information
Comment:
Replying to [comment:21 mcs]:
> Replying to [comment:18 isis]:
> > Problem !#1: That `<separator class="groove">` part between the
sentences. For the life of me, I can't get this thing to insert a newline.
I've tried `\n\n`, a [https://developer.mozilla.org/en-
US/docs/Mozilla/Tech/XUL/separator XUL separator] and a
[https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/spacer XUL
spacer]. All of them actually show up in the text.
>
> The text ends up in a XUL <description> element. If we can apply a CSS
rule like white-space: pre-wrap, then newlines (\n) will not be ignored.
There might be a better way, but here is something that seems to work:
add the following code to the CanvasPermissionPromptHelper_init()
function:
> {{{
> if (document.styleSheets && (document.styleSheets.length > 0)) try {
> let ruleText = "panel[popupid=canvas-permissions-prompt] description {
white-space: pre-wrap";
> let sheet = document.styleSheets[0];
> sheet.insertRule(ruleText, sheet.cssRules.length);
> } catch (e) {}
>
> }}}
Okay, I added that stanza after the
{{{Services.obs.addObserver(this, this._permissionsPrompt, false);}}}
line, and rebuilt Firefox. However, the resulting build was all kinds of
broken, and running the `firefox` binary with `-jsconsole` had some errors
about unterminated string literals in `browser/content/browser.js`.
I thought it was due to the missing CSS `}` at the end of the `ruleText`
variable above, but after adding the `}` and rebuilding a second time it
still came out janky and broken.
Was I supposed to add the CSS hack before the ServiceObserver gets added?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12684#comment:25>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs