<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre, #msg p { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[28490] trunk/WebKit/gtk</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/28490">28490</a></dd>
<dt>Author</dt> <dd>alp@webkit.org</dd>
<dt>Date</dt> <dd>2007-12-06 12:11:04 -0800 (Thu, 06 Dec 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>2007-12-06  Xan Lopez  &lt;xan@gnome.org&gt;

        Reviewed by Alp Toker.

        http://bugs.webkit.org/show_bug.cgi?id=16329
        [GTK] Two small cleanups

        * WebCoreSupport/ChromeClientGtk.cpp:
        (WebKit::ChromeClient::createWindow):
        (WebKit::ChromeClient::addMessageToConsole):
        (WebKit::ChromeClient::runJavaScriptAlert):
        (WebKit::ChromeClient::runJavaScriptConfirm):
        (WebKit::ChromeClient::runJavaScriptPrompt):
        (WebKit::ChromeClient::setStatusbarText):
        (WebKit::ChromeClient::mouseDidMoveOverElement):
        (WebKit::ChromeClient::setToolTip):
        * WebCoreSupport/ChromeClientGtk.h:
        * WebView/webkitprivate.cpp:
        (WebKit::kit):
        s/m_webPage/m_webView/
        * WebView/webkitwebview.cpp:
        Chain up to the parent class to activate bindings instead
        of doing it explicitely.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebKitgtkChangeLog">trunk/WebKit/gtk/ChangeLog</a></li>
<li><a href="#trunkWebKitgtkWebCoreSupportChromeClientGtkcpp">trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp</a></li>
<li><a href="#trunkWebKitgtkWebCoreSupportChromeClientGtkh">trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h</a></li>
<li><a href="#trunkWebKitgtkWebViewwebkitprivatecpp">trunk/WebKit/gtk/WebView/webkitprivate.cpp</a></li>
<li><a href="#trunkWebKitgtkWebViewwebkitwebviewcpp">trunk/WebKit/gtk/WebView/webkitwebview.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebKitgtkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/gtk/ChangeLog (28489 => 28490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/gtk/ChangeLog        2007-12-06 20:02:21 UTC (rev 28489)
+++ trunk/WebKit/gtk/ChangeLog        2007-12-06 20:11:04 UTC (rev 28490)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2007-12-06  Xan Lopez  &lt;xan@gnome.org&gt;
+
+        Reviewed by Alp Toker.
+
+        http://bugs.webkit.org/show_bug.cgi?id=16329
+        [GTK] Two small cleanups
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::createWindow):
+        (WebKit::ChromeClient::addMessageToConsole):
+        (WebKit::ChromeClient::runJavaScriptAlert):
+        (WebKit::ChromeClient::runJavaScriptConfirm):
+        (WebKit::ChromeClient::runJavaScriptPrompt):
+        (WebKit::ChromeClient::setStatusbarText):
+        (WebKit::ChromeClient::mouseDidMoveOverElement):
+        (WebKit::ChromeClient::setToolTip):
+        * WebCoreSupport/ChromeClientGtk.h:
+        * WebView/webkitprivate.cpp:
+        (WebKit::kit):
+        s/m_webPage/m_webView/
+        * WebView/webkitwebview.cpp:
+        Chain up to the parent class to activate bindings instead
+        of doing it explicitely.
+
</ins><span class="cx"> 2007-12-06  Holger Hans Peter Freyther &lt;holger.freyther@trolltech.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Alp Toker.
</span></span></pre></div>
<a id="trunkWebKitgtkWebCoreSupportChromeClientGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp (28489 => 28490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp        2007-12-06 20:02:21 UTC (rev 28489)
+++ trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp        2007-12-06 20:11:04 UTC (rev 28490)
</span><span class="lines">@@ -43,8 +43,8 @@
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><del>-ChromeClient::ChromeClient(WebKitWebView* page)
-    : m_webPage(page)
</del><ins>+ChromeClient::ChromeClient(WebKitWebView* webView)
+    : m_webView(webView)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -93,11 +93,11 @@
</span><span class="cx">         return 0;
</span><span class="cx">     } else {
</span><span class="cx">         /* TODO: FrameLoadRequest is not used */
</span><del>-        WebKitWebView* page = WEBKIT_WEB_VIEW_GET_CLASS(m_webPage)-&gt;create_web_view(m_webPage);
-        if (!page)
</del><ins>+        WebKitWebView* webView = WEBKIT_WEB_VIEW_GET_CLASS(m_webView)-&gt;create_web_view(m_webView);
+        if (!webView)
</ins><span class="cx">             return 0;
</span><span class="cx"> 
</span><del>-        WebKitWebViewPrivate *privateData = WEBKIT_WEB_VIEW_GET_PRIVATE(WEBKIT_WEB_VIEW(page));
</del><ins>+        WebKitWebViewPrivate* privateData = WEBKIT_WEB_VIEW_GET_PRIVATE(webView);
</ins><span class="cx">         return privateData-&gt;corePage;
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -197,20 +197,20 @@
</span><span class="cx"> void ChromeClient::addMessageToConsole(const WebCore::String&amp; message, unsigned int lineNumber, const WebCore::String&amp; sourceId)
</span><span class="cx"> {
</span><span class="cx">     gboolean retval;
</span><del>-    g_signal_emit_by_name(m_webPage, &quot;console-message&quot;, message.utf8().data(), lineNumber, sourceId.utf8().data(), &amp;retval);
</del><ins>+    g_signal_emit_by_name(m_webView, &quot;console-message&quot;, message.utf8().data(), lineNumber, sourceId.utf8().data(), &amp;retval);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ChromeClient::runJavaScriptAlert(Frame* frame, const String&amp; message)
</span><span class="cx"> {
</span><span class="cx">     gboolean retval;
</span><del>-    g_signal_emit_by_name(m_webPage, &quot;script-alert&quot;, kit(frame), message.utf8().data(), &amp;retval);
</del><ins>+    g_signal_emit_by_name(m_webView, &quot;script-alert&quot;, kit(frame), message.utf8().data(), &amp;retval);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ChromeClient::runJavaScriptConfirm(Frame* frame, const String&amp; message)
</span><span class="cx"> {
</span><span class="cx">     gboolean retval;
</span><span class="cx">     gboolean didConfirm;
</span><del>-    g_signal_emit_by_name(m_webPage, &quot;script-confirm&quot;, kit(frame), message.utf8().data(), &amp;didConfirm, &amp;retval);
</del><ins>+    g_signal_emit_by_name(m_webView, &quot;script-confirm&quot;, kit(frame), message.utf8().data(), &amp;didConfirm, &amp;retval);
</ins><span class="cx">     return didConfirm == TRUE;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -218,7 +218,7 @@
</span><span class="cx"> {
</span><span class="cx">     gboolean retval;
</span><span class="cx">     gchar* value = 0;
</span><del>-    g_signal_emit_by_name(m_webPage, &quot;script-prompt&quot;, kit(frame), message.utf8().data(), defaultValue.utf8().data(), &amp;value, &amp;retval);
</del><ins>+    g_signal_emit_by_name(m_webView, &quot;script-prompt&quot;, kit(frame), message.utf8().data(), defaultValue.utf8().data(), &amp;value, &amp;retval);
</ins><span class="cx">     if (value) {
</span><span class="cx">         result = String::fromUTF8(value);
</span><span class="cx">         g_free(value);
</span><span class="lines">@@ -230,7 +230,7 @@
</span><span class="cx"> void ChromeClient::setStatusbarText(const String&amp; string)
</span><span class="cx"> {
</span><span class="cx">     CString stringMessage = string.utf8();
</span><del>-    g_signal_emit_by_name(m_webPage, &quot;status-bar-text-changed&quot;, stringMessage.data());
</del><ins>+    g_signal_emit_by_name(m_webView, &quot;status-bar-text-changed&quot;, stringMessage.data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ChromeClient::shouldInterruptJavaScript()
</span><span class="lines">@@ -274,11 +274,11 @@
</span><span class="cx">         if (!url.isEmpty() &amp;&amp; url != m_hoveredLinkURL) {
</span><span class="cx">             CString titleString = hit.title().utf8();
</span><span class="cx">             DeprecatedCString urlString = url.prettyURL().utf8();
</span><del>-            g_signal_emit_by_name(m_webPage, &quot;hovering-over-link&quot;, titleString.data(), urlString.data());
</del><ins>+            g_signal_emit_by_name(m_webView, &quot;hovering-over-link&quot;, titleString.data(), urlString.data());
</ins><span class="cx">             m_hoveredLinkURL = url;
</span><span class="cx">         }
</span><span class="cx">     } else if (!isLink &amp;&amp; !m_hoveredLinkURL.isEmpty()) {
</span><del>-        g_signal_emit_by_name(m_webPage, &quot;hovering-over-link&quot;, 0, 0);
</del><ins>+        g_signal_emit_by_name(m_webView, &quot;hovering-over-link&quot;, 0, 0);
</ins><span class="cx">         m_hoveredLinkURL = KURL();
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -287,9 +287,9 @@
</span><span class="cx"> {
</span><span class="cx"> #if GTK_CHECK_VERSION(2,12,0)
</span><span class="cx">     if (toolTip.isEmpty())
</span><del>-        g_object_set(G_OBJECT(m_webPage), &quot;has-tooltip&quot;, FALSE, NULL);
</del><ins>+        g_object_set(G_OBJECT(m_webView), &quot;has-tooltip&quot;, FALSE, NULL);
</ins><span class="cx">     else
</span><del>-        gtk_widget_set_tooltip_text(GTK_WIDGET(m_webPage), toolTip.utf8().data());
</del><ins>+        gtk_widget_set_tooltip_text(GTK_WIDGET(m_webView), toolTip.utf8().data());
</ins><span class="cx"> #else
</span><span class="cx">     // TODO: Support older GTK+ versions
</span><span class="cx">     // See http://bugs.webkit.org/show_bug.cgi?id=15793
</span></span></pre></div>
<a id="trunkWebKitgtkWebCoreSupportChromeClientGtkh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h (28489 => 28490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h        2007-12-06 20:02:21 UTC (rev 28489)
+++ trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h        2007-12-06 20:11:04 UTC (rev 28490)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">     class ChromeClient : public WebCore::ChromeClient {
</span><span class="cx">     public:
</span><span class="cx">         ChromeClient(WebKitWebView*);
</span><del>-        WebKitWebView* webPage() const { return m_webPage; }
</del><ins>+        WebKitWebView* webView() const { return m_webView; }
</ins><span class="cx"> 
</span><span class="cx">         virtual void chromeDestroyed();
</span><span class="cx"> 
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">         virtual unsigned long long requestQuotaIncreaseForDatabaseOperation(WebCore::Frame*, const WebCore::SecurityOriginData&amp;, const WebCore::String&amp;, unsigned long long);
</span><span class="cx"> 
</span><span class="cx">     private:
</span><del>-        WebKitWebView* m_webPage;
</del><ins>+        WebKitWebView* m_webView;
</ins><span class="cx">         WebCore::KURL m_hoveredLinkURL;
</span><span class="cx">     };
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebKitgtkWebViewwebkitprivatecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/gtk/WebView/webkitprivate.cpp (28489 => 28490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/gtk/WebView/webkitprivate.cpp        2007-12-06 20:02:21 UTC (rev 28489)
+++ trunk/WebKit/gtk/WebView/webkitprivate.cpp        2007-12-06 20:11:04 UTC (rev 28490)
</span><span class="lines">@@ -84,6 +84,6 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(corePage-&gt;chrome());
</span><span class="cx">     WebKit::ChromeClient* client = static_cast&lt;WebKit::ChromeClient*&gt;(corePage-&gt;chrome()-&gt;client());
</span><del>-    return client ? client-&gt;webPage() : 0;
</del><ins>+    return client ? client-&gt;webView() : 0;
</ins><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebKitgtkWebViewwebkitwebviewcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/gtk/WebView/webkitwebview.cpp (28489 => 28490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/gtk/WebView/webkitwebview.cpp        2007-12-06 20:02:21 UTC (rev 28489)
+++ trunk/WebKit/gtk/WebView/webkitwebview.cpp        2007-12-06 20:11:04 UTC (rev 28490)
</span><span class="lines">@@ -141,7 +141,8 @@
</span><span class="cx">         return TRUE;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return gtk_bindings_activate_event(GTK_OBJECT(widget), event);
</del><ins>+    /* Chain up to our parent class for binding activation */
+    return GTK_WIDGET_CLASS(webkit_web_view_parent_class)-&gt;key_press_event(widget, event);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static gboolean webkit_web_view_key_release_event(GtkWidget* widget, GdkEventKey* event)
</span><span class="lines">@@ -152,7 +153,8 @@
</span><span class="cx">     if (frame-&gt;eventHandler()-&gt;keyEvent(keyboardEvent))
</span><span class="cx">         return TRUE;
</span><span class="cx"> 
</span><del>-    return FALSE;
</del><ins>+    /* Chain up to our parent class for binding activation */
+    return GTK_WIDGET_CLASS(webkit_web_view_parent_class)-&gt;key_release_event(widget, event);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static gboolean webkit_web_view_button_press_event(GtkWidget* widget, GdkEventButton* event)
</span></span></pre>
</div>
</div>

</body>
</html>