Skip to content

Commit

Permalink
revert to border-collapse: separate after problems in WebKit
Browse files Browse the repository at this point in the history
  • Loading branch information
warpech committed Mar 31, 2013
1 parent f4fc4e6 commit 66252d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/3rdparty/walkontable/css/walkontable.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

.wtHolder table {
border-collapse: collapse;
border-collapse: separate; /*it must be separate, otherwise there are offset miscalculations in WebKit: http://stackoverflow.com/questions/2655987/border-collapse-differences-in-ff-and-webkit*/
position: relative;
-webkit-user-select: none;
-khtml-user-select: none;
Expand Down
12 changes: 6 additions & 6 deletions src/3rdparty/walkontable/test/jasmine/spec/table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ describe('WalkontableTable', function () {
wt.draw();

var wtHider = $table.parents('.wtHider');
expect(wtHider.outerWidth()).toBe($table.outerWidth() - 1);//-1 because of borderCollapse: collapse
expect(wtHider.outerWidth()).toBe($table.outerWidth());
expect(wtHider.find('col:eq(1)').width()).toBe(wtHider.find('col:eq(2)').width() - 1); //first is 106, last is 107 due to remaining part
});

Expand All @@ -693,7 +693,7 @@ describe('WalkontableTable', function () {
wt.draw();

var wtHider = $table.parents('.wtHider');
expect(wtHider.outerWidth()).toBe($table.outerWidth() - 1);//-1 because of borderCollapse: collapse
expect(wtHider.outerWidth()).toBe($table.outerWidth());
expect(wtHider.find('col:eq(1)').width()).toBeLessThan(wtHider.find('col:eq(2)').width());
});

Expand All @@ -717,7 +717,7 @@ describe('WalkontableTable', function () {
wt.draw();

var wtHider = $table.parents('.wtHider');
expect(wtHider.outerWidth()).toBe($table.outerWidth() - 1);//-1 because of borderCollapse: collapse
expect(wtHider.outerWidth()).toBe($table.outerWidth());
expect(wtHider.find('col:eq(1)').width()).toBeLessThan(wtHider.find('col:eq(2)').width());
});

Expand All @@ -741,7 +741,7 @@ describe('WalkontableTable', function () {
wt.draw();

var wtHider = $table.parents('.wtHider');
expect(wtHider.width()).toBeGreaterThan($table.width() - 1);//-1 because of borderCollapse: collapse
expect(wtHider.width()).toBeGreaterThan($table.width());
expect(wtHider.find('col:eq(1)').width()).toBe(wtHider.find('col:eq(2)').width());
});

Expand All @@ -765,13 +765,13 @@ describe('WalkontableTable', function () {
wt.draw();

var wtHider = $table.parents('.wtHider');
expect(wtHider.outerWidth()).toBeGreaterThan($table.outerWidth());//-1 because of borderCollapse: collapse
expect(wtHider.outerWidth()).toBeGreaterThan($table.outerWidth());
expect(wtHider.find('tr:first td:last').width()).toEqual(wtHider.find('tr:first td:last').prev().width());

createDataArray(2, 20);
wt.scrollHorizontal(40);
wt.draw();
expect(wtHider.outerWidth()).toEqual($table.outerWidth() - 1);
expect(wtHider.outerWidth()).toEqual($table.outerWidth());
expect(wtHider.find('tr:first td:last').width()).toBeGreaterThan(wtHider.find('tr:first td:last').prev().width());

createDataArray(2, 4);
Expand Down

0 comments on commit 66252d7

Please sign in to comment.