[Webkit-unassigned] [Bug 30177] Volume slider always starts at half volume

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 23 10:25:57 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=30177


Eric Carlson <eric.carlson at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #41694|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #16 from Eric Carlson <eric.carlson at apple.com>  2009-10-23 10:25:57 PDT ---
(From update of attachment 41694)

> +    String newValue = String::number(m_mediaElement->volume());
> +    if (value() != newValue) {
> +        setValue(newValue);

String comparison is slower than comparing floats and it seems wasteful to
allocate a String when it won't be used, so I would like to see something like
the following instead:

   float volume = m_mediaElement->volume();
   if (value().toFloat() != volume) {
        setValue(String::number(volume));

Sorry to be so picky :-(

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list