Author: stippi Date: Tue Apr 20 13:17:45 2010 New Revision: 438 URL: http://mmlr.dyndns.org/changeset/438 Log: * Reworked repainting after WebKit API changes. Can't see any more problems with Facebook. GMX currently refuses to show me the GMX Mail 2010 web app. Either that's a regression or a problem with GMX at the moment. In any case, scrolling mail bodies didn't work in that app and I hope that's fixed too. * Replaced TODO with FIXME. Modified: webkit/trunk/WebKit/haiku/API/WebPage.cpp webkit/trunk/WebKit/haiku/API/WebPage.h webkit/trunk/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp Modified: webkit/trunk/WebKit/haiku/API/WebPage.cpp ============================================================================== --- webkit/trunk/WebKit/haiku/API/WebPage.cpp Tue Apr 20 13:12:20 2010 (r437) +++ webkit/trunk/WebKit/haiku/API/WebPage.cpp Tue Apr 20 13:17:45 2010 (r438) @@ -616,8 +616,7 @@ } } -void BWebPage::paint(BRect rect, bool contentChanged, bool immediate, - bool repaintContentOnly) +void BWebPage::paint(BRect rect, bool immediate) { if (!rect.IsValid()) return; @@ -876,7 +875,7 @@ message->FindRect("update rect", &rect); updateRect = updateRect | rect; } - paint(updateRect, true, false, true); + paint(updateRect, false); break; } case HANDLE_FRAME_RESIZED: @@ -1021,7 +1020,7 @@ // Trigger an internal repaint if the page was supposed to be repainted // while it was invisible. if (fPageVisible && fPageDirty) - paint(viewBounds(), false, false, true); + paint(viewBounds(), false); } void BWebPage::handleFrameResized(const BMessage* message) Modified: webkit/trunk/WebKit/haiku/API/WebPage.h ============================================================================== --- webkit/trunk/WebKit/haiku/API/WebPage.h Tue Apr 20 13:12:20 2010 (r437) +++ webkit/trunk/WebKit/haiku/API/WebPage.h Tue Apr 20 13:17:45 2010 (r438) @@ -183,8 +183,7 @@ static void downloadCreated(BWebDownload* download, bool isAsynchronousRequest); - void paint(BRect rect, bool contentChanged, bool immediate, - bool repaintContentOnly); + void paint(BRect rect, bool immediate); void scroll(int scrollDeltaX, int scrollDeltaY, const BRect& rectToScroll, const BRect& clipRect); void internalPaint(BView* view, BRegion* dirty); Modified: webkit/trunk/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp ============================================================================== --- webkit/trunk/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp Tue Apr 20 13:12:20 2010 (r437) +++ webkit/trunk/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp Tue Apr 20 13:17:45 2010 (r438) @@ -125,7 +125,7 @@ Page* ChromeClientHaiku::createWindow(Frame* frame, const FrameLoadRequest& request, const WebCore::WindowFeatures& features) { - // TODO: I believe the frame is important for cloning session information. + // FIXME: I believe the frame is important for cloning session information. // From looking through the Chromium port code, it is passed to the // method that creates a new WebView. I didn't find createView() implemented // anywhere, but only this comment: @@ -305,30 +305,35 @@ { // Since the page does not draw by itself, this call cannot make sense // in the Haiku port. - // TODO: Check what the booleans mean } -void ChromeClientHaiku::invalidateContentsAndWindow(const IntRect& rect, bool) +void ChromeClientHaiku::invalidateContentsAndWindow(const IntRect& rect, + bool immediate) { - // TODO: Check what the booleans mean -// if (immediate) -// m_webPage->paint(BRect(rect)); -// else + if (immediate) + m_webPage->paint(BRect(rect), true); + else m_webPage->draw(BRect(rect)); } -void ChromeClientHaiku::invalidateContentsForSlowScroll(const IntRect&, bool) +void ChromeClientHaiku::invalidateContentsForSlowScroll(const IntRect& rect, + bool immediate) { - // We can ignore this, since we implement fast scrolling. + // FIXME: We should be able to ignore this, + // since we implement fast scrolling. + invalidateContentsAndWindow(rect, immediate); } -void ChromeClientHaiku::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) +void ChromeClientHaiku::scroll(const IntSize& scrollDelta, + const IntRect& rectToScroll, + const IntRect& clipRect) { //printf("ChromeClientHaiku::scroll(%d x %d, rectToScroll(%d, %d, %d, %d), " //"clipRect(%d, %d, %d, %d))\n", scrollDelta.width(), scrollDelta.height(), //rectToScroll.x(), rectToScroll.y(), rectToScroll.right(), rectToScroll.bottom(), //clipRect.x(), clipRect.y(), clipRect.right(), clipRect.bottom()); - m_webPage->scroll(scrollDelta.width(), scrollDelta.height(), rectToScroll, clipRect); + m_webPage->scroll(scrollDelta.width(), scrollDelta.height(), rectToScroll, + clipRect); m_webView->SendFakeMouseMovedEvent(); } @@ -399,7 +404,7 @@ if (!m_webView->LockLooper()) return; - // TODO: Unless HideToolTip() is called here, changing the tool tip has no + // FIXME: Unless HideToolTip() is called here, changing the tool tip has no // effect in BView. Remove when BView is fixed. m_webView->HideToolTip(); if (!tip.length())