Open
Bug 503007
Opened 14 years ago
Updated 5 months ago
Provide Javascript Access to User Agent Style Sheets.
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
NEW
Tracking | Status | |
---|---|---|
status1.9.1 | --- | ? |
People
(Reporter: johnjbarton, Unassigned)
References
Details
(Keywords: helpwanted, student-project, Whiteboard: [firebug-p2])
Firebug wants to apply the same workaround to User Agent Style sheets as we applied to page sheets in Bug 500365 Unfortunately we have no way to access the User Agent Sheets. CSS editing is one of Firebug's top features and revealing the User Agent Sheets is a great way to help users understand CSS results. Currently editing User Agent sheets breaks Firefox, either making its UI fall apart or crash. Firebug could try to implement read-only for the User Agent Sheet, but just then we will want the edit capability for Chromebug.
Reporter | ||
Comment 1•14 years ago
|
||
Boris, please set blocking/wanting flags according to your estimate of how hard this would be to implement.
Whiteboard: [firebug-p1]
![]() |
||
Comment 2•14 years ago
|
||
Probably pretty easy, actually, via nsIDOMWindowUtils. Could add a method that just returns a non-live array of user or UA sheets. If someone wants to implement, I'm happy to point you to the relevant pieces.
Keywords: helpwanted,
student-project
![]() |
||
Updated•14 years ago
|
Flags: wanted1.9.1.x?
Flags: blocking1.9.2?
Comment 3•14 years ago
|
||
Hi, I've noticed this bug on http://blog.getfirebug.com/?p=265 and because I have some free time and I wanted to improve my C++ skills I see this as a great opportunity how to start. I've currently have the latest trunk and prepared build environment so I'll start with it this night. I have only question if there is any other what I need to know - but the previous post is pretty clear. Regards, Ondrej Donek
Reporter | ||
Comment 4•14 years ago
|
||
You'll need test cases to succeed and test cases will illustrate the proposed API, so I encourage you to start there.
Comment 5•14 years ago
|
||
I would rather prefer having this exposed via nsIStyleSheetService - so that user stylesheets are exposed as well.
![]() |
||
Comment 6•14 years ago
|
||
John wants access to both, I think. That said, this needs to be done per-document, so I'm not sure hanging it off of nsIStyleSheetService is a good approach; you'd have to have an API on there that takes a document or something.
![]() |
||
Comment 7•14 years ago
|
||
That's assuming I diagnosed John's problem correctly, of course. I looked again, and we only clone the quirks sheet; the other user/ua sheets are used as-is (we used to clone them, though). So I'm not quite sure whether the issue John's seeing would be fixed by touching those sheets....
Reporter | ||
Comment 8•14 years ago
|
||
(In reply to comment #5) > I would rather prefer having this exposed via nsIStyleSheetService - so that > user stylesheets are exposed as well. I can already get these from window.document.styleSheets.
![]() |
||
Comment 9•14 years ago
|
||
No, you can get the document sheets. User sheets are not in that collection.
Flags: blocking1.9.2? → wanted1.9.2+
Updated•14 years ago
|
status1.9.1:
--- → ?
Flags: wanted1.9.1.x?
Comment 10•13 years ago
|
||
In order to make it ok for Firebug to mutate the UA sheets, we need to (1) ensure that the UA sheets get cloned in DocumentViewerImpl::CreateStyleSet or somewhere else and (2) ensure that they get unique inners before they're mutated (which bug 536379 should do for the get-style-rules case, and make it easy to do in other cases)
Reporter | ||
Updated•13 years ago
|
Whiteboard: [firebug-p1] → [firebug-p2]
Updated•5 months ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•