| Summary: | [site-issue] does not render site correctly http://www.di.se/Avdelningar/Ettan.aspx | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | kek had <khadjari> |
| Component: | khtml renderer | 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: | testcase | ||
|
Description
kek had
2005-04-02 00:15:58 UTC
I can see it. Same with SVN r575787 Created attachment 19150 [details]
testcase
SVN commit 620738 by ggarand:
Make vertical-align text-top/bottom more CSS 2.1 compliant: we are
looking for the parent's font or font strut's *content area*
(as per 10.6.1) so do not use its baselinePosition.
Add the missing half-leading for both text-top and text-bottom
(mozilla/css_1/vertical_align_texttop.html): that's also part of
content area.
Using baselinePosition on parent was even more bogus because of the
major semantic differences in CSS between baseline in table
context and other baselines. A mess that was the origin of #103039
BUG: 103039
M +2 -10 render_object.cpp
--- trunk/KDE/kdelibs/khtml/rendering/render_object.cpp #620737:620738
@@ -1864,27 +1864,19 @@
return vpos - style()->verticalAlignLength().width( lineHeight( firstLine ) );
const QFont &f = ref->font( firstLine );
- int fontheight = ref->lineHeight( firstLine );
int fontsize = f.pixelSize();
- int halfleading = ( fontheight - fontsize ) / 2;
if ( va == SUB )
vpos += fontsize/5 + 1;
else if ( va == SUPER )
vpos -= fontsize/3 + 1;
else if ( va == TEXT_TOP ) {
-// qDebug( "got TEXT_TOP vertical pos hint" );
-// qDebug( "parent:" );
-// qDebug( "CSSLH: %d, CSS_FS: %d, basepos: %d", fontheight, fontsize, ref->baselinePosition( firstLine ) );
-// qDebug( "this:" );
-// qDebug( "CSSLH: %d, CSS_FS: %d, basepos: %d", lineHeight( firstLine ), style()->font().pixelSize(), baselinePosition( firstLine ) );
- vpos += ( baselinePosition( firstLine ) - ref->baselinePosition( firstLine ) +
- halfleading );
+ vpos += baselinePosition( firstLine ) - (QFontMetrics(f).ascent() + QFontMetrics(f).leading()/2);
} else if ( va == MIDDLE ) {
QRect b = QFontMetrics(f).boundingRect('x');
vpos += -b.height()/2 - lineHeight( firstLine )/2 + baselinePosition( firstLine );
} else if ( va == TEXT_BOTTOM ) {
- vpos += QFontMetrics(f).descent();
+ vpos += QFontMetrics(f).descent() + QFontMetrics(f).leading()/2;
if ( !isReplaced() )
vpos -= fontMetrics(firstLine).descent();
} else if ( va == BASELINE_MIDDLE )
|