Closed
Bug 103594
Opened 23 years ago
Closed 23 years ago
[CASCADE][review]Clean up colors prefs code in nsPresShell
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla0.9.8
People
(Reporter: pierre, Assigned: pierre)
References
Details
(Keywords: testcase)
Attachments
(3 files)
(deleted),
patch
|
glazou
:
review+
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
text/html
|
Details | |
(deleted),
image/png
|
Details |
We should remove the PREFS_USE_OVERRIDE code in nsPresShell and follow what is
described in the comments:
// - OVERRIDE is better for text and bg colors, but bad for link colors,
// so eventually, we should probably have an agent and an override and
// put the link colors in the agent and the text and bg colors in the override,
Assignee | ||
Updated•23 years ago
|
Assignee | ||
Comment 1•23 years ago
|
||
In bug 103517, fantasai wrote: "Pref style rules should be inserted at the
beginning of the User level; right now nsPresShell adds them as UA rules."
Assignee | ||
Comment 2•23 years ago
|
||
*** Bug 103517 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.6 → mozilla0.9.8
Assignee | ||
Comment 3•23 years ago
|
||
Marc/Daniel: please r/sr
Summary: Clean up colors prefs code in nsPresShell → [review]Clean up colors prefs code in nsPresShell
Assignee | ||
Comment 4•23 years ago
|
||
Keywords: testcase
Summary: [review]Clean up colors prefs code in nsPresShell → [CASCADE][review]Clean up colors prefs code in nsPresShell
Comment 6•23 years ago
|
||
Comment on attachment 61968 [details] [diff] [review]
patch
r=glazman
Attachment #61968 -
Flags: review+
Assignee | ||
Comment 7•23 years ago
|
||
fantasai: the :root{} rule doesn't do anything even if it changed to !important.
The testcase works fine though when the selector is changed to 'body'.
I suspected that would happen, since you're appending the stylesheet instead of
prepending it. Try replacing
+ mStyleSet->AppendUserStyleSheet(mPrefStyleSheet);
with
+ mStyleSet->InsertUserStyleSheetBefore(mPrefStyleSheet,
+ mStyleSet->GetUserStyleSheetAt(0));
I think the testcase should work then.
The reason it works with body is because the body is a child of :root--no matter
how specific the rule is on :root, it will never override a color on the body.
(If you use body instead of :root and make the <head> and <title> display block,
you'll see that the prefs color is set on the :root, because the <head> still
has the prefs color.)
Updated•23 years ago
|
Attachment #61968 -
Flags: superreview+
Comment 9•23 years ago
|
||
Comment on attachment 61968 [details] [diff] [review]
patch
sr=attinasi
Assignee | ||
Comment 10•23 years ago
|
||
fixed
checked in with mStyleSet->InsertUserStyleSheetBefore(mPrefStyleSheet, nsnull)
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 11•23 years ago
|
||
Did this cause a 10ms jump in page load time?
Comment 12•22 years ago
|
||
on linux, i tested the testcase attachment 62200 [details] .....
...this is what i saw ...
TEST 1 :
The text is blue on an aqua background. The entire body has the aqua background.
TEST 2:
The text is red on an aqua background, but, the aqua background is not painted
ont the entire body ....... only text background gets the aqua background ...
remaining page has a white background .
see what i am mean in the attacheded image.
Comment 13•22 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•