Commit 009044ff authored by rjw's avatar rjw

Fixed performance regression! Argh.

        * khtml/rendering/font.cpp:
        (Font::width):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 32782811
2002-11-21 Richard Williamson <rjw@apple.com>
Fixed performance regression! Argh.
* khtml/rendering/font.cpp:
(Font::width):
2002-11-21 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Trigger a rebuild because of the
......
2002-11-21 Richard Williamson <rjw@apple.com>
Fixed performance regression! Argh.
* khtml/rendering/font.cpp:
(Font::width):
2002-11-21 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Trigger a rebuild because of the
......
2002-11-21 Richard Williamson <rjw@apple.com>
Fixed performance regression! Argh.
* khtml/rendering/font.cpp:
(Font::width):
2002-11-21 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Trigger a rebuild because of the
......
......@@ -121,7 +121,8 @@ int Font::width( QChar *chs, int slen, int pos, int len ) const
#ifndef ROUND_TO_INT
#define ROUND_TO_INT(x) (unsigned int)((x)+.5)
#endif
return ROUND_TO_INT(fm.floatWidth(chs, slen, pos, len, letterSpacing, wordSpacing));
return ROUND_TO_INT(fm.floatWidth(chs+pos, slen-pos, 0, len, letterSpacing, wordSpacing));
// return fm.width(chs + pos, len);
#else
QString qstr = QConstString(chs+pos, len).string();
// hack for fonts that don't have a welldefined nbsp
......@@ -154,7 +155,8 @@ int Font::width( QChar *chs, int slen, int pos, int len ) const
int Font::width( QChar *chs, int slen, int pos ) const
{
#if APPLE_CHANGES
return ROUND_TO_INT(fm.floatWidth(chs, slen, pos, 1, letterSpacing, wordSpacing));
// return ROUND_TO_INT(fm.floatWidth(chs, slen, pos, 1, letterSpacing, wordSpacing));
return width(chs, slen, pos, 1);
#else
int w;
if ( !fontDef.hasNbsp && (chs+pos)->unicode() == 0xa0 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment