Handle button press event only when appropriate.
Handle button press event only when appropriate.

Merge branch 'rust-servo' into rust-0.8