equal
deleted
inserted
replaced
31 #include "BrCtl.h" |
31 #include "BrCtl.h" |
32 #include "SettingsContainer.h" |
32 #include "SettingsContainer.h" |
33 #include "StaticObjectsContainer.h" |
33 #include "StaticObjectsContainer.h" |
34 #include "WebTabbedNavigation.h" |
34 #include "WebTabbedNavigation.h" |
35 #include "WebPagePinchZoomHandler.h" |
35 #include "WebPagePinchZoomHandler.h" |
|
36 #include "FocusController.h" |
|
37 #include "Frame.h" |
|
38 #include "page.h" |
36 |
39 |
37 using namespace WebCore; |
40 using namespace WebCore; |
38 |
41 |
39 WebFrameView::WebFrameView() : |
42 WebFrameView::WebFrameView() : |
40 m_parent(NULL), |
43 m_parent(NULL), |
416 else if (!m_parent) { |
419 else if (!m_parent) { |
417 // top level |
420 // top level |
418 m_topView->updateScrollbars(m_contentSize.iHeight, m_contentPos.iY, m_contentSize.iWidth, m_contentPos.iX); |
421 m_topView->updateScrollbars(m_contentSize.iHeight, m_contentPos.iY, m_contentSize.iWidth, m_contentPos.iX); |
419 } |
422 } |
420 } |
423 } |
|
424 moveFocus(); |
|
425 } |
|
426 |
|
427 void WebFrameView::moveFocus() |
|
428 { |
|
429 // After resizing, move the focus to the correct node |
|
430 if (m_topView && m_topView->focusedElementType() == TBrCtlDefs::EElementAnchor && |
|
431 m_topView->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed) { |
|
432 Frame* mainFrame = core(m_topView->mainFrame()); |
|
433 FocusController* focusController = m_topView->page()->focusController(); |
|
434 Frame* focusedFrame = focusController->focusedOrMainFrame(); |
|
435 if (focusedFrame == NULL) { |
|
436 focusedFrame = mainFrame; |
|
437 } |
|
438 Node* node = focusedFrame->document()->focusedNode(); |
|
439 if (node) { |
|
440 TRect rect = node->getRect().Rect(); |
|
441 TPoint viewpoint = kit(focusedFrame)->frameView()->frameCoordsInViewCoords(rect.iTl); |
|
442 WebCursor* cursor = StaticObjectsContainer::instance()->webCursor(); |
|
443 cursor->updatePositionAndElemType(viewpoint); |
|
444 } |
|
445 } |
421 } |
446 } |
422 |
447 |
423 void WebFrameView::setMayUseCopyScroll(TBool aCopy) |
448 void WebFrameView::setMayUseCopyScroll(TBool aCopy) |
424 { |
449 { |
425 m_mayUseCopyScroll = aCopy; |
450 m_mayUseCopyScroll = aCopy; |