Bug 11188 - Setting hspace on a table overrides align=center
Summary: Setting hspace on a table overrides align=center
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Dave Hyatt
URL: http://www.iloveindia.com/astrology/i...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-06 02:06 PDT by mitz
Modified: 2008-01-11 10:27 PST (History)
1 user (show)

See Also:


Attachments
Test case (134 bytes, text/html)
2006-10-06 02:07 PDT, mitz
no flags Details
Patch that moves align=center into code instead of CSS (1.39 KB, patch)
2008-01-10 11:57 PST, Dave Hyatt
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2006-10-06 02:06:31 PDT
A table with align=center is not centered if it also specifies hspace. See attached test case.
Comment 1 mitz 2006-10-06 02:07:23 PDT
Created attachment 10945 [details]
Test case
Comment 2 Eric Seidel (no email) 2008-01-10 11:23:35 PST
An example of this on a real website:
http://www.iloveindia.com/astrology/index.html
Comment 3 Dave Hyatt 2008-01-10 11:46:58 PST
Interesting.  Firefox appears to be somehow giving some mapped attributes a higher precedence than others.  In particular, it makes sure hspace gets mapped in before align does.

Comment 4 Dave Hyatt 2008-01-10 11:56:06 PST
The bug is that we implemented align=center in the CSS file.  This created a situation where hspace would always win (instead of allowing attribute order to determine the winner).

Comment 5 Dave Hyatt 2008-01-10 11:57:41 PST
Created attachment 18368 [details]
Patch that moves align=center into code instead of CSS

This patch will also improve the style sharing performance of tables, since the attribute selector rule in html4.css prevented tables from sharing style with one another.
Comment 6 mitz 2008-01-10 12:03:40 PST
Comment on attachment 18368 [details]
Patch that moves align=center into code instead of CSS

r=me. Add a test case if not covered by an existing one.
Comment 7 Dave Hyatt 2008-01-11 10:27:53 PST
Fixed in r29409.