[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:26 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit ccc61ae9d8287a17d4d5cf50f973d952d1eaab8f
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 2 23:14:45 2001 +0000

    Fixed some geometry issues with drawing the web page view, and removed
    some of the ugly, hard-coded hacks that helped us to get this far.
    I also removed the unneeded double-buffering from the view drawing.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@404 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index 41c20b2..754863f 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -71,7 +71,6 @@ public:
     {
         underMouse = 0;
         reset();
-        tp=0;
         paintBuffer=0;
         formCompletions=0;
         prevScrollbarVisible = true;
@@ -79,7 +78,6 @@ public:
     ~KHTMLViewPrivate()
     {
         delete formCompletions;
-        delete tp; tp = 0;
         delete paintBuffer; paintBuffer =0;
         if (underMouse)
 	    underMouse->deref();
@@ -110,7 +108,6 @@ public:
 	isDoubleClick = false;
     }
 
-    QPainter *tp;
     QPixmap  *paintBuffer;
     NodeImpl *underMouse;
 
@@ -226,8 +223,6 @@ void KHTMLView::init()
 
     if(!d->paintBuffer) d->paintBuffer = new QPixmap(PAINT_BUFFER_HEIGHT, PAINT_BUFFER_HEIGHT);
     
-    if(!d->tp) d->tp = new QPainter();
-
     setFocusPolicy(QWidget::StrongFocus);
     viewport()->setFocusPolicy( QWidget::WheelFocus );
     viewport()->setFocusProxy(this);
@@ -309,10 +304,6 @@ static void printRenderTree(RenderObject *node, int level)
 
 void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
 {
-    // FIXME: make the height work correctly with the scroll view
-    eh = 780;
-
-
     if(!m_part->xmlDocImpl()) {
         p->fillRect(ex, ey, ew, eh, palette().normal().brush(QColorGroup::Base));
         return;
@@ -321,16 +312,11 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
     //kdDebug( 6000 ) << "drawContents x=" << ex << ",y=" << ey << ",w=" << ew << ",h=" << eh << endl;
 
     if ( d->paintBuffer->width() < visibleWidth() )
-        // FIXME: make the height work correctly with the scroll view
-        //d->paintBuffer->resize(visibleWidth(),PAINT_BUFFER_HEIGHT);
-        d->paintBuffer->resize(visibleWidth(),780);
+        d->paintBuffer->resize(visibleWidth(),PAINT_BUFFER_HEIGHT);
 
     int py=0;
     while (py < eh) {
         int ph = eh-py < PAINT_BUFFER_HEIGHT ? eh-py : PAINT_BUFFER_HEIGHT;
-        d->tp->begin(d->paintBuffer);
-        d->tp->translate(-ex, -ey-py);
-        d->tp->fillRect(ex, ey+py, ew, ph, palette().normal().brush(QColorGroup::Base));
         
         // FIXME!
         RenderObject *ro;
@@ -343,21 +329,16 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
 #ifdef RENDER_TREE_DEBUG
                 printRenderTree (ro, 0);
 #endif
-                ro->print(d->tp, ex, ey+py, ew, ph, 0, 0);
+                ro->print(p, ex, ey+py, ew, ph, 0, 0);
             }
         }
 #ifdef BOX_DEBUG
 	if (m_part->xmlDocImpl()->focusNode())
 	{
-	    d->tp->setBrush(Qt::NoBrush);
-	    d->tp->drawRect(m_part->xmlDocImpl()->focusNode()->getRect());
+	    p->setBrush(Qt::NoBrush);
+	    p->drawRect(m_part->xmlDocImpl()->focusNode()->getRect());
 	}
 #endif
-        d->tp->end();
-
-        // FIXME: make the height work correctly with the scroll view
-        //p->drawPixmap(ex, ey+py, *d->paintBuffer, 0, 0, ew, ph);
-        p->drawPixmap(ex, ey+py, *d->paintBuffer, ex, ey+py, ew, ph);
         py += PAINT_BUFFER_HEIGHT;
     }
 
diff --git a/WebCore/kwq/KWQView.mm b/WebCore/kwq/KWQView.mm
index afb4ebd..758685a 100644
--- a/WebCore/kwq/KWQView.mm
+++ b/WebCore/kwq/KWQView.mm
@@ -86,7 +86,7 @@
 {
     [super initWithFrame: r];
     widget = w;
-    isFlipped = NO;
+    isFlipped = YES;
 }
 
 
diff --git a/WebCore/src/kdelibs/khtml/khtmlview.cpp b/WebCore/src/kdelibs/khtml/khtmlview.cpp
index 41c20b2..754863f 100644
--- a/WebCore/src/kdelibs/khtml/khtmlview.cpp
+++ b/WebCore/src/kdelibs/khtml/khtmlview.cpp
@@ -71,7 +71,6 @@ public:
     {
         underMouse = 0;
         reset();
-        tp=0;
         paintBuffer=0;
         formCompletions=0;
         prevScrollbarVisible = true;
@@ -79,7 +78,6 @@ public:
     ~KHTMLViewPrivate()
     {
         delete formCompletions;
-        delete tp; tp = 0;
         delete paintBuffer; paintBuffer =0;
         if (underMouse)
 	    underMouse->deref();
@@ -110,7 +108,6 @@ public:
 	isDoubleClick = false;
     }
 
-    QPainter *tp;
     QPixmap  *paintBuffer;
     NodeImpl *underMouse;
 
@@ -226,8 +223,6 @@ void KHTMLView::init()
 
     if(!d->paintBuffer) d->paintBuffer = new QPixmap(PAINT_BUFFER_HEIGHT, PAINT_BUFFER_HEIGHT);
     
-    if(!d->tp) d->tp = new QPainter();
-
     setFocusPolicy(QWidget::StrongFocus);
     viewport()->setFocusPolicy( QWidget::WheelFocus );
     viewport()->setFocusProxy(this);
@@ -309,10 +304,6 @@ static void printRenderTree(RenderObject *node, int level)
 
 void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
 {
-    // FIXME: make the height work correctly with the scroll view
-    eh = 780;
-
-
     if(!m_part->xmlDocImpl()) {
         p->fillRect(ex, ey, ew, eh, palette().normal().brush(QColorGroup::Base));
         return;
@@ -321,16 +312,11 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
     //kdDebug( 6000 ) << "drawContents x=" << ex << ",y=" << ey << ",w=" << ew << ",h=" << eh << endl;
 
     if ( d->paintBuffer->width() < visibleWidth() )
-        // FIXME: make the height work correctly with the scroll view
-        //d->paintBuffer->resize(visibleWidth(),PAINT_BUFFER_HEIGHT);
-        d->paintBuffer->resize(visibleWidth(),780);
+        d->paintBuffer->resize(visibleWidth(),PAINT_BUFFER_HEIGHT);
 
     int py=0;
     while (py < eh) {
         int ph = eh-py < PAINT_BUFFER_HEIGHT ? eh-py : PAINT_BUFFER_HEIGHT;
-        d->tp->begin(d->paintBuffer);
-        d->tp->translate(-ex, -ey-py);
-        d->tp->fillRect(ex, ey+py, ew, ph, palette().normal().brush(QColorGroup::Base));
         
         // FIXME!
         RenderObject *ro;
@@ -343,21 +329,16 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
 #ifdef RENDER_TREE_DEBUG
                 printRenderTree (ro, 0);
 #endif
-                ro->print(d->tp, ex, ey+py, ew, ph, 0, 0);
+                ro->print(p, ex, ey+py, ew, ph, 0, 0);
             }
         }
 #ifdef BOX_DEBUG
 	if (m_part->xmlDocImpl()->focusNode())
 	{
-	    d->tp->setBrush(Qt::NoBrush);
-	    d->tp->drawRect(m_part->xmlDocImpl()->focusNode()->getRect());
+	    p->setBrush(Qt::NoBrush);
+	    p->drawRect(m_part->xmlDocImpl()->focusNode()->getRect());
 	}
 #endif
-        d->tp->end();
-
-        // FIXME: make the height work correctly with the scroll view
-        //p->drawPixmap(ex, ey+py, *d->paintBuffer, 0, 0, ew, ph);
-        p->drawPixmap(ex, ey+py, *d->paintBuffer, ex, ey+py, ew, ph);
         py += PAINT_BUFFER_HEIGHT;
     }
 
diff --git a/WebCore/src/kwq/KWQView.mm b/WebCore/src/kwq/KWQView.mm
index afb4ebd..758685a 100644
--- a/WebCore/src/kwq/KWQView.mm
+++ b/WebCore/src/kwq/KWQView.mm
@@ -86,7 +86,7 @@
 {
     [super initWithFrame: r];
     widget = w;
-    isFlipped = NO;
+    isFlipped = YES;
 }
 
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list