Closed Bug 408913 Opened 17 years ago Closed 16 years ago

Black horizontal stripes/lines after zooming in and scrolling down in this case

Categories

(Core :: Web Painting, defect, P2)

x86
Windows XP
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: martijn.martijn, Assigned: roc)

References

()

Details

(Keywords: testcase)

Attachments

(7 files)

Attached file testcase
Maybe related to bug 382961.

See testcase, to reproduce the bug:
- Load the testcase, press ctrl-+ 4 times to zoom in
- scroll down

Expected result:
- No black stripes should be seen

Actual result:
- Black horizontal stripes over the place where the iframes are.

Note that after pressing 2 times ctrl-+, I already see a horizontal stripe appearing. (apparenlty, it also happens after 2 times zooming in)
I'm also seeing white stripes/lines on this site after scrolling on the left advertisement iframe (no need to zoom in):
http://www.beursduivel.be/Winst_Wachovia_verdampt_door_afschrijvingen-43667.news
Might be related to this bug.
Or just go to cnn.com and scroll the page.
(Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008022604 Minefield/3.0b4pre)
Flags: blocking1.9?
Flags: tracking1.9? → blocking1.9?
Don't see it on Mac. Maybe Windows only?
Could be, I only have access to Windows.
Furthermore, it only happens in the 'Ads by Google' frame on cnn.com pages, but it is not always there (probably rotating with other ads). 
It happens intermittently for me, sometimes I see it happen a lot and then not anymore, using the same testcases, sites.
I could attach more (unminimized) testcases that also show the issue, but I doubt those would show the bug on Mac.
Attached file testcase2
Another testcase, that shows the issue for me. No need to zoom in or out. Every second iframe shows the black stripes for me when scrolling.
Yeah, that testcase works fine on Mac, breaks on Windows.

I wonder if this is related to bug 376124.
Ok, let's hope the patch in bug 376124 fixes this.
Depends on: 376124
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
That patch doesn't seem to fix this :-(.
Attached file testcase 3
This testcase is fairly simple and shows the problem on load, no zooming or scrolling required --- there's a black line at the top of the IFRAME.
Attached file even better testcase
This testcase shows the bug on Mac. There's a row of white pixels at the top of the IFRAME.
Okay, the problem here is that our "offset to the root" has user-space y of -10.5. We do UserToDevicePixelSnapped, that gives us -10. The problem is that the widget has been positioned at a y-offset of 11, not 10. So inverting the sign of the offset to the root before snapping, so it's consistent with how we round the offsets of widgets, should fix this.
Attached patch fixSplinter Review
This is actually a regression from the fix for bug 417967, the fix there was wrong.

The correct way to get things pixel-aligned is not to add an extra translation based on snapping. The logic in nsViewManager::Refresh should already be adequate to get things pixel-aligned, because we translate by ViewToWidgetOffset which is the difference in appunits between the view top-left and the (rounded) widget top-left.

The actual problem causing bug 417967 is that ViewToWidgetOffset always returns (0,0) for the root view of a subdocument, but that is incorrect when the subdocument is positioned at a fractional offset. As indicated in the comments in this patch, the true ViewToWidgetOffset for the root view should be the same as for its parent view which is the inner view of nsSubdocumentFrame. The reason for this discrepancy is that the root view's widget is not positioned by nsView::CalcWidgetBounds like all other views' widgets.

This patch fixes the testcases in this bug and does not regress bug 417967. Acid3 (reportedly regressed by 417967) also works fine.

I wish we could automatically test this stuff but AFAIK we'd need significant improvements in the infrastructure. drawWindow won't work because we need to paint via a child document's widget *and* have the drawing rooted by the outer document's viewmanager.

I am SO looking forward to compositor which will simplify this code out of existence.
Attachment #306984 - Flags: superreview?(bzbarsky)
Attachment #306984 - Flags: review?(bzbarsky)
Whiteboard: [needs review]
> Acid3 (reportedly regressed by 417967) also works fine.

I mean, it was reported that it had acquired a black line, and that is not apparent with this patch.
Comment on attachment 306984 [details] [diff] [review]
fix

>+      // is always positioned at that iner view's top-left, and its

s/iner/inner/

r+sr=bzbarsky with that
Attachment #306984 - Flags: superreview?(bzbarsky)
Attachment #306984 - Flags: superreview+
Attachment #306984 - Flags: review?(bzbarsky)
Attachment #306984 - Flags: review+
Whiteboard: [needs review] → [needs landing]
checked in
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
verified fixed using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b5pre) Gecko/2008031004 Minefield/3.0b5pre. I verified using all of the test cases in the bug.
Status: RESOLVED → VERIFIED
I'm not certain if this is simliar or not to Bug 399435, but I'm seeing this bug appear in Firefox 3.0 Beta 5 and I was hoping it was fixed. Is this a new bug or an old  bug that was supposedly fixed?
I'm not certain if this is related to the black bars or lines when scrolling downward, but rows are failing to render in gmail on scrolling downward in Firefox  3.0 B5 rc1.
Aharon, please file a new bug for that with steps to reproduce, and CC me and martijn.martijn@gmail.com, thanks!
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: