maybe its neither?!
with hip flexion and knee flexion the pelvis would be in anterior tilt. going up the stairs, as the knee extends the hip extends too=posterior tilt of pelvis. the hams dont necessarily have to lengthen or shorten.... maybe hams stays the same and contract isometrically!