Edgewall Software
Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10923 closed defect (fixed)

Initial syntax highlighting sample fails in pygments preferences for browsers other than firefox

Reported by: Ryan J Ollos <ryan.j.ollos@…> Owned by: Peter Koželj
Priority: normal Milestone: 0.12.5
Component: rendering Version:
Severity: normal Keywords: webkit
Cc:
Release Notes:

Fix initial activation of default style in Pygments' pref panel on WebKit browsers.

API Changes:

Description

With Chrome 22 on Debian 6 with the latest trunk (r11412), syntax highlighting of the sample in the Syntax Highlighting preferences view in not effective until the Style is changed. Here is an example:

The attached patch duplicates the patch by Peter Koželj of the Bloodhound development team.

Attachments (2)

ExampleOfSyntaxHighlightingFailure.png (17.3 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 6 years ago.
t10356-r11412-1.patch (554 bytes ) - added by Ryan J Ollos <ryan.j.ollos@…> 6 years ago.
Patch against r11412.

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by Ryan J Ollos <ryan.j.ollos@…>

Changed 6 years ago by Ryan J Ollos <ryan.j.ollos@…>

Attachment: t10356-r11412-1.patch added

Patch against r11412.

comment:1 Changed 6 years ago by Christian Boos

Thanks! I think that this was issue for nearly as long as the feature itself, and nobody cared to fix it so far…

Could you please add a reference to the original ticket, if there is one?

comment:2 Changed 6 years ago by Ryan J Ollos <ryan.j.ollos@…>

Yeah, it's bloodhound:#205 (hey, bloodhound is in InterTrac already ;)

comment:3 Changed 6 years ago by Christian Boos

[OT] As the "b" shortcuts are quite popular (#B1, #bn1, #bl1), it was not obvious which one to choose for BloodHound: bh or bd? Pick one or both ;-)


Back to the issue… this webkit bug is quite puzzling: I tried some other approaches, like not leaving the disabled property alone for the style selected by default, in hope this wouldn't trigger the problem (see this comment in particular), but that doesn't work. What I've observed is that:

  • by not touching at any .disabled property, all the stylesheets are active (the snippet gets some syntax highlighting)
  • by setting one .disabled property to true, none of these stylesheets are active (though when queried later, their .disabled property is indeed false for all but the one set to true)

So… it would need some serious debugging at the C++ level, if someone's interested in finding out what's really happening.

But the proposed workaround works perfectly, so I'll also content me with that ;-)

comment:4 in reply to:  3 ; Changed 6 years ago by Ryan J Ollos <ryan.j.ollos@…>

Replying to cboos:

[OT] As the "b" shortcuts are quite popular (#B1, #bn1, #bl1), it was not obvious which one to choose for BloodHound: bh or bd? Pick one or both ;-)

The consensus seems to be that the bh InterTrac prefix would be most useful.

comment:5 in reply to:  4 Changed 6 years ago by Christian Boos

Replying to Ryan J Ollos <ryan.j.ollos@…>:

The consensus seems to be that the bh InterTrac prefix would be most useful.

… and it rhymes with TH ;-)

Looks like it was already there anyway (BH).

comment:6 in reply to:  3 Changed 6 years ago by Christian Boos

Keywords: webkit added
Milestone: 0.12.5
Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

But the proposed workaround works perfectly, so I'll also content me with that ;-)

Applied in r11423, thanks!

comment:7 Changed 6 years ago by Christian Boos

Owner: set to Peter Koželj

comment:8 Changed 6 years ago by Christian Boos

(and sorry for messing up the name in the commit itself, I forgot to use --encoding utf-8)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Peter Koželj.
The resolution will be deleted.
to The owner will be changed from Peter Koželj to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.