  The Cosmic Evolution Survey (COSMOS) allows for the first time a highly
significant census of environments and structures up to redshift one, as well
as a full morphological description of the galaxy population. In this paper we
present a study aimed to constrain the evolution, in the redshift range 0.2 < z
< 1.2, of the mass content of different morphological types and its dependence
on the environmental density. We use a deep multicolor catalog, covering an
area of ~0.7 square degrees inside the COSMOS field, with accurate photometric
redshifts (i < 26.5 and dz/(z+1) ~ 0.035). We estimate galaxy stellar masses by
fitting the multi-color photometry to a grid of composite stellar population
models. We quantitatively describe the galaxy morphology by fitting PSF
convolved Sersic profiles to the galaxy surface brightness distributions down
to F814 = 24 mag for a sample of 41300 objects.
  We confirm an evolution of the morphological mix with redshift: the higher
the redshift the more disk-dominated galaxies become important. We find that
the morphological mix is a function of the local comoving density: the
morphology density relation extends up to the highest redshift explored.
  The stellar mass function of disk-dominated galaxies is consistent with being
constant with redshift. Conversely, the stellar mass function of
bulge-dominated systems shows a decline in normalization with redshift. Such
different behaviors of late-types and early-types stellar mass functions
naturally set the redshift evolution of the transition mass. ABRIDGED
