webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp
changeset 27 60c5402cb945
parent 0 dd21522fd290
child 59 1f3c3f2f5b0a
child 68 92a765b5b3e7
--- a/webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -29,12 +29,17 @@
 #include "PageScaler.h"
 #include "webkitlogger.h"
 #include "BrCtl.h"
+#include "SettingsContainer.h"
+#include "StaticObjectsContainer.h"
+#include "WebTabbedNavigation.h"
+
 using namespace WebCore;
 
 WebFrameView::WebFrameView() : 
       m_parent(NULL),
       m_hasBorder(true),
-      m_refCount(1)
+      m_refCount(1),
+	  m_isVisible(ETrue)
 {
     m_hScrollbar = new WebCore::PlatformScrollbar(this, WebCore::HorizontalScrollbar, WebCore::RegularScrollbar);
     m_vScrollbar = new WebCore::PlatformScrollbar(this, WebCore::VerticalScrollbar, WebCore::RegularScrollbar); 
@@ -323,7 +328,14 @@
 
             //Update scroll bar , thumb position
             m_topView->updateScrollbars(m_contentSize.iHeight, m_contentPos.iY, m_contentSize.iWidth, m_contentPos.iX);
-            
+
+            if (m_topView->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed) {
+                int h = (to.iX - from.iX);
+                int v = (to.iY - from.iY);
+                h = (h != 0) ? ((h > 0) ? 1 : -1) : h;
+                v = (v != 0) ? ((v > 0) ? 1 : -1) : v;
+                m_topView->tabbedNavigation()->updateCursorPosAfterScroll(core(m_frame.get()), h, v);
+            }
             // trigger painting
             m_topView->syncRepaint();
         }
@@ -506,6 +518,13 @@
     return pt;
 }
 
+TRect WebFrameView::frameCoordsInViewCoords(const TRect &aRect)
+{
+    TSize s = aRect.Size(); 
+    return TRect(frameCoordsInViewCoords(aRect.iTl), toViewCoords(s));
+}
+
+
 TRect WebFrameView::rectInGlobalCoords() const
 {
     TRect rect(toViewCoords(m_frameRect));
@@ -526,6 +545,7 @@
 
 void WebFrameView::makeVisible(TBool aVisible) 
 {
+    m_isVisible = aVisible;
 }
 
 TBool WebFrameView::isFocused() const
@@ -535,7 +555,7 @@
 
 TBool WebFrameView::isVisible() const
 {
-    return ETrue;
+    return m_isVisible;
 }
 
 TSize WebFrameView::contentSize() const