Last Comment Bug 725646 - Remove support for the hspace/vspace attributes on table
: Remove support for the hspace/vspace attributes on table
: dev-doc-needed, site-compat
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
-- normal with 4 votes (vote)
: ---
Assigned To: :Ms2ger (⌚ UTC+1/+2)
: Andrew Overholt [:overholt]
Depends on:
Blocks: quirks-mode-spec
  Show dependency treegraph
Reported: 2012-02-09 06:57 PST by :Ms2ger (⌚ UTC+1/+2)
Modified: 2015-10-26 22:13 PDT (History)
12 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (3.46 KB, patch)
2012-02-09 06:57 PST, :Ms2ger (⌚ UTC+1/+2)
bzbarsky: review+
Details | Diff | Splinter Review

Description User image :Ms2ger (⌚ UTC+1/+2) 2012-02-09 06:57:25 PST
Created attachment 595720 [details] [diff] [review]
Patch v1

These attributes are not supported at all in IE and Opera, and only in quirks mode in Gecko. Chrome supports them in all modes.

I think we can get away with removing support entirely.
Comment 1 User image Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-02-09 07:00:02 PST
Is it possible to get a more data driven answer than "we think we can get away with it"?
Comment 2 User image John Jensen 2012-02-09 11:43:15 PST
This seems to be a perfect question to direct to Blekko, who have a neat "grep the web" tool we can use. Essentially we would ask them "what percentage of <table> tags use hspace or vspace? Coincidentally there is a brownbag discussion being held today with them and I will follow up to see if this is possible.
Comment 3 User image Boris Zbarsky [:bz] (still a bit busy) 2012-02-09 12:01:56 PST
Comment on attachment 595720 [details] [diff] [review]
Patch v1

r=me on the code changes, but I'd love to see the data here.  Does IE really not support this even in their compat quirks mode?
Comment 4 User image :Ms2ger (⌚ UTC+1/+2) 2012-02-10 02:33:46 PST
My IE8 on WinXP doesn't seem to support it, with or without doctype.
Comment 5 User image :Ms2ger (⌚ UTC+1/+2) 2012-02-14 03:58:25 PST
John, do you know when we could get the data?
Comment 6 User image John Jensen 2012-02-14 10:56:31 PST
I've followed up with them and will update this ASAP.
Comment 7 User image :Ms2ger (⌚ UTC+1/+2) 2012-02-15 04:46:59 PST
Comment 8 User image :Ms2ger (⌚ UTC+1/+2) 2012-03-21 04:34:25 PDT
John, you would get to me ASAP over a month ago. Do you have an ETA? I'd rather not wait indefinitely to finish this bug.
Comment 9 User image John Jensen 2012-03-21 08:11:46 PDT
Hi Gerv,

Sorry, perhaps some miscommunication here. I saw you were cc'd on the emails from Blekko and thought that was sufficient. I'll dive back into that thread and get it sorted out.
Comment 11 User image :Ms2ger (⌚ UTC+1/+2) 2012-07-24 11:58:03 PDT
So, what's the conclusion here?
Comment 12 User image Boris Zbarsky [:bz] (still a bit busy) 2012-07-24 12:09:40 PDT
What does the data look like?
Comment 13 User image David Baron :dbaron: ⌚️UTC-8 2013-08-20 18:59:19 PDT
Someone needs to draw conclusions from comment 10 here.  It's a big number, but not clear to me how big.  And it wouldn't surprise me if most (or even nearly all) of the values were 0, which I think should be the default for both.
Comment 14 User image Simon Pieters 2013-08-21 08:03:25 PDT
One of the crawls looked for non-zero values if I understand the grep correctly. So looking at just number of URLs:

hspace 3.16M of which 2.21M (70%) have non-zero value
vspace 3.29M of which 2.28M (69%) have non-zero value

One thing I wonder is, in <table[^>]*hspace\s*=\s*['"]?[ ^0][^>]*> there's a space before the ^, is that intended to be there? Also, since the " or ' before it is optional in the regexp, it could instead match the [^0], so these results might be bogus.

I did a different search, data set 18/06/2013 from (53,000 pages):

$ grep -riE "<table\s[^>]*(v|h)space\s*=\s*[\"']?[1-9]" . > ~/Desktop/vhspace.txt
$ wc -l ~/Desktop/vhspace.txt 
      13 /Users/zcorpan/Desktop/vhspace.txt

The matches were from 9 different sites. So it's 0.017% of the sites in this data set that use non-zero vspace/hspace.
Comment 15 User image Simon Pieters 2013-08-21 13:01:17 PDT
Analysis of visual impact of dropping vspace/hspace on those 9 pages: - an image would get rid of 10px vertical spacing and two items in the footer would lose 3px spacing. Seems acceptable. - no visible difference. - the column widths differ by a few pixels. Seems acceptable. - same or very similar site as - no visible difference. - same site as above. - header would lose 4px vertical spacing. Seems acceptable. - no visible difference. - 404
Comment 17 User image Simon Pieters 2013-08-21 13:30:55 PDT
Spec bug:
Comment 18 User image :Ms2ger (⌚ UTC+1/+2) 2014-07-29 00:48:05 PDT
Chrome is doing this, fwiw.
Comment 20 User image j.j. 2015-08-03 18:49:55 PDT
The Blink bug is fixed since February 2015
Comment 21 User image :Ms2ger (⌚ UTC+1/+2) 2015-08-28 00:05:30 PDT
Comment 22 User image Kohei Yoshino [:kohei] 2015-10-26 22:13:12 PDT
Posted the site compatibility doc:

Note You need to log in before you can comment on or make changes to this bug.