Closed
Bug 232838
Opened 21 years ago
Closed 21 years ago
too-short scrollbars cause scrollport to be sized incorrectly
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: roc, Assigned: roc)
References
(Blocks 1 open bug)
Details
(Keywords: regression)
Attachments
(7 files, 2 obsolete files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
dbaron
:
review+
dbaron
:
superreview+
chofmann
:
approval1.7b+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
dbaron
:
review+
dbaron
:
superreview+
dbaron
:
approval1.7b+
|
Details | Diff | Splinter Review |
(deleted),
image/png
|
Details | |
(deleted),
text/html
|
Details | |
(deleted),
patch
|
bzbarsky
:
review-
bzbarsky
:
superreview-
|
Details | Diff | Splinter Review |
(deleted),
image/jpeg
|
Details |
Followup from the bug bz uncovered in bug 232469. It looks like whenever a
scrollbar is too short, the layout of the scrollport screws up so that it
appears to grow to include the scrollbar.
Assignee | ||
Comment 1•21 years ago
|
||
This illustrates the bug. Use a frame dump to see that the scrollport frame is
incorrectly sized.
Assignee | ||
Updated•21 years ago
|
Priority: -- → P2
Assignee | ||
Comment 2•21 years ago
|
||
The bug was a regression from the checkin for bug 210269, which removed the
setting of the 'collapsed' attribute on scrollbars. When a vertical or
horizontal scrollbar was too small to fit, we were trying to remove it. To
fully remove it, we have to now call LayoutBox on it again with a zero width
(or height), and we weren't doing this (I think we were relying on the setting
of 'collapsed' to trigger another reflow). This patch does that.
This patch also fixes an issue where if the horizontal scrollbar is too small
and is removed, the vertical scrollbar may need to grow. Again this was
probably handled before by another induced reflow.
This scrolling code is a bit nasty. It's unfortunate that in some cases we may
reflow the scrolled area three times.
Assignee | ||
Comment 3•21 years ago
|
||
Comment on attachment 140485 [details] [diff] [review]
fix
bz, are you reviewing nsGfxScrollFrame these days?
Attachment #140485 -
Flags: superreview?(bz-vacation)
Attachment #140485 -
Flags: review?(bz-vacation)
Comment 4•21 years ago
|
||
Probably, but I may not be able to get to this in time for 1.7a... I've got a
bunch of reviews already on my plate. :(
Assignee | ||
Comment 5•21 years ago
|
||
Never mind, here's a better fix. This is a bit more aggressive and logical
about doing the right thing. See the big comment. By checking minsize up front,
we can avoid laying out any scrollbar more than once AND we can ensure that if
there's only room for exactly one scrollbar, we will show the vertical
scrollbar.
Assignee | ||
Updated•21 years ago
|
Attachment #140485 -
Attachment is obsolete: true
Assignee | ||
Comment 6•21 years ago
|
||
Comment on attachment 140487 [details] [diff] [review]
revision
OK, I'll try dbaron then :-)
Attachment #140487 -
Flags: superreview?(dbaron)
Attachment #140487 -
Flags: review?(dbaron)
Assignee | ||
Updated•21 years ago
|
Attachment #140485 -
Flags: superreview?(bz-vacation)
Attachment #140485 -
Flags: review?(bz-vacation)
Comment 7•21 years ago
|
||
roc, to not file another bug, I'll ask here: Will that fix the inconsistent
behaviour I have on http://com.naddy.at/?d=b&m=i (sorry, no minimized case, it
disappeared when I tried to do a minimized testcase)?
What I'm seeing is a difference of layout of the main area in the middle (has
overflow:auto set, and contains a 100% width table) between first layout (call
URL via link or URL bar) and reloading (pressing reload on the browser).
At first, right and left borders are equal (table fills whole div). At reload,
right border is greater, as between the table and div border space for the
not-shown scrollbar is reserved.
Will this change to a consistent behaviour with this patch or should I file a
seperate bug?
(btw, what I'd really need for that site to behave correctly would be
overflow-x:auto;overflow-y:visible; - but that's CSS3 and not yet supported)
Comment 8•21 years ago
|
||
Comment on attachment 140487 [details] [diff] [review]
revision
>+ Our basic strategy here is to first try laying out the content with
>+ the scrollbars in their current state. We're hoping that that will
What's the current state in the first layout? (I guess I'd hope it's that the
scrollbars will be there, since reflowing will generally be cheaper if they
need to be removed (less stuff to reflow).)
Assignee | ||
Comment 9•21 years ago
|
||
kairo: not sure
dbaron: actually I think they're not there initially. This part is the same as
our current behaviour. I'm not sure it's unreasonable.
Assignee | ||
Comment 10•21 years ago
|
||
I think this is a layout regression, and the patch is nontrivial, so I think it
needs 1.7b exposure.
Flags: blocking1.7b?
Comment 11•21 years ago
|
||
Comment on attachment 140487 [details] [diff] [review]
revision
r+sr=dbaron. I may try to comment on the patch at a later date, but for now
we're probably better off just getting it in so it gets tested.
Attachment #140487 -
Flags: superreview?(dbaron)
Attachment #140487 -
Flags: superreview+
Attachment #140487 -
Flags: review?(dbaron)
Attachment #140487 -
Flags: review+
Assignee | ||
Comment 12•21 years ago
|
||
Comment on attachment 140487 [details] [diff] [review]
revision
layout regression, needs 1.7b exposure
Attachment #140487 -
Flags: approval1.7b?
Comment 13•21 years ago
|
||
Comment on attachment 140487 [details] [diff] [review]
revision
a=chofmann for 1.7b
Attachment #140487 -
Flags: approval1.7b? → approval1.7b+
Assignee | ||
Comment 14•21 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•21 years ago
|
Flags: blocking1.7b?
Comment 15•21 years ago
|
||
In my Linux gtk1 trunk build from this morning I'm getting a slew of these
###!!! ASSERTION: horizontal scrollbar can change height: 'hMinSize.height ==
hSize.height', file nsGfxScrollFrame.cpp, line 1506
Break: at file nsGfxScrollFrame.cpp, line 1506
###!!! ASSERTION: vertical scrollbar can change width: 'vMinSize.width ==
vSize.width', file nsGfxScrollFrame.cpp, line 1505
Break: at file nsGfxScrollFrame.cpp, line 1505
on almost all pages. One bonsai page generated 14. Is this due to this
checkin?
Assignee | ||
Comment 16•21 years ago
|
||
Yes, I think so.
Assignee | ||
Comment 17•21 years ago
|
||
We shouldn't be using hMinSize.height or vMinSize.width at all in ::Layout()
(because other functions like AddRemoveScrollbar assume we always give
horizontal scrollbars their preferred height, etc).
Arguably we should be allowing scrollbars to shrink to their minimum width in
some circumstances. That'd be future work.
Assignee | ||
Comment 18•21 years ago
|
||
Comment on attachment 143603 [details] [diff] [review]
get rid of annoying assertions
kill bogus assertions
Attachment #143603 -
Flags: superreview?(dbaron)
Attachment #143603 -
Flags: review?(dbaron)
Updated•21 years ago
|
Attachment #143603 -
Flags: superreview?(dbaron)
Attachment #143603 -
Flags: superreview+
Attachment #143603 -
Flags: review?(dbaron)
Attachment #143603 -
Flags: review+
Attachment #143603 -
Flags: approval1.7b+
Assignee | ||
Comment 19•21 years ago
|
||
checked in
Comment 20•21 years ago
|
||
I think this checkin (the large patch, not the assertion removal) caused some
funny text wrapping on the bonsai query page. Oddly, it's not consistent, I
sometimes have to reload or shift+reload to see the problem, but I can't
reproduce it at all with this backed out. I'll attach a screen shot to
demonstrate what I'm talking about.
Comment 21•21 years ago
|
||
Comment 22•21 years ago
|
||
Note that the wrapping problem is unaffected by changing the width of the window.
Assignee | ||
Comment 23•21 years ago
|
||
Have you noticed this on any other pages?
Comment 24•21 years ago
|
||
Not yet.
Assignee | ||
Comment 25•21 years ago
|
||
Brian, are you still seeing this?
Comment 26•21 years ago
|
||
the bug bryner mentioned was simply exposed by this checkin. see bug 238472
Assignee | ||
Comment 27•21 years ago
|
||
OK, then I'll close this bug. Thanks!!!!!
Status: REOPENED → RESOLVED
Closed: 21 years ago → 21 years ago
Depends on: 238472
Priority: P2 → P3
Resolution: --- → FIXED
Comment 28•21 years ago
|
||
> Created an attachment (id=143915)
> funny wrapping
I can see the same problem using a build of latest trunk, however the following
patch has an effect for this problem. Can it check?
Assignee | ||
Comment 29•21 years ago
|
||
Hideo, which testcase has the problem that you're seeing? I'm not seeing it...
Comment 30•21 years ago
|
||
Updated•21 years ago
|
Attachment #146831 -
Attachment is obsolete: true
Comment 31•21 years ago
|
||
Sorry, I made a mistake. I checked on own build on PowerPC/Linux using released
mozilla 1.7b, but the patch had without effect using same build on WinXP.
I posted a new patch that has an effect using the build on WInXP.
I think that this problem is regression of attachment 131205 [details] [diff] [review] of Bug 210269.
Comment 32•21 years ago
|
||
This patch has an effect for a problem of funny wrapping.
Comment 33•21 years ago
|
||
Comment on attachment 146918 [details] [diff] [review]
patch for flushing error
This patch is wrong. I can see possible arguments for not flushing at all, but
there is _certainly_ no need to flush at the point where you moved that code
to.
Attachment #146918 -
Flags: superreview-
Attachment #146918 -
Flags: review-
Comment 34•21 years ago
|
||
In the case of a problem of "funny wrapping", when measuring the contents of the
first cell, the contents of the first cell were short like the following texts.
Modify Query
Mail everyone on this page (12 people)
In the case of "testcase for flushing error", when measuring the contents of the
first cell, the contents of the second cell were empty.
You need to log in
before you can comment on or make changes to this bug.
Description
•