30 #include "webkitlogger.h" |
30 #include "webkitlogger.h" |
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 |
36 |
36 using namespace WebCore; |
37 using namespace WebCore; |
37 |
38 |
38 WebFrameView::WebFrameView() : |
39 WebFrameView::WebFrameView() : |
39 m_parent(NULL), |
40 m_parent(NULL), |
118 frameClip = TRect(viewCoordsInFrameCoords(frameClip.iTl), viewCoordsInFrameCoords(frameClip.iBr)); |
119 frameClip = TRect(viewCoordsInFrameCoords(frameClip.iTl), viewCoordsInFrameCoords(frameClip.iBr)); |
119 frameClip = TRect(toViewCoords(frameClip)); |
120 frameClip = TRect(toViewCoords(frameClip)); |
120 frameClip.Move(-cpos); |
121 frameClip.Move(-cpos); |
121 gc.setClippingRect( frameClip ); |
122 gc.setClippingRect( frameClip ); |
122 } |
123 } |
123 // draw frame border |
124 |
124 CFbsBitGc& realgc = gc.gc(); |
125 if (!m_topView->pinchZoomHandler()->isPinchActive()) { |
125 if (m_hasBorder && !m_frame->isFrameSet()) { |
126 |
126 // already moved the origin |
127 // draw frame border |
127 TRect borderRect(TPoint(-1,-1),toViewCoords(m_frameRect).Size()); |
128 CFbsBitGc& realgc = gc.gc(); |
128 borderRect.iBr += TPoint(2,2); |
129 if (m_hasBorder && !m_frame->isFrameSet()) { |
129 realgc.SetPenColor(TRgb(0x55,0x55,0x55)); |
130 // already moved the origin |
130 realgc.SetPenStyle(CGraphicsContext::ESolidPen); |
131 TRect borderRect(TPoint(-1,-1),toViewCoords(m_frameRect).Size()); |
131 realgc.SetBrushStyle(CGraphicsContext::ENullBrush); |
132 borderRect.iBr += TPoint(2,2); |
132 realgc.SetPenSize(TSize(1,1)); |
133 realgc.SetPenColor(TRgb(0x55,0x55,0x55)); |
133 realgc.DrawRect(borderRect); |
134 realgc.SetPenStyle(CGraphicsContext::ESolidPen); |
134 // double border in bottom/right |
135 realgc.SetBrushStyle(CGraphicsContext::ENullBrush); |
135 borderRect.iBr += TPoint(1,1); |
136 realgc.SetPenSize(TSize(1,1)); |
136 realgc.DrawRect(borderRect); |
137 realgc.DrawRect(borderRect); |
137 } |
138 // double border in bottom/right |
138 |
139 borderRect.iBr += TPoint(1,1); |
139 // draw scrollbars |
140 realgc.DrawRect(borderRect); |
140 rect.Move( -m_contentPos ); |
141 } |
141 WebCore::GraphicsContext ctx(&gc); |
142 |
142 if (m_vScrollbar->isEnabled()) |
143 // draw scrollbars |
143 m_vScrollbar->paint(&ctx, rect); |
144 rect.Move( -m_contentPos ); |
144 if (m_hScrollbar->isEnabled()) |
145 WebCore::GraphicsContext ctx(&gc); |
145 m_hScrollbar->paint(&ctx, rect); |
146 if (m_vScrollbar->isEnabled()) |
146 |
147 m_vScrollbar->paint(&ctx, rect); |
|
148 if (m_hScrollbar->isEnabled()) |
|
149 m_hScrollbar->paint(&ctx, rect); |
|
150 } |
147 gc.cancelClipping(); |
151 gc.cancelClipping(); |
148 gc.restore(saved); |
152 gc.restore(saved); |
149 } |
153 } |
150 } |
154 } |
151 |
155 |