Fix build with ENABLE_WEBGL=false
https://bugs.webkit.org/show_bug.cgi?id=97309

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-09-21
Reviewed by Eric Seidel.

WebKit no longer builds when WEBGL is not enabled.

* rendering/FilterEffectRenderer.h:
(FilterEffectRenderer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Implement ViewState methods in PageClientImpl in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=97202

Reviewed by Martin Robinson.

Source/WebKit2:

Implement isViewWindowActive(), isViewFocused(), isViewVisible()
and isViewInWindow() in PageClientImpl.

* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/C/gtk/WKView.cpp:
(WKViewSetFocus): New private method used by WTR to focus the
WebView.
* UIProcess/API/C/gtk/WKViewPrivate.h: Added.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::isViewWindowActive): Return
webkitWebViewBaseIsInWindowActive().
(WebKit::PageClientImpl::isViewFocused): Return
webkitWebViewBaseIsFocused().
(WebKit::PageClientImpl::isViewVisible): Return
webkitWebViewBaseIsVisible().
(WebKit::PageClientImpl::isViewInWindow): Return
webkitWebViewBaseIsInWindow().
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseNotifyResizerSize): Updated to not receive the
window as parameter since it's now saved in the instance struct.
(toplevelWindowResizeGripVisibilityChanged): Update to
webkitWebViewBaseNotifyResizerSize() API change.
(toplevelWindowFocusInEvent): Update ViewWindowIsActive flag and
notify the WebPageProxy if it changed.
(toplevelWindowFocusOutEvent): Ditto.
(webkitWebViewBaseSetToplevelOnScreenWindow): Set the toplevel
on-screen window where the view is currently added and notify
WebPageProxy if it changed.
(webkitWebViewBaseRealize): Call
webkitWebViewBaseSetToplevelOnScreenWindow() if the view has been
added to an on-screen window.
(webkitWebViewBaseFinalize): Reset the toplevel on-screen window
to make sure all signals are disconnected when the view is
destroyed.
(webkit_web_view_base_init): Remove unneeded initialization.
(resizeWebKitWebViewBaseFromAllocation): Update to
webkitWebViewBaseNotifyResizerSize() API change.
(webkitWebViewBaseMap): Update ViewIsVisible flag and notify
WebPageProxy if it changed.
(webkitWebViewBaseUnmap): Ditto.
(webkitWebViewBaseFocusInEvent): Call webkitWebViewBaseSetFocus()
passing true to focus the view.
(webkitWebViewBaseFocusOutEvent): Call webkitWebViewBaseSetFocus()
passing false to unfocus the view.
(webkitWebViewBaseParentSet): Reset the toplevel on-screen window
if the view is re-parented.
(webkit_web_view_base_class_init): Add implementations for map and
parent-set virtual functions.
(webkitWebViewBaseSetFocus): Update the ViewIsFocused and notify
WebPageProxy if it changed.
(webkitWebViewBaseIsInWindowActive):
(webkitWebViewBaseIsFocused):
(webkitWebViewBaseIsVisible):
(webkitWebViewBaseIsInWindow):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewMouseTarget): Use a GTK_WINDOW_TOPLEVEL instead of
POPUP for this test to make sure the view receives focus change
events.

Tools:

* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::focus): Focus the view.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebSocket] Receiving a large message is really slow
https://bugs.webkit.org/show_bug.cgi?id=97237

Patch by Evan Wallace <evan.exe@gmail.com> on 2012-09-21
Reviewed by Alexey Proskuryakov.

WebSocketChannel always reallocates its internal buffer when it receives
and appends new data which causes dramatic slowdowns for messages over
2 MB in size. This patch changes the internal buffer of WebSocketChannel
from a raw char array to a Vector<char> and uses its amortized append()
method. This brings the time to receive a 5 MB message from 5.2 seconds
to 0.25 seconds.

This patch is only for optimization. No new tests are needed.

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::~WebSocketChannel):
(WebCore::WebSocketChannel::fail):
(WebCore::WebSocketChannel::resume):
(WebCore::WebSocketChannel::didReceiveSocketStreamData):
(WebCore::WebSocketChannel::appendToBuffer):
(WebCore::WebSocketChannel::skipBuffer):
(WebCore::WebSocketChannel::processBuffer):
(WebCore::WebSocketChannel::resumeTimerFired):
(WebCore::WebSocketChannel::processFrame):
* Modules/websockets/WebSocketChannel.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129239 268f45cc-cd09-0410-ab3c-d52691b4dbfc