|
Lines 389-399
void ChromeClient::invalidateWindow(const IntRect&, bool immediate)
a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp_sec1
|
| 389 |
|
389 |
|
| 390 |
void ChromeClient::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate) |
390 |
void ChromeClient::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate) |
| 391 |
{ |
391 |
{ |
| 392 |
GdkRectangle rect = updateRect; |
392 |
cairo_rectangle_int_t rect = updateRect; |
| 393 |
GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(m_webView)); |
393 |
GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(m_webView)); |
| 394 |
|
394 |
|
| 395 |
if (window && !updateRect.isEmpty()) { |
395 |
if (window && !updateRect.isEmpty()) { |
| 396 |
gdk_window_invalidate_rect(window, &rect, FALSE); |
396 |
gdk_window_invalidate_rect(window, (GdkRectangle*)&rect, FALSE); |
| 397 |
// We don't currently do immediate updates since they delay other UI elements. |
397 |
// We don't currently do immediate updates since they delay other UI elements. |
| 398 |
//if (immediate) |
398 |
//if (immediate) |
| 399 |
// gdk_window_process_updates(window, FALSE); |
399 |
// gdk_window_process_updates(window, FALSE); |
|
Lines 417-434
void ChromeClient::scroll(const IntSize& delta, const IntRect& rectToScroll, con
a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp_sec2
|
| 417 |
// We cannot use gdk_window_scroll here because it is only able to |
417 |
// We cannot use gdk_window_scroll here because it is only able to |
| 418 |
// scroll the whole window at once, and we often need to scroll |
418 |
// scroll the whole window at once, and we often need to scroll |
| 419 |
// portions of the window only (think frames). |
419 |
// portions of the window only (think frames). |
| 420 |
GdkRectangle area = clipRect; |
420 |
cairo_rectangle_int_t area = clipRect; |
| 421 |
GdkRectangle moveRect; |
421 |
cairo_rectangle_int_t moveRect; |
| 422 |
|
422 |
|
| 423 |
GdkRectangle sourceRect = area; |
423 |
cairo_rectangle_int_t sourceRect = area; |
| 424 |
sourceRect.x -= delta.width(); |
424 |
sourceRect.x -= delta.width(); |
| 425 |
sourceRect.y -= delta.height(); |
425 |
sourceRect.y -= delta.height(); |
| 426 |
|
426 |
|
| 427 |
#ifdef GTK_API_VERSION_2 |
427 |
#ifdef GTK_API_VERSION_2 |
| 428 |
GdkRegion* invalidRegion = gdk_region_rectangle(&area); |
428 |
GdkRegion* invalidRegion = gdk_region_rectangle((GdkRectangle*)&area); |
| 429 |
|
429 |
|
| 430 |
if (gdk_rectangle_intersect(&area, &sourceRect, &moveRect)) { |
430 |
if (gdk_rectangle_intersect((GdkRectangle*)&area, (GdkRectangle*)&sourceRect, (GdkRectangle*)&moveRect)) { |
| 431 |
GdkRegion* moveRegion = gdk_region_rectangle(&moveRect); |
431 |
GdkRegion* moveRegion = gdk_region_rectangle((GdkRectangle*)&moveRect); |
| 432 |
gdk_window_move_region(window, moveRegion, delta.width(), delta.height()); |
432 |
gdk_window_move_region(window, moveRegion, delta.width(), delta.height()); |
| 433 |
gdk_region_offset(moveRegion, delta.width(), delta.height()); |
433 |
gdk_region_offset(moveRegion, delta.width(), delta.height()); |
| 434 |
gdk_region_subtract(invalidRegion, moveRegion); |
434 |
gdk_region_subtract(invalidRegion, moveRegion); |