Change implementation of resize ImageBitmap to meet specs

In a previous CL: https://codereview.chromium.org/2035113002, the
implementation of resize options for ImageBitmap follows the procedure
of resize the input and then crop the resized input. The specs recently
changed here: https://github.com/whatwg/html/pull/1546, where now we
should crop the input first and then scale the cropped input.

This CL changes the implementation. The change is actually quite simple,
we let parsedOption.cropRect() to keep the information of the cropRect
specified by the user, and let parsedOption.resizeWidth(Height) be the
resizeWidth && resizeHeight specified by the user. In the cropImage, we
only need to change the srcRect and dstRect when we do
SkCanvas::drawImageRect.

Layout test has been updated to account for this change.

BUG=627855

Review-Url: https://codereview.chromium.org/2182583002
Cr-Commit-Position: refs/heads/master@{#407807}
2 files changed