Closed
Bug 331458
Opened 19 years ago
Closed 19 years ago
Background image only displays top half
Categories
(Core :: Layout, defect, P2)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: neilio, Assigned: dbaron)
References
()
Details
(Whiteboard: [patch])
Attachments
(5 files, 2 obsolete files)
177.20 KB,
image/png
|
Details | |
397 bytes,
text/html
|
Details | |
4.26 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
3.04 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
394 bytes,
text/html; charset=UTF-8
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060322 Camino/1.2+
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060322 Camino/1.2+
In the latest Camino nightly, if I go to http://www.hushboom.com/ I get only 1/2 of the background image displaying - the bottom half is black. If I switch away to another tab and come back, however, the background image displays correct.
Reproducible: Always
Steps to Reproduce:
1. Go to http://www.hushboom.com/
2. Watch the background image load half-way and then stop.
3. Create a new tab and make it active.
4. Switch back to the first tab to see the background image fully displayed *without a page refresh*.
Reporter | ||
Comment 1•19 years ago
|
||
Comment 2•19 years ago
|
||
FWIW, this works great in 1.0.
cl
Someone have a recent trunk Firefox to test this with, and/or any idea of when it broke (my trunk Gecko bits are about a week old, so approx that long at least)?
QA Contact: page.layout
Version: unspecified → Trunk
Also happens on Windows; Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060325 Firefox/1.6a1
Cairo or not does not affect this bug.
Regression range seems to be around 2006-03-15-06 to 2006-03-15-12 (the second date provided by Mossop over IRC, I tested 2006-03-16-05). This points to dbaron, so CCing him :)
Assignee: mikepinkerton → nobody
Status: UNCONFIRMED → NEW
Component: Page Layout → Layout
Ever confirmed: true
OS: MacOS X → All
Product: Camino → Core
QA Contact: page.layout → layout
Hardware: Macintosh → All
Assignee | ||
Comment 6•19 years ago
|
||
So the problem is that PlaceScrollArea doesn't set NS_FRAME_OUTSIDE_CHILDREN (preferably by using FinishAndStoreOverflow) on the scrolledFrame (in this case, the canvas), so its parent skips it during the paint because the intersection of the dirty rect and the scrolled area is empty.
But when I fix (I tried both just setting the bit and using FinishAndStoreOverflow) that the background doesn't paint at all on the initial paint. It fixes the repaint bug, though.
Assignee | ||
Comment 7•19 years ago
|
||
er, intersection of the dirty rect and the **child's overflow area**
(In reply to comment #6)
> So the problem is that PlaceScrollArea doesn't set NS_FRAME_OUTSIDE_CHILDREN
> (preferably by using FinishAndStoreOverflow) on the scrolledFrame (in this
> case, the canvas), so its parent skips it during the paint because the
> intersection of the dirty rect and the scrolled area is empty.
I see...
> But when I fix (I tried both just setting the bit and using
> FinishAndStoreOverflow) that the background doesn't paint at all on the
> initial paint. It fixes the repaint bug, though.
Nothing springs to mind...
Assignee | ||
Comment 9•19 years ago
|
||
Making nsImageLoader invalidate the canvas correctly did spring to mind, but that didn't help either.
Assignee | ||
Comment 10•19 years ago
|
||
Then again, maybe I just wasn't testing right. I can't reproduce either problem now, although the background image was loading more slowly yesterday, which made it easier to see the second problem...
Assignee | ||
Comment 11•19 years ago
|
||
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [patch]
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Updated•19 years ago
|
Attachment #216341 -
Flags: superreview?(roc)
Attachment #216341 -
Flags: review?(roc)
Attachment #216341 -
Flags: superreview?(roc)
Attachment #216341 -
Flags: superreview+
Attachment #216341 -
Flags: review?(roc)
Attachment #216341 -
Flags: review+
Assignee | ||
Comment 12•19 years ago
|
||
Checked in to trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 13•19 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060326 Firefox/1.6a1 ID:2006032614 (non-cairo)
I'm still seeing this.
1. Load testcase. If all background is visible, ctrl-f5.
2. Right click somewhere on the page
3. Right click in another area. The previous area where the context menu was now shows the background that should be present.
Repo steps in comment 0 also still work for me.
Comment 14•19 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060326 Firefox/1.6a1 ID:2006032616 (NON-CAIRO)
not fixed yet.
http://img95.imageshack.us/img95/5237/as8ji.jpg
Assignee | ||
Updated•19 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 15•19 years ago
|
||
I think that it is necessary to extend a scrolled area to scroll area for scrolledFrame, as the previous code did.
--- ./nsGfxScrollFrame.cpp2 Sun Mar 26 22:46:06 2006
+++ ./nsGfxScrollFrame.cpp Tue Mar 28 23:46:03 2006
@@ -675,8 +675,9 @@ nsHTMLScrollFrame::PlaceScrollArea(const
nsRect scrolledArea;
scrolledArea.UnionRect(mInner.GetScrolledRect(aState.mScrollPortRect.Size()),
nsRect(nsPoint(0,0), aState.mScrollPortRect.Size()));
+ scrolledFrame->SetRect(scrolledArea);
// Note that making the view *exactly* the size of the scrolled area
// is critical, since the view scrolling code uses the size of the
// scrolled view to clamp scroll requests.
Assignee | ||
Comment 16•19 years ago
|
||
The reason we can't do that anymore is that it's much harder to do that when the overflow is to the left or top. So, instead, I want to make everything work without that.
Assignee | ||
Comment 17•19 years ago
|
||
Also, after my patch, I can't see the bug on Linux anymore. Do other people see the bug on Linux, or is it now Windows-only? Or do I have some other change in my tree?
Comment 18•19 years ago
|
||
I saw this problem with testcase on my PowerPC-Linux although applying posted patch. It seems that it is easy to see in a super-reload(reload with Shift-key).
I see the bug on initial load, but not on context-menu popup. So I think David's patch fixed a bug, but not the originally reported bug :-). It looks to me like the imageloader invalidation isn't working yet...
To be specific, on shift-ctrl-R, the document's body gets invalidated when the image has loaded but the canvas is not invalidated.
Assignee | ||
Comment 21•19 years ago
|
||
Yeah, I do still see the initial load problem when the image loads slowly enough. So the steps to repro for the reduced testcase really weren't the steps to reproduce for the original bug, it seems.
Assignee | ||
Comment 22•19 years ago
|
||
The problem is that the canvas frame has a view, so the nsIFrame::Invalidate calls UpdateView on a view that's smaller than the scrolled view, which clips the invalidate.
Assignee | ||
Comment 23•19 years ago
|
||
I should probably add a comment at some point as well, perhaps something like:
// If it's the canvas frame, we need the frame's view to be sized correctly
// as well so invalidates from background image loads will work correctly.
Attachment #216693 -
Flags: superreview?(roc)
Attachment #216693 -
Flags: review?(roc)
This is the straightforward fix: just invalidate the entire document. This isn't really wasteful because in almost all cases that's nearly what we're going to do anyway.
Assignee: dbaron → roc
Status: REOPENED → ASSIGNED
Attachment #216694 -
Flags: superreview?(dbaron)
Attachment #216694 -
Flags: review?(dbaron)
(In reply to comment #23)
> Created an attachment (id=216693) [edit]
> patch #2
scrolledView is scrolledFrame->GetView(). Why don't you just have the call to nsContainerFrame::SyncFrameViewAfterReflow set scrolledView's bounds to scrolledArea? The only reason that isn't happening now is because scrolledFrame doesn't get FRAME_OUTSIDE_CHILDREN until after that call.
Comment on attachment 216694 [details] [diff] [review]
fix
It would be better to fix the view bounds if we can do that without breaking scrolling.
Attachment #216694 -
Attachment is obsolete: true
Attachment #216694 -
Flags: superreview?(dbaron)
Attachment #216694 -
Flags: review?(dbaron)
We should fix the #if 0 code in nsImageLoader after we've fixed this...
Assignee | ||
Comment 28•19 years ago
|
||
(In reply to comment #25)
> scrolledView is scrolledFrame->GetView().
Oh, so it is. I was thinking it was the anonymous view.
Assignee | ||
Comment 29•19 years ago
|
||
Yeah, this works.
Assignee: roc → dbaron
Attachment #216693 -
Attachment is obsolete: true
Attachment #216695 -
Flags: superreview?(roc)
Attachment #216695 -
Flags: review?(roc)
Attachment #216693 -
Flags: superreview?(roc)
Attachment #216693 -
Flags: review?(roc)
Attachment #216695 -
Flags: superreview?(roc)
Attachment #216695 -
Flags: superreview+
Attachment #216695 -
Flags: review?(roc)
Attachment #216695 -
Flags: review+
Assignee | ||
Comment 30•19 years ago
|
||
Fix checked in to trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 31•19 years ago
|
||
Comment 32•19 years ago
|
||
It looks like this fixed perf regression bug 331385 (which was a regression from bug 192767).
You need to log in
before you can comment on or make changes to this bug.
Description
•