Bug 57080 - [test case] css "overflow:hidden" doesn't cut page
Summary: [test case] css "overflow:hidden" doesn't cut page
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 49199 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-10 12:21 UTC by Hans Fredrik Nordhaug
Modified: 2004-09-08 00:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
test case (1.00 KB, text/html)
2004-05-17 12:51 UTC, Stephan Kulow
Details
proposed fix (7.56 KB, patch)
2004-08-12 19:28 UTC, Leo Savernik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Fredrik Nordhaug 2003-04-10 12:21:47 UTC
Version:            (using KDE KDE 3.1.1)
Installed from:    RedHat RPMs
OS:          Linux

A div is given a width less than the screen width and has style overflow hidden. 
Then add a paragraph with style nowrap and contents with length wider than the 
screen width. The content is clipped, but the page has the width of the complete
paragrahp. As a result a horisontal scrollbar is added by the browser. 
See testcase.

--------- TEST CASE ---------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><title>konqi test</title></head>
<body>


<div style="width: 600px; overflow: hidden; background-color: #cccccc;">
        <h2>Testing overflow: hidden</h2>
        <p>
        The content is clipped, but the page has the width of
        the total text - not only the clipped.
        </p>
        <p style="white-space: nowrap">
        overflow: hidden overflow: hidden overflow: hidden
        overflow: hidden overflow: hidden overflow: hidden
        overflow: hidden overflow: hidden overflow: hidden
        overflow: hidden overflow: hidden overflow: hidden
        overflow: hidden overflow: hidden overflow: hidden
        overflow: hidden overflow: hidden overflow: hidden
        overflow: hidden overflow: hidden overflow: hidden
        overflow: hidden overflow: hidden overflow: hidden
        overflow: hidden overflow: hidden overflow: hidden
        </p>
</div>
</body>
</html>
Comment 1 Tiago Freire 2003-09-18 13:54:31 UTC
check out bug 11336. they might be duplicates. I voted for both though. 
Comment 2 Stephan Kulow 2003-11-01 10:38:38 UTC
that test case works for me in CVS HEAD
Comment 3 Tiago Freire 2004-01-29 13:02:03 UTC
I made the testcase on bug 11336. I am using kde 3.2.0_rc1 now, and I am glad it is "almost" working. The only issue I had was that the buttons on the scrollbar disappeared when I scrolled it using the mouse. It is a repaint issue, if I switch to another tab in konqueror, or to another application, and then switch back to the test page, the buttons show up again.
Comment 4 Tiago Freire 2004-01-29 13:19:12 UTC
Look at http://www.digimer.com.br. It does not look right. Is it sloppy javascript and css, or there are bugs ?
Comment 5 ieure 2004-04-09 21:33:50 UTC
Looks like this regressed in 3.2.1. Testcase works for me in 3.2.0, but I get a big horizontal scrollbar in 3.2.1.
Comment 6 Stephan Kulow 2004-05-17 12:51:09 UTC
regressed
Comment 7 Stephan Kulow 2004-05-17 12:51:42 UTC
Created attachment 6038 [details]
test case
Comment 8 Leo Savernik 2004-08-11 16:08:32 UTC
*** Bug 49199 has been marked as a duplicate of this bug. ***
Comment 9 Leo Savernik 2004-08-12 19:28:57 UTC
Created attachment 7090 [details]
proposed fix

This fixes the superfluous scrollbar on the canvas by correctly honouring the
overflow-clip of child elements.
Comment 10 Leo Savernik 2004-08-18 16:42:17 UTC
CVS commit by savernik: 

Fixed spurious scrollbars on the canvas when the overflow of clipped children
would exceed the viewports boundaries.

This patch also incorporates fixes from Germain Garand:
- Fixed unreachable relatively positioned content on viewport.
- Fixed unreachable positioned content in clipped blocks.

CC_MAIL: 57080-done@bugs.kde.org, germain@ebooksfrance.org


  M +47 -27    ChangeLog   1.276
  M +29 -10    rendering/render_block.cpp   1.39
  M +4 -3      rendering/render_box.cpp   1.237
  M +10 -47    rendering/render_canvas.cpp   1.151
  M +1 -1      rendering/render_flow.cpp   1.356
  M +14 -3     rendering/render_object.h   1.193



Comment 11 Leo Savernik 2004-09-08 00:20:27 UTC
CVS commit by savernik: 

Backport:
Fixed spurious scrollbars on the canvas when the overflow of clipped children
would exceed the viewports boundaries.

This patch also incorporates fixes from Germain Garand:
- Fixed unreachable relatively positioned content on viewport.
- Fixed unreachable positioned content in clipped blocks.

This commit fixes 74(!) regressions

CC_MAIL: 57080@bugs.kde.org


  M +29 -10    render_block.cpp   1.38.2.1
  M +4 -3      render_box.cpp   1.236.2.1
  M +10 -47    render_canvas.cpp   1.150.2.1
  M +1 -1      render_flow.cpp   1.355.2.1
  M +14 -3     render_object.h   1.192.2.1