KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
22657
:
[test case] Table height 100% doesn't work insi...
P
roduct
:
konqueror
Co
m
ponent
:
khtml renderer
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
3.0
Pr
i
ority
:
NOR
Severity
:
major
V
otes
:
30
Description
:
Opened:
2001-03-18 21:48
Last Changed:
2004-10-18 20:41:13
(*** This bug was imported into bugs.kde.org ***) Package: khtml Version: 3.0 (using KDE 2.1.0 ) Severity: normal Installed from: SuSE Compiler: gcc version 2.95.2 19991024 (release) OS: Linux 2.4.0 i686 OS/Compiler notes: Apparently setting "height: 100%" doesn't work for tables inside tables. Here's an example: <!-- This table correctly takes up 100% of the page height --> <table style='height: 100%; border: 1px solid black'> <tr> <td style='height: 100%'> <!-- This table does not take up 100% of the td even though it should. --> <table style='height: 100%; border: 1px solid black'> <tr> <td> Content </td> </tr> </table> </td> </tr> </table> (Submitted via bugs.kde.org) (Called from KBugReport dialog)
Comment
#1
mundaun gmx ch 2003-03-07 14:22:58
It seems this bug is still open. I just tried to use the same code as described above. It works in IE, it works in Mozilla, but it doesn't work in Konqueror. May someone please reopen this bug? Thanks, Michael
Comment
#2
mundaun gmx ch 2003-03-07 14:25:21
Sorry, I forgot something... Konqueror 3.1 / Debian
Comment
#3
Maksim Orlovich 2003-03-07 16:05:51
OK, I'm reopening as I can reproduce as well, but one note on this: I am not sure why this was closed since the info was lost during the bug system migration; could have been a duplicate...
Comment
#4
Fabian Rahm 2003-03-31 21:20:18
URL to reproduce as still OPEN (tested with KDE 3.0.3 on RH 8 and 3.1.1 on Gentoo):
http://www.arnolddesign.ch/de/kontakt_email.php
Comment
#5
S Leiber 2003-06-09 15:55:21
I think we have globaly a problem with the rendering of Percentage Units in Tables and sometimes for tables, too. Here was a side, too, where we don't render the table correctly, too.
http://www.w3.org/Style/CSS/Test/CSS1/current/sec62.htm
I thnk the table must be on this side width=100%!! Sven
Comment
#6
Maksim Orlovich 2003-07-11 17:25:58
***
Bug 49099
has been marked as a duplicate of this bug. ***
Comment
#7
Stephan Kulow 2003-10-28 19:11:50
there are quite some reports about that.
Comment
#8
Kai Lahmann 2004-01-26 19:18:32
***
Bug 42014
has been marked as a duplicate of this bug. ***
Comment
#9
Kai Lahmann 2004-03-21 04:34:56
Created an attachment (id=5315)
[details]
testcase interesting, WHAT doesn't have the 100% here
Comment
#10
Fabian Rahm 2004-03-21 15:48:19
testcase uses the css style= tag instead of plain old <table height="100%"> which is the reason for this bug.
Comment
#11
Matthew Trent 2004-03-23 01:22:45
I see this problem with or without CSS. I'm glad I found this bug report. I thought I was going crazy.
Comment
#12
Christian Fontana 2004-05-13 20:12:52
Hi, I tried with last kde release on a slackware, tables have the same problem with the same code. Regards
Comment
#13
Fabian Rahm 2004-05-14 16:23:44
This bug is now more than 3 years old. Congratulation to the KDE Team :-)
Comment
#14
Stephan Kulow 2004-05-17 21:17:57
Replaced
jonas@eisenstein.dk
with
fontana@netw.it
due to bounces by reporter
Comment
#15
Matthew Trent 2004-05-21 18:41:39
Not sure if this is the same bug, but it's a similar tables issue at least. Pricewatch.com does not render correctly, to mention a big one, and there are other misc. sites where tables are screwed up!
Comment
#16
Maksim Orlovich 2004-05-24 18:19:45
***
Bug 43753
has been marked as a duplicate of this bug. ***
Comment
#17
nine detonation org 2004-08-04 18:50:16
I just stomped on this bug. If the nested table has style="height: 100%", the sourounding table cell shrinks to the size of the nested table, regardless of the height of the outer table or other cells. This happens on both konqueror on SuSE 9.1 and Safari on OS X, so I suggest to set the plattform to all since this seems to be a general KHTML issue.
Comment
#18
Christian Fontana 2004-09-07 22:26:47
Created an attachment (id=7442)
[details]
proposed patch The two diff files patches two khtml files. The html_tableimpl.diff file introduces the height attribute for the <TD> element to be managed; The render_table.diff file introduces the lines that calculates the height of the table if this element is inside a <TD>.
Comment
#19
Christian Fontana 2004-09-07 22:28:44
(From update of
attachment 7442
[details]
) The patch was created for the KDE3.3
Comment
#20
Allan Sandfeld 2004-10-09 13:51:32
The posted patch is empty.
Comment
#21
Christian Fontana 2004-10-14 17:53:09
I tried to open the file and everything was right. The file contains the diff data.
Comment
#22
Stephan Kulow 2004-10-14 20:45:22
the attachment contains only the filename
Comment
#23
Germain Garand 2004-10-15 06:41:00
> the attachment contains only the filename
No it doesn't... it contains a non-standard diff. KWrite bug?
Comment
#24
Stephan Kulow 2004-10-15 17:40:53
***
Bug 76759
has been marked as a duplicate of this bug. ***
Comment
#25
Stephan Kulow 2004-10-15 17:42:05
***
Bug 89418
has been marked as a duplicate of this bug. ***
Comment
#26
Stephan Kulow 2004-10-17 14:51:11
(From update of
attachment 7442
[details]
) the mimetype was wrong
Comment
#27
Christian Fontana 2004-10-18 19:42:39
Created an attachment (id=7937)
[details]
Repost of the diff files I'm reposting the patch. In this case the file is a .tar.gz It includes both diff files.
Comment
#28
Allan Sandfeld 2004-10-18 20:41:11
CVS commit by carewolf: Merging selected table-layout changes from Webcore/146 BUG: 22657 M +5 -0 ChangeLog 1.305 M +33 -23 rendering/render_table.cpp 1.262 --- kdelibs/khtml/ChangeLog #1.304:1.305 @@ -1,2 +1,6 @@ +2004-10-18 Allan Sandfeld Jensen <
kde@carewolf.com
> + + * rendering/render_table.cpp: Merge layout fixes from Webcore + 2004-10-17 Stephan Kulow <
coolo@kde.org
> @@ -5,4 +9,5 @@ 2004-10-16 Allan Sandfeld Jensen <
kde@carewolf.com
> + * html/html_formimpl.cpp: Escape otherwise unencodable characters. Matches the behavior of Gecko. --- kdelibs/khtml/rendering/render_table.cpp #1.261:1.262 @@ -213,5 +213,4 @@ void RenderTable::calcWidth() m_width = style()->width().minWidth( availableWidth ); if(m_minWidth > m_width) m_width = m_minWidth; - //kdDebug( 6040 ) << "1 width=" << m_width << " minWidth=" << m_minWidth << " availableWidth=" << availableWidth << " " << endl; } else { m_width = KMIN(short( availableWidth ),m_maxWidth); @@ -227,4 +226,5 @@ void RenderTable::calcWidth() m_width = KMAX (m_width, m_minWidth); + // Finally, with our true width determined, compute our margins for real. m_marginRight=0; m_marginLeft=0; @@ -286,11 +286,21 @@ void RenderTable::layout() } - m_height += borderTop(); + int bpTop = borderTop(); + int bpBottom = borderBottom(); + + m_height += bpTop; + + int oldHeight = m_height; + calcHeight(); + int newHeight = m_height; + m_height = oldHeight; // html tables with percent height are relative to view Length h = style()->height(); - int th=0; - if (h.isFixed()) - th = h.value(); + int th = -(bpTop + bpBottom); // Tables size as though CSS height includes border/padding. + if (isPositioned()) + th = newHeight; // FIXME: Leave this alone for now but investigate later. + else if (h.isFixed()) + th += h.value(); else if (h.isPercent()) { RenderObject* c = containingBlock(); @@ -301,16 +311,22 @@ void RenderTable::layout() Length ch = c->style()->height(); if (ch.isFixed()) { - th = h.width(ch.value()); + th += h.width(ch.value()); break; } } - if (!c->isTableCell()) { + if (c->isTableCell()) { + RenderTableCell* cell = static_cast<RenderTableCell*>(c); + int cellHeight = cell->cellPercentageHeight(); + if (cellHeight) + th += h.width(cellHeight); + } + else { Length ch = c->style()->height(); if (ch.isFixed()) - th = h.width(ch.value()); + th += h.width(ch.value()); else { // we need to substract out the margins of this block. -dwh - th = h.width(viewRect().height() - c->marginBottom() - c->marginTop()); + th += h.width(viewRect().height() - c->marginBottom() - c->marginTop()); // not really, but this way the view height change // gets propagated correctly @@ -351,6 +367,5 @@ void RenderTable::layout() } - - m_height += borderBottom(); + m_height += bpBottom; if(tCaption && tCaption->style()->captionSide()==CAPBOTTOM) { @@ -361,8 +376,4 @@ void RenderTable::layout() //kdDebug(0) << "table height: " << m_height << endl; - calcHeight(); - - //kdDebug(0) << "table height: " << m_height << endl; - // table can be containing block of positioned elements. // ### only pass true if width or height changed. @@ -1238,5 +1248,5 @@ int RenderTableSection::layoutRows( int // qDebug("layoutRows: totalHeight = %d", totalHeight ); - int dh = totalHeight-rowPos[totalRows]; + int dh = toAdd; int totalPercent = 0; int numVariable = 0;
P
latform
:
SuSE RPMs
O
S
:
Linux
K
eywords
:
People
Reporter
:
Christian Fontana
Assigned To
:
Konqueror Developers
CC
:
adrians aska com pl
andreas krimmer gmx de
jarkko haapalainen iki fi
lucy-ples mtu-net ru
oded geek co il
thebreaker terra es
Thorsten Meinl informatik uni-erlangen de
Related actions
View Bug Activity
Format For Printing
XML
Clone This Bug
Note
You need to
log in
before you can comment on or make changes to this bug.
Attachments
testcase
(277 bytes, text/html)
2004-03-21 04:34
,
Kai Lahmann
Details
proposed patch
(10.00 KB, application/x-tar)
2004-09-07 22:26
,
Christian Fontana
Details
Repost of the diff files
(595 bytes, patch)
2004-10-18 19:42
,
Christian Fontana
Details
Hide Obsolete
(1) |
View All
Add an attachment
(proposed patch, testcase, etc.)
Depends on
:
B
locks
:
Show dependency tree
-
Show dependency graph
First
Last
Prev
Next
No search results available
Search page
Actions
Reports
Requests
Reports
Bugs reported today
Bugs reported in the last 3 days
Bug reports with patches
Weekly Bug statistics
The most hated bugs
The most severe bugs
The most frequently reported bugs
The most wanted features
Junior Jobs
Report ownership counts and charts
My Account
New Account
Log In