Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Issue 15294018: Limit size of scaled layer rects in ScrollbarLayer to content_bounds(). (Closed)

Created:
7 years, 7 months ago by wjmaclean
Modified:
7 years, 7 months ago
Reviewers:
enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, kevers
Visibility:
Public.

Description

Limit size of scaled layer rects in ScrollbarLayer to content_bounds(). ScrollbarLayer allocates textures for the back-/fore-tracks that are sized to the content_bounds. When a non-integer contents_scale is applied to a ScrollbarLayer at present, it may paint bitmaps that are larger than the texture size. This can happen when the following conditions are true: 1) The scrollbar location is non-zero, and 2) the contents scale is non-integer. In this case, the bitmap is painted to a rect that is created from both a scaled location and the content_bounds(), and then enlarged using ToEnclosingRect(). The enlarging operation can result in a paint rect that is larger-by-one than the content_bounds() in one or two dimensions, leading to an error when attempting to upload the bitmap to the texture. Non-integer content_bounds() can occur either through non-integer page scales encountered during pinch-zoom, or non-integer device scale factors (1.4 and 1.8 are common on Windows), or a combination of both. This CL clamps the scaled layer rects produced internally in ScrollbarLayer so they do not exceed the content_bounds(). BUG=229614 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201392

Patch Set 1 #

Patch Set 2 : Rebased to fix merge conflict. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -5 lines) Patch
M cc/layers/scrollbar_layer.cc View 1 1 chunk +7 lines, -3 lines 0 comments Download
M cc/layers/scrollbar_layer_unittest.cc View 1 chunk +94 lines, -0 lines 0 comments Download
M cc/test/fake_web_scrollbar.h View 1 chunk +3 lines, -0 lines 0 comments Download
M cc/test/fake_web_scrollbar.cc View 2 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
wjmaclean
I think this CL explains the issue with scaled scrollbars having troubles uploading their textures ...
7 years, 7 months ago (2013-05-17 19:17:28 UTC) #1
wjmaclean
BTW, when fixing this I had to make a choice between clamping the size of ...
7 years, 7 months ago (2013-05-17 19:36:25 UTC) #2
enne (OOO)
Can you remind me, when is the scrollbar location non-zero? Is that something we could ...
7 years, 7 months ago (2013-05-17 21:46:15 UTC) #3
wjmaclean
On 2013/05/17 21:46:15, enne wrote: > Can you remind me, when is the scrollbar location ...
7 years, 7 months ago (2013-05-18 00:18:00 UTC) #4
enne (OOO)
lgtm
7 years, 7 months ago (2013-05-20 17:27:21 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/15294018/1
7 years, 7 months ago (2013-05-21 12:36:56 UTC) #6
commit-bot: I haz the power
Failed to apply patch for cc/layers/scrollbar_layer.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 7 months ago (2013-05-21 12:36:59 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/15294018/9001
7 years, 7 months ago (2013-05-21 13:31:01 UTC) #8
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 7 months ago (2013-05-21 13:39:58 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/15294018/9001
7 years, 7 months ago (2013-05-21 14:02:03 UTC) #10
commit-bot: I haz the power
7 years, 7 months ago (2013-05-22 00:02:53 UTC) #11
Message was sent while issue was closed.
Change committed as 201392

Powered by Google App Engine
This is Rietveld 408576698