Changeset 95940 in webkit


Ignore:
Timestamp:
Sep 26, 2011 5:06:02 AM (13 years ago)
Author:
kov@webkit.org
Message:

REGRESSION: Empathy crashes when switching theme
https://bugs.webkit.org/show_bug.cgi?id=68600

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2011-09-26
Reviewed by Martin Robinson.

  • webkit/webkitwebview.cpp:

(webkit_web_view_set_scroll_adjustments): use the existing
set{Horizontal,Vertical}Adjustment functions, so the code is not
duplicated
(webkit_web_view_dispose): unset the adjustments during dispose,
to avoid late adjustment change notifications hitting the
adjustment watcher

Location:
trunk/Source/WebKit/gtk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/gtk/ChangeLog

    r95919 r95940  
     12011-09-26  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
     2
     3        REGRESSION: Empathy crashes when switching theme
     4        https://bugs.webkit.org/show_bug.cgi?id=68600
     5
     6        Reviewed by Martin Robinson.
     7
     8        * webkit/webkitwebview.cpp:
     9        (webkit_web_view_set_scroll_adjustments): use the existing
     10        set{Horizontal,Vertical}Adjustment functions, so the code is not
     11        duplicated
     12        (webkit_web_view_dispose): unset the adjustments during dispose,
     13        to avoid late adjustment change notifications hitting the
     14        adjustment watcher
     15
    1162011-09-24  Adam Barth  <abarth@webkit.org>
    217
  • trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp

    r95271 r95940  
    428428}
    429429
    430 #ifndef GTK_API_VERSION_2
    431430static void setHorizontalAdjustment(WebKitWebView* webView, GtkAdjustment* adjustment)
    432431{
     
    445444}
    446445
     446#ifndef GTK_API_VERSION_2
    447447static GtkAdjustment* getHorizontalAdjustment(WebKitWebView* webView)
    448448{
     
    10401040static void webkit_web_view_set_scroll_adjustments(WebKitWebView* webView, GtkAdjustment* horizontalAdjustment, GtkAdjustment* verticalAdjustment)
    10411041{
    1042     // This may be called after the page has been destroyed, in which case we do nothing.
    1043     Page* page = core(webView);
    1044     if (!page)
    1045         return;
    1046 
    1047     WebKit::ChromeClient* client = static_cast<WebKit::ChromeClient*>(page->chrome()->client());
    1048     client->adjustmentWatcher()->setHorizontalAdjustment(horizontalAdjustment);
    1049     client->adjustmentWatcher()->setVerticalAdjustment(verticalAdjustment);
     1042    setHorizontalAdjustment(webView, horizontalAdjustment);
     1043    setVerticalAdjustment(webView, verticalAdjustment);
    10501044}
    10511045#endif
     
    13071301
    13081302    priv->disposing = TRUE;
     1303
     1304    // Make sure GtkAdjustmentWatcher won't be reacting to adjustment changes after the
     1305    // WebView is destroyed.
     1306    setHorizontalAdjustment(webView, 0);
     1307    setVerticalAdjustment(webView, 0);
    13091308
    13101309    // These smart pointers are cleared manually, because some cleanup operations are
Note: See TracChangeset for help on using the changeset viewer.