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

Issue 1193203003: Keep effectiveZoom finite (Closed)

Created:
5 years, 6 months ago by fs
Modified:
5 years, 6 months ago
Reviewers:
pdr., Timothy Loh
CC:
blink-reviews, blink-reviews-style_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Keep effectiveZoom finite Through repeated application, it's quite possible to get the effective zoom to overflow, resulting in Infinity in ComputedStyle. This is a very uncommon case in reality (outside fuzzers), but make sure to clamp the effective zoom value to a finite range to avoid the simplest cases of Infinity havoc-wrecking. BUG=490757, 502997 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197734

Patch Set 1 #

Patch Set 2 : More tests #

Total comments: 1

Patch Set 3 : Reduced clamp range; Remove clamp in CSSToLength... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -3 lines) Patch
A LayoutTests/animations/zoomed-length-crash.html View 1 1 chunk +24 lines, -0 lines 0 comments Download
A + LayoutTests/animations/zoomed-length-crash-expected.txt View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/svg/zoom/large-zoom-crash.html View 1 chunk +6 lines, -2 lines 0 comments Download
A + LayoutTests/svg/zoom/large-zoom-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/css/CSSToLengthConversionData.h View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M Source/core/style/ComputedStyle.h View 1 2 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
fs
https://codereview.chromium.org/1193203003/diff/20001/Source/core/style/ComputedStyle.h File Source/core/style/ComputedStyle.h (right): https://codereview.chromium.org/1193203003/diff/20001/Source/core/style/ComputedStyle.h#newcode1890 Source/core/style/ComputedStyle.h:1890: float clampedEffectiveZoom = clampTo<float>(f); In practice this is just ...
5 years, 6 months ago (2015-06-23 21:11:57 UTC) #2
pdr.
On 2015/06/23 at 21:11:57, fs wrote: > https://codereview.chromium.org/1193203003/diff/20001/Source/core/style/ComputedStyle.h > File Source/core/style/ComputedStyle.h (right): > > https://codereview.chromium.org/1193203003/diff/20001/Source/core/style/ComputedStyle.h#newcode1890 ...
5 years, 6 months ago (2015-06-23 22:33:34 UTC) #3
Timothy Loh
CSSToLengthConversionData has some code (ctor and setZoom) that clamps to avoid zero, maybe we should ...
5 years, 6 months ago (2015-06-24 04:34:04 UTC) #4
fs
On 2015/06/24 04:34:04, Timothy Loh wrote: > CSSToLengthConversionData has some code (ctor and setZoom) that ...
5 years, 6 months ago (2015-06-24 10:09:15 UTC) #5
Timothy Loh
On 2015/06/24 10:09:15, fs wrote: > On 2015/06/24 04:34:04, Timothy Loh wrote: > > CSSToLengthConversionData ...
5 years, 6 months ago (2015-06-24 10:27:48 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1193203003/40001
5 years, 6 months ago (2015-06-24 11:36:20 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1193203003/40001
5 years, 6 months ago (2015-06-24 11:36:51 UTC) #12
commit-bot: I haz the power
5 years, 6 months ago (2015-06-24 11:40:32 UTC) #13
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197734

Powered by Google App Engine
This is Rietveld 408576698