Fix to make selection more like NSTextView. All gap painting is now done by WebCore...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2004 20:11:51 +0000 (20:11 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2004 20:11:51 +0000 (20:11 +0000)
needs to try to fill gaps around text.

        Reviewed by kocienda

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer _CG_drawHighlightForRun:style:geometry:]):
        (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7765 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebCoreSupport.subproj/WebTextRenderer.m

index 3fa0c1943aab2a2916f31565d71d2cd423a1285c..f67ccd7858d70ba810a89e77a821fd9031757633 100644 (file)
@@ -1,3 +1,14 @@
+2004-10-05  David Hyatt  <hyatt@apple.com>
+
+       Fix to make selection more like NSTextView.  All gap painting is now done by WebCore, so WebKit no longer
+       needs to try to fill gaps around text.
+       
+        Reviewed by kocienda
+
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer _CG_drawHighlightForRun:style:geometry:]):
+        (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]):
+
 2004-10-05  Darin Adler  <darin@apple.com>
 
         Reviewed by John.
index 49f1e55058d8d581d428d4da822ec0632a08e759..2ae682bfe4c2f08f2b4028c20b6ffcb0e8f68fdf 100644 (file)
@@ -936,13 +936,6 @@ static void _drawGlyphs(NSFont *font, NSColor *color, CGGlyph *glyphs, CGSize *a
         else {
             [NSBezierPath fillRect:NSMakeRect(startX, yPos, backgroundWidth, height)];
         }
-
-        // Draw the extra rectangles on either side of the selection to mimic Cocoa behavior.
-        if (geometry->selectionMinX != geometry->point.x) {
-            [NSBezierPath fillRect:NSMakeRect(geometry->selectionMinX, yPos, geometry->point.x - geometry->selectionMinX, height)];
-        }
-        if (geometry->selectionMaxX != geometry->point.x)
-            [NSBezierPath fillRect:NSMakeRect(startX + backgroundWidth, yPos, geometry->selectionMaxX - (startX + backgroundWidth), height)];
     }
 }
 
@@ -1545,13 +1538,6 @@ static WebCoreTextRun reverseCharactersInRun(const WebCoreTextRun *run)
         [NSBezierPath fillRect:NSMakeRect(selectedLeftX, yPos, backgroundWidth, height)];
     }
 
-    // Draw the extra rectangles on either side of the selection to mimic Cocoa behavior.
-    if (geometry->selectionMinX != geometry->point.x) {
-        [NSBezierPath fillRect:NSMakeRect(geometry->selectionMinX, yPos, geometry->point.x - geometry->selectionMinX, height)];
-    }
-    if (geometry->selectionMaxX != geometry->point.x)
-        [NSBezierPath fillRect:NSMakeRect(selectedLeftX + backgroundWidth, yPos, geometry->selectionMaxX - (selectedLeftX + backgroundWidth), height)];
-
     ATSUDisposeTextLayout (layout); // Ignore the error.  Nothing we can do anyway.
 
     if (style->visuallyOrdered)