[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 05:53:41 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit adc7e17f9da73a89b08e352be6d8d40323c9f9ad
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 19 03:54:42 2001 +0000
Finally fixed underlining.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index ca51c72..ea5d869 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,20 +1,15 @@
2001-12-18 Richard Williamson <rjw at apple.com>
- * ChangeLog:
- * src/kdelibs/khtml/dom/html_element.cpp:
-
-<<<<<<< ChangeLog
-2001-12-18 Richard Williamson <rjw at apple.com>
-
- * src/kdelibs/khtml/dom/html_element.cpp:
+ Finally fixed underlining.
+
+ * src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration):
+ * src/kwq/KWQFontMetrics.mm:
-=======
2001-12-18 Maciej Stachowiak <mjs at apple.com>
* src/kwq/Makefile.in: Re-apply my changes, which accidentally got
clobbered.
->>>>>>> 1.7
2001-12-13 Maciej Stachowiak <mjs at apple.com>
Changes for international character set support. Still needs work,
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index ca51c72..ea5d869 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,20 +1,15 @@
2001-12-18 Richard Williamson <rjw at apple.com>
- * ChangeLog:
- * src/kdelibs/khtml/dom/html_element.cpp:
-
-<<<<<<< ChangeLog
-2001-12-18 Richard Williamson <rjw at apple.com>
-
- * src/kdelibs/khtml/dom/html_element.cpp:
+ Finally fixed underlining.
+
+ * src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration):
+ * src/kwq/KWQFontMetrics.mm:
-=======
2001-12-18 Maciej Stachowiak <mjs at apple.com>
* src/kwq/Makefile.in: Re-apply my changes, which accidentally got
clobbered.
->>>>>>> 1.7
2001-12-13 Maciej Stachowiak <mjs at apple.com>
Changes for international character set support. Still needs work,
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ca51c72..ea5d869 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,20 +1,15 @@
2001-12-18 Richard Williamson <rjw at apple.com>
- * ChangeLog:
- * src/kdelibs/khtml/dom/html_element.cpp:
-
-<<<<<<< ChangeLog
-2001-12-18 Richard Williamson <rjw at apple.com>
-
- * src/kdelibs/khtml/dom/html_element.cpp:
+ Finally fixed underlining.
+
+ * src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration):
+ * src/kwq/KWQFontMetrics.mm:
-=======
2001-12-18 Maciej Stachowiak <mjs at apple.com>
* src/kwq/Makefile.in: Re-apply my changes, which accidentally got
clobbered.
->>>>>>> 1.7
2001-12-13 Maciej Stachowiak <mjs at apple.com>
Changes for international character set support. Still needs work,
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 4385241..dc090b1 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -112,18 +112,16 @@ void TextSlave::printDecoration( QPainter *pt, RenderText* p, int _tx, int _ty,
if ( end )
width -= p->paddingRight() + p->borderRight();
+
+#ifdef _KWQ_
+ int underlineOffset = pt->fontMetrics().height();
+ int descent = pt->fontMetrics().descent();
+ if (descent >= 3)
+ underlineOffset -= (descent - 2);
+#else
int underlineOffset = ( pt->fontMetrics().height() + m_baseline ) / 2;
if(underlineOffset <= m_baseline) underlineOffset = m_baseline+1;
-
- // FIXME: [kocienda]
- // This hack gets the underline in a better place but we should be
- // doing something better.
- // FIXED: [rjw] Don't need this.
- if (pt->fontMetrics().descent() > 2)
- underlineOffset = underlineOffset - pt->fontMetrics().descent() + 4;
- else if (pt->fontMetrics().descent() == 2)
- underlineOffset += 2;
-
+#endif
if(deco & UNDERLINE){
//fprintf (stderr, "UNDERLINE (%d, %d) to (%d, %d)\n", _tx, _ty + underlineOffset, _tx + width, _ty + underlineOffset );
diff --git a/WebCore/kwq/KWQFontMetrics.mm b/WebCore/kwq/KWQFontMetrics.mm
index 32343b4..fb0d8ac 100644
--- a/WebCore/kwq/KWQFontMetrics.mm
+++ b/WebCore/kwq/KWQFontMetrics.mm
@@ -255,7 +255,8 @@ int QFontMetrics::ascent() const
// Qt seems to use [font defaultLineHeightForFont] + [font descender] instead
// of what seems more natural [font ascender].
// Remember that descender is negative.
- return ROUND_TO_INT([data->font defaultLineHeightForFont] + [data->font descender]);
+ //return ROUND_TO_INT([data->font defaultLineHeightForFont] + [data->font descender]);
+ return ROUND_TO_INT([data->font ascender]);
}
@@ -264,7 +265,8 @@ int QFontMetrics::height() const
// According to Qt documentation:
// "This is always equal to ascent()+descent()+1 (the 1 is for the base line)."
// However, the [font defaultLineHeightForFont] seems more appropriate.
- return ROUND_TO_INT([data->font defaultLineHeightForFont]);
+ //return ROUND_TO_INT([data->font defaultLineHeightForFont]);
+ return ROUND_TO_INT([data->font ascender] - [data->font descender] + 1);
}
diff --git a/WebCore/src/kdelibs/khtml/rendering/render_text.cpp b/WebCore/src/kdelibs/khtml/rendering/render_text.cpp
index 4385241..dc090b1 100644
--- a/WebCore/src/kdelibs/khtml/rendering/render_text.cpp
+++ b/WebCore/src/kdelibs/khtml/rendering/render_text.cpp
@@ -112,18 +112,16 @@ void TextSlave::printDecoration( QPainter *pt, RenderText* p, int _tx, int _ty,
if ( end )
width -= p->paddingRight() + p->borderRight();
+
+#ifdef _KWQ_
+ int underlineOffset = pt->fontMetrics().height();
+ int descent = pt->fontMetrics().descent();
+ if (descent >= 3)
+ underlineOffset -= (descent - 2);
+#else
int underlineOffset = ( pt->fontMetrics().height() + m_baseline ) / 2;
if(underlineOffset <= m_baseline) underlineOffset = m_baseline+1;
-
- // FIXME: [kocienda]
- // This hack gets the underline in a better place but we should be
- // doing something better.
- // FIXED: [rjw] Don't need this.
- if (pt->fontMetrics().descent() > 2)
- underlineOffset = underlineOffset - pt->fontMetrics().descent() + 4;
- else if (pt->fontMetrics().descent() == 2)
- underlineOffset += 2;
-
+#endif
if(deco & UNDERLINE){
//fprintf (stderr, "UNDERLINE (%d, %d) to (%d, %d)\n", _tx, _ty + underlineOffset, _tx + width, _ty + underlineOffset );
diff --git a/WebCore/src/kwq/KWQFontMetrics.mm b/WebCore/src/kwq/KWQFontMetrics.mm
index 32343b4..fb0d8ac 100644
--- a/WebCore/src/kwq/KWQFontMetrics.mm
+++ b/WebCore/src/kwq/KWQFontMetrics.mm
@@ -255,7 +255,8 @@ int QFontMetrics::ascent() const
// Qt seems to use [font defaultLineHeightForFont] + [font descender] instead
// of what seems more natural [font ascender].
// Remember that descender is negative.
- return ROUND_TO_INT([data->font defaultLineHeightForFont] + [data->font descender]);
+ //return ROUND_TO_INT([data->font defaultLineHeightForFont] + [data->font descender]);
+ return ROUND_TO_INT([data->font ascender]);
}
@@ -264,7 +265,8 @@ int QFontMetrics::height() const
// According to Qt documentation:
// "This is always equal to ascent()+descent()+1 (the 1 is for the base line)."
// However, the [font defaultLineHeightForFont] seems more appropriate.
- return ROUND_TO_INT([data->font defaultLineHeightForFont]);
+ //return ROUND_TO_INT([data->font defaultLineHeightForFont]);
+ return ROUND_TO_INT([data->font ascender] - [data->font descender] + 1);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list