[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.4/kdelibs/khtml
From:       Germain Garand <germain () ebooksfrance ! org>
Date:       2010-02-20 1:18:10
Message-ID: 1266628690.612508.9925.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1093042 by ggarand:

automatically merged revision 1089662:
fix access keys being displayed only for the visible part of the page,
fix scrolling while access keys are displayed producing artifacts

BUG: 219306

 M  +18 -6     khtmlview.cpp  


--- branches/KDE/4.4/kdelibs/khtml/khtmlview.cpp #1093041:1093042
@@ -335,7 +335,13 @@
                         \
view->horizontalScrollBar()->maximum()-view->horizontalScrollBar()->value() : \
view->horizontalScrollBar()->value();  contentsY = \
view->verticalScrollBar()->value();  }
-
+    void scrollAccessKeys(int dx, int dy)
+    {
+        QList<QLabel*> wl = qFindChildren<QLabel*>(view->widget(), \
"KHTMLAccessKey"); +        foreach(QLabel* w, wl) {
+            w->move( w->pos() + QPoint(dx, dy) );
+        }
+    }
     void scrollExternalWidgets(int dx, int dy)
     {
         if (visibleWidgets.isEmpty())
@@ -2668,8 +2674,9 @@
             }
             if( !accesskey.isNull()) {
 	        QRect rec=en->getRect();
-	        QLabel *lab=new QLabel(accesskey,viewport());
+	        QLabel *lab=new QLabel(accesskey,widget());
 	        lab->setAttribute(Qt::WA_DeleteOnClose);
+	        lab->setObjectName("KHTMLAccessKey");
 	        connect( origview, SIGNAL(hideAccessKeys()), lab, SLOT(close()) );
 	        connect( this, SIGNAL(repaintAccessKeys()), lab, SLOT(repaint()));
 	        lab->setPalette(QToolTip::palette());
@@ -2712,10 +2719,10 @@
 
 void KHTMLView::accessKeysTimeout()
 {
-d->accessKeysActivated=false;
-d->accessKeysPreActivate = false;
-m_part->setStatusBarText(QString(), KHTMLPart::BarOverrideText);
-emit hideAccessKeys();
+    d->accessKeysActivated=false;
+    d->accessKeysPreActivate = false;
+    m_part->setStatusBarText(QString(), KHTMLPart::BarOverrideText);
+    emit hideAccessKeys();
 }
 
 // Handling of the HTML accesskey attribute.
@@ -3996,6 +4003,9 @@
             // we can't avoid a full update
             widget()->update();
         }
+        if (d->accessKeysActivated)
+            d->scrollAccessKeys(dx, dy);
+        
         return;
     }
 
@@ -4010,6 +4020,8 @@
     }
 
     d->scrollExternalWidgets(dx, dy);
+    if (d->accessKeysActivated)
+        d->scrollAccessKeys(dx, dy);
 }
 
 void KHTMLView::setupSmoothScrolling(int dx, int dy)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic