Fix boundary computation.
Fix boundary computation.

R=etiennej@chromium.org

Review URL: https://codereview.chromium.org/1279743002 .

afandria/mojo,afandria/mojo,afandria/mojo,afandria/mojo,afandria/mojo,afandria/mojo,afandria/mojo,afandria/mojo