summaryrefslogtreecommitdiff
path: root/Source/WebKit/gtk
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-15 16:08:57 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-15 16:08:57 +0200
commit5466563f4b5b6b86523e3f89bb7f77e5b5270c78 (patch)
tree8caccf7cd03a15207cde3ba282c88bf132482a91 /Source/WebKit/gtk
parent33b26980cb24288b5a9f2590ccf32a949281bb79 (diff)
downloadqtwebkit-5466563f4b5b6b86523e3f89bb7f77e5b5270c78.tar.gz
Imported WebKit commit 0dc6cd75e1d4836eaffbb520be96fac4847cc9d2 (http://svn.webkit.org/repository/webkit/trunk@131300)
WebKit update which introduces the QtWebKitWidgets module that contains the WK1 widgets based API. (In fact it renames QtWebKit to QtWebKitWidgets while we're working on completing the entire split as part of https://bugs.webkit.org/show_bug.cgi?id=99314
Diffstat (limited to 'Source/WebKit/gtk')
-rw-r--r--Source/WebKit/gtk/ChangeLog296
-rw-r--r--Source/WebKit/gtk/GNUmakefile.am3
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h7
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextCairo.cpp10
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp6
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp78
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp11
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h1
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp9
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp4
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h1
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp7
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h1
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp4
-rw-r--r--Source/WebKit/gtk/webkit/webkitdownload.cpp33
-rw-r--r--Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp7
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebdatasource.cpp3
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebplugin.cpp6
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebview.cpp34
22 files changed, 420 insertions, 107 deletions
diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog
index cef16d151..986e4b1d3 100644
--- a/Source/WebKit/gtk/ChangeLog
+++ b/Source/WebKit/gtk/ChangeLog
@@ -1,3 +1,299 @@
+2012-10-10 Brady Eidson <beidson@apple.com>
+
+ Switch ResourceLoader::resourceData() from SharedBuffer to ResourceBuffer
+ https://bugs.webkit.org/show_bug.cgi?id=98976
+
+ Reviewed by Anders Carlsson.
+
+ * webkit/webkitwebdatasource.cpp:
+ (webkit_web_data_source_get_data):
+
+2012-10-10 Jon Lee <jonlee@apple.com>
+
+ [WK2] Activate plugins when user clicks on snapshot
+ https://bugs.webkit.org/show_bug.cgi?id=98328
+ <rdar://problem/12426681>
+
+ Reviewed by Brady Eidson.
+
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+ (WebKit::FrameLoaderClient::recreatePlugin): Stub implementation of recreatePlugin().
+
+2012-10-10 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r130853.
+ http://trac.webkit.org/changeset/130853
+ https://bugs.webkit.org/show_bug.cgi?id=98873
+
+ The rollout was incorrect (Requested by zdobersek on #webkit).
+
+ * webkit/webkitwebview.cpp:
+ (resizeWebViewFromAllocation):
+ (webkit_web_view_size_allocate):
+ (webkitWebViewMap):
+
+2012-10-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r130838.
+ http://trac.webkit.org/changeset/130838
+ https://bugs.webkit.org/show_bug.cgi?id=98860
+
+ The patch is causing X errors (=> crashes) on GTK 64-bit
+ Release builder (Requested by zdobersek on #webkit).
+
+ * webkit/webkitwebview.cpp:
+ (resizeWebViewFromAllocation):
+ (webkit_web_view_size_allocate):
+ (webkitWebViewMap):
+
+2012-10-09 Daniel Drake <dsd@laptop.org>
+
+ [GTK] Plugins don't display
+ https://bugs.webkit.org/show_bug.cgi?id=98789
+
+ Reviewed by Martin Robinson.
+
+ Fix a recent regression where plugin content was not being displayed.
+ Bringing webkit_web_view_size_allocate in line with the WebKit2
+ equivalent solves the issue.
+
+ * webkit/webkitwebview.cpp:
+ (resizeWebViewFromAllocation): pass allocation request to children
+ even when the allocation size does not change.
+ (webkit_web_view_size_allocate): don't bail too early if the
+ allocation size does not change.
+
+2012-10-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Rename first/second to key/value in HashMap iterators
+ https://bugs.webkit.org/show_bug.cgi?id=82784
+
+ Reviewed by Eric Seidel.
+
+ * WebCoreSupport/PlatformStrategiesGtk.cpp:
+ (PlatformStrategiesGtk::getPluginInfo):
+ * webkit/webkitfavicondatabase.cpp:
+ (webkitFaviconDatabaseImportFinished):
+ * webkit/webkitwebplugin.cpp:
+ (webkit_web_plugin_get_mimetypes):
+
+2012-10-04 Simon Fraser <simon.fraser@apple.com>
+
+ Final part of "sync" to "flush" renaming
+ https://bugs.webkit.org/show_bug.cgi?id=98430
+
+ Reviewed by Tim Horton.
+
+ Change method names on GraphicsLayer and GraphicsLayerClient that
+ refer to "sync" to use the term "flush" instead, to be consistent
+ with the rest of the code.
+
+ * WebCoreSupport/AcceleratedCompositingContext.h:
+ (AcceleratedCompositingContext):
+ * WebCoreSupport/AcceleratedCompositingContextCairo.cpp:
+ (WebKit::AcceleratedCompositingContext::attachRootGraphicsLayer):
+ (WebKit::AcceleratedCompositingContext::resizeRootLayer):
+ (WebKit::AcceleratedCompositingContext::syncLayersNow):
+ (WebKit::AcceleratedCompositingContext::notifyFlushRequired):
+ * WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
+ (WebKit::AcceleratedCompositingContext::flushPendingLayerChanges):
+ (WebKit::AcceleratedCompositingContext::notifyFlushRequired):
+ * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
+ (WebKit::AcceleratedCompositingContext::flushPendingLayerChanges):
+ (WebKit::AcceleratedCompositingContext::notifyFlushRequired):
+
+2012-10-04 Simon Fraser <simon.fraser@apple.com>
+
+ Standardize on "flush" terminology for compositing layer flushing/syncing
+ https://bugs.webkit.org/show_bug.cgi?id=98321
+
+ Reviewed by Simon Fraser.
+
+ Rename compositing-related methods that refer to "syncing" to instead
+ refer to "flushing".
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::scheduleCompositingLayerFlush):
+ * WebCoreSupport/ChromeClientGtk.h:
+ (ChromeClient):
+
+2012-10-02 Anders Carlsson <andersca@apple.com>
+
+ Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory
+ https://bugs.webkit.org/show_bug.cgi?id=98217
+
+ Reviewed by Andreas Kling.
+
+ * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
+ (WebKit::AcceleratedCompositingContext::initialize):
+
+2012-10-02 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add API to get the web view that initiated a custom URI request to WebKit2 GTK+
+ https://bugs.webkit.org/show_bug.cgi?id=97895
+
+ Reviewed by Martin Robinson.
+
+ * WebCoreSupport/FrameNetworkingContextGtk.cpp:
+ (WebKit::FrameNetworkingContextGtk::initiatingPageID): Stub
+ implementation.
+ * WebCoreSupport/FrameNetworkingContextGtk.h:
+ (FrameNetworkingContextGtk): Added.
+
+2012-10-02 Adrian Perez de Castro <aperez@igalia.com>
+
+ [GTK] Value not returned warning with geolocation disabled
+ https://bugs.webkit.org/show_bug.cgi?id=98148
+
+ Reviewed by Xan Lopez.
+
+ With geolocation disabled in the build, return a sensible value from
+ DumpRenderTreeSupportGtk::numberOfPendingGeolocationPermissionRequests.
+ This also avoids a compiler warning.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::numberOfPendingGeolocationPermissionRequests):
+
+2012-10-01 Brady Eidson <beidson@apple.com>
+
+ Remove the Safari 2 -> Safari 3 icon database import code.
+ https://bugs.webkit.org/show_bug.cgi?id=98113
+
+ Reviewed by Maciej Stachowiak.
+
+ Nuke the performImport() IconDatabaseClient method.
+
+ * webkit/webkitfavicondatabase.cpp:
+ (IconDatabaseClientGtk):
+
+2012-10-01 Arnaud Renevier <a.renevier@sisa.samsung.com>
+
+ [Gtk] crash when accelerated composition is turned off
+ https://bugs.webkit.org/show_bug.cgi?id=98099
+
+ Reviewed by Martin Robinson.
+
+ frame->view()->updateLayoutAndStyleIfNeededRecursive() may reset root
+ compositing layer in flushAndRenderLayers. So, we check if compositing
+ is enabled afterwards, and return if it is not.
+
+ This bug is handled by LayoutTests/compositing/toggle-compositing.html
+
+ * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
+ (WebKit::AcceleratedCompositingContext::flushAndRenderLayers):
+
+2012-10-01 Claudio Saavedra <csaavedra@igalia.com>
+
+ [GTK] Save original uri for downloaded files
+ https://bugs.webkit.org/show_bug.cgi?id=95188
+
+ Reviewed by Carlos Garcia Campos.
+
+ gvfs stores metadata locally, and this information can later be
+ used by file management applications. Based on a patch by
+ Alexander Larsson <alexl@redhat.com>.
+
+ * webkit/webkitdownload.cpp:
+ (webkit_download_open_stream_for_uri): Save the download-uri as
+ file metadata.
+
+2012-10-01 Claudio Saavedra <csaavedra@igalia.com>
+
+ [GTK] WebKitDownload: use more of GOwnPtr/GRefPtr
+ https://bugs.webkit.org/show_bug.cgi?id=98009
+
+ Reviewed by Carlos Garcia Campos.
+
+ Use more GOwnPtr/GRefPtr in WebKitDownload
+
+ * webkit/webkitdownload.cpp:
+ (webkit_download_open_stream_for_uri): Use GRefPtr
+ for a GFile and GOwnPtr for GError.
+ (webkit_download_set_destination_uri): Ditto.
+ (webkit_download_received_data): Use GOwnPtr for GError.
+
+2012-09-28 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ Code inside FrameLoaderClient::canShowMIMEType() implementations can be shared among different WK ports
+ https://bugs.webkit.org/show_bug.cgi?id=97547
+
+ Reviewed by Adam Barth.
+
+ Newly added WebCore::MIMETypeRegistry::canShowMIMEType() function is used
+ inside WebKit::FrameLoaderClient::canShowMIMEType().
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::canShowMIMEType):
+
+2012-09-28 Huang Dongsung <luxtella@company100.net>
+
+ [GTK] Enable CSS Shaders layout LayoutTests on GTK+
+ https://bugs.webkit.org/show_bug.cgi?id=97821
+
+ Reviewed by Martin Robinson.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::setCSSCustomFilterEnabled): Pass through to Settings object.
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-09-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ Unify event handling of middle mouse button.
+ https://bugs.webkit.org/show_bug.cgi?id=97690
+
+ Reviewed by Tony Chang.
+
+ Remove port specific handling of middle mouse button press.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::supportsGlobalSelection):
+ * WebCoreSupport/EditorClientGtk.h:
+ (EditorClient):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_button_press_event):
+
+2012-09-26 Gustavo Noronha Silva <gns@gnome.org>
+
+ Unreviewed build fix after 129707.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_forward_context_menu_event):
+
+2012-09-26 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Use XDamage to simplify RedirectedXCompositeWindow
+ https://bugs.webkit.org/show_bug.cgi?id=97267
+
+ Reviewed by Alejandro G. Castro.
+
+ Use XDamage to queue redraws of the widget when redirecting accelerated compositing
+ to an offscreen window. This allows removing a finicky timer-based approach, improves
+ performance, and allows simplifying things greatly.
+
+ * GNUmakefile.am: Add the XDamage CFLAGS and LIBS.
+ * WebCoreSupport/AcceleratedCompositingContext.h:
+ (AcceleratedCompositingContext): Change the signature of compositeLayersToContext
+ to accept an enum that explains the composite purpose.
+ * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
+ (WebKit::redirectedWindowDamagedCallback): Added.
+ (WebKit::AcceleratedCompositingContext::initialize): Handle the situation where
+ the RedirectedXCompositeWindow returns a null pointer.
+ (WebKit::AcceleratedCompositingContext::enabled): Ditto.
+ (WebKit::AcceleratedCompositingContext::renderLayersToWindow): Remove the code handling
+ the usable size of the RedirectedXCompositeWindow. The usable size is now always equal
+ to the size.
+ (WebKit::AcceleratedCompositingContext::compositeLayersToContext): When drawing for a
+ resize, first clear the entire context. Remove the double swap-buffer, as it's no
+ longer necessary.
+ (WebKit::AcceleratedCompositingContext::setRootCompositingLayer): Handle the case that
+ the redirected window is null.
+ (WebKit::AcceleratedCompositingContext::resizeRootLayer): Instead of doing another
+ immediate layer flush, just recomposite the current layer state and schedule a new
+ flush. This should make resizing faster.
+ (WebKit::AcceleratedCompositingContext::flushAndRenderLayers): We no longer need to
+ queue a redraw, unless we want to force one.
+
2012-09-26 Zan Dobersek <zandobersek@gmail.com>
[GTK] Enable some of the unstable CSS features
diff --git a/Source/WebKit/gtk/GNUmakefile.am b/Source/WebKit/gtk/GNUmakefile.am
index db6c9b0bc..5be9eb548 100644
--- a/Source/WebKit/gtk/GNUmakefile.am
+++ b/Source/WebKit/gtk/GNUmakefile.am
@@ -66,6 +66,8 @@ libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPF
$(LIBXSLT_CFLAGS) \
$(SQLITE3_CFLAGS) \
$(UNICODE_CFLAGS) \
+ $(XCOMPOSITE_LIBS) \
+ $(XDAMAGE_LIBS) \
$(XT_CFLAGS) \
$(ZLIB_CFLAGS)
@@ -102,6 +104,7 @@ libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBA
$(SQLITE3_LIBS) \
$(UNICODE_LIBS) \
$(XCOMPOSITE_LIBS) \
+ $(XDAMAGE_LIBS) \
$(XRENDER_LIBS) \
$(XT_LIBS) \
$(WINMM_LIBS) \
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
index 45ef470b6..6572ea5ea 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
@@ -58,13 +58,16 @@ public:
// GraphicsLayerClient
virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
- virtual void notifySyncRequired(const WebCore::GraphicsLayer*);
+ virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& rectToPaint);
virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
void initialize();
- void compositeLayersToContext();
+
+ enum CompositePurpose { ForResize, NotForResize };
+ void compositeLayersToContext(CompositePurpose = NotForResize);
+
void flushAndRenderLayers();
bool flushPendingLayerChanges();
void scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextCairo.cpp b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextCairo.cpp
index 881132a7d..378903426 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextCairo.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextCairo.cpp
@@ -89,7 +89,7 @@ void AcceleratedCompositingContext::attachRootGraphicsLayer(GraphicsLayer* graph
m_textureMapper = TextureMapperImageBuffer::create();
m_rootTextureMapperLayer->setTextureMapper(m_textureMapper.get());
- m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
+ m_rootGraphicsLayer->flushCompositingStateForThisLayerOnly();
}
void AcceleratedCompositingContext::scheduleRootLayerRepaint(const IntRect& rect)
@@ -110,7 +110,7 @@ void AcceleratedCompositingContext::resizeRootLayer(const IntSize& size)
if (!m_rootGraphicsLayer)
return;
m_rootGraphicsLayer->setSize(size);
- m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
+ m_rootGraphicsLayer->flushCompositingStateForThisLayerOnly();
}
static gboolean syncLayersTimeoutCallback(AcceleratedCompositingContext* context)
@@ -135,9 +135,9 @@ void AcceleratedCompositingContext::syncLayersNow()
core(m_webView)->mainFrame()->view()->layout();
if (m_rootGraphicsLayer)
- m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
+ m_rootGraphicsLayer->flushCompositingStateForThisLayerOnly();
- core(m_webView)->mainFrame()->view()->syncCompositingStateIncludingSubframes();
+ core(m_webView)->mainFrame()->view()->flushCompositingStateIncludingSubframes();
}
void AcceleratedCompositingContext::syncLayersTimeout()
@@ -158,7 +158,7 @@ void AcceleratedCompositingContext::notifyAnimationStarted(const GraphicsLayer*,
{
}
-void AcceleratedCompositingContext::notifySyncRequired(const GraphicsLayer*)
+void AcceleratedCompositingContext::notifyFlushRequired(const GraphicsLayer*)
{
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
index c523bb545..87ceb6ea0 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
@@ -136,9 +136,9 @@ void AcceleratedCompositingContext::scheduleLayerFlush()
bool AcceleratedCompositingContext::flushPendingLayerChanges()
{
if (m_rootGraphicsLayer)
- m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
+ m_rootGraphicsLayer->flushCompositingStateForThisLayerOnly();
- return core(m_webView)->mainFrame()->view()->syncCompositingStateIncludingSubframes();
+ return core(m_webView)->mainFrame()->view()->flushCompositingStateIncludingSubframes();
}
void AcceleratedCompositingContext::flushAndRenderLayers()
@@ -155,7 +155,7 @@ void AcceleratedCompositingContext::notifyAnimationStarted(const WebCore::Graphi
{
ASSERT_NOT_REACHED();
}
-void AcceleratedCompositingContext::notifySyncRequired(const WebCore::GraphicsLayer*)
+void AcceleratedCompositingContext::notifyFlushRequired(const WebCore::GraphicsLayer*)
{
ASSERT_NOT_REACHED();
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
index 95da644e3..efc206193 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
@@ -63,23 +63,32 @@ static IntSize getWebViewSize(WebKitWebView* webView)
return IntSize(allocation.width, allocation.height);
}
+void redirectedWindowDamagedCallback(void* data)
+{
+ gtk_widget_queue_draw(GTK_WIDGET(data));
+}
+
void AcceleratedCompositingContext::initialize()
{
if (m_rootLayer)
return;
IntSize pageSize = getWebViewSize(m_webView);
- if (!m_redirectedWindow)
- m_redirectedWindow = RedirectedXCompositeWindow::create(pageSize);
- else
+ if (!m_redirectedWindow) {
+ if (m_redirectedWindow = RedirectedXCompositeWindow::create(pageSize))
+ m_redirectedWindow->setDamageNotifyCallback(redirectedWindowDamagedCallback, m_webView);
+ } else
m_redirectedWindow->resize(pageSize);
- m_rootLayer = GraphicsLayer::create(this);
+ if (!m_redirectedWindow)
+ return;
+
+ m_rootLayer = GraphicsLayer::create(0, this);
m_rootLayer->setDrawsContent(false);
m_rootLayer->setSize(pageSize);
// The non-composited contents are a child of the root layer.
- m_nonCompositedContentLayer = GraphicsLayer::create(this);
+ m_nonCompositedContentLayer = GraphicsLayer::create(0, this);
m_nonCompositedContentLayer->setDrawsContent(true);
m_nonCompositedContentLayer->setContentsOpaque(!m_webView->priv->transparent);
m_nonCompositedContentLayer->setSize(pageSize);
@@ -120,7 +129,7 @@ void AcceleratedCompositingContext::stopAnyPendingLayerFlush()
bool AcceleratedCompositingContext::enabled()
{
- return m_rootLayer && m_textureMapper;
+ return m_redirectedWindow && m_rootLayer && m_textureMapper;
}
bool AcceleratedCompositingContext::renderLayersToWindow(cairo_t* cr, const IntRect& clipRect)
@@ -130,19 +139,6 @@ bool AcceleratedCompositingContext::renderLayersToWindow(cairo_t* cr, const IntR
if (!enabled())
return false;
- // It's important to paint a white background (if the WebView isn't transparent), because when growing
- // the redirected window, the usable size of the window may be smaller than the allocation of our widget.
- // We don't want to show artifacts in that case.
- IntSize usableWindowSize = m_redirectedWindow->usableSize();
- if (usableWindowSize != m_redirectedWindow->size()) {
- if (!m_webView->priv->transparent) {
- cairo_set_source_rgb(cr, 1, 1, 1);
- cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
- } else
- cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
- cairo_paint(cr);
- }
-
cairo_surface_t* windowSurface = m_redirectedWindow->cairoSurfaceForWidget(GTK_WIDGET(m_webView));
if (!windowSurface)
return true;
@@ -176,7 +172,7 @@ GLContext* AcceleratedCompositingContext::prepareForRendering()
return context;
}
-void AcceleratedCompositingContext::compositeLayersToContext()
+void AcceleratedCompositingContext::compositeLayersToContext(CompositePurpose purpose)
{
GLContext* context = prepareForRendering();
if (!context)
@@ -185,21 +181,16 @@ void AcceleratedCompositingContext::compositeLayersToContext()
const IntSize& windowSize = m_redirectedWindow->size();
glViewport(0, 0, windowSize.width(), windowSize.height());
+ if (purpose == ForResize) {
+ glClearColor(1, 1, 1, 0);
+ glClear(GL_COLOR_BUFFER_BIT);
+ }
+
m_textureMapper->beginPainting();
toTextureMapperLayer(m_rootLayer.get())->paint();
m_textureMapper->endPainting();
context->swapBuffers();
-
- // FIXME: It seems that when using double-buffering (and on some drivers single-buffering)
- // and XComposite window redirection, two swap buffers are required to force the pixmap
- // to update. This isn't a problem during animations, because swapBuffer is continuously
- // called. For non-animation situations we use this terrible hack until we can get to the
- // bottom of the issue.
- if (!toTextureMapperLayer(m_rootLayer.get())->descendantsOrSelfHaveRunningAnimations()) {
- context->swapBuffers();
- context->swapBuffers();
- }
}
void AcceleratedCompositingContext::clearEverywhere()
@@ -236,7 +227,8 @@ void AcceleratedCompositingContext::setRootCompositingLayer(GraphicsLayer* graph
stopAnyPendingLayerFlush();
// Shrink the offscreen window to save memory while accelerated compositing is turned off.
- m_redirectedWindow->resize(IntSize(1, 1));
+ if (m_redirectedWindow)
+ m_redirectedWindow->resize(IntSize(1, 1));
m_rootLayer = nullptr;
m_nonCompositedContentLayer = nullptr;
m_textureMapper = nullptr;
@@ -245,6 +237,9 @@ void AcceleratedCompositingContext::setRootCompositingLayer(GraphicsLayer* graph
// Add the accelerated layer tree hierarchy.
initialize();
+ if (!m_redirectedWindow)
+ return;
+
m_nonCompositedContentLayer->removeAllChildren();
m_nonCompositedContentLayer->addChild(graphicsLayer);
@@ -295,7 +290,8 @@ void AcceleratedCompositingContext::resizeRootLayer(const IntSize& newSize)
m_nonCompositedContentLayer->setNeedsDisplayInRect(FloatRect(0, oldSize.height(), newSize.width(), newSize.height() - oldSize.height()));
m_nonCompositedContentLayer->setNeedsDisplayInRect(IntRect(IntPoint(), newSize));
- flushAndRenderLayers();
+ compositeLayersToContext(ForResize);
+ scheduleLayerFlush();
}
void AcceleratedCompositingContext::scrollNonCompositedContents(const IntRect& scrollRect, const IntSize& scrollOffset)
@@ -326,9 +322,9 @@ void AcceleratedCompositingContext::scheduleLayerFlush()
bool AcceleratedCompositingContext::flushPendingLayerChanges()
{
- m_rootLayer->syncCompositingStateForThisLayerOnly();
- m_nonCompositedContentLayer->syncCompositingStateForThisLayerOnly();
- return core(m_webView)->mainFrame()->view()->syncCompositingStateIncludingSubframes();
+ m_rootLayer->flushCompositingStateForThisLayerOnly();
+ m_nonCompositedContentLayer->flushCompositingStateForThisLayerOnly();
+ return core(m_webView)->mainFrame()->view()->flushCompositingStateIncludingSubframes();
}
void AcceleratedCompositingContext::flushAndRenderLayers()
@@ -341,6 +337,9 @@ void AcceleratedCompositingContext::flushAndRenderLayers()
return;
frame->view()->updateLayoutAndStyleIfNeededRecursive();
+ if (!enabled())
+ return;
+
GLContext* context = m_redirectedWindow->context();
if (context && !context->makeContextCurrent())
return;
@@ -351,14 +350,13 @@ void AcceleratedCompositingContext::flushAndRenderLayers()
m_lastFlushTime = currentTime();
compositeLayersToContext();
- gtk_widget_queue_draw(GTK_WIDGET(m_webView));
-
// If it's been a long time since we've actually painted, which means that events might
// be starving the main loop, we should force a draw now. This seems to prevent display
// lag on http://2012.beercamp.com.
- if (m_redrawPendingTime && currentTime() - m_redrawPendingTime > gScheduleDelay)
+ if (m_redrawPendingTime && currentTime() - m_redrawPendingTime > gScheduleDelay) {
+ gtk_widget_queue_draw(GTK_WIDGET(m_webView));
gdk_window_process_updates(gtk_widget_get_window(GTK_WIDGET(m_webView)), FALSE);
- else if (!m_redrawPendingTime)
+ } else if (!m_redrawPendingTime)
m_redrawPendingTime = currentTime();
}
@@ -372,7 +370,7 @@ void AcceleratedCompositingContext::notifyAnimationStarted(const GraphicsLayer*,
{
}
-void AcceleratedCompositingContext::notifySyncRequired(const GraphicsLayer*)
+void AcceleratedCompositingContext::notifyFlushRequired(const GraphicsLayer*)
{
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index 3523fa78d..6152f5080 100644
--- a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -1014,7 +1014,7 @@ void ChromeClient::setNeedsOneShotDrawingSynchronization()
m_webView->priv->acceleratedCompositingContext->scheduleLayerFlush();
}
-void ChromeClient::scheduleCompositingLayerSync()
+void ChromeClient::scheduleCompositingLayerFlush()
{
m_webView->priv->acceleratedCompositingContext->scheduleLayerFlush();
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
index 284bdaa36..44c211ad4 100644
--- a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
@@ -156,7 +156,7 @@ namespace WebKit {
#if USE(ACCELERATED_COMPOSITING)
virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);
virtual void setNeedsOneShotDrawingSynchronization();
- virtual void scheduleCompositingLayerSync();
+ virtual void scheduleCompositingLayerFlush();
virtual CompositingTriggerFlags allowedCompositingTriggers() const;
#endif
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
index ba5053452..a37f83e14 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
@@ -208,7 +208,7 @@ void DumpRenderTreeSupportGtk::addUserStyleSheet(WebKitWebFrame* frame, const ch
WebKitWebView* webView = getViewFromFrame(frame);
Page* page = core(webView);
- page->group().addUserStyleSheetToWorld(mainThreadNormalWorld(), sourceCode, KURL(), nullptr, nullptr, allFrames ? InjectInAllFrames : InjectInTopFrameOnly);
+ page->group().addUserStyleSheetToWorld(mainThreadNormalWorld(), sourceCode, KURL(), Vector<String>(), Vector<String>(), allFrames ? InjectInAllFrames : InjectInTopFrameOnly);
}
/**
@@ -673,6 +673,8 @@ int DumpRenderTreeSupportGtk::numberOfPendingGeolocationPermissionRequests(WebKi
#if ENABLE(GEOLOCATION)
GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(GeolocationController::from(core(webView))->client());
return mock->numberOfPendingPermissionRequests();
+#else
+ return 0;
#endif
}
@@ -691,6 +693,13 @@ void DumpRenderTreeSupportGtk::setCSSRegionsEnabled(WebKitWebView* webView, bool
core(webView)->settings()->setCSSRegionsEnabled(enabled);
}
+void DumpRenderTreeSupportGtk::setCSSCustomFilterEnabled(WebKitWebView* webView, bool enabled)
+{
+#if ENABLE(CSS_SHADERS)
+ core(webView)->settings()->setCSSCustomFilterEnabled(enabled);
+#endif
+}
+
void DumpRenderTreeSupportGtk::setShadowDOMEnabled(bool enabled)
{
#if ENABLE(SHADOW_DOM)
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
index 3f7087cd4..d142bd9c1 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
@@ -118,6 +118,7 @@ public:
static void setPageCacheSupportsPlugins(WebKitWebView*, bool enabled);
static void setCSSGridLayoutEnabled(WebKitWebView*, bool enabled);
static void setCSSRegionsEnabled(WebKitWebView*, bool enabled);
+ static void setCSSCustomFilterEnabled(WebKitWebView*, bool enabled);
static void setShadowDOMEnabled(bool);
static void setStyleScopedEnabled(bool);
diff --git a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index 5e4b57848..1b90182c3 100644
--- a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -560,4 +560,13 @@ bool EditorClient::spellingUIIsShowing()
return false;
}
+bool EditorClient::supportsGlobalSelection()
+{
+#if PLATFORM(X11)
+ return true;
+#else
+ return false;
+#endif
+}
+
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index a1acaa896..aa4fc0ad0 100644
--- a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -134,6 +134,8 @@ class EditorClient : public WebCore::EditorClient {
virtual bool shouldShowUnicodeMenu();
+ virtual bool supportsGlobalSelection() OVERRIDE;
+
private:
#if ENABLE(SPELLCHECK)
TextCheckerClientGtk m_textCheckerClient;
diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index d363faf2e..085f41c6a 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -897,9 +897,7 @@ bool FrameLoaderClient::canShowMIMETypeAsHTML(const String& MIMEType) const
bool FrameLoaderClient::canShowMIMEType(const String& type) const
{
- return (MIMETypeRegistry::isSupportedImageMIMEType(type)
- || MIMETypeRegistry::isSupportedNonImageMIMEType(type)
- || MIMETypeRegistry::isSupportedMediaMIMEType(type)
+ return (MIMETypeRegistry::canShowMIMEType(type)
|| PluginDatabase::installedPlugins()->isMIMETypeRegistered(type));
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
index f6e3d4f6e..f9db7baab 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
@@ -114,6 +114,7 @@ namespace WebKit {
virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const WTF::Vector<WTF::String>&, const WTF::Vector<WTF::String>&, const WTF::String&, bool);
+ virtual void recreatePlugin(WebCore::Widget*) { }
virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget);
virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues);
virtual WTF::String overrideMediaType() const;
diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp
index 4b9d12491..1c15a8462 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "FrameNetworkingContextGtk.h"
+#include "NotImplemented.h"
#include "ResourceHandle.h"
using namespace WebCore;
@@ -32,4 +33,10 @@ SoupSession* FrameNetworkingContextGtk::soupSession() const
return ResourceHandle::defaultSession();
}
+uint64_t FrameNetworkingContextGtk::initiatingPageID() const
+{
+ notImplemented();
+ return 0;
+}
+
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h b/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h
index a59a94099..cada19b9c 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h
@@ -33,6 +33,7 @@ public:
WebCore::Frame* coreFrame() const { return frame(); }
virtual SoupSession* soupSession() const;
+ virtual uint64_t initiatingPageID() const;
private:
FrameNetworkingContextGtk(WebCore::Frame* frame)
diff --git a/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp
index 292173ae2..9103c8460 100644
--- a/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp
@@ -88,8 +88,8 @@ void PlatformStrategiesGtk::getPluginInfo(const Page* page, Vector<PluginInfo>&
MIMEToDescriptionsMap::const_iterator end = mimeToDescriptions.end();
for (MIMEToDescriptionsMap::const_iterator it = mimeToDescriptions.begin(); it != end; ++it) {
MimeClassInfo mime;
- mime.type = it->first;
- mime.desc = it->second;
+ mime.type = it->key;
+ mime.desc = it->value;
mime.extensions = package->mimeToExtensions().get(mime.type);
pluginInfo.mimes.append(mime);
}
diff --git a/Source/WebKit/gtk/webkit/webkitdownload.cpp b/Source/WebKit/gtk/webkit/webkitdownload.cpp
index e698ed505..cfcd3357c 100644
--- a/Source/WebKit/gtk/webkit/webkitdownload.cpp
+++ b/Source/WebKit/gtk/webkit/webkitdownload.cpp
@@ -38,6 +38,7 @@
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
#include <wtf/Noncopyable.h>
+#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
@@ -459,22 +460,23 @@ static gboolean webkit_download_open_stream_for_uri(WebKitDownload* download, co
g_return_val_if_fail(uri, FALSE);
WebKitDownloadPrivate* priv = download->priv;
- GFile* file = g_file_new_for_uri(uri);
- GError* error = NULL;
+ GRefPtr<GFile> file = adoptGRef(g_file_new_for_uri(uri));
+ GOwnPtr<GError> error;
if (append)
- priv->outputStream = g_file_append_to(file, G_FILE_CREATE_NONE, NULL, &error);
+ priv->outputStream = g_file_append_to(file.get(), G_FILE_CREATE_NONE, NULL, &error.outPtr());
else
- priv->outputStream = g_file_replace(file, NULL, TRUE, G_FILE_CREATE_NONE, NULL, &error);
-
- g_object_unref(file);
+ priv->outputStream = g_file_replace(file.get(), NULL, TRUE, G_FILE_CREATE_NONE, NULL, &error.outPtr());
if (error) {
webkitDownloadEmitError(download, downloadDestinationError(core(priv->networkResponse), error->message));
- g_error_free(error);
return FALSE;
}
+ GRefPtr<GFileInfo> info = adoptGRef(g_file_info_new());
+ g_file_info_set_attribute_string(info.get(), "metadata::download-uri", webkit_download_get_uri(download));
+ g_file_set_attributes_async(file.get(), info.get(), G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT, 0, 0, 0);
+
return TRUE;
}
@@ -696,21 +698,17 @@ void webkit_download_set_destination_uri(WebKitDownload* download, const gchar*
if (downloading)
webkit_download_close_stream(download);
- GFile* src = g_file_new_for_uri(priv->destinationURI);
- GFile* dest = g_file_new_for_uri(destination_uri);
- GError* error = NULL;
-
- g_file_move(src, dest, G_FILE_COPY_BACKUP, NULL, NULL, NULL, &error);
+ GRefPtr<GFile> src = adoptGRef(g_file_new_for_uri(priv->destinationURI));
+ GRefPtr<GFile> dest = adoptGRef(g_file_new_for_uri(destination_uri));
+ GOwnPtr<GError> error;
- g_object_unref(src);
- g_object_unref(dest);
+ g_file_move(src.get(), dest.get(), G_FILE_COPY_BACKUP, 0, 0, 0, &error.outPtr());
g_free(priv->destinationURI);
priv->destinationURI = g_strdup(destination_uri);
if (error) {
webkitDownloadEmitError(download, downloadDestinationError(core(priv->networkResponse), error->message));
- g_error_free(error);
return;
}
@@ -862,14 +860,13 @@ static void webkit_download_received_data(WebKitDownload* download, const gchar*
ASSERT(priv->outputStream);
gsize bytes_written;
- GError* error = NULL;
+ GOwnPtr<GError> error;
g_output_stream_write_all(G_OUTPUT_STREAM(priv->outputStream),
- data, length, &bytes_written, NULL, &error);
+ data, length, &bytes_written, NULL, &error.outPtr());
if (error) {
webkitDownloadEmitError(download, downloadDestinationError(core(priv->networkResponse), error->message));
- g_error_free(error);
return;
}
diff --git a/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp b/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp
index 6babfe4dd..d77419ae8 100644
--- a/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp
+++ b/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp
@@ -80,7 +80,6 @@ static void webkitFaviconDatabaseClose(WebKitFaviconDatabase* database);
class IconDatabaseClientGtk : public IconDatabaseClient {
public:
// IconDatabaseClient interface
- virtual bool performImport() { return true; }
virtual void didRemoveAllIcons() { };
// Called when an icon is requested while the initial import is
@@ -614,18 +613,18 @@ static void webkitFaviconDatabaseImportFinished(WebKitFaviconDatabase* database)
Vector<String> toDeleteURLs;
PendingIconRequestMap::const_iterator end = database->priv->pendingIconRequests.end();
for (PendingIconRequestMap::const_iterator iter = database->priv->pendingIconRequests.begin(); iter != end; ++iter) {
- String iconURL = iconDatabase().synchronousIconURLForPageURL(iter->first);
+ String iconURL = iconDatabase().synchronousIconURLForPageURL(iter->key);
if (!iconURL.isEmpty())
continue;
- PendingIconRequestVector* icons = iter->second;
+ PendingIconRequestVector* icons = iter->value;
for (size_t i = 0; i < icons->size(); ++i) {
PendingIconRequest* request = icons->at(i).get();
if (request->asyncResult())
request->asyncResultComplete(0);
}
- toDeleteURLs.append(iter->first);
+ toDeleteURLs.append(iter->key);
}
for (size_t i = 0; i < toDeleteURLs.size(); ++i)
diff --git a/Source/WebKit/gtk/webkit/webkitwebdatasource.cpp b/Source/WebKit/gtk/webkit/webkitwebdatasource.cpp
index f973752ac..b6fdc470f 100644
--- a/Source/WebKit/gtk/webkit/webkitwebdatasource.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebdatasource.cpp
@@ -25,6 +25,7 @@
#include "FrameLoader.h"
#include "FrameLoaderClientGtk.h"
#include "KURL.h"
+#include "ResourceBuffer.h"
#include "ResourceRequest.h"
#include "SharedBuffer.h"
#include "SubstituteData.h"
@@ -336,7 +337,7 @@ GString* webkit_web_data_source_get_data(WebKitWebDataSource* webDataSource)
WebKitWebDataSourcePrivate* priv = webDataSource->priv;
- RefPtr<SharedBuffer> mainResourceData = priv->loader->mainResourceData();
+ RefPtr<ResourceBuffer> mainResourceData = priv->loader->mainResourceData();
if (!mainResourceData)
return NULL;
diff --git a/Source/WebKit/gtk/webkit/webkitwebplugin.cpp b/Source/WebKit/gtk/webkit/webkitwebplugin.cpp
index e03b1ea6d..01d0bb5f2 100644
--- a/Source/WebKit/gtk/webkit/webkitwebplugin.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebplugin.cpp
@@ -237,10 +237,10 @@ GSList* webkit_web_plugin_get_mimetypes(WebKitWebPlugin* plugin)
for (MIMEToDescriptionsMap::const_iterator it = mimeToDescriptions.begin(); it != end; ++it) {
WebKitWebPluginMIMEType* mimeType = g_slice_new0(WebKitWebPluginMIMEType);
- mimeType->name = g_strdup(it->first.utf8().data());
- mimeType->description = g_strdup(it->second.utf8().data());
+ mimeType->name = g_strdup(it->key.utf8().data());
+ mimeType->description = g_strdup(it->value.utf8().data());
- Vector<String> extensions = priv->corePlugin->mimeToExtensions().get(it->first);
+ Vector<String> extensions = priv->corePlugin->mimeToExtensions().get(it->key);
mimeType->extensions = static_cast<gchar**>(g_malloc0(sizeof(char*) * (extensions.size() + 1)));
for (unsigned i = 0; i < extensions.size(); i++)
mimeType->extensions[i] = g_strdup(extensions[i].utf8().data());
diff --git a/Source/WebKit/gtk/webkit/webkitwebview.cpp b/Source/WebKit/gtk/webkit/webkitwebview.cpp
index 608bfc243..5ac04842d 100644
--- a/Source/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebview.cpp
@@ -351,7 +351,7 @@ static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webVie
return FALSE;
mainFrame->view()->setCursor(pointerCursor());
- if (page->frameCount()) {
+ if (page->subframeCount()) {
MouseEventWithHitTestResults mev = prepareMouseEventForFrame(mainFrame, event);
Frame* targetFrame = EventHandler::subframeForHitTestResult(mev);
if (!targetFrame)
@@ -746,21 +746,6 @@ static gboolean webkit_web_view_button_press_event(GtkWidget* widget, GdkEventBu
priv->imFilter.notifyMouseButtonPress();
gboolean result = frame->eventHandler()->handleMousePressEvent(platformEvent);
-#if PLATFORM(X11)
- /* Copy selection to the X11 selection clipboard */
- if (event->button == 2) {
- PasteboardHelper* helper = PasteboardHelper::defaultPasteboardHelper();
- bool wasUsingPrimary = helper->usePrimarySelectionClipboard();
- helper->setUsePrimarySelectionClipboard(true);
-
- Editor* editor = webView->priv->corePage->focusController()->focusedOrMainFrame()->editor();
- result = result || editor->canPaste() || editor->canDHTMLPaste();
- editor->paste();
-
- helper->setUsePrimarySelectionClipboard(wasUsingPrimary);
- }
-#endif
-
return result;
}
@@ -864,17 +849,21 @@ static void updateChildAllocationFromPendingAllocation(GtkWidget* child, void*)
*allocation = IntRect();
}
-static void resizeWebViewFromAllocation(WebKitWebView* webView, GtkAllocation* allocation)
+static void resizeWebViewFromAllocation(WebKitWebView* webView, GtkAllocation* allocation, bool sizeChanged)
{
Page* page = core(webView);
IntSize oldSize;
- if (FrameView* frameView = page->mainFrame()->view()) {
+ FrameView* frameView = page->mainFrame()->view();
+ if (sizeChanged && frameView) {
oldSize = frameView->size();
frameView->resize(allocation->width, allocation->height);
}
gtk_container_forall(GTK_CONTAINER(webView), updateChildAllocationFromPendingAllocation, 0);
+ if (!sizeChanged)
+ return;
+
WebKit::ChromeClient* chromeClient = static_cast<WebKit::ChromeClient*>(page->chrome()->client());
chromeClient->widgetSizeChanged(oldSize, IntSize(allocation->width, allocation->height));
chromeClient->adjustmentWatcher()->updateAdjustmentsFromScrollbars();
@@ -884,17 +873,16 @@ static void webkit_web_view_size_allocate(GtkWidget* widget, GtkAllocation* allo
{
GtkAllocation oldAllocation;
gtk_widget_get_allocation(widget, &oldAllocation);
+ bool sizeChanged = allocation->width != oldAllocation.width || allocation->height != oldAllocation.height;
GTK_WIDGET_CLASS(webkit_web_view_parent_class)->size_allocate(widget, allocation);
- if (allocation->width == oldAllocation.width && allocation->height == oldAllocation.height)
- return;
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
- if (!gtk_widget_get_mapped(widget)) {
+ if (sizeChanged && !gtk_widget_get_mapped(widget)) {
webView->priv->needsResizeOnMap = true;
return;
}
- resizeWebViewFromAllocation(webView, allocation);
+ resizeWebViewFromAllocation(webView, allocation, sizeChanged);
}
static void webkitWebViewMap(GtkWidget* widget)
@@ -907,7 +895,7 @@ static void webkitWebViewMap(GtkWidget* widget)
GtkAllocation allocation;
gtk_widget_get_allocation(widget, &allocation);
- resizeWebViewFromAllocation(webView, &allocation);
+ resizeWebViewFromAllocation(webView, &allocation, true);
webView->priv->needsResizeOnMap = false;
}