Diff
Modified: trunk/Source/WebCore/ChangeLog (145168 => 145169)
--- trunk/Source/WebCore/ChangeLog 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebCore/ChangeLog 2013-03-08 02:24:34 UTC (rev 145169)
@@ -1,5 +1,15 @@
2013-03-07 Andreas Kling <[email protected]>
+ Resizing Cappuccino is very laggy on WebKit since Safari 5.1
+ <http://webkit.org/b/71354>
+ <rdar://problem/10565998>
+
+ Reviewed by Anders Carlsson.
+
+ * WebCore.exp.in: Export FloatPoint(const NSPoint&)
+
+2013-03-07 Andreas Kling <[email protected]>
+
Remove desktop version of -webkit-text-size-adjust property.
<http://webkit.org/b/56543>
<rdar://problem/9150203>
Modified: trunk/Source/WebCore/WebCore.exp.in (145168 => 145169)
--- trunk/Source/WebCore/WebCore.exp.in 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebCore/WebCore.exp.in 2013-03-08 02:24:34 UTC (rev 145169)
@@ -70,6 +70,7 @@
__ZN7WebCore10ClientRectC1Ev
__ZN7WebCore10CredentialC1ERKN3WTF6StringES4_NS_21CredentialPersistenceE
__ZN7WebCore10CredentialC1Ev
+__ZN7WebCore10FloatPointC1ERK8_NSPoint
__ZN7WebCore10FloatPointC1ERKNS_8IntPointE
__ZN7WebCore10JSDocument6s_infoE
__ZN7WebCore10MouseEvent6createERKN3WTF12AtomicStringENS1_10PassRefPtrINS_9DOMWindowEEERKNS_18PlatformMouseEventEiNS5_INS_4NodeEEE
Modified: trunk/Source/WebKit2/ChangeLog (145168 => 145169)
--- trunk/Source/WebKit2/ChangeLog 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/ChangeLog 2013-03-08 02:24:34 UTC (rev 145169)
@@ -1,3 +1,50 @@
+2013-03-07 Andreas Kling <[email protected]>
+
+ Resizing Cappuccino is very laggy on WebKit since Safari 5.1
+ <http://webkit.org/b/71354>
+ <rdar://problem/10565998>
+
+ Reviewed by Anders Carlsson.
+
+ 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:]):
+
2013-03-07 Alexey Proskuryakov <[email protected]>
Don't try to create a sandbox extension when path is empty
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (145168 => 145169)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2013-03-08 02:24:34 UTC (rev 145169)
@@ -400,7 +400,7 @@
NSRect viewFrameInWindowCoordinates = [self convertRect:[self frame] toView:nil];
NSPoint accessibilityPosition = [[self accessibilityAttributeValue:NSAccessibilityPositionAttribute] pointValue];
- _data->_page->windowAndViewFramesChanged(enclosingIntRect(windowFrameInScreenCoordinates), enclosingIntRect(viewFrameInWindowCoordinates), IntPoint(accessibilityPosition));
+ _data->_page->windowAndViewFramesChanged(windowFrameInScreenCoordinates, viewFrameInWindowCoordinates, accessibilityPosition);
if (_data->_expandsToFitContentViaAutoLayout)
_data->_page->viewExposedRectChanged([self visibleRect]);
}
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (145168 => 145169)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2013-03-08 02:24:34 UTC (rev 145169)
@@ -385,7 +385,7 @@
#if PLATFORM(MAC)
void updateWindowIsVisible(bool windowIsVisible);
- void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates);
+ void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
void viewExposedRectChanged(const WebCore::FloatRect& exposedRect);
void setMainFrameIsScrollable(bool);
Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (145168 => 145169)
--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm 2013-03-08 02:24:34 UTC (rev 145169)
@@ -129,7 +129,7 @@
process()->send(Messages::WebPage::SetWindowIsVisible(windowIsVisible), m_pageID);
}
-void WebPageProxy::windowAndViewFramesChanged(const IntRect& windowFrameInScreenCoordinates, const IntRect& viewFrameInWindowCoordinates, const IntPoint& accessibilityViewCoordinates)
+void WebPageProxy::windowAndViewFramesChanged(const FloatRect& windowFrameInScreenCoordinates, const FloatRect& viewFrameInWindowCoordinates, const FloatPoint& accessibilityViewCoordinates)
{
if (!isValid())
return;
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (145168 => 145169)
--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2013-03-08 02:24:34 UTC (rev 145169)
@@ -482,12 +482,12 @@
m_plugin->contentsScaleFactorChanged(scaleFactor);
}
-void PluginView::windowAndViewFramesChanged(const IntRect& windowFrameInScreenCoordinates, const IntRect& viewFrameInWindowCoordinates)
+void PluginView::windowAndViewFramesChanged(const FloatRect& windowFrameInScreenCoordinates, const FloatRect& viewFrameInWindowCoordinates)
{
if (!m_isInitialized || !m_plugin)
return;
- m_plugin->windowAndViewFramesChanged(windowFrameInScreenCoordinates, viewFrameInWindowCoordinates);
+ m_plugin->windowAndViewFramesChanged(enclosingIntRect(windowFrameInScreenCoordinates), enclosingIntRect(viewFrameInWindowCoordinates));
}
bool PluginView::sendComplexTextInput(uint64_t pluginComplexTextInputIdentifier, const String& textInput)
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h (145168 => 145169)
--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h 2013-03-08 02:24:34 UTC (rev 145169)
@@ -72,7 +72,7 @@
void setWindowIsVisible(bool);
void setWindowIsFocused(bool);
void setDeviceScaleFactor(float);
- void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates);
+ void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates);
bool sendComplexTextInput(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
void setLayerHostingMode(LayerHostingMode);
RetainPtr<PDFDocument> pdfDocumentForPrinting() const { return m_plugin->pdfDocumentForPrinting(); }
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (145168 => 145169)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2013-03-08 02:24:34 UTC (rev 145169)
@@ -107,11 +107,16 @@
void WebChromeClient::setWindowRect(const FloatRect& windowFrame)
{
- m_page->send(Messages::WebPageProxy::SetWindowFrame(windowFrame));
+ m_page->sendSetWindowFrame(windowFrame);
}
FloatRect WebChromeClient::windowRect()
{
+#if PLATFORM(MAC)
+ if (m_page->hasCachedWindowFrame())
+ return m_page->windowFrameInScreenCoordinates();
+#endif
+
FloatRect newWindowFrame;
if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::GetWindowFrame(), Messages::WebPageProxy::GetWindowFrame::Reply(newWindowFrame), m_page->pageID()))
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (145168 => 145169)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-03-08 02:24:34 UTC (rev 145169)
@@ -237,6 +237,7 @@
, m_mainFrameIsScrollable(true)
#if PLATFORM(MAC)
, m_pdfPluginEnabled(false)
+ , m_hasCachedWindowFrame(false)
, m_windowIsVisible(false)
, m_layerHostingMode(parameters.layerHostingMode)
, m_keyboardEventBeingInterpreted(0)
@@ -2905,7 +2906,15 @@
m_pluginViews.remove(pluginView);
}
+void WebPage::sendSetWindowFrame(const FloatRect& windowFrame)
+{
#if PLATFORM(MAC)
+ m_hasCachedWindowFrame = false;
+#endif
+ send(Messages::WebPageProxy::SetWindowFrame(windowFrame));
+}
+
+#if PLATFORM(MAC)
void WebPage::setWindowIsVisible(bool windowIsVisible)
{
m_windowIsVisible = windowIsVisible;
@@ -2917,7 +2926,7 @@
(*it)->setWindowIsVisible(windowIsVisible);
}
-void WebPage::windowAndViewFramesChanged(const IntRect& windowFrameInScreenCoordinates, const IntRect& viewFrameInWindowCoordinates, const IntPoint& accessibilityViewCoordinates)
+void WebPage::windowAndViewFramesChanged(const FloatRect& windowFrameInScreenCoordinates, const FloatRect& viewFrameInWindowCoordinates, const FloatPoint& accessibilityViewCoordinates)
{
m_windowFrameInScreenCoordinates = windowFrameInScreenCoordinates;
m_viewFrameInWindowCoordinates = viewFrameInWindowCoordinates;
@@ -2925,7 +2934,9 @@
// Tell all our plug-in views that the window and view frames have changed.
for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
- (*it)->windowAndViewFramesChanged(windowFrameInScreenCoordinates, viewFrameInWindowCoordinates);
+ (*it)->windowAndViewFramesChanged(enclosingIntRect(windowFrameInScreenCoordinates), enclosingIntRect(viewFrameInWindowCoordinates));
+
+ m_hasCachedWindowFrame = true;
}
#endif
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (145168 => 145169)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2013-03-08 02:24:34 UTC (rev 145169)
@@ -299,6 +299,8 @@
void clearMainFrameName();
void sendClose();
+ void sendSetWindowFrame(const WebCore::FloatRect&);
+
double textZoomFactor() const;
void setTextZoomFactor(double);
double pageZoomFactor() const;
@@ -352,9 +354,11 @@
bool windowIsVisible() const { return m_windowIsVisible; }
void updatePluginsActiveAndFocusedState();
- const WebCore::IntRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
- const WebCore::IntRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
+ const WebCore::FloatRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
+ const WebCore::FloatRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
+ bool hasCachedWindowFrame() const { return m_hasCachedWindowFrame; }
+
void setTopOverhangImage(PassRefPtr<WebImage>);
void setBottomOverhangImage(PassRefPtr<WebImage>);
#endif
@@ -441,7 +445,7 @@
#if PLATFORM(MAC)
void registerUIProcessAccessibilityTokens(const CoreIPC::DataReference& elemenToken, const CoreIPC::DataReference& windowToken);
WKAccessibilityWebPageObject* accessibilityRemoteObject();
- WebCore::IntPoint accessibilityPosition() const { return m_accessibilityPosition; }
+ const WebCore::FloatPoint& accessibilityPosition() const { return m_accessibilityPosition; }
void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
@@ -732,7 +736,7 @@
void performDictionaryLookupForRange(DictionaryPopupInfo::Type, WebCore::Frame*, WebCore::Range*, NSDictionary *options);
void setWindowIsVisible(bool windowIsVisible);
- void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates);
+ void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
RetainPtr<PDFDocument> pdfDocumentForPrintingFrame(WebCore::Frame*);
void computePagesForPrintingPDFDocument(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects);
@@ -841,17 +845,19 @@
#if PLATFORM(MAC)
bool m_pdfPluginEnabled;
+ bool m_hasCachedWindowFrame;
+
// Whether the containing window is visible or not.
bool m_windowIsVisible;
// The frame of the containing window in screen coordinates.
- WebCore::IntRect m_windowFrameInScreenCoordinates;
+ WebCore::FloatRect m_windowFrameInScreenCoordinates;
// The frame of the view in window coordinates.
- WebCore::IntRect m_viewFrameInWindowCoordinates;
+ WebCore::FloatRect m_viewFrameInWindowCoordinates;
// The accessibility position of the view.
- WebCore::IntPoint m_accessibilityPosition;
+ WebCore::FloatPoint m_accessibilityPosition;
// The layer hosting mode.
LayerHostingMode m_layerHostingMode;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (145168 => 145169)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2013-03-08 02:24:34 UTC (rev 145169)
@@ -260,7 +260,7 @@
SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
SetWindowIsVisible(bool windowIsVisible)
- WindowAndViewFramesChanged(WebCore::IntRect windowFrameInScreenCoordinates, WebCore::IntRect viewFrameInWindowCoordinates, WebCore::IntPoint accessibilityViewCoordinates)
+ WindowAndViewFramesChanged(WebCore::FloatRect windowFrameInScreenCoordinates, WebCore::FloatRect viewFrameInWindowCoordinates, WebCore::FloatPoint accessibilityViewCoordinates)
ViewExposedRectChanged(WebCore::FloatRect exposedRect)
SetMainFrameIsScrollable(bool isScrollable)
RegisterUIProcessAccessibilityTokens(CoreIPC::DataReference elemenToken, CoreIPC::DataReference windowToken)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm (145168 => 145169)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm 2013-03-08 02:08:41 UTC (rev 145168)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm 2013-03-08 02:24:34 UTC (rev 145169)
@@ -145,7 +145,7 @@
return nil;
if ([attribute isEqualToString:NSAccessibilityPositionAttribute]) {
- WebCore::IntPoint point = m_page->accessibilityPosition();
+ const WebCore::FloatPoint& point = m_page->accessibilityPosition();
return [NSValue valueWithPoint:NSMakePoint(point.x(), point.y())];
}
if ([attribute isEqualToString:NSAccessibilitySizeAttribute]) {