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

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:51:10 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit b075bdb850cf2440e2d835c0d928b9dd965fe35f
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 26 21:23:35 2001 +0000

    More improvements to rendering. The major addition is that links draw
    correctly now.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@389 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/khtml/rendering/render_style.h b/WebCore/khtml/rendering/render_style.h
index 9a790c7..40e352d 100644
--- a/WebCore/khtml/rendering/render_style.h
+++ b/WebCore/khtml/rendering/render_style.h
@@ -190,6 +190,7 @@ public:
     {
 	width = 3; // medium is default value
 	style = BNONE;
+	color = Qt::black;
     }
     QColor color;
     unsigned short width : 12;
diff --git a/WebCore/kwq/KWQColor.mm b/WebCore/kwq/KWQColor.mm
index ca550ef..13c2b00 100644
--- a/WebCore/kwq/KWQColor.mm
+++ b/WebCore/kwq/KWQColor.mm
@@ -121,17 +121,25 @@ static int hex2int( QChar hexchar )
 
 void QColor::setNamedColor(const QString&name)
 {
-
+    // FIXME: The combination of this code with the code that
+    // is in khtml/misc/helper.cpp makes setting colors by
+    // name a real crock. We need to look at the process
+    // of mapping names to colors and figure out something
+    // better.
     if ( name.isEmpty() ) {
 	setRgb( 0 );
     } 
-    else if ( name[0] == '#' || name.length() == 6) {
+    else if ((name.length() == 7 && name[0] == '#') || name.length() == 6) {
         int offset = 0;
+        int len;
         if (name[0] == '#') {
             offset = 1;
+            len = name.length() - 1;
+        }
+        else {
+            len = name.length();
         }
         const QChar *p = name.unicode() + offset;
-        int len = name.length();
         int r, g, b;
         if ( len == 12 ) {
             r = (hex2int(p[0]) << 4) + hex2int(p[1]);
diff --git a/WebCore/kwq/KWQKHistoryProvider.mm b/WebCore/kwq/KWQKHistoryProvider.mm
index 76c6f68..e2d05dc 100644
--- a/WebCore/kwq/KWQKHistoryProvider.mm
+++ b/WebCore/kwq/KWQKHistoryProvider.mm
@@ -23,27 +23,40 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include <kwqdebug.h>
+
 #include <historyprovider.h>
 
 namespace KParts {
 
+static HistoryProvider *instance = 0;
+
 HistoryProvider *HistoryProvider::self()
 {
+    _logNotYetImplemented();
+    if (instance == 0) {
+        instance = new HistoryProvider();
+    }
+    return instance;
 }
 
 
 HistoryProvider::HistoryProvider()
 {
+    _logNotYetImplemented();
 }
 
 
 HistoryProvider::~HistoryProvider()
 {
+    _logNotYetImplemented();
 }
 
 
 bool HistoryProvider::contains(const QString &) const
 {
+    _logNotYetImplemented();
+    return FALSE;
 }
 
 
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index ee78790..7761de9 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -439,7 +439,6 @@ void QPainter::drawText(int x, int y, const QString &qstring, int len)
     // This will draw the text from the top of the bounding box down.
     // Qt expects to draw from the baseline.
     y = y - (int)([font defaultLineHeightForFont] + [font descender]);
-    
     [string drawAtPoint:NSMakePoint(x, y) withAttributes:[NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, data->qpen.color().color, NSForegroundColorAttributeName, nil]];
 
     _unlockFocus();
diff --git a/WebCore/src/kdelibs/khtml/rendering/render_style.h b/WebCore/src/kdelibs/khtml/rendering/render_style.h
index 9a790c7..40e352d 100644
--- a/WebCore/src/kdelibs/khtml/rendering/render_style.h
+++ b/WebCore/src/kdelibs/khtml/rendering/render_style.h
@@ -190,6 +190,7 @@ public:
     {
 	width = 3; // medium is default value
 	style = BNONE;
+	color = Qt::black;
     }
     QColor color;
     unsigned short width : 12;
diff --git a/WebCore/src/kwq/KWQColor.mm b/WebCore/src/kwq/KWQColor.mm
index ca550ef..13c2b00 100644
--- a/WebCore/src/kwq/KWQColor.mm
+++ b/WebCore/src/kwq/KWQColor.mm
@@ -121,17 +121,25 @@ static int hex2int( QChar hexchar )
 
 void QColor::setNamedColor(const QString&name)
 {
-
+    // FIXME: The combination of this code with the code that
+    // is in khtml/misc/helper.cpp makes setting colors by
+    // name a real crock. We need to look at the process
+    // of mapping names to colors and figure out something
+    // better.
     if ( name.isEmpty() ) {
 	setRgb( 0 );
     } 
-    else if ( name[0] == '#' || name.length() == 6) {
+    else if ((name.length() == 7 && name[0] == '#') || name.length() == 6) {
         int offset = 0;
+        int len;
         if (name[0] == '#') {
             offset = 1;
+            len = name.length() - 1;
+        }
+        else {
+            len = name.length();
         }
         const QChar *p = name.unicode() + offset;
-        int len = name.length();
         int r, g, b;
         if ( len == 12 ) {
             r = (hex2int(p[0]) << 4) + hex2int(p[1]);
diff --git a/WebCore/src/kwq/KWQKHistoryProvider.mm b/WebCore/src/kwq/KWQKHistoryProvider.mm
index 76c6f68..e2d05dc 100644
--- a/WebCore/src/kwq/KWQKHistoryProvider.mm
+++ b/WebCore/src/kwq/KWQKHistoryProvider.mm
@@ -23,27 +23,40 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include <kwqdebug.h>
+
 #include <historyprovider.h>
 
 namespace KParts {
 
+static HistoryProvider *instance = 0;
+
 HistoryProvider *HistoryProvider::self()
 {
+    _logNotYetImplemented();
+    if (instance == 0) {
+        instance = new HistoryProvider();
+    }
+    return instance;
 }
 
 
 HistoryProvider::HistoryProvider()
 {
+    _logNotYetImplemented();
 }
 
 
 HistoryProvider::~HistoryProvider()
 {
+    _logNotYetImplemented();
 }
 
 
 bool HistoryProvider::contains(const QString &) const
 {
+    _logNotYetImplemented();
+    return FALSE;
 }
 
 
diff --git a/WebCore/src/kwq/KWQPainter.mm b/WebCore/src/kwq/KWQPainter.mm
index ee78790..7761de9 100644
--- a/WebCore/src/kwq/KWQPainter.mm
+++ b/WebCore/src/kwq/KWQPainter.mm
@@ -439,7 +439,6 @@ void QPainter::drawText(int x, int y, const QString &qstring, int len)
     // This will draw the text from the top of the bounding box down.
     // Qt expects to draw from the baseline.
     y = y - (int)([font defaultLineHeightForFont] + [font descender]);
-    
     [string drawAtPoint:NSMakePoint(x, y) withAttributes:[NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, data->qpen.color().color, NSForegroundColorAttributeName, nil]];
 
     _unlockFocus();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list