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

RESOLVED FIXED in mozilla37

Status

()

defect
--
minor
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: brianhewitt1, Assigned: bzbarsky)

Tracking

({css2, dev-doc-complete})

Trunk
mozilla37
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

5 years ago
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
(Reporter)

Updated

5 years ago
Severity: normal → minor
Keywords: css2
(Reporter)

Updated

5 years ago
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)
(Reporter)

Comment 3

5 years ago
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+
https://hg.mozilla.org/mozilla-central/rev/085ff9c53ded
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED

Comment 13

4 years ago
https://developer.mozilla.org/en-US/docs/Mozilla_Quirks_Mode_Behavior
needs an update
Keywords: dev-doc-needed
OS: Mac OS X → All
Hardware: x86 → All
Comment hidden (spam)
You need to log in before you can comment on or make changes to this bug.