Closed
Bug 19329
Opened 25 years ago
Closed 24 years ago
default page background color differs between platforms [mac][gfx]
Categories
(Core :: XUL, defect, P4)
Tracking
()
RESOLVED
FIXED
mozilla0.9
People
(Reporter: sfraser_bugs, Assigned: Brade)
References
Details
(Keywords: platform-parity)
Attachments
(1 file)
13.50 KB,
patch
|
Details | Diff | Splinter Review |
On Windows, the default page background color is white (i.e. for an HTML page
that does not specify a background color or image on the BODY tag, or through
CSS). On Mac and UNIX, it's gray. Why the difference?
Comment 1•25 years ago
|
||
I guess it has something to do with widget/nsLookAndFeel.cpp on Mac and Unix:
case eColor_WindowBackground:
aColor = NS_RGB(0xdd,0xdd,0xdd);
break;
Assignee: leger → trudelle
Component: Browser-General → XP Toolkit/Widgets
QA Contact: leger → claudius
Updated•25 years ago
|
Assignee: trudelle → sdagley
Priority: P3 → P4
Target Milestone: M13
Comment 3•25 years ago
|
||
reassigning to sdagley as p4 for m13
Updated•25 years ago
|
Status: NEW → ASSIGNED
Updated•25 years ago
|
Target Milestone: M13 → M15
Comment 4•25 years ago
|
||
why was this left on M13? moving to m15
Updated•25 years ago
|
Summary: [PP] default page background color differs between platforms → default page background color differs between platforms
Reporter | ||
Comment 6•25 years ago
|
||
Why does sdagley have this? Reassigning to pierre, since this is really a layout
issue.
Assignee: sdagley → pierre
Status: ASSIGNED → NEW
Comment 7•25 years ago
|
||
Assigning to ekrock: 1/3 of Pierre's NEW bugs to help reduce his doomage factor
Assignee: pierre → ekrock
Comment 8•25 years ago
|
||
Reassigned back to me these bugs that shouldn't have left my list.
Assignee: ekrock → pierre
Comment 9•25 years ago
|
||
On Windows the bkcolor is a system setting, as it is on gtk, qt and OS/2. The
mac and BeOS implementations of nsLookAndFeel have hard-coded the values instead
of getting the system values. (I did not look at the other platforms)
This is either OK as is, or the platform implementations of nsLookAndFeel
that have hard-coded colors need to be updated to reflect system colors. This
should probably be somebody else's bug...
Comment 10•25 years ago
|
||
sfraser: The CSS2 System Colors are a related yet separate issue. It was assigned
to sdagley because the platform-specific implementations of nsLookAndFeel belong
to XPWidgets. Bouncing back to XPWidgets.
Assignee: pierre → trudelle
QA Contact: claudius → jrgm
Comment 11•25 years ago
|
||
reassigning to rods, who I'm told has claimed this as his very own.
Assignee: trudelle → rods
Comment 12•25 years ago
|
||
The nsLookAndFeel on the make needs to get the system color for the background
of pages just like the other platforms
Assignee: rods → dcone
Reporter | ||
Comment 13•25 years ago
|
||
On Mac, there is no widely accepted background color for HTML pages in the
system, which is probably the reason why the platforms differ. However, Internet
Config has a setting for the page background color, as well as visitied and
unvisited links, and I think we should start using these.
davidm is in the process of adding Internet Config support, so there will be a
service you can call to get info from IC.
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M15 → M17
Updated•25 years ago
|
Target Milestone: M17 → M18
Comment 14•24 years ago
|
||
This bug has been marked future because we have determined that it is not
critical for netscape 6.0. If you feel this is an error, or if it blocks your
work in some way -- please attach your concern to the bug for reconsideration.
Target Milestone: M18 → Future
Comment 15•24 years ago
|
||
this may seem like a silly suggestion, but why don't we simply modify html.css
from this:
body {
display: block;
line-height: normal;
margin: 8px;
}
to this:
body {
display: block;
line-height: normal;
margin: 8px;
background-color: white; /* ensures platform parity on background colors */
}
In the future, we can add more platform specific stuff for a "more correct"
solution. In the here and now, we're consistent across platforms.
There is also a mozilla precident for this. The html.css frame background color
is defined as being white. This solution would simply be doing the same thing
for non-frame pages.
Thoughts?
David
Comment 16•24 years ago
|
||
This bug is not valid. We get the colour of the page background from the system,
and thus fit with the user's preferences by default. You could take three
Windows systems and we would have a different page background colour on each;
it's not a per-platform thing it is a per-user thing.
If you want the default background changed for a particular platform, file a bug
directly on that platform. Mac and Xlib have a hard coded values, because (I
guess) those platforms do not have user-editable preferences for colours (!).
The proposed solution would not work due to clashing with CSS rules for
background propagation (this is a complex issue, mail me if you want details).
Also, the "mozilla precedent" was actually a bug causing performance problems,
and you will see the frame background colours have now been set to transparent.
In any case, that white was not being used as 'white' anywhere. (The colour was
overriden by the document that was drawn on the frame itself.)
FWIW, bug 1004 is covering the issue of implementing nsLookAndFeel correctly on
the Mac.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Comment 17•24 years ago
|
||
Reopening because nobody knows where the gray background is coming from. I asked
the following question to Don, Buster, Waterson, Kevin and others last month but
nobidy replied. Ian is persuaded that it comes from the nsPresContext constructor
but I wrote 3 times already that it does not.
---
In html.css, when the viewport and viewport-scroll have "background-color:
inherit", we get a gray background on the web pages - rgb(192,192,192) - but it
doesn't come from nsLookAndFeel, nor StyleColorImpl::ResetFrom(), nor from
nsPresContext::nsPresContext(). Do you know where that default background is
set?
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Comment 18•24 years ago
|
||
I should have added that when viewport and viewport-scroll don't have
"background-color: inherit" (which isn't what we want) then the color comes from
the LookAndFeel.
Comment 19•24 years ago
|
||
Bug 5721 is the general "support Internet Config properly" bug on the Mac.
This can be considered to be a part of that bug, if you like.
Updated•24 years ago
|
Status: REOPENED → ASSIGNED
Summary: default page background color differs between platforms → default page background color differs between platforms [mac][gfx]
Updated•24 years ago
|
Blocks: 71775
Keywords: correctness,
nsbeta1
Comment 20•24 years ago
|
||
boy howdy. this bug has been around the block.
i know for a fact that this difference is causing certain pages to look crappy on
mac when they look ok on win32. tables end up with a gray bg on mac, and on win32
they're white and so it looks a-ok.
http://bugzilla.mozilla.org/show_bug.cgi?id=71775
Assignee | ||
Comment 21•24 years ago
|
||
I think the color we give (hardcoded) in the Mac version of nsLookAndFeel.cpp,
should be white for eColor_WindowBackground.
I made this change (see Pierre's first comment for location) and haven't seen any
problems in either theme.
Comment 22•24 years ago
|
||
brade, since you made the bg white, can you try
http://www.headphone.com/ProductsHeadphones/SennheiserHD570.asp
and see if the table bg is gray or white? On the tip, it's an ugly gray.
Assignee | ||
Updated•24 years ago
|
Assignee: dcone → brade
Status: ASSIGNED → NEW
Assignee | ||
Comment 23•24 years ago
|
||
I'll take this bug and do the IC thing
Assignee | ||
Updated•24 years ago
|
Target Milestone: Future → mozilla0.9
Assignee | ||
Comment 24•24 years ago
|
||
Comment 25•24 years ago
|
||
Does IC default to #FFFFFF? Having a default other than #FFFFFF defeats the purpose of
the setting because Web authors will keep overriding the user pref on a per page basis if
the default is unacceptable to them. (Page authors, in general, don't want gray
backgrounds. Defaulting to gray way back in Mosaic and Nav 1 was a bad idea.)
Assignee | ||
Comment 26•24 years ago
|
||
The default of Internet Config is irrelevant (but yes, it is white). The reason
is that if the Preference for using the "OS Settings" is checked, this is what
the OS has set (whether the user has that setting in IC to orange, red, blue,
gray, or white).
Henri--I don't understand your point. If the user sets the preference in the OS,
we should be following it (not trying to guess what a page author may or may not
have wanted it to appear with).
Status: NEW → ASSIGNED
Reporter | ||
Comment 27•24 years ago
|
||
Patch looks good. My only reservation is the overhead of getting the IC service
each time we request the page background or foreground color. Does anyone have
opinions on this?
Assignee | ||
Comment 28•24 years ago
|
||
nsInternetConfigService::GetColor gets called 3 times for a new window open and
once for each URL that is loaded.
Unfortunately I don't have the instrumentation installed right now to determine
how long it takes to call into IC on my Mac.
If there is a performance problem, I think we should fix the problem of the
nsPresContext constructor not calling into LookAndFeel when it may not need the
information anyways (or some other related fix).
Other opinions?
Assignee | ||
Comment 29•24 years ago
|
||
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•