Shuffle some code around in preparation for a change to how poseAsWebKitApp works.