On Sun, May 01, 2011 at 08:30:44PM +0000, corvid wrote:
I wrote:
I wrote:
Rob wrote:
On this page,?http://www3.sympatico.ca/rsquared/gdb/, there are two images at the bottom which link to the W3C HTML and CSS validation pages. ?The inline style for the images is as follows: style="border:0;width:88px;height:31px" On every browser I have used, including Dillo 2.2, the blue link box around the images has not been displayed. ?Under the Dillo FLTK 1.3 port, it shows them. ?My question is, why? ?Which is the correct behaviour?
Must be a parsing problem. It works if I change border:0 to border:0px, but the unit is optional after 0.
My impression is that we broke it when implementing line-height, with the length type changing from CSS_LENGTH_TYPE_PX to CSS_LENGTH_TYPE_NONE, and computeValue() not expecting that. I'll leave this to Johannes, since he'll know what he'll want to do about it.
For the sake of having something, see attached.
diff -r 5b4c489423d2 src/styleengine.cc --- a/src/styleengine.cc Wed Apr 20 02:45:55 2011 +0000 +++ b/src/styleengine.cc Sun May 01 20:26:40 2011 +0000 @@ -619,6 +619,9 @@ case CSS_LENGTH_TYPE_EX: *dest = roundInt (CSS_LENGTH_VALUE(value) * font->xHeight); return true; + case CSS_LENGTH_TYPE_NONE: + *dest = 0; + return true; default: break; }
Thanks for bringing this up again. Committed with an additional assert(). Cheers, Johannes