Both are important. Controlling for calories demonstrates yet again that sugar is not uniquely bad (the claim that it is is very prevalent in the health and fitness online space). Ad libitum studies demonstrate that the foods we eat have differential effects on appetite, satiety, etc.