Closed Bug 741293 Opened 12 years ago Closed 12 years ago

argument to :dir() and :-moz-locale-dir() is treated case-sensitively; should be case-insensitive

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: jtd, Assigned: dbaron)

References

Details

Attachments

(1 file, 1 obsolete file)

The code in CSSParserImpl::ParsePseudoClassWithIdentArg contains:

  // -moz-locale-dir can only have values of 'ltr' or 'rtl'.
  if (aType == nsCSSPseudoClasses::ePseudoClass_mozLocaleDir) {
    if (!mToken.mIdent.EqualsLiteral("ltr") &&
        !mToken.mIdent.EqualsLiteral("rtl")) {
      return eSelectorParsingStatus_Error; // our caller calls SkipUntil(')')
    }
  }

http://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSParser.cpp#3419

Those comparisons need to be case-insensitive.
Yep, should be LowerCaseEqualsLiteral.
Blocks: 478416
Summary: minor case-sensitivity error in parsing of -moz-locale → argument to :-moz-locale-dir() is treated case-sensitively; should be case-insensitive
Attached patch patch (obsolete) — Splinter Review
Attachment #611465 - Flags: review?(enndeakin)
Comment on attachment 611465 [details] [diff] [review]
patch

Er, wait, that's not quite sufficient; need to lowercase what we store too.
Attachment #611465 - Flags: review?(enndeakin)
(If someone else wants to finish this that's fine with me.)
This is higher priority now that bug 562169 landed.  We need to get it in the same release as bug 562169.  Patch coming, once I make sure the tests pass.
Assignee: nobody → dbaron
Blocks: 562169
Status: NEW → ASSIGNED
Summary: argument to :-moz-locale-dir() is treated case-sensitively; should be case-insensitive → argument to :dir() and :-moz-locale-dir() is treated case-sensitively; should be case-insensitive
Attachment #653549 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/d086edab3616
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: