Resizing Cappuccino is very laggy on WebKit since Safari 5.1
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2013 02:24:34 +0000 (02:24 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2013 02:24:34 +0000 (02:24 +0000)
commit867088a0ae815fd9a7fb8277484b730aac5c16e5
treeebe0ab5bf7216ca87d406b59857061d8e4ba7544
parentba481109d175a3b451aa25314445ae0a33868e61
Resizing Cappuccino is very laggy on WebKit since Safari 5.1
<http://webkit.org/b/71354>
<rdar://problem/10565998>

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.exp.in: Export FloatPoint(const NSPoint&)

Source/WebKit2:

On Mac, we already cache the window rect through the WindowAndViewFramesChanged
message, so simply return that in WebChromeClient::windowRect() instead of
sending a synchronous query to the UIProcess.

If a programmatic resize is requested, we bypass the cache until we've received
a new WindowAndViewFramesChanged message. This compromise allows us to return
cached rects in the common case, and handles creating a new window and immediately
resizing it gracefully.

Changed WindowAndViewFramesChanged to pass FloatRect/FloatPoint rather than
IntRect/IntPoint to match the ChromeClient::windowRect() return type.

* UIProcess/API/mac/WKView.mm:
(-[WKView _updateWindowAndViewFrames]):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowAndViewFramesChanged):
* WebProcess/Plugins/PluginView.h:
(PluginView):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setWindowRect):
(WebKit::WebChromeClient::windowRect):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::sendSetWindowFrame):
(WebKit::WebPage::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.h:
(WebPage):
(WebKit::WebPage::windowFrameInScreenCoordinates):
(WebKit::WebPage::viewFrameInWindowCoordinates):
(WebKit::WebPage::hasCachedWindowFrame):
(WebKit::WebPage::accessibilityPosition):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.h
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm