"Hysteria" turns the subject of female sexual independence into the stuff of historical comedy, inviting viewers back to the Victorian era for a look at what led to the invention of the vibrator.

Hugh Dancy stars as progressive and idealistic young doctor Mortimer Granville, who finds himself on the fringe of the medical establishment for his belief in "germ theory" (that is, that germs cause people to get sick). He's taken in by Dr. Dalrymple (Jonathan Pryce), a stuffy and successful specialist in cases of female "hysteria"—an old-fashioned diagnosis for a whole range of physical and psychological ailments and "troubling" behavior. (It's also what Keira Knightley was diagnosed with when she was sent to see Michael Fassbender in David Cronenberg's "A Dangerous Method," a very different film from this one.)

Dalrymple's treatment involves helping patients achieve "paroxysm" (orgasm) through "pelvic massage" (doctors manually stimulating the patient's genitals). As salacious as it sounds, writers Stephen Dyer and Jonah Lisa Dyer and director Tanya Wexler plays these scenes strictly for R-rated laughs and never X-rated visuals. The humor comes from the purely scientific execution of the treatment, handled with the utmost decorum and a complete lack of sexual acknowledgment. For the doctors, a job well done means easing a woman's hysteria, no more and no less.

Granville's belief in his work is shaken by Dalrymple's two very different daughters — prim and proper young Emily (Felicity Jones), who happily courts Granville because that's what her father wants, and the older and more rebellious Charlotte (Maggie Gyllenhaal), whose belief in women's rights and helping the poor causes her to dismiss her father's lucrative business assisting sexually frustrated upper class women as "frivolous." One of these sisters is the true perfect match for Granville, and it's never a question which one, at least not to the audience.

"Hysteria" doesn't trouble itself with surprise twists or unpredictable developments, it's a silly romance with a positive message about freedom of the mind and body, and the characters are basically clichés. Fortunately, the casting is so spot-on it's easy enough to go with the flow.

Rupert Everett returns to ace scene-stealing mode with a succession of dry one-liners as Granville's pal who plays a key role in the vibrator's invention (an event that doesn't occur until over halfway through the action). There's more welcome support from Sheridan Smith as a frisky former prostitute and an underused Ashley Jensen as one of Charlotte's charity cases.

But the film's success springs from its cheerfully winking tone (which might have played more condescending if Wexler didn't respect her characters so much) and credibly sweet chemistry between Dancy and Gyllenhaal (adding another believable Brit role to her resume following "Nanny McPhee Returns"). It's rare to find a romance of any kind these days where the love interests truly spark, and it's a pleasure to be reminded what that looks like in Dancy and Gyllenhaal's work here.

"Hysteria" doesn't amount to much more than sex comedy suitable for "Masterpiece Theater," but the gimmick proves more charming than one might expect.

"Hysteria" opens in limited release May 18