Infield fly call requires 4 elements. 1) less than 2 out, 2) runners on 1st & 2nd OR bases loaded, 3) batted ball is hit higher than the tallest infielder (obviously judgment call), 4) batted ball is not hit further from home plate than 2 steps beyond the deepest usual fielding position of the furthest infielder.
The object of element 3) is to bar lineouts from being called an infield fly.
Additionally, I believe you will find element 4) is not in the official MLB rules. In fact, a comment in the official rules notes that the rule can be invoked even if an
outfielder is positioned to catch the ball --IF-- in the opinion of the umpire, the fielder has a plausible double play by dropping the ball. And more to this: inasmuch as the umpire is obligated to invoke the rule as soon as possible, and will take a great deal of crap from the bench and from the league if he doesn't, he is often not in much of a position to judge that the ball will actually come down just two steps behind the furthest infielder at the point when the call is made.
The rule elements are <2 outs and a force at third. Everything else is a judgement, and may be made by any umpire on the field.