As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 741293 - argument to :dir() and :-moz-locale-dir() is treated case-sensitively; should be case-insensitive
: argument to :dir() and :-moz-locale-dir() is treated case-sensitively; should...
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: P3 normal (vote)
: mozilla17
Assigned To: David Baron :dbaron: ⌚️UTC-8
: Jet Villegas (:jet)
Depends on:
Blocks: 478416 562169
  Show dependency treegraph
Reported: 2012-04-02 00:50 PDT by John Daggett (:jtd)
Modified: 2012-08-21 06:27 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (2.14 KB, patch)
2012-04-02 08:29 PDT, David Baron :dbaron: ⌚️UTC-8
no flags Details | Diff | Splinter Review
Treat argument of :-moz-locale-dir() case-insensitively. () (5.12 KB, patch)
2012-08-20 15:26 PDT, David Baron :dbaron: ⌚️UTC-8
smontagu: review+
Details | Diff | Splinter Review

Description User image John Daggett (:jtd) 2012-04-02 00:50:54 PDT
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(')')

Those comparisons need to be case-insensitive.
Comment 1 User image David Baron :dbaron: ⌚️UTC-8 2012-04-02 08:26:22 PDT
Yep, should be LowerCaseEqualsLiteral.
Comment 2 User image David Baron :dbaron: ⌚️UTC-8 2012-04-02 08:29:51 PDT
Created attachment 611465 [details] [diff] [review]
Comment 3 User image David Baron :dbaron: ⌚️UTC-8 2012-04-02 08:30:52 PDT
Comment on attachment 611465 [details] [diff] [review]

Er, wait, that's not quite sufficient; need to lowercase what we store too.
Comment 4 User image David Baron :dbaron: ⌚️UTC-8 2012-04-02 08:31:48 PDT
(If someone else wants to finish this that's fine with me.)
Comment 5 User image David Baron :dbaron: ⌚️UTC-8 2012-08-20 14:38:21 PDT
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.
Comment 6 User image David Baron :dbaron: ⌚️UTC-8 2012-08-20 15:26:51 PDT
Created attachment 653549 [details] [diff] [review]
Treat argument of :-moz-locale-dir() case-insensitively.  ()
Comment 7 User image David Baron :dbaron: ⌚️UTC-8 2012-08-20 22:43:29 PDT
Comment 8 User image Ed Morley [:emorley] 2012-08-21 06:27:13 PDT

Note You need to log in before you can comment on or make changes to this bug.