Changeset 74628 in webkit


Ignore:
Timestamp:
Dec 24, 2010 3:50:34 AM (13 years ago)
Author:
evan@chromium.org
Message:

2010-12-24 Evan Martin <evan@chromium.org>

Reviewed by Darin Adler.

TextMetrics::width is an integer, but the member is a float
https://bugs.webkit.org/show_bug.cgi?id=51566

Change the return type to a float.

No tests, fixing a compiler warning.
(I was unable to produce a difference in the values exposed to pages
with a float versus the previous conversion to an integer.)

  • html/TextMetrics.h: (WebCore::TextMetrics::width):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r74626 r74628  
     12010-12-24  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        TextMetrics::width is an integer, but the member is a float
     6        https://bugs.webkit.org/show_bug.cgi?id=51566
     7
     8        Change the return type to a float.
     9
     10        No tests, fixing a compiler warning.
     11        (I was unable to produce a difference in the values exposed to pages
     12        with a float versus the previous conversion to an integer.)
     13
     14        * html/TextMetrics.h:
     15        (WebCore::TextMetrics::width):
     16
    1172010-12-24  Ryuan Choi  <ryuan.choi@samsung.com>
    218
  • trunk/WebCore/html/TextMetrics.h

    r60784 r74628  
    3636    static PassRefPtr<TextMetrics> create() { return adoptRef(new TextMetrics); }
    3737
    38     // FIXME: Is coercing to an integer value intentional? If so, there should be a static_cast<unsigned>() here.
    39     unsigned width() const { return m_width; }
     38    float width() const { return m_width; }
    4039    void setWidth(float w) { m_width = w; }
    4140
Note: See TracChangeset for help on using the changeset viewer.