Closed Bug 514127 Opened 15 years ago Closed 15 years ago

"Scroll ignored" area rendered wrong in fennec

Categories

(Core :: Layout, defect, P2)

1.9.2 Branch
x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1
Tracking Status
status1.9.2 --- beta1-fixed
fennec 1.0+ ---

People

(Reporter: romaxa, Assigned: tnikkel)

References

Details

Attachments

(2 files, 2 obsolete files)

Attached image Picture
Install:
http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/fennec-1.0b4pre.en-US.linux-i686.tar.bz2


./fennec http://linux.org.ru

Scroll down a bit to see how rendered area outside overflow rect.

EXPECTED: background is black, no white painted area
ACTUAL: background is rendered white outside of rendered area
This bug looks like 100% regression candidate:
http://hg.mozilla.org/mozilla-central/rev/23942ec68af5

Bug 488242. Make iframes with semi-transparent backgrounds work correctly by painting all canvas background colors using a dedicated fallback background color display item. r+sr=roc
Blocks: 488242
tracking-fennec: --- → ?
Tested mozilla-1.9.2 without 
http://hg.mozilla.org/mozilla-central/rev/23942ec68af5
change - Works fine.
From discussing in #mobile it seems Fennec doesn't update the scrollport properly. I think this is probably why bug 488242 is causing the problem; because it draws the background color based on the viewport. So it sounds like updating the scrollport is the proper solution. But if not I think I can change RenderDocument (the guts of drawWindow) to paint the canvas background color over the passed in rect instead of the viewport. That actually might be a good idea regardless.
Attached patch patch? (obsolete) — Splinter Review
Could someone try this patch with Fennec and see if it fixes the problem?
Comment on attachment 398092 [details] [diff] [review]
patch?

It solve problem with MicroB browser, I guess with fennec it should work too.
I have tested it a bit more on N900 device, and in the beginning of page loading it flashes, probably it possible to see on desktop too, by running fennec with valgrind (make it slower)
with white background and then it works fine.
Flashes caused by this patch?
Comment on attachment 398092 [details] [diff] [review]
patch?

This patch seems like a good idea for drawWindow in general. Code that tries to render the entire web content to a canvas will need this patch to work right.
One question I wanted to answer before potentially getting this in was what we do if the passed in rect extends outside the document bounds? Is that allowed? This patch will probably change what happens in that case.
IMHO drawWindow should draw nothing outside the document bounds.

I think here if RENDER_IGNORE_VIEWPORT_SCROLLING is not set we should keep doing what we're doing --- the canvas background color fills the viewport --- otherwise we set the canvas background color to cover the area of the root scrolled frame ... so we should pass GetRootScrollFrameAsScrollable()->GetScrolledFrame() as the frame.
tracking-fennec: ? → 1.0+
I think what we want is the overflow rect of GetRootScrollFrameAsScrollable()->GetScrolledFrame(), which is a CanvasFrame. The rect of the scrolled frame is just the size of the scrollport and the position marks the scroll position. Or more specifically CanvasFrame::CanvasArea is what we want, which is what the canvas background is drawn over. Without duplicating that code, I guess the best way to access CanvasFrame::CanvasArea is to pull out the definition of CanvasFrame into a header then?
You're right. You could move it into a helper function in nsLayoutUtils.
Attached patch patch v2 (obsolete) — Splinter Review
Assignee: nobody → tnikkel
Attachment #398092 - Attachment is obsolete: true
Attachment #400447 - Flags: review?(roc)
Attachment #398092 - Flags: review?(roc)
Oh, we should probably have a mochitest for this.

Two things that would be nice to do in followup:
-- rename nsHTMLFrame.h/.cpp to nsCanvasFrame.h/.cpp
-- remove nsICanvasFrame and just use nsCanvasFrame instead
...and CanvasFrame -> nsCanvasFrame? Or what is the plan for getting rid of the ns prefix and using the mozilla namespace for frames?
That's a pretty big project that I don't want to start here!
So yeah, renaming to nsCanvasFrame would be desirable.
Attached patch patch v3Splinter Review
Just added a mochitest.

I'll do that cleanup in a followup later.
Attachment #400447 - Attachment is obsolete: true
Attachment #400963 - Flags: review?(roc)
Comment on attachment 400963 [details] [diff] [review]
patch v3

Do you actually have to escape the entire iframe src URL? I seem to recall writing iframe data: URLs without escaping <> and using ' for quotes
You're probably right, but I've had problems before, so I just ran the iframe src data URL through a encoder and pasted instead of (possibly) trying to figure out why it wasn't working. With the full unencoded src right there it shouldn't cause any problem.
Keywords: checkin-needed
Flags: wanted1.9.2?
Attachment #400963 - Flags: approval1.9.2?
Attachment #400963 - Flags: approval1.9.2? → approval1.9.2+
http://hg.mozilla.org/mozilla-central/rev/aba4d636382d
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Flags: in-testsuite+
Keywords: checkin-needed
Keywords: checkin-needed
Whiteboard: needs 1.9.2 landing
I need to merge this to 1.9.2 before landing on 1.9.2.
Keywords: checkin-needed
Whiteboard: needs 1.9.2 landing
Flags: wanted1.9.2? → blocking1.9.2+
Priority: -- → P2
Looking into it.
The failing tests pass on my Linux box, and this is on m-c. I will wait until the Linux test results are in on the next push, if it's still failing I'll backout.
Tests are all starred or green, so marking fixed on 1.9.2.

http://hg.mozilla.org/releases/mozilla-1.9.2/rev/9170c06ef1e5
Problem is still not fixed properly with latest patch.

When I scroll page down, it works fine, but when I scroll the same page back to TOP, white background visible.
http://maemo.org/news/events/maemo_summit_2009/#participants
Reproducible on:
http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2009-09-24-03-mozilla-1.9.2/
And fennec nightly


With patch https://bug514127.bugzilla.mozilla.org/attachment.cgi?id=398092
It works fine.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Filed bug 518777 for this issue. Marking this resolved because it did fix a real problem, and trying to fix this new issue in this bug would just cause confusion as to what is fixed and what is not etc.
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Depends on: 518777
The cleanup mentioned in comment 17 is filed as bug 520425.
The test case depends on the implementation details of the old HTML parser on how data: URL parsing maps to event loop tasks (bug 546639).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: