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

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml
From:       Leo Savernik <l.savernik () aon ! at>
Date:       2006-09-07 17:30:34
Message-ID: 1157650234.267181.10319.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 581838 by savernik:

Fix accessibility bug wrt frames scrolling=no by allowing scrolling if content
would be otherwise hidden. The scrollbars still remain hidden. This also
complies with Mozilla.

BUG 91113


 M  +31 -72    khtmlview.cpp  


--- branches/KDE/3.5/kdelibs/khtml/khtmlview.cpp #581837:581838
@@ -1472,13 +1472,9 @@
       switch(_ke->key())
         {
         case Key_Space:
-            if ( d->vmode == QScrollView::AlwaysOff )
-                _ke->accept();
-            else {
-                scrollBy( 0, -clipper()->height() + offs );
-                if(d->scrollSuspended)
-                    d->newScrollTimer(this, 0);
-            }
+            scrollBy( 0, -clipper()->height() + offs );
+            if(d->scrollSuspended)
+                d->newScrollTimer(this, 0);
             break;
 
         case Key_Down:
@@ -1506,69 +1502,45 @@
         {
         case Key_Down:
         case Key_J:
-            if ( d->vmode == QScrollView::AlwaysOff )
-                _ke->accept();
-            else {
-                if (!d->scrollTimerId || d->scrollSuspended)
-                    scrollBy( 0, 10 );
-                if (d->scrollTimerId)
-                    d->newScrollTimer(this, 0);
-            }
+            if (!d->scrollTimerId || d->scrollSuspended)
+                scrollBy( 0, 10 );
+            if (d->scrollTimerId)
+                d->newScrollTimer(this, 0);
             break;
 
         case Key_Space:
         case Key_Next:
-            if ( d->vmode == QScrollView::AlwaysOff )
-                _ke->accept();
-            else {
-                scrollBy( 0, clipper()->height() - offs );
-                if(d->scrollSuspended)
-                    d->newScrollTimer(this, 0);
-            }
+            scrollBy( 0, clipper()->height() - offs );
+            if(d->scrollSuspended)
+                d->newScrollTimer(this, 0);
             break;
 
         case Key_Up:
         case Key_K:
-            if ( d->vmode == QScrollView::AlwaysOff )
-                _ke->accept();
-            else {
-                if (!d->scrollTimerId || d->scrollSuspended)
-                    scrollBy( 0, -10 );
-                if (d->scrollTimerId)
-                    d->newScrollTimer(this, 0);
-            }
+            if (!d->scrollTimerId || d->scrollSuspended)
+                scrollBy( 0, -10 );
+            if (d->scrollTimerId)
+                d->newScrollTimer(this, 0);
             break;
 
         case Key_Prior:
-            if ( d->vmode == QScrollView::AlwaysOff )
-                _ke->accept();
-            else {
-                scrollBy( 0, -clipper()->height() + offs );
-                if(d->scrollSuspended)
-                    d->newScrollTimer(this, 0);
-            }
+            scrollBy( 0, -clipper()->height() + offs );
+            if(d->scrollSuspended)
+                d->newScrollTimer(this, 0);
             break;
         case Key_Right:
         case Key_L:
-            if ( d->hmode == QScrollView::AlwaysOff )
-                _ke->accept();
-            else {
-                if (!d->scrollTimerId || d->scrollSuspended)
-                    scrollBy( 10, 0 );
-                if (d->scrollTimerId)
-                    d->newScrollTimer(this, 0);
-            }
+            if (!d->scrollTimerId || d->scrollSuspended)
+                scrollBy( 10, 0 );
+            if (d->scrollTimerId)
+                d->newScrollTimer(this, 0);
             break;
         case Key_Left:
         case Key_H:
-            if ( d->hmode == QScrollView::AlwaysOff )
-                _ke->accept();
-            else {
-                if (!d->scrollTimerId || d->scrollSuspended)
-                    scrollBy( -10, 0 );
-                if (d->scrollTimerId)
-                    d->newScrollTimer(this, 0);
-            }
+            if (!d->scrollTimerId || d->scrollSuspended)
+                scrollBy( -10, 0 );
+            if (d->scrollTimerId)
+                d->newScrollTimer(this, 0);
             break;
         case Key_Enter:
         case Key_Return:
@@ -1581,22 +1553,14 @@
 	    }
             break;
         case Key_Home:
-            if ( d->vmode == QScrollView::AlwaysOff )
-                _ke->accept();
-            else {
-                setContentsPos( 0, 0 );
-                if(d->scrollSuspended)
-                    d->newScrollTimer(this, 0);
-            }
+            setContentsPos( 0, 0 );
+            if(d->scrollSuspended)
+                d->newScrollTimer(this, 0);
             break;
         case Key_End:
-            if ( d->vmode == QScrollView::AlwaysOff )
-                _ke->accept();
-            else {
-                setContentsPos( 0, contentsHeight() - visibleHeight() );
-                if(d->scrollSuspended)
-                    d->newScrollTimer(this, 0);
-            }
+            setContentsPos( 0, contentsHeight() - visibleHeight() );
+            if(d->scrollSuspended)
+                d->newScrollTimer(this, 0);
             break;
         case Key_Shift:
             // what are you doing here?
@@ -3239,11 +3203,6 @@
             m_part->parentPart()->view()->wheelEvent( e );
         e->ignore();
     }
-    else if ( (e->orientation() == Vertical && d->vmode == QScrollView::AlwaysOff) ||
-              (e->orientation() == Horizontal && d->hmode == QScrollView::AlwaysOff) )
-    {
-        e->accept();
-    }
     else
     {
         d->scrollBarMoved = true;
[prev in list] [next in list] [prev in thread] [next in thread] 

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