Re: [cssom-view]: offset{Left, Top, Width, Height} for <col> and <colgroup>...

On Mon, 14 Mar 2011 23:02:41 +0100, Dan Bates <dbates-w3c@intudata.com>  
wrote:

>
>
> I am writing to propose for consideration that offset{Left, Top, Width,
>
> Height} for <col> and <colgroup> return non-zero values. Anne Van  
> Kesteren
>
> suggested that I write to this list after speaking with him on 02/24 on
>
> #whatwg with regards to this issue and my work on WebKit bug #15277
>
> <https://bugs.webkit.org/show_bug.cgi?id=15277>.
>
>
>
> In discussing this issue with Anne, we came to the conclusion that table-
>
> columns and column groups do not have have a "CSS layout box" because  
> such
>
> elements only influence aspects of table cells by section 17.3 of the CSS
>
> 2.1 spec <http://www.w3.org/TR/CSS21/tables.html#columns>. Hence, these
>
> attributes should return 0 (by section 6.1 of CSSOM View Draft 31
>
> <http://dev.w3.org/csswg/cssom-view/#offset-attributes>).
>
>
>
> Instead, I propose that the offset attributes for these table elements
>
> return non-zero values for convenience, consistency with current and
>
> historical browser implementations, and the "box"-like quality they  
> exhibit
>
> via their influence on table cells.

Done. I also made offsetParent work for these elements.

https://dvcs.w3.org/hg/csswg/rev/f34dc20f58fb

This fix is a bit hand-wavy but I couldn't figure out the "right" way to  
define this. Does anyone have advice for improvements to spec this more  
properly?

> I have elaborated on these reasons in
>
> the following list of pros and cons to this proposal:
>
>
>
> Pros:
>
> - Consistent with the MSDN documentation for these attributes (see remark
>
> (**)).
>
> - Materially consistent with the functionality of these attributes in IE
>
> and Firefox (see (*))
>
> - Provides a convenient way for a person to access column/column-group
>
> metrics that can be derived by hand from already available metric
>
> information.
>
>
>
> Cons:
>
> - Having these attributes return non-zero values disagrees with the
>
> "non-boxness" of <col> and <colgroup> using a strict interpretation of  
> the
>
> CSS2.1 spec.
>
> - Having these attributes return non-zero values disagrees with IE 8
>
> (standards mode), IE 9 (standards mode), and Opera 11.01.

Opera 12.15 returns non-zero values, FWIW.

> - Will break sites that assume that these attributes will always return 0
>
> for <col>s and <colgroup>s (why?).

That seems unlikely.

>
>
> (*) Brief Survey of Browser Implementations
>
>
>
> Firefox for Mac 3.6.13, IE7, IE8 (quirks mode), IE9 (quirks mode) return
>
> computed values for offset{Width, Height} for <col>s and <colgroup>s.
>
> Firefox for Mac also returns computed values for offset{Left, Top} for  
> such
>
> elements. (IE always returns 0 for these attributes - why?). Opera for  
> Mac
>
> 11.01 returns 0 for offset{Left, Top, Width, Height} for <col>s and
>
> <colgroup>s.
>
>
>
> (**) Remark:
>
>
>
>> From my understanding the offset attributes were originally introduced  
>> as
>
> Microsoft extensions. Notice, the MSDN documentation for these attributes
>
> explicitly state that it applies to <col> and <colgroup>:
>
>
>
> offsetLeft:
>
> http://msdn.microsoft.com/en-us/library/ms534200%28v=vs.85%29.aspx
>
> offsetTop:
>
> http://msdn.microsoft.com/en-us/library/ms534303%28v=vs.85%29.aspx
>
> offsetWidth:
>
> http://msdn.microsoft.com/en-us/library/ms534304%28v=vs.85%29.aspx
>
> offsetHeight:
>
> http://msdn.microsoft.com/en-us/library/ms534199%28v=vs.85%29.aspx
>
>
>
> For completeness, I have posted a test case that can be used to compare
>
> the value of these offset attributes for <col> and <colgroup> in  
> different
>
> browsers: <http://tersk.intudata.com/~dbates/w3c/col_offset_test.html>.
>
>
>
> Dan
>

Thanks
-- 
Simon Pieters
Opera Software

Received on Tuesday, 16 April 2013 12:35:31 UTC