'clip' and 'position: static' causing scroll bars improperly

RESOLVED WORKSFORME

Status

()

Core
Layout
RESOLVED WORKSFORME
12 years ago
10 years ago

People

(Reporter: memso, Unassigned)

Tracking

({testcase})

1.8 Branch
x86
Windows Server 2003
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

532 bytes, text/html
Details
(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

When using 'clip' on a basic object that does not have "position: relative" or "position: absolute" set, the object is clipped properly but the main window scroll bars still act as if it was visible.

Reproducible: Always

Steps to Reproduce:
1. Make a <div> region (do not set position: ... on it)
2. Inside that <div> region, make another <div> with a lot of content and "clip: rect(0px 0px 100px 100px)" in the style


Actual Results:  
The inner region is clipped, but the outer scroll bars still act as if it was not

Expected Results:  
The inner region is clipped AND the scroll bars are not affected by the clipped content

Sorry if this is a repeat bug. Spent almost an hour searching for it but could not find it.

In the test case that is included, there are some javascript toggles to control "Visibility", "Clipping" and "Position" values set in the style. These show a number of problems, but I didn't search for those problems so I have no clue if they are repeated:

1) The issue for this bug report is listed above, where the clip is set but the scroll bars don't act proper (reminds me of how Opera always deals with clipping).
2) Changing the div "Outer" from Static to Absolute then to Relative, the border of it's surrounding div is not properly redrawn
3) Positioning an absolute div inside a static div inside an absolute div ignores the static div for px placement. Looking at CSS2, this doesn't match their description of:
The box's position (and possibly size) is specified with the 'left', 'right', 'top', and 'bottom' properties. These properties specify
offsets with respect to the box's containing block.
Maybe I'm just missing something there. Also, it ignores the static div's overflow settings (you can see the WHOLE block when clipping is off).
(Reporter)

Comment 1

12 years ago
Created attachment 235473 [details]
Test case w/ javascript

This is the test case HTML described above.
Toggling visibility and position affect the "Outer" div. Toggling clipping affects the "Inner" div

Updated

12 years ago
Keywords: testcase

Comment 2

12 years ago
(In reply to comment #1)
> Created an attachment (id=235473) [details]
> Test case w/ javascript
> 
> This is the test case HTML described above.
> Toggling visibility and position affect the "Outer" div. Toggling clipping
> affects the "Inner" div

Hmm, this testcase has way too many issues packed into it; a good testcase shows one issue and makes it easy to see whether the browser passes or fails.

That said, let me try to respond.

Bug 372063 covers clip:rect(auto auto auto auto).

Bug 372037 covers the scrollbars.

The "containing block" for an absolutely positioned element is the closest positioned parent (i.e. the position:static parent is not the containing block for anything with position:absolute in CSS terms).

I think the rest of the issues are fixed on the trunk; would you mind downloading a nightly build (ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/) to check?
(Reporter)

Comment 3

11 years ago
Created attachment 258080 [details]
Greatly simplified test case

I am attaching a greatly simplified test case. Though I no longer have FF 1.5.0.6 that the original test case was found on, it still occurs on FF 1.5.0.9, 2.2 and the Minefield 3.0a3pre test version.

This simple test case has one div. Most of the styling is for display only.
Inner: An absolute positioned simple DIV region. It is 1200x1200 solid blue, but clipped to (50,50) - (100,100). It is properly clipped, but the scroll bars appear as if it was not.
Attachment #235473 - Attachment is obsolete: true
(Reporter)

Comment 4

11 years ago
(In reply to comment #3)

I meant FF 2.0.0.2, sorry 'bout that!

Comment 5

11 years ago
Okay, setting dependency.
Depends on: 372037

Updated

11 years ago
Assignee: general → nobody
Component: General → Layout
Product: Mozilla Application Suite → Core
QA Contact: general → layout
Version: unspecified → 1.8 Branch

Comment 6

10 years ago
This was fixed by bug 372037.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.