Skip to content
Permalink
Browse files
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):

Canonical link: https://commits.webkit.org/64967@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@74628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Evan Martin committed Dec 24, 2010
1 parent 99892da commit 6458dfc9a2b91b223b2fb9785a59e3963d68b6a7
Showing 2 changed files with 17 additions and 2 deletions.
@@ -1,3 +1,19 @@
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):

2010-12-24 Ryuan Choi <ryuan.choi@samsung.com>

Reviewed by Kenneth Rohde Christiansen.
@@ -35,8 +35,7 @@ class TextMetrics : public RefCounted<TextMetrics> {
public:
static PassRefPtr<TextMetrics> create() { return adoptRef(new TextMetrics); }

// FIXME: Is coercing to an integer value intentional? If so, there should be a static_cast<unsigned>() here.
unsigned width() const { return m_width; }
float width() const { return m_width; }
void setWidth(float w) { m_width = w; }

private:

0 comments on commit 6458dfc

Please sign in to comment.