Closed
Bug 2258
Opened 26 years ago
Closed 26 years ago
[PP] Messed up drawing after scrolling
Categories
(Core :: Layout, defect, P2)
Tracking
()
VERIFIED
FIXED
M2
People
(Reporter: sfraser_bugs, Assigned: davidm)
References
()
Details
Load the URL above in viewer. Scroll the page down. Note how now multiple copies
of the page are drawn, overlaying eachother at different locations. This is not
just a refresh problem; if you collapse the window and expand it again, it still
draws with multiple overlaid copies.
Eli notes that something similar occurs when you view an FTP directory, and
resize the window. But then, a refresh of the window fixes the drawing problems.
This works fine on Windows.
Reporter | ||
Comment 1•26 years ago
|
||
A little more info: if you turn off double-buffering, the problem goes away
(or at least looks different). I guess we're drawing twice into a GWorld
somewhere without clearing it first.
Comment 2•26 years ago
|
||
[This happens with a huge number of URLs; I've seen at least 7 or 8. For one
grotesque example, see http://pds.jpl.nasa.gov/planets.]
Updated•26 years ago
|
Assignee: sdagley → mcmullen
Comment 3•26 years ago
|
||
Throwing to mcmullen since it is scrolling related.
Eli, can you try and isolate what might be the common HTML element causing this
problem? pink mentioned that it seemed to eb related to form elements but he has
seen pages w/form elements that do not exhibit this behavior.
Comment 4•26 years ago
|
||
Absolutely. Will investigate tomorrow morning.
Reporter | ||
Comment 6•26 years ago
|
||
I see this on pages with just <HR>s and text, perhaps with some <FONT> tags.
Comment 7•26 years ago
|
||
Simon, could you provide these URLs? Simpler cases may help a lot to track down
the bug.
Comment 8•26 years ago
|
||
<Am currently working on providing a simplified test case.>
Comment 9•26 years ago
|
||
Perhaps I'm stoned, but the following is a simplified test case that reproduces
this behavior (if you shrink the Viewer window and then scroll) will invoked the
messed up behavior.
I don't understand why a simple <HTML><BODY> (lots of foo) </HTML></BODY> will
invoke this behavior, but most pages don't exhibit it.
----SNIP----
<HTML>
<BODY>
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foofoo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo
</BODY></HTML>
----S
Comment 10•26 years ago
|
||
<also, note that I was using the 1.12.98 build of Viewer to try to simplify the
behavior.
Comment 11•26 years ago
|
||
I don't think this has anything to do with scrollbars. Using Eli's example, the
overdrawing occurs even before the scrollbar is invoked. Just start resizing the
window smaller.
Comment 12•26 years ago
|
||
<Also please note that if you take the same test case --- but put a background
image on the page --- the problem does not occur. This probably explains in part
why so few pages exhibit this problem.>
Comment 13•26 years ago
|
||
Likewise, if you put a BGCOLOR in the BODY tag, the problem also doesn't take
place.
Comment 14•26 years ago
|
||
Pierre, any suggestions based on these experiments?
Comment 15•26 years ago
|
||
No... I'm even more confused because the problem only happens in the simplest
case! I'll ask the layout gurus what they think about it.
Assignee | ||
Comment 16•26 years ago
|
||
reassign
Comment 17•26 years ago
|
||
Simon also noted an excellent scenario that may be related to this bug.
Specifically, if you view a page (i.e. Sample 1 from the Sample menu), and then
select "View Source", you'll see a new window with the source code superimposed
onto the rendered page content.
Didn't reproduce on Dagley's Mac, but I've seen it reproducibly with the 1.14.99
build of Viewer.
Assignee | ||
Comment 18•26 years ago
|
||
In nsCSSRendering.cpp there is a function called PaintBackground. If you specify
either a background color or image, then a routine is called to draw the
background. In the default case however, there is a color but it has a flag value
of 3 which is defined as NS_STYLE_BG_COLOR_TRANSPARENT & NS_STYLE_BG_IMAGE_NONE.
Since for a transparent background no drawing is done, the code just draws the
new html over the old. I am guessing that the default background color should not
be transparent but I don't know where the color comes from. Do we have a
preference file where default browser prefs ( or where does the default
background color get set) get read in from?
Comment 19•26 years ago
|
||
How about changing ::TextMode(srcOr) to ::TextMode(srcCopy) in
nsRenderingContextMac::SetQuickDrawEnvironment()?
If it solves the problem, please do a little bit of testing on various pages with
and without background image/color, with/without form controls, etc...
Assignee | ||
Comment 20•26 years ago
|
||
I really don't think thats the problem. I think we should be drawing a background
rect filled in with whatever the background color is. There shouldn't be a
difference between a web page with a BGCOLOR set to white ( or whatever the
netscape default background color is ) and one without the tag. I would like to
change the default background color to grey and see if windows still works
properly.
Comment 21•26 years ago
|
||
You're right, srcCopy is not the solution: when drawing a string, it erases
whatever background there is. I asked some Layout folks to have a look at the
problem.
Assignee | ||
Comment 22•26 years ago
|
||
more info. if you edit the root tag in ua.css and change the background color
from inherit to blue it doesn't work. On windows it does. I am guessing that
there is something wrong with drawing the root frame.
Assignee | ||
Comment 23•26 years ago
|
||
The problem was in nsDocumentViewer which contained some XP_MAC code which made
the assumption that the Root view would never be drawn.
Comment 24•26 years ago
|
||
Your fix is fine: you can remove my hack...
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 25•26 years ago
|
||
fix checked in
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 26•26 years ago
|
||
Verified fixed using 1.22.99 build of Seamonkey. Specifically verified that:
- the URL that Simon cited in the bug report displays correctly after
scrolling
- viewing page source works properly
- a sampling of other web pages lacking backgrounds (www.yahoo.com &
pds.jpl.nasa.gov/planets) also display scroll correctly
Comment 27•26 years ago
|
||
Inserting Milestone info.
You need to log in
before you can comment on or make changes to this bug.
Description
•