Closed Bug 27180 Opened 25 years ago Closed 24 years ago

Bad paint on fixed positioning [FIX POS]

Categories

(Core Graveyard :: GFX, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9

People

(Reporter: u, Assigned: roc)

References

Details

(Keywords: css2, testcase, Whiteboard: ViewManager2 seems to fix. [nsbeta3-])

Attachments

(9 files)

* DESCRIPTION: Elements with fixed positioning dont paint well if: 1.- Dont't have set the "background-color" propertie. 2.- Have "background-color" propertie, but the content overlaps his parent size 3.- Have "background-color" propertie, but "opacity" is different than "100%" * STEPS TO REPRODUCE: Open the atached file * RESULT: Fixed positioned boxes with corrupted content and filled with parts of the mozilla interface or other well painted fixed positioned items. * EXPECTED RESULT Fixed positioned boxes with his content. * NOTES: Tested in html pages and "pure xml"+CSS2 pages, nothing to do with div tag * TESTED IN: - Win 2000(PR2): Milestone 13 - Win 98: Build ID: 2000020908 - Linux: Recent build(not sure what)
These are all known issues because of problems in the compositor...
Component: Layout → Compositor
Re-assigning to Compositor component
Assignee: troy → beard
Many of these seem to work with nsViewManager2. Would you please check this in your build? Go to Preferences dialog, Debug, check Use ViewManager2.
Whiteboard: ViewManager2 seems to fix.
Work Ok with nsViewManager2 in Build ID: 2000021014 OS: Win 2000
*** Bug 27706 has been marked as a duplicate of this bug. ***
If #27706 is a duplicate of this, then this bug is not fixed. I have enabled nsViewManager2, and the situation has improved, but the basic problem remains: starting with a wide window, and then making it narrow, the lines are not redrawn with new breaks until the window gets really narrow. I will bring my testcase from 27706 to here.
Keywords: css2
I don't see the reflow issues with the new test case. Everything looks fine to me on the Mac.
On the Mac, nsWindow::Resize() invalidates the entire widget area, if the aRepaint parameter is true. On Linux, and Windows, this invalidate isn't done. This may be a brute force fix, but at least the platforms will be consistent in behavior, and that was the intent of the aRepaint parameter. Here're patches to make this work on linux and windows: Index: mozilla/widget/src/gtk/nsWindow.cpp =================================================================== RCS file: /cvsroot/mozilla/widget/src/gtk/nsWindow.cpp,v retrieving revision 1.240 diff -c -2 -r1.240 nsWindow.cpp *** nsWindow.cpp 2000/02/12 00:42:57 1.240 --- nsWindow.cpp 2000/02/15 04:57:32 *************** *** 2445,2448 **** --- 2445,2451 ---- Show(PR_TRUE); + if (aRepaint) + Invalidate(PR_FALSE); + return NS_OK; } Index: mozilla/widget/src/windows/nsWindow.cpp =================================================================== RCS file: /cvsroot/mozilla/widget/src/windows/nsWindow.cpp,v retrieving revision 3.251 diff -c -2 -r3.251 nsWindow.cpp *** nsWindow.cpp 2000/02/12 00:10:22 3.251 --- nsWindow.cpp 2000/02/15 04:59:36 *************** *** 1183,1186 **** --- 1183,1190 ---- NS_IF_RELEASE(par); } + + if (aRepaint) + Invalidate(PR_FALSE); + return NS_OK; } *************** *** 1232,1235 **** --- 1236,1243 ---- NS_IF_RELEASE(par); } + + if (aRepaint) + Invalidate(PR_FALSE); + return NS_OK; }
Status: NEW → ASSIGNED
Target Milestone: M14
Checked in changes for Windows & Linux.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Build: 2000021608 (Win32) My testcase (attachment 5237 [details]) displays garbage when the window is small. More precisely: If I make the window very small and then load the attachment URL, then the page renders with some cruft from the Moz toolbar area at the back, the red fixed frame drawn over the top of that, and then the text is drawn over the top of all of it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Build: 2000021608 Win32(Same as you) with nsViewManager2 enabled In my testcase(attachment 5123 [details]) some problems remain: 1.- If the the backgroun-color is not set the problem remain 2.- If the content overlaps his parent seems to pain ok, but if you try to select the text that is outside of the parent, the backgroun is corrupted. 3.- If the opacity isn't 100% are some problems: - The border isn't painted - The opacity is like 100%(the content isn't transparent) roc+moz: I see the problems you describe in your testcase, but only if the window is very little, if i load the test case and then meake the window little the problem apear, but disapear making the window bigger again. (Sorry for my bad english)
Assignee: beard → troy
Status: REOPENED → NEW
Component: Compositor → Layout
Target Milestone: M14 → M15
In the second case, it looks to me like when the text overflows the div, the background color of the view the text is in isn't being properly painted. I'd suspect layout rendering is the culprit. This may also explain the first attachment drawing artifacts. Handing back to somebody in layout to take a look.
I can't tell which testcase you're referring to and exactly what the problem is but I doubt it's layout If the fixed positioned element has text that overflows its bounds, then we mark the view as having transparent content and the part of the view that is opaque we paint with the background color, and the part that is transparent should display with whatever background is underneath If you look at the view in question and see that it is marked as having transparent content, then layout is doing the correct thing
Assignee: troy → beard
Attachment 5411 [details] shows that a fixed-position DIV with no content gets trash drawn in its area. It doesn't seem to have anything to do with text overflowing. (If I put content in there, it just gets drawn on top of the trash.) So it looks like these (all?) fixed-position elements are being incorrectly treated as opaque. Over to you people to figure out whether it's layout or the compositor :-).
There's definately something up with Fixed positioning and overflow properties. Quite often adding overflow: hidden will result in the rendering being OK (or at least a lot better, until you resize the window too small) whereas adding overflow: visible will give you a whole bunch of junk in the view, bits of the previous page elements, bits of the toolbar etc. etc. Since visible is the default many layout problems can be "cured" by adding overflow: hidden, but this is not a permenant solution
This requires that we correctly redraw every visible view that intersects each widget. The current display list creation code only considers views that lie along the path from the painted-widget's view up to the root view. We also need to consider widget-bearing views below the painted-widget's view in the tree. This is hard to explain in words. We need a good diagram to visualize this.
Status: NEW → ASSIGNED
Reassigning all compositor bugs to kevin.
Assignee: beard → troy
Status: ASSIGNED → NEW
Reassigning all compositor bugs to kevin.
Assignee: troy → kmcclusk
Moving to M16.
Status: NEW → ASSIGNED
Target Milestone: M15 → M16
Target Milestone: M16 → M17
Moving to M18
Target Milestone: M17 → M18
This bug has been marked "future" because the original netscape engineer working on this is over-burdened. If you feel this is an error, that you or another known resource will be working on this bug,or if it blocks your work in some way -- please attach your concern to the bug for reconsideration.
Target Milestone: M18 → Future
the original testcase was invalid, I attached a new version. The original bug seems fixed, but some problems remains: the opacity don't work well, and the text that overflows isn't transparent. I'll attach a new version of the testcase that shows better the actual problems. I think this shouldn't be marked as "future", IMHO we need to fix it before NS6 ships. Kevin, what milestone you think can we set?
As per meeting with ChrisD today, taking QA.
QA Contact: petersen → py8ieh=bugzilla
I have this working perfectly in my revamped nsViewManager2.
Robert: Looks great!
Reassigning to Robert, who has a fix pending review in bug 39621.
Assignee: kmcclusk → roc+moz
Status: ASSIGNED → NEW
Depends on: 39621
Hardware: PC → All
Target Milestone: Future → M18
Status: NEW → ASSIGNED
Summary: Bad paint on fixed positioning ( css2 ) → Bad paint on fixed positioning [FIX POS]
Rubber stamping [nsbeta3-], since Robert's fix is slated for the next release do to high risk considerations.
Whiteboard: ViewManager2 seems to fix. → ViewManager2 seems to fix. [nsbeta3-]
Target Milestone: M18 → ---
Can we resolve this one?
Component: Layout → Compositor
Target Milestone: --- → mozilla0.9
This should be fixed as of today, now that 39621 is fixed.
Looks fixed to me!
Status: ASSIGNED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → FIXED
verified
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: