Last Comment Bug 308734 - Limit the values we accept for currentScale
: Limit the values we accept for currentScale
: fixed1.8, hang
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
-- critical (vote)
: ---
Assigned To: Jonathan Watt [:jwatt]
: Hixie (not reading bugmail)
: Jet Villegas (:jet)
Depends on:
  Show dependency treegraph
Reported: 2005-09-15 15:47 PDT by Jonathan Watt [:jwatt]
Modified: 2006-03-12 18:55 PST (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (6.20 KB, patch)
2005-09-15 20:12 PDT, Jonathan Watt [:jwatt]
tor: review+
tor: superreview+
asa: approval1.8b5-
Details | Diff | Splinter Review

Description User image Jonathan Watt [:jwatt] 2005-09-15 15:47:17 PDT
We need to put limits on the values we allow for currentScale. Playing with

shows that you don't have to zoom in or out too many times before nasty
artifacts and maxing out of CPU and memory occurs. ASV allows for a maximum
value of 16 and a minimum value of 0.0625. Unless anyone has other ideas, I
suggest we use these limits too.
Comment 1 User image Jonathan Watt [:jwatt] 2005-09-15 20:12:26 PDT
Created attachment 196276 [details] [diff] [review]

This patch keeps currentScale clamped to what are hopefully safe values.

For the record I tried doing this in WillModify/DidModify, but it isn't
possible. Once you get past the first issues (hint - recursion) you find that
it's impossible to dispatch event's with the correct data when you need to
Comment 2 User image Jonathan Watt [:jwatt] 2005-09-30 11:53:09 PDT
Comment on attachment 196276 [details] [diff] [review]

Requesting approval. It's very important that we include this in FF1.5. The
risk is next to nothing.
Comment 3 User image Asa Dotzler [:asa] 2005-10-05 11:42:56 PDT
Comment on attachment 196276 [details] [diff] [review]

we're now locked down and in ship mode for 1.8b5. If you'd like to re-request
approval for this change, please set the approval1.8rc1? flag.
Comment 4 User image Jonathan Watt [:jwatt] 2005-10-05 11:46:24 PDT
Sorry Asa, this is actually already landed. I just forgot to add the fixed1.8

Note You need to log in before you can comment on or make changes to this bug.