~ubuntu-branches/ubuntu/lucid/webkit/lucid-security

« back to all changes in this revision

Viewing changes to WebKit/gtk/webkit/webkitwebframe.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-01-06 21:25:06 UTC
  • mfrom: (1.2.6 upstream) (4.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100106212506-gd0czn4zrwf1j19l
* New upstream release
- adds basic Content-Encoding support, thanks to soup
  (Closes: #529271)
- fixes over-advertising content types as supported by
  the media player (Closes: #559420)
* debian/control:
- updated libsoup build requirement (>= 2.28.2)
* debian/libwebkit-1.0-2.symbols:
- updated with new symbols
* debian/copyright:
- updated information since 1.1.17
* Imported patch from https://bugs.webkit.org/show_bug.cgi?id=30623
- I am shipping this patch because I believe it is correct, it is the
  way to go, it fixes a race, and it needs testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
#include "JSDOMBinding.h"
55
55
#include "ScriptController.h"
56
56
#include "SubstituteData.h"
 
57
#if ENABLE(SVG)
 
58
#include "SVGSMILElement.h"
 
59
#endif
57
60
 
58
61
#include <atk/atk.h>
59
62
#include <JavaScriptCore/APICast.h>
181
184
            g_cclosure_marshal_VOID__VOID,
182
185
            G_TYPE_NONE, 0);
183
186
 
 
187
    /**
 
188
     * WebKitWebFrame::load-done
 
189
     * @web_frame: the object on which the signal is emitted
 
190
     *
 
191
     * Emitted when frame loading is done.
 
192
     *
 
193
     * Deprecated: Use the "load-status" property instead.
 
194
     */
184
195
    webkit_web_frame_signals[LOAD_COMMITTED] = g_signal_new("load-committed",
185
196
            G_TYPE_FROM_CLASS(frameClass),
186
197
            (GSignalFlags)G_SIGNAL_RUN_LAST,
196
207
     *
197
208
     * Emitted when frame loading is done.
198
209
     *
199
 
     * Deprecated: Use WebKitWebView::load-finished instead, and/or
 
210
     * Deprecated: Use the "load-status" property instead, and/or
200
211
     * WebKitWebView::load-error to be notified of load errors
201
212
     */
202
213
    webkit_web_frame_signals[LOAD_DONE] = g_signal_new("load-done",
209
220
            G_TYPE_NONE, 1,
210
221
            G_TYPE_BOOLEAN);
211
222
 
 
223
    /**
 
224
     * WebKitWebFrame::title-changed:
 
225
     * @frame: the object on which the signal is emitted
 
226
     * @title: the new title
 
227
     *
 
228
     * When a #WebKitWebFrame changes the document title this signal is emitted.
 
229
     *
 
230
     * Deprecated: 1.1.18: Use "notify::title" instead.
 
231
     */
212
232
    webkit_web_frame_signals[TITLE_CHANGED] = g_signal_new("title-changed",
213
233
            G_TYPE_FROM_CLASS(frameClass),
214
234
            (GSignalFlags)G_SIGNAL_RUN_LAST,
959
979
    return core(frame)->animation()->pauseTransitionAtTime(coreElement->renderer(), AtomicString(name), time);
960
980
}
961
981
 
 
982
bool webkit_web_frame_pause_svg_animation(WebKitWebFrame* frame, const gchar* animationId, double time, const gchar* elementId)
 
983
{
 
984
    ASSERT(core(frame));
 
985
#if ENABLE(SVG)
 
986
    Document* document = core(frame)->document();
 
987
    if (!document || !document->svgExtensions())
 
988
        return false;
 
989
    Element* coreElement = document->getElementById(AtomicString(animationId));
 
990
    if (!coreElement || !SVGSMILElement::isSMILElement(coreElement))
 
991
        return false;
 
992
    return document->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreElement), time);
 
993
#else
 
994
    return false;
 
995
#endif
 
996
}
 
997
 
962
998
unsigned int webkit_web_frame_number_of_active_animations(WebKitWebFrame* frame)
963
999
{
964
1000
    Frame* coreFrame = core(frame);
1124
1160
 
1125
1161
    view->layout();
1126
1162
}
 
1163
 
 
1164
/**
 
1165
 * webkit_web_frame_get_network_response:
 
1166
 * @frame: a #WebKitWebFrame
 
1167
 *
 
1168
 * Returns a #WebKitNetworkResponse object representing the response
 
1169
 * that was given to the request for the given frame, or NULL if the
 
1170
 * frame was not created by a load. You must unref the object when you
 
1171
 * are done with it.
 
1172
 *
 
1173
 * Return value: a #WebKitNetworkResponse object
 
1174
 *
 
1175
 * Since: 1.1.18
 
1176
 */
 
1177
WebKitNetworkResponse* webkit_web_frame_get_network_response(WebKitWebFrame* frame)
 
1178
{
 
1179
    Frame* coreFrame = core(frame);
 
1180
    if (!coreFrame)
 
1181
        return NULL;
 
1182
 
 
1183
    WebCore::DocumentLoader* loader = coreFrame->loader()->activeDocumentLoader();
 
1184
    if (!loader)
 
1185
        return NULL;
 
1186
 
 
1187
    return webkit_network_response_new_with_core_response(loader->response());
 
1188
}