Trapdoor: which first, frame or floor?
I would suggest that since you intend (and should) attach the frame to the subfloor that it will be much better to install the frame first. Then fit the flooring up to the frame.