Closed
Bug 473847
Opened 16 years ago
Closed 16 years ago
<progressmeter> + -moz-appearance:none + large |max| = wonkyness
Categories
(Toolkit :: XUL Widgets, defect, P1)
Toolkit
XUL Widgets
Tracking
()
RESOLVED
FIXED
People
(Reporter: Dolske, Assigned: enndeakin)
References
Details
(Keywords: fixed1.9.1)
Attachments
(2 files, 1 obsolete file)
(deleted),
application/vnd.mozilla.xul+xml
|
Details | |
(deleted),
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
Found while switching videocontrols over to use a <progressmeter>.
When incrementing the value of the progressmeter, I found that the bar was jumping around randomly. This seems to require using -moz-appearance:none and using a large |max| attribute on the progressmeter. Without either condition, the bar works normally.
Looks like a layout bug, because resizing the window (without changing the progressmeter's value) also makes it jump around as it resizes.
Testcase attached, it increments a red progress bar in 10% increments every 500ms. You should see a progression from 0% to 100%, instead it jumps around. If |max| is < ~10,000, it seems to work though!
Reporter | ||
Comment 1•16 years ago
|
||
Also happens on Linux, even without the -moz-appearance:none (in fact, deleting the whole <html:style/> block in the testcase).
OS: Mac OS X → All
Hardware: x86 → All
Reporter | ||
Comment 2•16 years ago
|
||
Windows is weird too; the bar doesn't jump around randomly, but seems to just immediately peg at 100%. It's even broken on a static XUL page with just:
<progressmeter value="500" max="1000"/>
Assignee | ||
Comment 3•16 years ago
|
||
The issue here is that multiplying the flex and the sizeRemaining overflows. Instead, we divide first. Might not be the best solution, but it fixes this progressmeter issue.
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attachment #357677 -
Flags: superreview?(dbaron)
Attachment #357677 -
Flags: review?(dbaron)
Comment 4•16 years ago
|
||
Why not cast to PRInt64 instead, and then back to PRInt32?
Assignee | ||
Comment 5•16 years ago
|
||
Attachment #357677 -
Attachment is obsolete: true
Attachment #357711 -
Flags: superreview?(dbaron)
Attachment #357711 -
Flags: review?(dbaron)
Attachment #357677 -
Flags: superreview?(dbaron)
Attachment #357677 -
Flags: review?(dbaron)
Comment 6•16 years ago
|
||
Comment on attachment 357711 [details] [diff] [review]
yes, that makes more sense
r+sr=dbaron, although I much prefer construction-style casts in C++, i.e. replacing
>+ PRInt32 newSize = pref + (PRInt32)((PRInt64)sizeRemaining * flex / spacerConstantsRemaining);
with ... = pref + PRInt32(PRInt64(sizeRemaining) * flex / spacerConstantsRemaining);
etc.
Attachment #357711 -
Flags: superreview?(dbaron)
Attachment #357711 -
Flags: superreview+
Attachment #357711 -
Flags: review?(dbaron)
Attachment #357711 -
Flags: review+
Assignee | ||
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 8•16 years ago
|
||
Is this ready to land on 1.9.1 too? I'd like to land the video scrubber tomorrow, which needs this. [I'd be happy to land and watch the tree for this patch too.]
Assignee | ||
Updated•16 years ago
|
Keywords: fixed1.9.1
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•