fix for letter/word-spacing bug

David Hyatt hyatt at apple.com
Mon Nov 10 00:55:01 CET 2003


Index: khtml/rendering/render_style.h
===================================================================
RCS file: /local/home/cvs/Labyrinth/WebCore/khtml/rendering/render_style.h,v
retrieving revision 1.42
diff -u -p -r1.42 khtml/rendering/render_style.h
--- khtml/rendering/render_style.h	2003/11/03 18:22:30	1.42
+++ khtml/rendering/render_style.h	2003/11/09 01:09:18
@@ -1078,7 +1078,7 @@ public:
     bool setFontDef(const khtml::FontDef & v) {
         // bah, this doesn't compare pointers. broken! (Dirk)
         if (!(inherited->font.fontDef == v)) {
-            inherited.access()->font = Font( v );
+            inherited.access()->font = Font( v, inherited->font.letterSpacing, inherited->font.wordSpacing );
             return true;
         }
         return false;
Index: khtml/rendering/font.h
===================================================================
RCS file: /local/home/cvs/Labyrinth/WebCore/khtml/rendering/font.h,v
retrieving revision 1.24
diff -u -p -r1.24 khtml/rendering/font.h
--- khtml/rendering/font.h	2003/10/14 00:44:29	1.24
+++ khtml/rendering/font.h	2003/11/09 01:09:18
@@ -100,11 +100,11 @@ class Font
 public:
 #if APPLE_CHANGES
     Font() : letterSpacing(0), wordSpacing(0) {}
-    Font(const FontDef &fd) : fontDef(fd), letterSpacing(0), wordSpacing(0) {}
+    Font(const FontDef &fd, int l, int w) : fontDef(fd), letterSpacing(l), wordSpacing(w) {}
 #else
     Font() : fontDef(), f(), fm( f ), scFont( 0 ), letterSpacing( 0 ), wordSpacing( 0 ) {}
-    Font( const FontDef &fd )
-        :  fontDef( fd ), f(), fm( f ), scFont( 0 ), letterSpacing( 0 ), wordSpacing( 0 )
+    Font( const FontDef &fd, int l, int w )
+        :  fontDef( fd ), f(), fm( f ), scFont( 0 ), letterSpacing( l ), wordSpacing( w )
         {}
 #endif
 
-------------- next part --------------


dave


More information about the Khtml-devel mailing list