Closed Bug 1020400 Opened 11 years ago Closed 10 years ago

"empty-cells" CSS default should be "show" in quirks mode (like in standards mode)

Categories

(Core :: Layout: Tables, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: brianhewitt1, Assigned: bzbarsky)

Details

(Keywords: css2, dev-doc-complete)

Attachments

(4 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release) Build ID: 20140506152807 Steps to reproduce: A table cell (class) is set to have a bottom border. There is an empty table cell. border-bottom: 1px solid #808080; Actual results: unless empty-cells:show is explicitly set, the border does not show Expected results: CSS2 default value should be "show". It should not be necessary to set this explicitly
Severity: normal → minor
Keywords: css2
Component: CSS Parsing and Computation → General
Product: Core → Firefox
Is your page in quirks mode, by any chance? In quirks mode we default empty-cells to a special quirky "show background only" value.
Component: General → Layout: Tables
Product: Firefox → Core
On the other hand, neither Trident (IE11) nor WebKit/Blink seem to have such a quirk. So maybe we can remove it?
Flags: needinfo?(dbaron)
It is indeed dropped into quirks (it's an old frameset, sadly, with spotty adherence to standards). So that explains it, I suppose. But I'm not sure what advantage there could be of handling it differently like that. I'd be in favor of adhering to the CSS2 standard of defaulting to "show".
> But I'm not sure what advantage there could be of handling it differently like that. Yeah, I tracked this back, and it looks like we had "hide" as the default value until bug 33244 when we changed it to "hide" in quirks and "show" in standards, and then in bug 107857 changed to the current behavior. I think we should just drop this quirk.
Summary: "emtpy-cells" CSS default should be "show" → "empty-cells" CSS default should be "show"
Attachment #8438454 - Attachment description: testcase, quirks mode → test of empty-cells, quirks mode
Yeah, I'm fine with removing the quirk given comment 2. (I didn't test Trident myself on the testcases above, though.) We should remove both the special initialization in nsStyleTableBorder::nsStyleTableBorder and nsRuleNode::ComputeTableBorderData and the -moz-show-background value itself.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(dbaron)
Summary: "empty-cells" CSS default should be "show" → "empty-cells" CSS default should be "show" in quirks mode (like in standards mode)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
(In reply to David Baron [:dbaron] (UTC-8) (needinfo? for questions) from comment #7) > Yeah, I'm fine with removing the quirk given comment 2. (I didn't test > Trident myself on the testcases above, though.) IE 11 behaves the same as Chrome.
Comment on attachment 8527804 [details] [diff] [review] Remove empty-cells quirk, since no other UA has it Review of attachment 8527804 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/style/nsStyleStruct.h @@ +2231,5 @@ > int32_t mSpan; // [reset] the number of columns spanned by a colgroup or col > }; > > struct nsStyleTableBorder { > + explicit nsStyleTableBorder(); Can probably drop the explicit?
Attachment #8527804 - Flags: review?(cam) → review+
Target Milestone: --- → mozilla37
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Keywords: dev-doc-needed
OS: Mac OS X → All
Hardware: x86 → All
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: