27 #include "GraphicsContext.h" |
27 #include "GraphicsContext.h" |
28 #include "PlatformScrollbar.h" |
28 #include "PlatformScrollbar.h" |
29 #include "PageScaler.h" |
29 #include "PageScaler.h" |
30 #include "webkitlogger.h" |
30 #include "webkitlogger.h" |
31 #include "BrCtl.h" |
31 #include "BrCtl.h" |
|
32 #include "SettingsContainer.h" |
|
33 #include "StaticObjectsContainer.h" |
|
34 #include "WebTabbedNavigation.h" |
|
35 |
32 using namespace WebCore; |
36 using namespace WebCore; |
33 |
37 |
34 WebFrameView::WebFrameView() : |
38 WebFrameView::WebFrameView() : |
35 m_parent(NULL), |
39 m_parent(NULL), |
36 m_hasBorder(true), |
40 m_hasBorder(true), |
37 m_refCount(1) |
41 m_refCount(1), |
|
42 m_isVisible(ETrue) |
38 { |
43 { |
39 m_hScrollbar = new WebCore::PlatformScrollbar(this, WebCore::HorizontalScrollbar, WebCore::RegularScrollbar); |
44 m_hScrollbar = new WebCore::PlatformScrollbar(this, WebCore::HorizontalScrollbar, WebCore::RegularScrollbar); |
40 m_vScrollbar = new WebCore::PlatformScrollbar(this, WebCore::VerticalScrollbar, WebCore::RegularScrollbar); |
45 m_vScrollbar = new WebCore::PlatformScrollbar(this, WebCore::VerticalScrollbar, WebCore::RegularScrollbar); |
41 m_horizontalScrollBarMode = ScrollbarAuto; |
46 m_horizontalScrollBarMode = ScrollbarAuto; |
42 m_verticalScrollBarMode = ScrollbarAuto; |
47 m_verticalScrollBarMode = ScrollbarAuto; |
321 if( m_topView->pageScaler() && m_topView->pageScaler()->Visible()) |
326 if( m_topView->pageScaler() && m_topView->pageScaler()->Visible()) |
322 m_topView->pageScaler()->DocumentViewportMoved(); |
327 m_topView->pageScaler()->DocumentViewportMoved(); |
323 |
328 |
324 //Update scroll bar , thumb position |
329 //Update scroll bar , thumb position |
325 m_topView->updateScrollbars(m_contentSize.iHeight, m_contentPos.iY, m_contentSize.iWidth, m_contentPos.iX); |
330 m_topView->updateScrollbars(m_contentSize.iHeight, m_contentPos.iY, m_contentSize.iWidth, m_contentPos.iX); |
326 |
331 |
|
332 if (m_topView->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed) { |
|
333 int h = (to.iX - from.iX); |
|
334 int v = (to.iY - from.iY); |
|
335 h = (h != 0) ? ((h > 0) ? 1 : -1) : h; |
|
336 v = (v != 0) ? ((v > 0) ? 1 : -1) : v; |
|
337 m_topView->tabbedNavigation()->updateCursorPosAfterScroll(core(m_frame.get()), h, v); |
|
338 } |
327 // trigger painting |
339 // trigger painting |
328 m_topView->syncRepaint(); |
340 m_topView->syncRepaint(); |
329 } |
341 } |
330 } |
342 } |
331 } |
343 } |
504 pv = pv->m_parent; |
516 pv = pv->m_parent; |
505 } |
517 } |
506 return pt; |
518 return pt; |
507 } |
519 } |
508 |
520 |
|
521 TRect WebFrameView::frameCoordsInViewCoords(const TRect &aRect) |
|
522 { |
|
523 TSize s = aRect.Size(); |
|
524 return TRect(frameCoordsInViewCoords(aRect.iTl), toViewCoords(s)); |
|
525 } |
|
526 |
|
527 |
509 TRect WebFrameView::rectInGlobalCoords() const |
528 TRect WebFrameView::rectInGlobalCoords() const |
510 { |
529 { |
511 TRect rect(toViewCoords(m_frameRect)); |
530 TRect rect(toViewCoords(m_frameRect)); |
512 |
531 |
513 for (WebFrameView* p = m_parent; p; p=p->m_parent) |
532 for (WebFrameView* p = m_parent; p; p=p->m_parent) |
524 { |
543 { |
525 } |
544 } |
526 |
545 |
527 void WebFrameView::makeVisible(TBool aVisible) |
546 void WebFrameView::makeVisible(TBool aVisible) |
528 { |
547 { |
|
548 m_isVisible = aVisible; |
529 } |
549 } |
530 |
550 |
531 TBool WebFrameView::isFocused() const |
551 TBool WebFrameView::isFocused() const |
532 { |
552 { |
533 return ETrue; |
553 return ETrue; |
534 } |
554 } |
535 |
555 |
536 TBool WebFrameView::isVisible() const |
556 TBool WebFrameView::isVisible() const |
537 { |
557 { |
538 return ETrue; |
558 return m_isVisible; |
539 } |
559 } |
540 |
560 |
541 TSize WebFrameView::contentSize() const |
561 TSize WebFrameView::contentSize() const |
542 { |
562 { |
543 return m_contentSize; |
563 return m_contentSize; |