ChatZilla's motifs should style the user list and other UI elements

RESOLVED FIXED

Status

Other Applications
ChatZilla
--
enhancement
RESOLVED FIXED
13 years ago
11 years ago

People

(Reporter: rob lord, Assigned: Gijs)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [cz-0.9.78])

Attachments

(1 attachment)

5.76 KB, patch
James Ross
: review+
Details | Diff | Splinter Review
(Reporter)

Description

13 years ago
User-Agent:       
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

it'd be awesome if the drag-and-drop css support styled the *entire* app. 
thanks for a great irc client. 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Comment 1

13 years ago
I'm not sure how possible this is (though it would be cool). I currently can't
figure out any way to /add/ a stylesheet to a XUL window, so it may have to have
a dummy one in the source that is just changed at run-time instead. Also,
Mozilla *may* have objection to such changes, as the dynamic theme changing has
been very prone to crashes in the past.
Product: Core → Other Applications
(Assignee)

Updated

12 years ago
Depends on: 325358
(Assignee)

Comment 2

12 years ago
Cleaning up UNCO's - valid enhancement request --> Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: css style user list, text entry, even tabs pls! → ChatZilla's motifs should style the user list and other UI elements
(Assignee)

Comment 3

11 years ago
Created attachment 248636 [details] [diff] [review]
Patch

Wee, patch! :-)

So, I tested this on Mozilla 1.0. document.insertBefore totally b0rks there, so I added a fallback for that (ie, not do anything at all, and alert the user).

Apart from this, it seems to work pretty well on current Fx 2.0 and trunk - with the exception that changes really don't get through to it. Even trying to force it to flush the cache before/after changing things (/eval getService("@mozilla.org/observer-service;1", "nsIObserverService").notifyObservers(null, "chrome-flush-caches", null)) didn't convince it to actually update the cached css. sync-output continues to work fine for the content part, however.
Assignee: rginda → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #248636 - Flags: review?(silver)

Comment 4

11 years ago
Comment on attachment 248636 [details] [diff] [review]
Patch

>+function updateAppMotif(motifURL)
>+{
>+    var node = document.firstChild;
>+    while (node && ((node.nodeType != node.PROCESSING_INSTRUCTION_NODE) ||
>+                    !(/name="dyn-motif"/).test(node.data)))
>+    {
>+        node = node.nextSibling;
>+    }
>+
>+    var dataStr = "href=\"" + motifURL + "\" name=\"dyn-motif\"";

motifURL will need some sanity here; if it contains a double-quote, what happens?

>+    try 
>+    {
>+        // No dynamical style node yet.

s/dynamical/dynamic/

This code makes me cry (it's so hacky), but r=silver with above problems fixed.
Attachment #248636 - Flags: review?(silver) → review+
(Assignee)

Comment 5

11 years ago
Checked in with:
motifURL = motifURL.replace(/"/g, "%22");
and the comment fix. URL-escaping it might even make something broken work - given that you can't have double quotes in URLs in the first place. We don't do a full encodeURIComponent cause that'd screw up all the 'special' characters that we really do want (slashes, colons, etc.) According to the spec, XML entities aren't parsed as such in PIs, luckily for us, so we can leave that part of the universe for what it is.

Oh, right. --> FIXED.

I was thinking, we might want to update the dark motif so it styles the userlist? Sander has done all the work for us anyway: http://weblog.juima.org/showpost.asp?postid=3379

We should probably file a new bug for that, depending on this one.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.78]
You need to log in before you can comment on or make changes to this bug.