forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use an explicit rect, rather than center point and padding, for rect-…
…based hit tests Prior to this patch, a rect-based hit test took as parameters a center point and four padding values for top, right, bottom, and left padding. Theoretically, a rect-based hit test might have asymmetric padding, but in practice, this never happens in the code (i.e., it's always true that top-padding == bottom-padding and left-padding == right-padding). Additionally, point-based hit tests used the same call path as rect-based hit tests (with zero padding), which made the code hard to follow. Finally, there was a bug in the rect-based hit test implementation: point-based hit tests always create a one-pixel rect with the hit test point at top left and width=height=1. Because rect-based hit tests used the same code path, the hit test rect was always erroneously expanded by one pixel to the right and one pixel down. This patch makes an explicit distinction between point-based and rect-based hit tests; it gets rid of center-point-and-padding in favor of a simple rect; and it fixes the one-pixel-padding bug. BUG=827639 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I11e49da328080c03da2e1662cbcc0317ab409740 Reviewed-on: https://chromium-review.googlesource.com/1081331 Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Commit-Queue: Stefan Zager <szager@chromium.org> Cr-Commit-Position: refs/heads/master@{#565556}
- Loading branch information
1 parent
27aa45d
commit 69f57e1
Showing
25 changed files
with
343 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.