[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:50:32 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f6645535de51dcc2afe0df7d21d88daaddc058e4
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 7 02:19:12 2003 +0000

    WebKit:
    	Fixed 3365378.  Edge case text run > 1024 hit by JS generated string.  We weren't correctly checking size of string length.  Used /2 instead of *2.
    
            Reviewed by Vicki (and Dan!).
    
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (-[WebTextRenderer _CG_drawHighlightForRun:style:atPoint:]):
            (-[WebTextRenderer _CG_drawRun:style:atPoint:]):
    
    
    WebCore:
    	Fixed development build problem.  WebCore.exp needed a newline at EOF.
    
            * WebCore-combined.exp:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4782 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index aabd79f..274eee4 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,11 @@
 2003-08-06  Richard Williamson   <rjw at apple.com>
 
+	Fixed development build problem.  WebCore.exp needed a newline at EOF.
+	
+        * WebCore-combined.exp:
+
+2003-08-06  Richard Williamson   <rjw at apple.com>
+
 	Fixed 3348630.  Pick up about 1% by moving implementation of _unicodeDirection to WebCore and inlining.
 
         Reviewed by Ken.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index aabd79f..274eee4 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,11 @@
 2003-08-06  Richard Williamson   <rjw at apple.com>
 
+	Fixed development build problem.  WebCore.exp needed a newline at EOF.
+	
+        * WebCore-combined.exp:
+
+2003-08-06  Richard Williamson   <rjw at apple.com>
+
 	Fixed 3348630.  Pick up about 1% by moving implementation of _unicodeDirection to WebCore and inlining.
 
         Reviewed by Ken.
diff --git a/WebCore/WebCore-combined.exp b/WebCore/WebCore-combined.exp
index 2e4c55f..2fe99c4 100644
--- a/WebCore/WebCore-combined.exp
+++ b/WebCore/WebCore-combined.exp
@@ -23,7 +23,8 @@ _WebCoreUnicodeMirroredFunction
 _WebCoreUnicodeUpperFunction
 _WebCoreInitializeTextRun
 _WebCoreInitializeEmptyTextStyle
-_WebCoreDirectionInfo__ZN10KWQMapImpl11endInternalEv
+_WebCoreDirectionInfo
+__ZN10KWQMapImpl11endInternalEv
 __ZN10KWQMapImpl13beginInternalEv
 __ZN10KWQMapImpl13clearInternalEv
 __ZN10KWQMapImpl14insertInternalEP14KWQMapNodeImplb
diff --git a/WebCore/config.h b/WebCore/config.h
index d6cc425..34666ee 100644
--- a/WebCore/config.h
+++ b/WebCore/config.h
@@ -6,7 +6,7 @@
 #define HAVE_DIRENT_H 1
 
 /* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
+#define HAVE_DLFCN_H 1
 
 /* Define to 1 if you have the <float.h> header file. */
 #define HAVE_FLOAT_H 1
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 22fe73b..664b789 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,15 @@
 2003-08-06  Richard Williamson   <rjw at apple.com>
 
+	Fixed 3365378.  Edge case text run > 1024 hit by JS generated string.  We weren't correctly checking size of string length.  Used /2 instead of *2.
+
+        Reviewed by Vicki (and Dan!).
+
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer _CG_drawHighlightForRun:style:atPoint:]):
+        (-[WebTextRenderer _CG_drawRun:style:atPoint:]):
+
+2003-08-06  Richard Williamson   <rjw at apple.com>
+
 	Fixed 3348630.  Pick up about 1% by moving implementation of _unicodeDirection to WebCore and inlining.
 
         Reviewed by Ken.
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index b26ae2c..553d01f 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -34,7 +34,10 @@
 // bug in CoreGraphics where there seem to be small errors to some metrics.
 #define CEIL_TO_INT(x) ((int)(x + 0.999)) /* ((int)(x + 1.0 - FLT_EPSILON)) */
 
-#define LOCAL_BUFFER_SIZE 1024
+// MAX_GLYPH_EXPANSION is the maximum numbers of glyphs that may be
+// use to represent a single unicode code point.
+#define MAX_GLYPH_EXPANSION 4
+#define LOCAL_BUFFER_SIZE 2048
 
 // Covers Latin1.
 #define INITIAL_BLOCK_SIZE 0x200
@@ -837,11 +840,11 @@ static void _drawGlyphs(NSFont *font, NSColor *color, CGGlyph *glyphs, CGSize *a
     if (run->length == 0)
         return;
 
-    if (length/2 > LOCAL_BUFFER_SIZE) {
-        advances = (CGSize *)calloc(length*2, sizeof(CGSize));
-        widthBuffer = (float *)calloc(length*2, sizeof(float));
-        glyphBuffer = (CGGlyph *)calloc(length*2, sizeof(ATSGlyphRef));
-        fontBuffer = (NSFont **)calloc(length*2, sizeof(NSFont *));
+    if (length*MAX_GLYPH_EXPANSION > LOCAL_BUFFER_SIZE) {
+        advances = (CGSize *)calloc(length*MAX_GLYPH_EXPANSION, sizeof(CGSize));
+        widthBuffer = (float *)calloc(length*MAX_GLYPH_EXPANSION, sizeof(float));
+        glyphBuffer = (CGGlyph *)calloc(length*MAX_GLYPH_EXPANSION, sizeof(ATSGlyphRef));
+        fontBuffer = (NSFont **)calloc(length*MAX_GLYPH_EXPANSION, sizeof(NSFont *));
     } else {
         advances = localAdvanceBuffer;
         widthBuffer = localWidthBuffer;
@@ -929,11 +932,11 @@ static void _drawGlyphs(NSFont *font, NSColor *color, CGGlyph *glyphs, CGSize *a
     if (run->length == 0)
         return;
 
-    if (length/2 > LOCAL_BUFFER_SIZE) {
-        advances = (CGSize *)calloc(length*2, sizeof(CGSize));
-        widthBuffer = (float *)calloc(length*2, sizeof(float));
-        glyphBuffer = (CGGlyph *)calloc(length*2, sizeof(ATSGlyphRef));
-        fontBuffer = (NSFont **)calloc(length*2, sizeof(NSFont *));
+    if (length*MAX_GLYPH_EXPANSION > LOCAL_BUFFER_SIZE) {
+        advances = (CGSize *)calloc(length*MAX_GLYPH_EXPANSION, sizeof(CGSize));
+        widthBuffer = (float *)calloc(length*MAX_GLYPH_EXPANSION, sizeof(float));
+        glyphBuffer = (CGGlyph *)calloc(length*MAX_GLYPH_EXPANSION, sizeof(ATSGlyphRef));
+        fontBuffer = (NSFont **)calloc(length*MAX_GLYPH_EXPANSION, sizeof(NSFont *));
     } else {
         advances = localAdvanceBuffer;
         widthBuffer = localWidthBuffer;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list