+ if ( m_physX == wxDefaultCoord )
+ {
+ m_physX = m_physY = 0;
+ for (wxHtmlCell *cell = this; cell; cell = cell->GetParent())
+ {
+ m_physX += cell->GetPosX();
+ m_physY += cell->GetPosY();
+ }
+ }
+
+ wxWindow *win = m_windowIface->GetHTMLWindow();
+ wxPoint pos =
+ m_windowIface->HTMLCoordsToWindow(this, wxPoint(m_physX, m_physY));
+ wxRect rect(pos, wxSize(m_Width, m_Height));
+
+ if ( win->GetClientRect().Intersects(rect) &&
+ m_gifDecoder->ConvertToImage(m_nCurrFrame, &img) )
+ {
+#if !defined(__WXMSW__) || wxUSE_WXDIB
+ if ( m_gifDecoder->GetFrameSize(m_nCurrFrame) != wxSize(m_Width, m_Height) ||
+ m_gifDecoder->GetFramePosition(m_nCurrFrame) != wxPoint(0, 0) )
+ {
+ wxBitmap bmp(img);
+ wxMemoryDC dc;
+ dc.SelectObject(*m_bitmap);
+ dc.DrawBitmap(bmp, m_gifDecoder->GetFramePosition(m_nCurrFrame),
+ true /* use mask */);
+ }
+ else
+#endif
+ SetImage(img);
+ win->Refresh(img.HasMask(), &rect);
+ }
+
+ long delay = m_gifDecoder->GetDelay(m_nCurrFrame);
+ if ( delay == 0 )
+ delay = 1;
+ timer->Start(delay, true);
+}
+
+void wxHtmlImageCell::Layout(int w)
+{
+ wxHtmlCell::Layout(w);
+ m_physX = m_physY = wxDefaultCoord;
+}
+
+#endif
+
+wxHtmlImageCell::~wxHtmlImageCell()
+{
+ delete m_bitmap;
+#if wxUSE_GIF && wxUSE_TIMER
+ delete m_gifTimer;
+ delete m_gifDecoder;
+#endif
+}
+
+
+void wxHtmlImageCell::Draw(wxDC& dc, int x, int y,
+ int WXUNUSED(view_y1), int WXUNUSED(view_y2),
+ wxHtmlRenderingInfo& WXUNUSED(info))