[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:34:34 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit fb9df4c84b8401c99db9090828fa962c79128e3a
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Aug 26 20:35:59 2002 +0000
- Patch drawText to understand right-aligned drawing.
- Fixed <ul> bullets so that they position properly.
- Fixed bugs with horizontal and vertical positioning of
<ol> bullets.
* khtml/rendering/render_list.cpp:
(RenderListMarker::printObject):
* kwq/KWQPainter.mm:
(QPainter::drawText):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 892c7ff..9b1288d 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,15 @@
+2002-08-26 David Hyatt <hyatt at apple.com>
+
+ - Patch drawText to understand right-aligned drawing.
+ - Fixed <ul> bullets so that they position properly.
+ - Fixed bugs with horizontal and vertical positioning of
+ <ol> bullets.
+
+ * khtml/rendering/render_list.cpp:
+ (RenderListMarker::printObject):
+ * kwq/KWQPainter.mm:
+ (QPainter::drawText):
+
2002-08-24 Darin Adler <darin at apple.com>
- fixed 3032072 -- Crash on reload in DOM::DocumentImpl::~DocumentImpl [unified]()
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 892c7ff..9b1288d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2002-08-26 David Hyatt <hyatt at apple.com>
+
+ - Patch drawText to understand right-aligned drawing.
+ - Fixed <ul> bullets so that they position properly.
+ - Fixed bugs with horizontal and vertical positioning of
+ <ol> bullets.
+
+ * khtml/rendering/render_list.cpp:
+ (RenderListMarker::printObject):
+ * kwq/KWQPainter.mm:
+ (QPainter::drawText):
+
2002-08-24 Darin Adler <darin at apple.com>
- fixed 3032072 -- Crash on reload in DOM::DocumentImpl::~DocumentImpl [unified]()
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 892c7ff..9b1288d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2002-08-26 David Hyatt <hyatt at apple.com>
+
+ - Patch drawText to understand right-aligned drawing.
+ - Fixed <ul> bullets so that they position properly.
+ - Fixed bugs with horizontal and vertical positioning of
+ <ol> bullets.
+
+ * khtml/rendering/render_list.cpp:
+ (RenderListMarker::printObject):
+ * kwq/KWQPainter.mm:
+ (QPainter::drawText):
+
2002-08-24 Darin Adler <darin at apple.com>
- fixed 3032072 -- Crash on reload in DOM::DocumentImpl::~DocumentImpl [unified]()
diff --git a/WebCore/khtml/rendering/render_list.cpp b/WebCore/khtml/rendering/render_list.cpp
index c5272bb..8f3e20b 100644
--- a/WebCore/khtml/rendering/render_list.cpp
+++ b/WebCore/khtml/rendering/render_list.cpp
@@ -305,15 +305,8 @@ void RenderListMarker::printObject(QPainter *p, int, int _y,
#endif
p->setFont(style()->font());
const QFontMetrics fm = p->fontMetrics();
-#ifdef APPLE_CHANGES
- // Why does khtml draw such large dots, squares, circle, etc for list items?
- // These seem much bigger than competing browsers. This change reduces the size.
- // FIXME: Does this change cause positioning problems?
- int offset = fm.ascent()/3;
-#else
int offset = fm.ascent()*2/3;
-#endif
-
+
bool isPrinting = (p->device()->devType() == QInternal::Printer);
if (isPrinting)
{
@@ -372,7 +365,12 @@ void RenderListMarker::printObject(QPainter *p, int, int _y,
return;
default:
if (m_item != QString::null) {
- //_ty += fm.ascent() - fm.height()/2 + 1;
+#ifdef APPLE_CHANGES
+ // Text should be drawn on the baseline, so we add in the ascent of the font.
+ // For some inexplicable reason, this works in Konqueror. I'm not sure why.
+ // - dwh
+ _ty += fm.ascent();
+#endif
if(style()->listStylePosition() == INSIDE) {
if(style()->direction() == LTR)
p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, m_item);
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index 6ba8eb3..ba95bd2 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -352,9 +352,15 @@ void QPainter::drawText(int x, int y, int, int, int alignmentFlags, const QStrin
if (data->state.paintingDisabled)
return;
- [[[WebCoreTextRendererFactory sharedFactory]
- rendererWithFamily:data->state.font.getNSFamily() traits:data->state.font.getNSTraits() size:data->state.font.getNSSize()]
- drawCharacters:(const UniChar *)qstring.unicode() stringLength:qstring.length()
+ id<WebCoreTextRenderer> renderer =
+ [[WebCoreTextRendererFactory sharedFactory]
+ rendererWithFamily:data->state.font.getNSFamily() traits:data->state.font.getNSTraits() size:data->state.font.getNSSize()];
+
+ const UniChar* str = (const UniChar*)qstring.unicode();
+ if (alignmentFlags & Qt::AlignRight)
+ x -= [renderer widthForCharacters: str length: qstring.length()];
+
+ [renderer drawCharacters:str stringLength:qstring.length()
fromCharacterPosition:0 toCharacterPosition:qstring.length() atPoint:NSMakePoint(x, y)
withTextColor:data->state.pen.color().getNSColor() backgroundColor:nil];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list