Closed Bug 1580346 Opened 5 years ago Closed 5 years ago

When the page direction is rtl the table margins go wrong

Categories

(Core :: Layout: Tables, defect, P2)

66 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: muhammad1reda, Assigned: MatsPalmgren_bugz)

Details

(Keywords: testcase)

Crash Data

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

open this HTML with Firefox

<!DOCTYPE html>
<html>
<head>
<style>
html{direction:rtl;}
table,td,tr {
    border: 2px solid black;
}
</style>
</head>
<body>
    <table>
        <tr> <td>foobar</td><td>foobar</td> </tr>
        <tr> <td>foobar</td><td>foobar</td> </tr>
    </table>
</body>
</html>

Actual results:

The table borders will be calculated wrong Like in this picture
https://i.stack.imgur.com/V1Iip.jpg

Expected results:

The table borders should be calculated like if direction is ltr , like in this picture
https://i.stack.imgur.com/73r2U.jpg

chrome shows the table as expected on both directions

This is a question I posted on stackoverflow.com 3 years ago when I encountered this issue

https://stackoverflow.com/questions/38816104/why-the-table-margins-go-wrong-when-it-is-dir-rtl

Mr Lister from stackoverflow.com community commented that "I've tested, and it only started to go wrong in Firefox v41. Older versions are OK."

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Layout: Tables
Product: Firefox → Core
Assignee: nobody → mats
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Unspecified → All
Priority: -- → P2
Hardware: Unspecified → All
Attachment #9092082 - Attachment is obsolete: true
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/24ef927c7a58
Initialize table-row and table-row-group borders to zero in border-collapse:separate tables.  r=bzbarsky
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/19104 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Upstream PR merged by moz-wptsync-bot
Crash Signature: [@ mozilla::intl::LineBreaker::GetJISx4051Breaks]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: