These statements refer to the concept of "structure functions", from the time researchers were looking with particle scatterings for the structure of the proton. In the case of the proton, deep inelastic scattering showed up the parton/quark structure . IMO it is at present a confusing manner of describing the data which are much more simply described by the standard model of particle physics.
In this model all interaction of the point particles (i.e. no dimensions/size ) in the table can be written down with the summation of appropriate Feynman diagrams, and they all obey special relativity transformations . The masses in the table are invariant masses , the length of the four vector describing the particle, i.e. they do not change under Lorentz transformations .
In writing down the diagrams necessary to calculate the scattering cross sections for elementary particles, for example photon electron scattering, there is a large number of diagrams of higher order, that have to be added so as to fit the data. These are extra exchanges and loops, allowed by quantum number conservation, which are off mass shell for the particles described in the internal lines of the diagrams. They are virtual.
It is confusing to equate the "structure" of a proton, which has a mass and is a complex system with a mathematical internal structure of elementary particles. The theoretical mathematical use of exchange of virtual particles in elementary particle interactions, represented by Feynman diagrams, which is what all these statements are doing, is not the same as the internal structure of hadrons. There may be a mathematical correspondence, but it clouds the issues.
Asymptotic freedom holds within hadrons, but it is wrong to use it for higher order diagrams of elementary particle interactions. Apples and oranges.
Within the particle physics standard model a photon cannot be massive
In the table,gluons are massless, quarks have masses which have been "measured" by fitting data with specific models. Within the hadrons where they are confined they are virtual, i.e. off mass shell and can have a mass variable within the limits of integration. Only in cosmological models at very high energies they are assumed massless due to symmetry breaking .
The quantum description of mass is "the length of the four vector" assigned to a particle or a system.