Closed Bug 1363961 Opened 7 years ago Closed 7 years ago

stylo: AttrHasSubstring gets its strings backwards

Categories

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

53 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We're doing:

  return FindInReadable(str, nsDependentAtomString(aStr));

where "str" is the attr value and "aStr" comes from the selector.

But FindInReadable takes the pattern as the first arg, the string to search within as the second arg.  So the args are backwards.

Patch coming up once I have try results indicating which tests start passing with this fixed.
MozReview-Commit-ID: BAsd9bN4dtA
Attachment #8866646 - Flags: review?(cam)
Attachment #8866646 - Flags: review?(cam) → review+
Nice find!
Priority: -- → P1
Manish found this; it was in his list of unknown failures.  ;)

I'm also adding some tests to test_selectors.html for this.
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/990b66f0c7e8
Fix the order of arguments to FindInReadable in AttrHasSubstring.  r=heycam
https://hg.mozilla.org/mozilla-central/rev/990b66f0c7e8
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: