overflow: -moz-scrollbars-* not implemented

VERIFIED FIXED in M14

Status

()

Core
CSS Parsing and Computation
P3
normal
VERIFIED FIXED
19 years ago
16 years ago

People

(Reporter: kinmoz, Assigned: kinmoz)

Tracking

({css-moz})

Trunk
css-moz
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: New 'overflow' values to control scrollbar visibility do not yet work)

Attachments

(1 attachment)

(Assignee)

Description

19 years ago
The style system needs to be modified so we can independently hide the
horizontal scrollbar, the vertical scrollbar, or both, but still be able
to scroll the view.

An example of the need for this feature would be a Gfx textfield, which has no
scrollbars, but must be able to scroll as the cursor moves through the text it
contains.

Right now the only way for us to create a scrolling frame with no scrollbars is
to create one with scrollbars, then hide them by setting the scroll preference
in it's scrolling view to nsScrollPreference_kNeverScroll. Doing this makes the
scroll frame's style info and the scrolling view's scroll preference out of
sync, allowing nsScrollFrame::Reflow() to incorrectly include the scrollbar
dimensions when calculating the scrolled view's size.

I added a temporary hack to nsScrollFrame::Reflow() that gets around the
problem. The hack is currentlyl bracketed by the comments "XXX: Begin Temporary
Hack" and "XXX: End Temporary Hack".

The hack checks the scrolled view's scroll preference to see if it equals
nsScrollPreference_kNeverScroll, if it does, then we know that we have a frame
that scrolls but has it's scrollbars hidden, so it sets the scrollbar dimensions
to zero for the scrolled view size calculations.

Checking the scrolled view's scroll preference goes against the defined flow of
control between the scroll frame and it's view, so this hack should be removed
when the style system adds the support described above.
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
Target Milestone: M12
(Assignee)

Comment 1

19 years ago
Accepting bug.
(Assignee)

Updated

19 years ago
Target Milestone: M12 → M13
(Assignee)

Comment 2

19 years ago
Making M13.

Updated

19 years ago
Blocks: 17408
Summary: Need style properties that control scrollbar visibility → {css-moz} Need style properties that control scrollbar visibility
[ccing pierre as peterl was cc'ed and this probably affects pierre too]

We probably want to introduce new keywords on the 'overflow' property for this,
such as:

   overflow: -moz-no-scrollbars
   overflow: -moz-no-horizontal-scrollbars
   overflow: -moz-no-vertical-scrollbars

...in addition to the CSS2 keywords 'auto' 'hidden' 'visible' and 'scroll' (the
latter being the opposite of the suggested '-moz-no-scrollbars').

So a normal text field with both scroll bars and scrolling enabled would be:

   textarea { overflow: scroll; }

...but one with scrolling enabled and no scroll bars would be:

   input[type=text] { overflow: -moz-no-scrollbars; }

...and so on.

Comments?
(Assignee)

Updated

19 years ago
Blocks: 20342

Updated

19 years ago
Blocks: 20387
Summary: {css-moz} Need style properties that control scrollbar visibility → {css-moz} Need new 'overflow' values to control scrollbar visibility
BTW, please note that we do not need a new value for "scrolling enabled and
scroll bars only appear when required" -- that is what 'auto' does.

Updated

19 years ago
Blocks: 22677

Comment 5

19 years ago
The overflow property now supports the following values:
  -moz-scrollbars-none
  -moz-scrollbars-horizontal
  -moz-scrollbars-vertical
Summary: {css-moz} Need new 'overflow' values to control scrollbar visibility → {css-moz} overflow: -moz-scrollbars-* not implemented
Whiteboard: New 'overflow' values to control scrollbar visibility do not yet work
Updating summary to reflect current status.
(Assignee)

Comment 7

19 years ago
I'll get the scrollbar visibility code working after I tackle some of the Linux
repaint regressions. I hope to get to this sometime this week.
Keywords: css-moz
(Assignee)

Updated

19 years ago
Target Milestone: M13 → M14
(Assignee)

Comment 8

19 years ago
I'm working on this right now, but I don't think I'll make tonight's M13
midnight deadline. Moving to M14 since it isn't an M13 stopper.
(Assignee)

Comment 9

19 years ago
I just checked in support for the layout side of things:

    mozilla/layout/html/base/src/nsGfxScrollFrame.cpp   revision 3.29

I'll attatch a test case for this to the bug. Support should appear in the
01/27/2000 QA builds.
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 10

19 years ago
Created attachment 4587 [details]
Test case for the various overflow values.
It's implemented. Verified. There may be bugs in the implementation, though, in 
which case new bugs should be filed.
Status: RESOLVED → VERIFIED
Summary: {css-moz} overflow: -moz-scrollbars-* not implemented → overflow: -moz-scrollbars-* not implemented

Comment 12

18 years ago
Reopening to ask a question (but it's likely a bug). Are the moz properties
-moz-scrollbars-vertical, -moz-scrollbars-horizontal, -moz-scrollbars-none
applicable to both GFX and native scrollbars? 

The curious thing I noticed is that these properties have the exact *opposite*
behaviour (20000508 mac, win32 and linux/gtk):

  i.e., GFX: -moz-scrollbars-vertical    => has VERT scrollbar
             -moz-scrollbars-horizontal  => has HORIZ scrollbar
             -moz-scrollbars-none        => has NO scrollbars

     NATIVE: -moz-scrollbars-vertical    => has HORIZ scrollbar
             -moz-scrollbars-horizontal  => has VERT scrollbar
             -moz-scrollbars-none        => has VERT && HORIZ scrollbars
Status: VERIFIED → REOPENED
Resolution: FIXED → ---

Comment 13

18 years ago
While I'm being obnoxious ...

> Checking the scrolled view's scroll preference goes against the defined flow 
of
> control between the scroll frame and it's view, so this hack should be removed
> when the style system adds the support described above.

This code is still in the tree (nsScrollFrame.cpp). Should it be gone?
(Assignee)

Comment 14

18 years ago
Changing status to FIXED.

At the time I implemented the -moz-scrollbars-* values, we were in the process 
of dropping support for native scrollbars, so I didn't think it was worth the 
effort to write code for something that was going away. Other bugs related to 
native scrollbars, especially on Linux, were being closed as WONT_FIX at the 
time for the same reason.

There is no code that supports -moz-scrollbars-* in the native implementation, 
so what you report seeing above when using -moz-scrollbars-* values and 
switching to Native Scrollbars might be due to the code using defaults because 
it doesn't recognize the -moz-scrollbars-* values.
Status: REOPENED → RESOLVED
Last Resolved: 19 years ago18 years ago
Resolution: --- → FIXED

Comment 15

18 years ago
Verifying bug fixed.
Status: RESOLVED → VERIFIED

Comment 16

16 years ago
*** Bug 107495 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.