RESOLVED WONTFIX 21588
Calculation of column width with CSS-pseudo-class first-line
https://bugs.webkit.org/show_bug.cgi?id=21588
Summary Calculation of column width with CSS-pseudo-class first-line
Rüdiger Cordes
Reported 2008-10-14 06:26:11 PDT
Tip for you to quick and comfortable testing: my program PHP-Aquarium <HTML> <HEAD> <STYLE type="text/css"> td { font-size:12px } td:first-line { font-size:24px } </STYLE> </HEAD> <BODY> <H3>Calculation of column width with CCS-pseudo-class first-line.</H3> <P>Column width seems to be calculated before the first-line attributes are applied - wrong?</P> <TABLE cellspacing=0 border=1> <TR> <TD>erste Zeile<br>zweite Zeile</TD> </TR> </TABLE> <P>Awaited:</P> <TABLE cellspacing=0 border=1> <TR> <TD>erste Zeile<br>zweite breitererere Zeile</TD> </TR> </TABLE> </BODY> </HTML>
Attachments
Two unsuccessful attempts in trying to get control over line break. (1.17 KB, text/html)
2011-10-22 11:28 PDT, Rüdiger Cordes
no flags
Rüdiger Cordes
Comment 1 2008-10-14 06:39:13 PDT
Priority P1 because I guess its an organizational thing (order) inside the webkit engine which will effect other problems too. So its a good bug to understand and test the problem. I am happy that I have not to do this ;-)
Rüdiger Cordes
Comment 2 2008-10-14 06:48:46 PDT
Firefox 3.0.3 doesnt break the first line but calculates the width of the column if second line has the font-size of the first line. Different but not better ;-)
Rüdiger Cordes
Comment 3 2008-10-14 09:47:59 PDT
More variations: <HTML> <HEAD> <STYLE type="text/css"> td { font-size:12px } td:first-line { font-size:24px } td.no:first-line { font-size:12px } </STYLE> </HEAD> <BODY> <H3>Calculation of column width with CCS-pseudo-class first-line.</H3> <P>Column width seems to be calculated before the first-line attributes are applied - wrong?</P> <TABLE cellspacing=0 border=1> <TR> <TD>erste Zeile<br>zweite Zeile</TD> </TR> </TABLE> <P>Awaited:</P> <TABLE cellspacing=0 border=1> <TR> <TD>erste Zeile<br>zweite breitererere Zeile</TD> </TR> </TABLE> <P>No work around: nowrap</P> <TABLE cellspacing=0 border=1> <TR> <TD nowrap >erste Zeile<br>zweite Zeile</TD> </TR> </TABLE> <P>Same with CSS: white-space:nowrap</P> <TABLE cellspacing=0 border=1> <TR> <TD style="white-space:nowrap">erste Zeile<br>zweite Zeile</TD> </TR> </TABLE> <P>So what about &amp;nbsp; ?</P> <TABLE cellspacing=0 border=1> <TR> <TD style="white-space:nowrap">erste&nbsp;Zeile<br>zweite Zeile</TD> </TR> </TABLE> <P>Seems my theory is true:</P> <TABLE cellspacing=0 border=1> <TR> <TD>ersteextrabreite&nbsp;Zeile<br>zweite Zeile</TD> </TR> </TABLE> <TABLE cellspacing=0 border=1> <TR> <TD class=no>ersteextrabreite&nbsp;Zeile</TD> </TR> </TABLE> <P>&nbsp;</P> <TABLE cellspacing=0 border=1> <TR> <TD>erste extrabreite&nbsp;Zeile<br>zweite Zeile</TD> </TR> </TABLE> <TABLE cellspacing=0 border=1> <TR> <TD class=no>erste extrabreite Zeile</TD> </TR> </TABLE> </BODY> </HTML>
Rüdiger Cordes
Comment 4 2010-04-28 20:44:11 PDT
Isnt solved up to r58391.
Tab Atkins
Comment 5 2011-10-21 15:04:12 PDT
Not a bug. This is undefined in the specs, and I believe our behavior is reasonable. You have to determine what size something is before you can determine what the first line is. You may then have to adjust what is actually on the first line, based on the ::first-line styles, but ideally you want to minimize the amount of layout changes based on that. If the spec ever specifies what to do here, we should ensure that we match it. Until then, I'm marking this as WONTFIX.
Rüdiger Cordes
Comment 6 2011-10-22 11:28:33 PDT
Created attachment 112092 [details] Two unsuccessful attempts in trying to get control over line break.
Note You need to log in before you can comment on or make changes to this bug.