long7181226 / compatibility-detector

Automatically exported from code.google.com/p/compatibility-detector
Apache License 2.0
0 stars 0 forks source link

RX1008 table_cellspacing_border_collapse #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
第一轮测试:有误报(91.7% [11/12])

---------------------------[误报] #1

当对 TABLE 元素设置 ‘border-spacing’ 特性而不是 
‘cellspacing’ 时,会报错。由于 IE6 IE7 IE8(Q) 中存在 RX1008 
的问题,又这三类浏览器不支持 ‘border-spacing’ 
特性(RE1020),因此在 ‘border-collapse:collapse’ 
时,各浏览器无差异。各浏览器都有默认 2px 的 cellspacing。

测试样例:
only_set_border_spacing.html

URL:
http://123.sogou.com/
http://anime.xunlei.com/
http://blog.sina.com.cn/
http://ditu.google.cn/
http://ent.sina.com.cn/
http://hd.gougou.com/
http://tw.stock.yahoo.com/
http://www.2345.com/indexz.htm
http://www.chinanews.com.cn/
http://www.google.cn/music/homepage
http://xy2.163.com/

---------------------------[误报] #2

设置了 ‘border-collapse:collapse’ 的空 
TABLE(无子元素),浏览器间无差异,都不显示 TABLE。

测试样例:
empty_TABLE.html

URL:
http://anime.xunlei.com/

---------------------------[误报] #3

设置了 ‘cellspacing’ 属性的 TABLE 的父元素不可见(visibility 
: hidden 或 display : none),各浏览器间无差异,都不显示 TABLE。

测试样例:
invisible_parent_of_TABLE.html

URL:
http://auto.sohu.com/

Original issue reported on code.google.com by wangju...@beyondsoft.com on 16 Nov 2010 at 8:46

Attachments:

GoogleCodeExporter commented 9 years ago
第二轮测试: 有误报 95% (19/20)

-------------------------[误报] #1

当  cellspacing="0" 
时,会产生误报,此时所有浏览器效果一致。
问题处于 detection 代码中如下部分
if (node.hasAttribute('cellspacing'))
          this.addProblem('RX1008', [node]);

建议修改为:
if (node.hasAttribute('cellspacing') && 
parseInt(node.getAttribute('cellspacing'),10) > 0 )
          this.addProblem('RX1008', [node]);

测试用例:
table_cellspacing_border_collapse.html

URL:
http://www.microsoft.com/security/malwareremove/default.aspx
http://finance.yahoo.com/
http://en.wikipedia.org/wiki/Africa
http://bangaliguru.com/
http://basketball.fantasysports.yahoo.com/
http://3dpregnancy.parentsconnect.com/
http://allrecipes.com
http://ace.mu.nu/archives/307736.php
http://blogs.wsj.com/digits/2010/11/02/google-translate-takes-on-poetry/
http://cooltamil.com/
http://bubbleshooter.net/game1.php
http://disney.go.com/disneyonice/
……

-------------------------[误报] #2

当空表格设置了  cellspacing 存在非零值 和  
'border-collapse:collapse' 时,各浏览器显示一致,产生误报。

测试用例:
table_cellspacing_border_collapse.html

URL:
http://www.google.com/prdhp

Original comment by qianbao...@beyondsoft.com on 17 Nov 2010 at 4:09

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by wangju...@beyondsoft.com on 19 Nov 2010 at 2:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
根据第二轮测试结果修改后,验证修改结果: 误报 0% (0/100)

Original comment by qianbao...@beyondsoft.com on 22 Nov 2010 at 11:08

GoogleCodeExporter commented 9 years ago
第三轮测试,无误报,准确率 100% 抽样测 189 URL 中的 15 个。

Original comment by wangju...@beyondsoft.com on 1 Dec 2010 at 8:48