70 return this; |
70 return this; |
71 } |
71 } |
72 |
72 |
73 void WebFrameView::draw(WebCoreGraphicsContext& gc, const TRect& r) |
73 void WebFrameView::draw(WebCoreGraphicsContext& gc, const TRect& r) |
74 { |
74 { |
|
75 if (m_topView->isPinchZoom()) { |
|
76 return; |
|
77 } |
|
78 |
75 TRect vr(visibleRect()); |
79 TRect vr(visibleRect()); |
76 TRect rect(r); |
80 TRect rect(r); |
77 if (isScaled() || m_frame->isFrameSet()) |
81 if (isScaled() || m_frame->isFrameSet()) |
78 rect.Grow(1,1); // eliminate rounding errors |
82 rect.Grow(1,1); // eliminate rounding errors |
79 TRect frameRect(m_frameRect); |
83 TRect frameRect(m_frameRect); |
119 frameClip = TRect(viewCoordsInFrameCoords(frameClip.iTl), viewCoordsInFrameCoords(frameClip.iBr)); |
123 frameClip = TRect(viewCoordsInFrameCoords(frameClip.iTl), viewCoordsInFrameCoords(frameClip.iBr)); |
120 frameClip = TRect(toViewCoords(frameClip)); |
124 frameClip = TRect(toViewCoords(frameClip)); |
121 frameClip.Move(-cpos); |
125 frameClip.Move(-cpos); |
122 gc.setClippingRect( frameClip ); |
126 gc.setClippingRect( frameClip ); |
123 } |
127 } |
124 |
128 |
125 if (!m_topView->pinchZoomHandler()->isPinchActive()) { |
129 // draw frame border |
126 |
130 CFbsBitGc& realgc = gc.gc(); |
127 // draw frame border |
131 if (m_hasBorder && !m_frame->isFrameSet()) { |
128 CFbsBitGc& realgc = gc.gc(); |
132 // already moved the origin |
129 if (m_hasBorder && !m_frame->isFrameSet()) { |
133 TRect borderRect(TPoint(-1,-1),toViewCoords(m_frameRect).Size()); |
130 // already moved the origin |
134 borderRect.iBr += TPoint(2,2); |
131 TRect borderRect(TPoint(-1,-1),toViewCoords(m_frameRect).Size()); |
135 realgc.SetPenColor(TRgb(0x55,0x55,0x55)); |
132 borderRect.iBr += TPoint(2,2); |
136 realgc.SetPenStyle(CGraphicsContext::ESolidPen); |
133 realgc.SetPenColor(TRgb(0x55,0x55,0x55)); |
137 realgc.SetBrushStyle(CGraphicsContext::ENullBrush); |
134 realgc.SetPenStyle(CGraphicsContext::ESolidPen); |
138 realgc.SetPenSize(TSize(1,1)); |
135 realgc.SetBrushStyle(CGraphicsContext::ENullBrush); |
139 realgc.DrawRect(borderRect); |
136 realgc.SetPenSize(TSize(1,1)); |
140 // double border in bottom/right |
137 realgc.DrawRect(borderRect); |
141 borderRect.iBr += TPoint(1,1); |
138 // double border in bottom/right |
142 realgc.DrawRect(borderRect); |
139 borderRect.iBr += TPoint(1,1); |
143 } |
140 realgc.DrawRect(borderRect); |
144 |
141 } |
145 // draw scrollbars |
142 |
146 rect.Move( -m_contentPos ); |
143 // draw scrollbars |
147 WebCore::GraphicsContext ctx(&gc); |
144 rect.Move( -m_contentPos ); |
148 if (m_vScrollbar->isEnabled()) |
145 WebCore::GraphicsContext ctx(&gc); |
149 m_vScrollbar->paint(&ctx, rect); |
146 if (m_vScrollbar->isEnabled()) |
150 if (m_hScrollbar->isEnabled()) |
147 m_vScrollbar->paint(&ctx, rect); |
151 m_hScrollbar->paint(&ctx, rect); |
148 if (m_hScrollbar->isEnabled()) |
152 |
149 m_hScrollbar->paint(&ctx, rect); |
|
150 } |
|
151 gc.cancelClipping(); |
153 gc.cancelClipping(); |
152 gc.restore(saved); |
154 gc.restore(saved); |
153 } |
155 } |
154 } |
156 } |
155 |
157 |