Commit 34341a9c authored by andersca@apple.com's avatar andersca@apple.com
Browse files

2011-01-24 Anders Carlsson <andersca@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@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
parent 175c44be
2011-01-24 Anders Carlsson <andersca@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@webkit.org>
 
Reviewed by Eric Seidel.
......@@ -980,6 +980,7 @@ __ZNK7WebCore11HistoryItem12isTargetItemEv
__ZNK7WebCore11HistoryItem12redirectURLsEv
__ZNK7WebCore11HistoryItem14alternateTitleEv
__ZNK7WebCore11HistoryItem15lastVisitedTimeEv
__ZNK7WebCore11HistoryItem15pageScaleFactorEv
__ZNK7WebCore11HistoryItem17originalURLStringEv
__ZNK7WebCore11HistoryItem20getTransientPropertyERKN3WTF6StringE
__ZNK7WebCore11HistoryItem21encodeBackForwardTreeERN3WTF7EncoderE
......
......@@ -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];
......
2011-01-24 Anders Carlsson <andersca@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@apple.com>
 
Reviewed by Anders Carlsson.
......@@ -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);
......
......@@ -260,6 +260,8 @@ public:
void sendAccessibilityPresenterToken(const CoreIPC::DataReference&);
#endif
void viewScaleFactorDidChange(double);
// Find.
void findString(const String&, FindOptions, unsigned maxMatchCount);
void hideFindUI();
......
......@@ -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)
......
......@@ -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()
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment