Closed Bug 1098558 Opened 10 years ago Closed 10 years ago

NS_STYLE_DIRECTION_INHERIT is unused & should be removed

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

We have a #define for NS_STYLE_DIRECTION_INHERIT, but it's completely unused (aside from one mention in a code-comment):
http://mxr.mozilla.org/mozilla-central/search?string=NS_STYLE_DIRECTION_INHERIT

Probably needs removing.
(It was already unused when we made the switch from CVS --> hg, as shown by:
 http://mxr.mozilla.org/firefox/search?string=%20NS_STYLE_DIRECTION_INHERIT
)

HISTORICAL TANGENT:
I tried to figure out when this value's last usage was removed, but couldn't. Here's what I got:

1) kipp added this value here, with usages in nsCSSParser.cpp:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=mozilla%2Flayout%2F&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=1998-04-25+20%3A40&maxdate=1998-04-25+20%3A50&cvsroot=%2Fcvsroot

2) kDirectionKTable then moved to nsCSSProps.cpp at some point (including this _INHERIT value):
  http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/style/nsCSSProps.cpp&rev=3.5#429

3) In revision 3.6 of nsCSSProps.cpp, this table disappeared. (I'm not sure where it moved to -- it sounds like it might've gone to a file called nsCSSProps2.cpp, but bonsai won't show me any versions of that file.)

4) Then, in revision 3.13 of nsCSSProps.cpp, this table returned, but without the INHERIT value:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/style/nsCSSProps.cpp&rev=3.13&root=/cvsroot#273

So sometime between (3) and (4), this value was removed from the table. I'm not going to bother digging further.
Attached patch fix v1Splinter Review
Attachment #8522513 - Flags: review?(smontagu)
(In reply to Daniel Holbert [:dholbert] from comment #1)
> So sometime between (3) and (4), this value was removed from the table. I'm
> not going to bother digging further.

FWIW, it was removed in revision 3.2 of nsCSSProps2.cpp at 1998-10-26 15:16, with the checkin comment "added CSS2 properties"

http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/layout/html/style/src/Attic/nsCSSProps2.cpp&root=/cvsroot
Attachment #8522513 - Flags: review?(smontagu) → review+
Ah, thanks for finishing off the digging. :)  I love 1998-era commit messages...

Anyway, landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/c01469b24e22
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/c01469b24e22
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: