| Summary: | [test case] Small problem with position of a table at the bottom without putting the height in the <table> | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | Tom Albers <toma> |
| Component: | khtml | Assignee: | Konqueror Bugs <konqueror-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
test
patch |
||
|
Description
Tom Albers
2005-06-16 11:19:37 UTC
Created attachment 11477 [details]
test
Created attachment 14911 [details]
patch
calculate table height a bit differently for positioned tables, so as to get
accurate bottom positioning,
also adds table { box-sizing: border-box } to default sheet.
SVN commit 514954 by ggarand:
Use the calculated height for positioned tables, so as to always compute an accurate
position.
Add box-sizing: border-box to table's default style
BUG: 107521
M +1 -0 css/html4.css
M +7 -3 rendering/render_box.cpp
M +3 -1 rendering/render_table.cpp
--- branches/KDE/3.5/kdelibs/khtml/css/html4.css #514953:514954
@@ -173,6 +173,7 @@
text-align: -khtml-auto;
border-spacing: 2px;
-khtml-flow-mode: -khtml-around-floats;
+ box-sizing: border-box;
}
TABLE[align="center"] {
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_box.cpp #514953:514954
@@ -1033,7 +1033,7 @@
}
if (result != -1) {
result = height.width(result);
- if (cb->isTableCell() && !isTable() && style()->boxSizing() != BORDER_BOX) {
+ if (cb->isTableCell() && style()->boxSizing() != BORDER_BOX) {
result -= (borderTop() + paddingTop() + borderBottom() + paddingBottom());
result = kMax(0, result);
}
@@ -1467,8 +1467,12 @@
else if (!height.isVariable())
{
h = height.width(ch);
- if (ourHeight - pab > h)
- ourHeight = h + pab;
+ if (ourHeight - pab > h) {
+ if (!isTable())
+ ourHeight = h + pab;
+ else
+ h = ourHeight - pab;
+ }
}
else if (isReplaced())
h = intrinsicHeight();
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_table.cpp #514953:514954
@@ -303,6 +303,8 @@
m_height += bpTop;
int oldHeight = m_height;
+ if (isPositioned())
+ m_height += calculatedHeight + bpBottom;
calcHeight();
int newHeight = m_height;
m_height = oldHeight;
@@ -310,7 +312,7 @@
Length h = style()->height();
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.
+ th += newHeight;
else if (h.isFixed())
th += h.value();
else if (h.isPercent())
Great! Thanks! Looking forward to the next release. |