| Summary: | CSS "overflow: hidden" on body hides relative box nested in absolute box | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | Jan de Groot <admin> |
| Component: | khtml renderer | Assignee: | Konqueror Bugs <konqueror-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
testcase
more general testcase (just for having a ref number for the regression framework) |
||
|
Description
Jan de Groot
2003-11-09 16:13:41 UTC
Subject: Re: New: [REGRESSION] HTML/CSS2 render bug
The front page problem (which is a resurrection of #34634) is fixed by the
following patch.
Dunno if it's correct - I thought the root element was a canvas ?!
*sigh* DESIGN.html is so old now...
Index: rendering/render_box.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/rendering/render_box.cpp,v
retrieving revision 1.218
diff -u -3 -b -B -p -r1.218 render_box.cpp
--- rendering/render_box.cpp 4 Nov 2003 21:26:21 -0000 1.218
+++ rendering/render_box.cpp 9 Nov 2003 18:11:53 -0000
@@ -1046,7 +1046,7 @@ void RenderBox::calcAbsoluteVertical()
if (hl.isFixed())
ch = hl.value() + cb->paddingTop() + cb->paddingBottom()
+ cb->borderTop() + cb->borderBottom();
- else if (cb->isCanvas())
+ else if (cb->isCanvas() || cb->isRoot())
ch = cb->availableHeight();
else
ch = cb->height();
The menu-not-being-displayed problem in the inner page remains.
such a patch is meanwhile in CVS afaik Yes, I saw that Zack eventually commited it. I didn't close the report though because of the big problems with "overflow: hidden" on <body> that ruin the inner page. See: http://www.gossewijnsma.nl/index2.php I'll try to make a testcase. Created attachment 3465 [details]
testcase
-body { overflow: hidden }
-relative box inside absolute box
=> not rendered
renders OK in Mozilla 1.5 / Opera 7
The bug is still in KDE 3.2.3. I tried to load the page on Mac OS X 10.3.3 with Safari, which shows fine. I think KHTML should get the fix from apple for this one, I'm sure this is not the only HTML 4.01 transitional/CSS2 compliant page that doesn't render OK. CVS commit by ggarand: rendering/render_layer.cpp (calculateClipRects): absolutely positioned objects must update the overflowClipRect passed to relatively positioned child layers to match the posClipRect in effect. regression tested. CCMAIL: 67665-done@bugs.kde.org, 72994-done@bugs.kde.org M +8 -0 ChangeLog 1.267 M +15 -7 rendering/render_layer.cpp 1.42 --- kdelibs/khtml/ChangeLog #1.266:1.267 @@ -1,2 +1,10 @@ + +2004-07-10 Germain Garand <germain@ebooksfrance.org> + + * rendering/render_layer.cpp (calculateClipRects): + absolutely positioned objects must update the overflowClipRect + passed to relatively positioned child layers to match the + posClipRect in effect (#67665/#72994). + 2004-06-30 Tobias Anton <anton@stud.fbi.fh-darmstadt.de> * khtmlview.{cpp,h}: --- kdelibs/khtml/rendering/render_layer.cpp #1.41:1.42 @@ -883,12 +883,20 @@ void RenderLayer::calculateClipRects(con // to our parent layer. + switch (m_object->style()->position()) { // A fixed object is essentially the root of its containing block hierarchy, so when // we encounter such an object, we reset our clip rects to the fixedClipRect. - if (m_object->style()->position() == FIXED) { + case FIXED: posClipRect = fixedClipRect; overflowClipRect = fixedClipRect; - } - else if (m_object->style()->position() == RELATIVE) + break; + case ABSOLUTE: + overflowClipRect = posClipRect; + break; + case RELATIVE: posClipRect = overflowClipRect; + break; + default: + break; + } // Update the clip rects that will be passed to child layers. Created attachment 6606 [details]
more general testcase (just for having a ref number for the regression framework)
|