Implement Window::get_cx() to reduce code repetition.
auto merge of #1050 : Ms2ger/servo/get_cx, r=jdm