Closed Bug 12825 Opened 25 years ago Closed 24 years ago

overflow: -moz-scrollbars-* not implemented

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: kinmoz, Assigned: kinmoz)

References

Details

(Keywords: css-moz, Whiteboard: New 'overflow' values to control scrollbar visibility do not yet work)

Attachments

(1 file)

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.
Status: NEW → ASSIGNED
Target Milestone: M12
Accepting bug.
Target Milestone: M12 → M13
Making M13.
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?
Blocks: 20342
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.
Blocks: 22677
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.
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
Target Milestone: M13 → M14
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.
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
Closed: 25 years ago
Resolution: --- → FIXED
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
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 → ---
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?
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
Closed: 25 years ago24 years ago
Resolution: --- → FIXED
Verifying bug fixed.
Status: RESOLVED → VERIFIED
*** 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.

Attachment

General

Creator:
Created:
Updated:
Size: