Changeset 37105 in webkit
- Timestamp:
- Sep 30, 2008 1:09:42 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r37098 r37105 1 2008-09-30 Dave Hyatt <hyatt@apple.com> 2 3 http://bugs.webkit.org/show_bug.cgi?id=21250 4 5 Rename updateContents to repaintContentRectangle and make it cross-platform by always sending 6 repaints up through the ChromeClient. 7 8 Reviewed by Darin Adler 9 10 * loader/EmptyClients.h: 11 (WebCore::EmptyChromeClient::repaint): 12 * page/Chrome.cpp: 13 (WebCore::Chrome::repaint): 14 * page/Chrome.h: 15 * page/ChromeClient.h: 16 * page/FrameView.cpp: 17 (WebCore::FrameView::hostWindow): 18 (WebCore::FrameView::repaintContentRectangle): 19 * page/FrameView.h: 20 * platform/HostWindow.h: 21 * platform/ScrollView.cpp: 22 (WebCore::ScrollView::repaintContentRectangle): 23 (WebCore::ScrollView::platformRepaintContentRectangle): 24 * platform/ScrollView.h: 25 * platform/gtk/ScrollViewGtk.cpp: 26 * platform/mac/ScrollViewMac.mm: 27 (WebCore::ScrollView::platformRepaintContentRectangle): 28 * platform/qt/ScrollViewQt.cpp: 29 * platform/win/ScrollViewWin.cpp: 30 * platform/wx/ScrollViewWx.cpp: 31 (WebCore::ScrollView::platformRepaintContentRectangle): 32 1 33 2008-09-30 Alexey Proskuryakov <ap@webkit.org> 2 34 -
trunk/WebCore/loader/EmptyClients.h
r35946 r37105 114 114 virtual void updateBackingStore() { } 115 115 116 virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false) { } 117 116 118 virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags) { } 117 119 -
trunk/WebCore/page/Chrome.cpp
r37061 r37105 77 77 } 78 78 79 void Chrome::repaint(const IntRect& windowRect, bool contentChanged, bool immediate) 80 { 81 m_client->repaint(windowRect, contentChanged, immediate); 82 } 83 79 84 void Chrome::setWindowRect(const FloatRect& rect) const 80 85 { -
trunk/WebCore/page/Chrome.h
r37085 r37105 52 52 53 53 ChromeClient* client() { return m_client; } 54 55 // HostWindow methods. 56 virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false); 54 57 55 58 void setWindowRect(const FloatRect&) const; -
trunk/WebCore/page/ChromeClient.h
r35900 r37105 109 109 110 110 virtual IntRect windowResizerRect() const = 0; 111 112 // The following three methods are deprecated and will be removed once all of the callers have been 113 // eliminated. 111 114 virtual void addToDirtyRegion(const IntRect&) = 0; 112 115 virtual void scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect) = 0; 113 116 virtual void updateBackingStore() = 0; 117 // End deprecated methods. 118 119 virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false) = 0; 114 120 115 121 virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags) = 0; -
trunk/WebCore/page/FrameView.cpp
r37019 r37105 623 623 } 624 624 625 HostWindow* FrameView::hostWindow() const 626 { 627 Page* page = frame() ? frame()->page() : 0; 628 if (!page) 629 return 0; 630 return page->chrome(); 631 } 632 625 633 const unsigned cRepaintRectUnionThreshold = 25; 626 634 … … 646 654 return; 647 655 648 updateContents(r, immediate);656 ScrollView::repaintContentRectangle(r, immediate); 649 657 } 650 658 -
trunk/WebCore/page/FrameView.h
r37019 r37105 61 61 62 62 virtual ~FrameView(); 63 64 virtual HostWindow* hostWindow() const; 63 65 64 66 Frame* frame() const { return m_frame.get(); } … … 167 169 void performPostLayoutTasks(); 168 170 169 v oid repaintContentRectangle(const IntRect&, bool immediate);171 virtual void repaintContentRectangle(const IntRect&, bool immediate); 170 172 171 173 unsigned m_refCount; -
trunk/WebCore/platform/HostWindow.h
r37085 r37105 31 31 namespace WebCore { 32 32 33 class IntRect; 34 33 35 class HostWindow : Noncopyable { 34 36 public: 35 37 HostWindow() {} 36 38 virtual ~HostWindow() {} 39 40 // The repaint method asks the host window to repaint a rect in the window's coordinate space. The 41 // contentChanged boolean indicates whether or not the Web page content actually changed (or if a repaint 42 // of unchanged content is being requested). 43 virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false) = 0; 37 44 }; 38 45 -
trunk/WebCore/platform/ScrollView.cpp
r37072 r37105 27 27 #include "ScrollView.h" 28 28 29 #include "HostWindow.h" 29 30 #include "PlatformMouseEvent.h" 30 31 #include "PlatformWheelEvent.h" … … 341 342 } 342 343 344 void ScrollView::repaintContentRectangle(const IntRect& rect, bool now) 345 { 346 if (rect.isEmpty()) 347 return; 348 349 ASSERT(!parent()); 350 351 if (platformWidget()) { 352 platformRepaintContentRectangle(rect, now); 353 return; 354 } 355 356 hostWindow()->repaint(contentsToWindow(rect), true, now); 357 } 358 343 359 #if !PLATFORM(MAC) 344 360 void ScrollView::platformSetCanBlitOnScroll() … … 382 398 return true; 383 399 } 400 401 void ScrollView::platformRepaintContentRectangle(const IntRect&, bool now) 402 { 403 } 384 404 #endif 385 405 -
trunk/WebCore/platform/ScrollView.h
r37067 r37105 55 55 namespace WebCore { 56 56 57 class HostWindow; 57 58 class PlatformWheelEvent; 58 59 class Scrollbar; … … 62 63 ScrollView(); 63 64 ~ScrollView(); 65 66 // The window thats hosts the ScrollView. The ScrollView will communicate scrolls and repaints to the 67 // host window in the window's coordinate space. 68 virtual HostWindow* hostWindow() const = 0; 64 69 65 70 // Methods for child manipulation and inspection. … … 181 186 182 187 protected: 183 v oid updateContents(const IntRect&, bool now = false);188 virtual void repaintContentRectangle(const IntRect&, bool now = false); 184 189 void updateWindowRect(const IntRect&, bool now = false); 185 190 public: … … 213 218 bool platformScroll(ScrollDirection, ScrollGranularity); 214 219 void platformSetScrollbarsSuppressed(bool repaintOnUnsuppress); 215 220 void platformRepaintContentRectangle(const IntRect&, bool now); 221 216 222 #if PLATFORM(MAC) && defined __OBJC__ 217 223 public: -
trunk/WebCore/platform/gtk/ScrollViewGtk.cpp
r37092 r37105 286 286 } 287 287 288 void ScrollView::updateContents(const IntRect& updateRect, bool now)289 {290 if (updateRect.isEmpty())291 return;292 293 IntPoint windowPoint = contentsToWindow(updateRect.location());294 IntRect containingWindowRect = updateRect;295 containingWindowRect.setLocation(windowPoint);296 297 GdkRectangle rect = containingWindowRect;298 GdkWindow* window = GTK_WIDGET(containingWindow())->window;299 300 if (window)301 gdk_window_invalidate_rect(window, &rect, true);302 303 // Cache the dirty spot.304 addToDirtyRegion(containingWindowRect);305 306 if (now && window)307 gdk_window_process_updates(window, true);308 }309 310 288 void ScrollView::update() 311 289 { -
trunk/WebCore/platform/mac/ScrollViewMac.mm
r37067 r37105 157 157 } 158 158 159 void ScrollView:: updateContents(const IntRect& rect, bool now)159 void ScrollView::platformRepaintContentRectangle(const IntRect& rect, bool now) 160 160 { 161 161 BEGIN_BLOCK_OBJC_EXCEPTIONS; … … 164 164 NSRect visibleRect = visibleContentRect(); 165 165 166 // FIXME: I don't think this intersection is necessary any more now that 167 // selection doesn't call this method directly (but has to go through FrameView's 168 // repaintContentRectangle, which does the intersection test also). Leaving it in 169 // for now until I'm sure. 166 170 // Checking for rect visibility is an important optimization for the case of 167 171 // Select All of a large document. AppKit does not do this check, and so ends -
trunk/WebCore/platform/qt/ScrollViewQt.cpp
r37092 r37105 181 181 } 182 182 183 void ScrollView::updateContents(const IntRect& rect, bool now)184 {185 if (rect.isEmpty())186 return;187 188 IntPoint windowPoint = contentsToWindow(rect.location());189 IntRect containingWindowRect = rect;190 containingWindowRect.setLocation(windowPoint);191 192 // Cache the dirty spot.193 addToDirtyRegion(containingWindowRect);194 195 if (now)196 updateBackingStore();197 }198 199 183 void ScrollView::update() 200 184 { -
trunk/WebCore/platform/win/ScrollViewWin.cpp
r37067 r37105 202 202 } 203 203 204 void ScrollView::updateContents(const IntRect& rect, bool now)205 {206 if (rect.isEmpty())207 return;208 209 IntPoint windowPoint = contentsToWindow(rect.location());210 IntRect containingWindowRect = rect;211 containingWindowRect.setLocation(windowPoint);212 213 updateWindowRect(containingWindowRect, now);214 }215 216 204 void ScrollView::updateWindowRect(const IntRect& rect, bool now) 217 205 { -
trunk/WebCore/platform/wx/ScrollViewWx.cpp
r37067 r37105 138 138 } 139 139 140 void ScrollView:: updateContents(const IntRect& updateRect, bool now)140 void ScrollView::platformRepaintContentRectangle(const IntRect& updateRect, bool now) 141 141 { 142 142 // we need to convert coordinates to scrolled position -
trunk/WebKit/gtk/ChangeLog
r36532 r37105 1 2008-09-30 Dave Hyatt <hyatt@apple.com> 2 3 http://bugs.webkit.org/show_bug.cgi?id=21250 4 5 Rename updateContents to repaintContentRectangle and make it cross-platform by always sending 6 repaints up through the ChromeClient. 7 8 Reviewed by Darin Adler 9 10 * WebCoreSupport/ChromeClientGtk.cpp: 11 (WebKit::ChromeClient::repaint): 12 * WebCoreSupport/ChromeClientGtk.h: 13 1 14 2008-09-16 Alp Toker <alp@nuanti.com> 2 15 -
trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
r34110 r37105 260 260 } 261 261 262 void ChromeClient::repaint(const WebCore::IntRect& windowRect, bool contentChanged, bool immediate) 263 { 264 // No double buffer. 265 if (!contentChanged || !m_webView) 266 return; 267 268 GtkWidget* windowWidget = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); 269 if (!windowWidget) 270 return; 271 272 GdkRectangle rect = windowRect; 273 GdkWindow* window = GTK_WINDOW(windowWidget); 274 275 if (window) { 276 gdk_window_invalidate_rect(window, &rect, true); 277 if (immediate) 278 gdk_window_process_updates(window, true); 279 } 280 } 281 262 282 void ChromeClient::addToDirtyRegion(const IntRect&) 263 283 { -
trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
r29699 r37105 88 88 virtual void updateBackingStore(); 89 89 90 virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false); 91 90 92 virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags); 91 93 -
trunk/WebKit/mac/ChangeLog
r37102 r37105 1 2008-09-30 Dave Hyatt <hyatt@apple.com> 2 3 http://bugs.webkit.org/show_bug.cgi?id=21250 4 5 Rename updateContents to repaintContentRectangle and make it cross-platform by always sending 6 repaints up through the ChromeClient. 7 8 Reviewed by Darin Adler 9 10 * WebCoreSupport/WebChromeClient.h: 11 * WebCoreSupport/WebChromeClient.mm: 12 (WebChromeClient::repaint): 13 1 14 2008-09-30 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/WebKit/mac/WebCoreSupport/WebChromeClient.h
r37061 r37105 93 93 virtual void updateBackingStore(); 94 94 95 virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false); 96 95 97 virtual void setStatusbarText(const WebCore::String&); 96 98 -
trunk/WebKit/mac/WebCoreSupport/WebChromeClient.mm
r37061 r37105 404 404 } 405 405 406 void WebChromeClient::repaint(const WebCore::IntRect&, bool, bool) 407 { 408 } 409 406 410 void WebChromeClient::addToDirtyRegion(const IntRect&) 407 411 { -
trunk/WebKit/qt/ChangeLog
r37064 r37105 1 2008-09-30 Dave Hyatt <hyatt@apple.com> 2 3 http://bugs.webkit.org/show_bug.cgi?id=21250 4 5 Rename updateContents to repaintContentRectangle and make it cross-platform by always sending 6 repaints up through the ChromeClient. 7 8 Reviewed by Darin Adler 9 10 * WebCoreSupport/ChromeClientQt.cpp: 11 (WebCore::ChromeClientQt::repaint): 12 * WebCoreSupport/ChromeClientQt.h: 13 1 14 2008-09-29 Gunnar Sletta <gunnar@trolltech.com> 2 15 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r36534 r37105 297 297 } 298 298 299 void ChromeClientQt::repaint(const WebCore::IntRect& windowRect, bool contentChanged, bool) 300 { 301 // No double buffer. 302 if (!contentChanged) 303 return; 304 305 QWidget* view = m_webPage->view(); 306 if (view) { 307 QRect rect(r); 308 rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize())); 309 if (!r.isEmpty()) 310 view->update(r); 311 } else 312 emit m_webPage->repaintRequested(r); 313 314 // FIXME: There is no "immediate" support. 315 } 316 299 317 void ChromeClientQt::addToDirtyRegion(const IntRect& r) 300 318 { -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r32209 r37105 104 104 virtual void updateBackingStore(); 105 105 106 virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false); 107 106 108 virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags); 107 109 -
trunk/WebKit/win/ChangeLog
r37083 r37105 1 2008-09-30 Dave Hyatt <hyatt@apple.com> 2 3 http://bugs.webkit.org/show_bug.cgi?id=21250 4 5 Rename updateContents to repaintContentRectangle and make it cross-platform by always sending 6 repaints up through the ChromeClient. 7 8 Reviewed by Darin Adler 9 10 * WebCoreSupport/WebChromeClient.cpp: 11 (WebChromeClient::repaint): 12 * WebCoreSupport/WebChromeClient.h: 13 * WebView.cpp: 14 (WebView::repaint): 15 * WebView.h: 16 1 17 2008-09-29 Dan Bernstein <mitz@apple.com> 2 18 -
trunk/WebKit/win/WebCoreSupport/WebChromeClient.cpp
r36971 r37105 418 418 } 419 419 420 void WebChromeClient::repaint(const IntRect& windowRect, bool contentChanged, bool immediate) 421 { 422 ASSERT(core(m_webView->topLevelFrame())); 423 m_webView->repaint(windowRect, contentChanged, immediate); 424 } 425 420 426 void WebChromeClient::addToDirtyRegion(const IntRect& dirtyRect) 421 427 { -
trunk/WebKit/win/WebCoreSupport/WebChromeClient.h
r35308 r37105 92 92 virtual bool tabsToLinks() const; 93 93 virtual WebCore::IntRect windowResizerRect() const; 94 95 virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false); 96 94 97 virtual void addToDirtyRegion(const WebCore::IntRect&); 95 98 virtual void scrollBackingStore(int dx, int dy, const WebCore::IntRect& scrollViewRect, const WebCore::IntRect& clipRect); -
trunk/WebKit/win/WebView.cpp
r37021 r37105 620 620 621 621 deleteBackingStore(); 622 } 623 624 void WebView::repaint(const WebCore::IntRect& windowRect, bool contentChanged, bool immediate) 625 { 626 RECT rect = windowRect; 627 ::InvalidateRect(m_viewWindow, &rect, false); 628 if (contentChanged) 629 addToDirtyRegion(windowRect); 630 if (immediate) 631 ::UpdateWindow(m_viewWindow); 622 632 } 623 633 -
trunk/WebKit/win/WebView.h
r36652 r37105 712 712 void updateBackingStore(WebCore::FrameView*, HDC, bool backingStoreCompletelyDirty); 713 713 void deleteBackingStore(); 714 void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false); 714 715 void frameRect(RECT* rect); 715 716 void closeWindow(); -
trunk/WebKit/wx/ChangeLog
r36980 r37105 1 2008-09-30 Dave Hyatt <hyatt@apple.com> 2 3 http://bugs.webkit.org/show_bug.cgi?id=21250 4 5 Rename updateContents to repaintContentRectangle and make it cross-platform by always sending 6 repaints up through the ChromeClient. 7 8 Reviewed by Darin Adler 9 10 * WebKitSupport/ChromeClientWx.cpp: 11 (WebCore::ChromeClientWx::repaint): 12 * WebKitSupport/ChromeClientWx.h: 13 1 14 2008-09-26 Kevin Ollivier <kevino@theolliviers.com> 2 15 -
trunk/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
r35437 r37105 284 284 } 285 285 286 void ChromeClientWx::repaint(const WebCore::IntRect&, bool, bool) 287 { 288 notImplemented(); 289 } 290 286 291 void ChromeClientWx::addToDirtyRegion(const IntRect&) 287 292 { -
trunk/WebKit/wx/WebKitSupport/ChromeClientWx.h
r29698 r37105 99 99 virtual void updateBackingStore(); 100 100 101 virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false); 102 101 103 virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags); 102 104
Note: See TracChangeset
for help on using the changeset viewer.