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

Issue 2836613002: Better overflow handling for aspect-ratio MQ. (Closed)

Created:
3 years, 8 months ago by rune
Modified:
3 years, 7 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, chromium-reviews, dglazkov+blink, feature-media-reviews_chromium.org, kenneth.christiansen, rwlbuis, Yoav Weiss
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Better overflow handling for aspect-ratio MQ. This change fixes two issues: 1. Clamp instead of casting double values from parser to internal unsigned storage. 2. Promote width/height/numerator/denominator multiplications to double to avoid integer overflow for large numerator/denominators. R=yoav@yoav.ws,suzyh@chromium.org BUG=676709, 714079 Review-Url: https://codereview.chromium.org/2836613002 Cr-Commit-Position: refs/heads/master@{#467615} Committed: https://chromium.googlesource.com/chromium/src/+/cf115265d17e7eec4e8c6c2d4441942988dc84db

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -6 lines) Patch
A third_party/WebKit/LayoutTests/fast/media/mq-aspect-ratio-overflow.html View 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/MediaQueryEvaluatorTest.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/MediaQueryExp.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (8 generated)
rune
ptal I wrote the layout test first, but I guess the unit test may suffice. ...
3 years, 8 months ago (2017-04-21 11:09:49 UTC) #3
rune
3 years, 8 months ago (2017-04-25 06:33:59 UTC) #7
suzyh_UTC10 (ex-contributor)
Thanks for doing this, Rune, and apologies for the delay. This lgtm but as I ...
3 years, 7 months ago (2017-04-26 00:08:13 UTC) #8
rune
On 2017/04/26 00:08:13, suzyh_UTC10 wrote: > Thanks for doing this, Rune, and apologies for the ...
3 years, 7 months ago (2017-04-26 07:09:35 UTC) #9
meade_UTC10
lgtm
3 years, 7 months ago (2017-04-27 03:15:19 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2836613002/1
3 years, 7 months ago (2017-04-27 05:29:47 UTC) #12
commit-bot: I haz the power
3 years, 7 months ago (2017-04-27 07:14:02 UTC) #15
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/cf115265d17e7eec4e8c6c2d4441...

Powered by Google App Engine
This is Rietveld 408576698