glass first then headliner

does the headliner go in first befor the glass or does it matter?