[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 08:04:18 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 9b3532d3153b67a8f4b403d8691d4de9357ce564
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 23 00:10:53 2003 +0000
WebKit:
Match WebCore's notion of distributing linegap between top and bottom of
line. WebKit used to put it all at the bottom of the line.
Reviewed by Hyatt.
* WebCoreSupport.subproj/WebTextRenderer.h:
* WebCoreSupport.subproj/WebTextRenderer.m:
(-[WebTextRenderer initWithFont:usingPrinterFont:]):
(-[WebTextRenderer _CG_drawHighlightForRun:style:atPoint:]):
WebCore:
Fixed 3454067. RenderText's repaint wasn't called because of recent changes to de-virtualize repaint. Modified getAbsoluteRepaintRect() to return containing block's getAbsoluteRepaintRect().
Also removed the long standing +1 from QFontMetrics::height().
Reviewed by Hyatt.
* khtml/rendering/render_text.cpp:
(RenderText::getAbsoluteRepaintRect):
* khtml/rendering/render_text.h:
* kwq/KWQFontMetrics.mm:
(QFontMetrics::height):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 881c0af..c20146d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,17 @@
+2003-10-22 Richard Williamson <rjw at apple.com>
+
+ Fixed 3454067. RenderText's repaint wasn't called because of recent changes to de-virtualize repaint. Modified getAbsoluteRepaintRect() to return containing block's getAbsoluteRepaintRect().
+
+ Also removed the long standing +1 from QFontMetrics::height().
+
+ Reviewed by Hyatt.
+
+ * khtml/rendering/render_text.cpp:
+ (RenderText::getAbsoluteRepaintRect):
+ * khtml/rendering/render_text.h:
+ * kwq/KWQFontMetrics.mm:
+ (QFontMetrics::height):
+
2003-10-22 David Hyatt <hyatt at apple.com>
Fix visibility to be done when widgets are added or when styles are set rather than at paint time. Fixes
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 881c0af..c20146d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2003-10-22 Richard Williamson <rjw at apple.com>
+
+ Fixed 3454067. RenderText's repaint wasn't called because of recent changes to de-virtualize repaint. Modified getAbsoluteRepaintRect() to return containing block's getAbsoluteRepaintRect().
+
+ Also removed the long standing +1 from QFontMetrics::height().
+
+ Reviewed by Hyatt.
+
+ * khtml/rendering/render_text.cpp:
+ (RenderText::getAbsoluteRepaintRect):
+ * khtml/rendering/render_text.h:
+ * kwq/KWQFontMetrics.mm:
+ (QFontMetrics::height):
+
2003-10-22 David Hyatt <hyatt at apple.com>
Fix visibility to be done when widgets are added or when styles are set rather than at paint time. Fixes
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 0da5ee0..2f36bb1 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -1312,11 +1312,10 @@ short RenderText::width() const
return w;
}
-void RenderText::repaint(bool immediate)
+QRect RenderText::getAbsoluteRepaintRect()
{
RenderObject *cb = containingBlock();
- if(cb != this)
- cb->repaint(immediate);
+ return cb->getAbsoluteRepaintRect();
}
bool RenderText::isFixedWidthFont() const
diff --git a/WebCore/khtml/rendering/render_text.h b/WebCore/khtml/rendering/render_text.h
index 455e1c2..839da0e 100644
--- a/WebCore/khtml/rendering/render_text.h
+++ b/WebCore/khtml/rendering/render_text.h
@@ -202,7 +202,7 @@ public:
virtual int rightmostPosition() const;
- virtual void repaint(bool immediate=false);
+ virtual QRect getAbsoluteRepaintRect();
const QFontMetrics &metrics(bool firstLine) const;
const Font *htmlFont(bool firstLine) const;
diff --git a/WebCore/kwq/KWQFontMetrics.mm b/WebCore/kwq/KWQFontMetrics.mm
index 530b968..5030a47 100644
--- a/WebCore/kwq/KWQFontMetrics.mm
+++ b/WebCore/kwq/KWQFontMetrics.mm
@@ -135,7 +135,8 @@ int QFontMetrics::height() const
{
// According to Qt documentation:
// "This is always equal to ascent()+descent()+1 (the 1 is for the base line)."
- return ascent() + descent() + 1;
+ // We DO NOT match the Qt behavior here. This is intentional.
+ return ascent() + descent();
}
int QFontMetrics::lineSpacing() const
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 7085e8d..b97b701 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2003-10-22 Richard Williamson <rjw at apple.com>
+
+ Match WebCore's notion of distributing linegap between top and bottom of
+ line. WebKit used to put it all at the bottom of the line.
+
+ Reviewed by Hyatt.
+
+ * WebCoreSupport.subproj/WebTextRenderer.h:
+ * WebCoreSupport.subproj/WebTextRenderer.m:
+ (-[WebTextRenderer initWithFont:usingPrinterFont:]):
+ (-[WebTextRenderer _CG_drawHighlightForRun:style:atPoint:]):
+
2003-10-21 Maciej Stachowiak <mjs at apple.com>
Reviewed by Dave.
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.h b/WebKit/WebCoreSupport.subproj/WebTextRenderer.h
index 2cdc60a..fc0d348 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.h
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.h
@@ -21,6 +21,7 @@ typedef struct CharacterWidthIterator CharacterWidthIterator;
int ascent;
int descent;
int lineSpacing;
+ int lineGap;
ATSStyleGroupPtr styleGroup;
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index fb94cd3..f7c6b0e 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -361,7 +361,7 @@ static BOOL alwaysUseATSU = NO;
float pointSize = [font pointSize];
float asc = (ScaleEmToUnits(metrics->ascent, unitsPerEm)*pointSize);
float dsc = (-ScaleEmToUnits(metrics->descent, unitsPerEm)*pointSize);
- float lineGap = ScaleEmToUnits(metrics->lineGap, unitsPerEm)*pointSize;
+ float _lineGap = ScaleEmToUnits(metrics->lineGap, unitsPerEm)*pointSize;
float adjustment;
// We need to adjust Times, Helvetica, and Courier to closely match the
@@ -380,7 +380,9 @@ static BOOL alwaysUseATSU = NO;
ascent = ROUND_TO_INT(asc + adjustment);
descent = ROUND_TO_INT(dsc);
- lineSpacing = ascent + descent + (int)(lineGap > 0.0 ? floor(lineGap + 0.5) : 0.0);
+ _lineGap = (_lineGap > 0.0 ? floor(_lineGap + 0.5) : 0.0);
+ lineGap = (int)_lineGap;
+ lineSpacing = ascent + descent + lineGap;
#ifdef COMPARE_APPKIT_CG_METRICS
printf ("\nCG/Appkit metrics for font %s, %f, lineGap %f, adjustment %f, _canDrawOutsideLineHeight %d, _isSystemFont %d\n", [[font displayName] cString], [font pointSize], lineGap, adjustment, (int)[font _canDrawOutsideLineHeight], (int)[font _isSystemFont]);
@@ -926,7 +928,8 @@ static void _drawGlyphs(NSFont *font, NSColor *color, CGGlyph *glyphs, CGSize *a
backgroundWidth += advances[i].width;
[style->backgroundColor set];
-
+
+ float yPos = point.y - [self ascent] - (lineGap/2);
if (style->rtl){
WebCoreTextRun completeRun = *run;
completeRun.from = 0;
@@ -939,10 +942,10 @@ static void _drawGlyphs(NSFont *font, NSColor *color, CGGlyph *glyphs, CGSize *a
startPosition:nil
numGlyphs: &numGlyphs];
- [NSBezierPath fillRect:NSMakeRect(point.x + completeRunWidth - startPosition - backgroundWidth, point.y - [self ascent], backgroundWidth, [self lineSpacing])];
+ [NSBezierPath fillRect:NSMakeRect(point.x + completeRunWidth - startPosition - backgroundWidth, yPos, backgroundWidth, [self lineSpacing])];
}
else
- [NSBezierPath fillRect:NSMakeRect(startX, point.y - [self ascent], backgroundWidth, [self lineSpacing])];
+ [NSBezierPath fillRect:NSMakeRect(startX, yPos, backgroundWidth, [self lineSpacing])];
}
if (advances != localAdvanceBuffer) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list