[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
andersca at apple.com
andersca at apple.com
Sun Feb 20 23:46:15 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 34341a9c13fada7aaddecd019d518d44a61acb49
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 25 02:38:10 2011 +0000
2011-01-24 Anders Carlsson <andersca at apple.com>
Reviewed by Dan Bernstein.
Reset the page scale factor on standard frame loads
https://bugs.webkit.org/show_bug.cgi?id=53058
<rdar://problem/8908844>
Add a symbol needed by WebKit2.
* WebCore.exp.in:
2011-01-24 Anders Carlsson <andersca at apple.com>
Reviewed by Dan Bernstein.
Reset the page scale factor on standard frame loads
https://bugs.webkit.org/show_bug.cgi?id=53058
<rdar://problem/8908844>
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleWebView):
Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
(WebKit::WebPageProxy::viewScaleFactorDidChange):
Update m_viewScaleFactor.
* UIProcess/WebPageProxy.h:
Add viewScaleFactorDidChange.
* UIProcess/WebPageProxy.messages.in:
Add ViewScaleFactorDidChange message.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
Set the scale factor.
(WebKit::WebFrameLoaderClient::restoreViewState):
Inform the UI process about the new view scale factor.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleWebView):
Send a ViewScaleFactorDidChange message.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 8e4c744..5de637b 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-24 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Reset the page scale factor on standard frame loads
+ https://bugs.webkit.org/show_bug.cgi?id=53058
+ <rdar://problem/8908844>
+
+ Add a symbol needed by WebKit2.
+
+ * WebCore.exp.in:
+
2011-01-24 Ryosuke Niwa <rniwa at webkit.org>
Reviewed by Eric Seidel.
diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in
index eabcaa9..106b8f4 100644
--- a/Source/WebCore/WebCore.exp.in
+++ b/Source/WebCore/WebCore.exp.in
@@ -980,6 +980,7 @@ __ZNK7WebCore11HistoryItem12isTargetItemEv
__ZNK7WebCore11HistoryItem12redirectURLsEv
__ZNK7WebCore11HistoryItem14alternateTitleEv
__ZNK7WebCore11HistoryItem15lastVisitedTimeEv
+__ZNK7WebCore11HistoryItem15pageScaleFactorEv
__ZNK7WebCore11HistoryItem17originalURLStringEv
__ZNK7WebCore11HistoryItem20getTransientPropertyERKN3WTF6StringE
__ZNK7WebCore11HistoryItem21encodeBackForwardTreeERN3WTF7EncoderE
diff --git a/Source/WebKit/mac/WebView/WebHTMLView.mm b/Source/WebKit/mac/WebView/WebHTMLView.mm
index 35b3def..bfa0944 100644
--- a/Source/WebKit/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKit/mac/WebView/WebHTMLView.mm
@@ -1733,6 +1733,14 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
}
}
+- (BOOL)mouseDownCanMoveWindow
+{
+ BOOL result = [super mouseDownCanMoveWindow];
+
+ NSLog(@"%@, %@ %d", self, NSStringFromSelector(_cmd), result);
+ return result;
+}
+
- (void)_handleAutoscrollForMouseDragged:(NSEvent *)event
{
[self autoscroll:event];
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index cf342a2..dfbece1 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,35 @@
+2011-01-24 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Reset the page scale factor on standard frame loads
+ https://bugs.webkit.org/show_bug.cgi?id=53058
+ <rdar://problem/8908844>
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::scaleWebView):
+ Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
+
+ (WebKit::WebPageProxy::viewScaleFactorDidChange):
+ Update m_viewScaleFactor.
+
+ * UIProcess/WebPageProxy.h:
+ Add viewScaleFactorDidChange.
+
+ * UIProcess/WebPageProxy.messages.in:
+ Add ViewScaleFactorDidChange message.
+
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
+ Set the scale factor.
+
+ (WebKit::WebFrameLoaderClient::restoreViewState):
+ Inform the UI process about the new view scale factor.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::scaleWebView):
+ Send a ViewScaleFactorDidChange message.
+
2011-01-24 Maciej Stachowiak <mjs at apple.com>
Reviewed by Anders Carlsson.
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp
index e7b4277..ab1ea33 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp
@@ -890,7 +890,6 @@ void WebPageProxy::scaleWebView(double scale, const IntPoint& origin)
if (!isValid())
return;
- m_viewScaleFactor = scale;
process()->send(Messages::WebPage::ScaleWebView(scale, origin), m_pageID);
}
@@ -920,6 +919,11 @@ void WebPageProxy::setFixedLayoutSize(const IntSize& size)
process()->send(Messages::WebPage::SetFixedLayoutSize(size), m_pageID);
}
+void WebPageProxy::viewScaleFactorDidChange(double scaleFactor)
+{
+ m_viewScaleFactor = scaleFactor;
+}
+
void WebPageProxy::findString(const String& string, FindOptions options, unsigned maxMatchCount)
{
process()->send(Messages::WebPage::FindString(string, options, maxMatchCount), m_pageID);
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.h b/Source/WebKit2/UIProcess/WebPageProxy.h
index 7b80029..184f85b 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.h
+++ b/Source/WebKit2/UIProcess/WebPageProxy.h
@@ -260,6 +260,8 @@ public:
void sendAccessibilityPresenterToken(const CoreIPC::DataReference&);
#endif
+ void viewScaleFactorDidChange(double);
+
// Find.
void findString(const String&, FindOptions, unsigned maxMatchCount);
void hideFindUI();
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.messages.in b/Source/WebKit2/UIProcess/WebPageProxy.messages.in
index 8d26dbd..ea16cc4 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.messages.in
+++ b/Source/WebKit2/UIProcess/WebPageProxy.messages.in
@@ -119,6 +119,8 @@ messages -> WebPageProxy {
DidReceiveAccessibilityPageToken(CoreIPC::DataReference data)
+ ViewScaleFactorDidChange(double scaleFactor)
+
#if PLATFORM(MAC)
# Keyboard support messages
InterpretKeyEvent(uint32_t type) -> (Vector<WebCore::KeypressCommand> commandName, uint32_t selectionStart, uint32_t selectionEnd, Vector<WebCore::CompositionUnderline> underlines)
@@ -189,7 +191,7 @@ messages -> WebPageProxy {
GetGuessesForWord(WTF::String word, WTF::String context) -> (Vector<WTF::String> guesses)
LearnWord(WTF::String word);
IgnoreWord(WTF::String word);
-
+
# Drag and drop messages
DidPerformDragControllerAction(uint64_t resultOperation)
#if PLATFORM(MAC)
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index 49ce240..ecfede0 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -57,6 +57,7 @@
#include <WebCore/FrameView.h>
#include <WebCore/HTMLAppletElement.h>
#include <WebCore/HTMLFormElement.h>
+#include <WebCore/HistoryItem.h>
#include <WebCore/MIMETypeRegistry.h>
#include <WebCore/MouseEvent.h>
#include <WebCore/Page.h>
@@ -426,7 +427,17 @@ void WebFrameLoaderClient::dispatchDidCommitLoad()
webPage->sandboxExtensionTracker().didCommitProvisionalLoad(m_frame);
// Notify the UIProcess.
+
webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), response.mimeType(), m_frameHasCustomRepresentation, PlatformCertificateInfo(response), InjectedBundleUserMessageEncoder(userData.get())));
+
+ // Restore the page scale factor.
+ double newPageScaleFactor = m_frame->coreFrame()->pageScaleFactor();
+
+ // Only restore the scale factor for standard frame loads (of the main frame).
+ if (m_frame->isMainFrame() && m_frame->coreFrame()->loader()->loadType() == FrameLoadTypeStandard)
+ newPageScaleFactor = 1.0;
+
+ webPage->scaleWebView(newPageScaleFactor, IntPoint());
}
void WebFrameLoaderClient::dispatchDidFailProvisionalLoad(const ResourceError& error)
@@ -1003,7 +1014,9 @@ void WebFrameLoaderClient::saveViewStateToItem(HistoryItem*)
void WebFrameLoaderClient::restoreViewState()
{
- notImplemented();
+ // Inform the UI process of the scale factor.
+ double scaleFactor = m_frame->coreFrame()->loader()->history()->currentItem()->pageScaleFactor();
+ m_frame->page()->send(Messages::WebPageProxy::ViewScaleFactorDidChange(scaleFactor));
}
void WebFrameLoaderClient::provisionalLoadStarted()
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index e5c581f..9ab3b26 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -614,6 +614,8 @@ void WebPage::scaleWebView(double scale, const IntPoint& origin)
if (!frame)
return;
frame->scalePage(scale, origin);
+
+ send(Messages::WebPageProxy::ViewScaleFactorDidChange(scale));
}
double WebPage::viewScaleFactor() const
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list