Summary: | Alignment issues with generated content (:before and :after CSS pseudo-elements) in XHTML Strict mode | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Laurent Pinchart <laurent.pinchart> |
Component: | khtml | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Test case
patch... Qt does not support setting a QFont to size zero (be it pixels or points, though it's only explicitly said in documentation for the latter) |
Description
Laurent Pinchart
2006-05-25 17:12:39 UTC
Created attachment 16267 [details]
Test case
Confirmed. Notice however that there a several invalid statements in your CSS, which are ignored in both modes. mmh, using font-size > 0 makes testcase work. Investigating that... Created attachment 16299 [details]
patch... Qt does not support setting a QFont to size zero (be it pixels or points, though it's only explicitly said in documentation for the latter)
SVN commit 552597 by ggarand: QFont does not support setting a zero pixel size. BUG:128024 M +3 -2 css/cssstyleselector.cpp M +3 -2 rendering/font.cpp --- branches/KDE/3.5/kdelibs/khtml/css/cssstyleselector.cpp #552596:552597 @@ -3167,10 +3167,11 @@ return; } - if(size < 1) return; + if (size < 0) return; // we never want to get smaller than the minimum font size to keep fonts readable - if(size < minFontSize ) size = minFontSize; + // do not however maximize zero as that is commonly used for fancy layouting purposes + if (size && size < minFontSize) size = minFontSize; //kdDebug( 6080 ) << "computed raw font size: " << size << endl; --- branches/KDE/3.5/kdelibs/khtml/rendering/font.cpp #552596:552597 @@ -459,7 +459,8 @@ } // make sure we don't bust up X11 - size = KMAX(0, KMIN(255, size)); + // Also, Qt does not support sizing a QFont to zero. + size = kMax(1, kMin(255, size)); // qDebug("setting font to %s, italic=%d, weight=%d, size=%d", fontDef.family.latin1(), fontDef.italic, // fontDef.weight, size ); @@ -475,7 +476,7 @@ if ( fontDef.smallCaps ) { scFont = new QFont( f ); - scFont->setPixelSize( f.pixelSize()*7/10 ); + scFont->setPixelSize( kMax(1, f.pixelSize()*7/10) ); } } |