We present a method to determine all the components of the magnetization vector in ultrathin ferromagnetic films using magneto-optical Kerr effects of either both p- and s-polarization waves or each polarization wave. The technique is applied to an in situ study of magnetization reversal and spin-reorientation transition (SRT) in Co films grown on a Pt(111) single-crystal substrate. The thickness-driven SRT from perpendicular to in-plane magnetization in Co/Pt(111) occurs in the film thickness range of 10-15 ML. This transition proceeds via a stable state of the canted phase exhibiting a typical second-order behavior. The second- and fourth-order surface anisotropy constants K-2s=1.8 mJ/m(2) and K-4s=-0.034 mJ/m(2), are determined from the theoretical fit to the magnetization orientation in the canted phase. The large second-order surface anisotropy is interpreted to be responsible for the later onset of transition, while the small fourth-order surface anisotropy results in a stable canted phase during the SRT.