Remove IntRect(const &FloatRect) and IntRect(const &LayoutRect)
They simply truncated x, y, width and height to integer, which may not be what we want and may hide some errors. The usages of them may be in the following cases: 1. The input rect is already in integral geometry, so all methods of IntRect conversion will get the same result; 2. The IntRect is just used for informative purpose so differences of 1 to 2 pixels at the edges don't matter. We should use EnclosingIntRect(), EnclosedIntRect(), etc. to explicitly specify the way to convert. Convert the usages of them to - EnclosingIntRect if we are getting a visual rect or a rect that needs to cover the input rect; - Floored size for page size when printing to keep the original behavior. - PixelSnappedIntRect or RoundedIntRect for others. Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: Ifc81334e39db105d32a046cfa868baa35340a479 Reviewed-on: https://chromium-review.googlesource.com/949571 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by:Philip Rogers <pdr@chromium.org> Reviewed-by:
David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#542534}
Showing
Please register or sign in to comment