Role of the diagonal and off-diagonal continuum–continuum couplings in the breakup of 8B and 19C on 58Ni and 208Pb targets