- <rdar://
4516170> Back/Forward Cache on Windows
* WebFrame.cpp:
(WebFrame::forceLayout): Implemented this. Just calling through to
Frame::forceLayout matches the Mac pretty well and should be enough
for now. Without this we won't repaint the new page when we go back
and forward.
(WebFrame::dispatchWillSubmitForm): Use COMPtr's AdoptCOM constructor
instead of the adoptRef function.
(WebFrame::restoreViewState): Removed unneeded notImplemented() call.
This is implemented as much as it needs to be.
(WebFrame::shouldGoToHistoryItem): Ditto.
(WebFrame::saveViewStateToItem): Ditto.
(WebFrame::canCachePage): Ditto, also changed it to return true. This
is what was preventing the back/forward cache from running, and there's
no need for any additional checks in the Windows version.
* WebView.cpp:
(PreferencesChangedOrRemovedObserver::onNotify): Fix backwards null check
that was preventing this notification from ever being sent, which in turn
meant that page cache had a capacity of 0.
(WebView::initWithFrame): Removed unneeded setUsesPageCache(false) code.
This actually was ineffective and ended up doing no harm, but we don't
need it.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28822
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-12-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ - <rdar://4516170> Back/Forward Cache on Windows
+
+ * WebFrame.cpp:
+ (WebFrame::forceLayout): Implemented this. Just calling through to
+ Frame::forceLayout matches the Mac pretty well and should be enough
+ for now. Without this we won't repaint the new page when we go back
+ and forward.
+ (WebFrame::dispatchWillSubmitForm): Use COMPtr's AdoptCOM constructor
+ instead of the adoptRef function.
+ (WebFrame::restoreViewState): Removed unneeded notImplemented() call.
+ This is implemented as much as it needs to be.
+ (WebFrame::shouldGoToHistoryItem): Ditto.
+ (WebFrame::saveViewStateToItem): Ditto.
+ (WebFrame::canCachePage): Ditto, also changed it to return true. This
+ is what was preventing the back/forward cache from running, and there's
+ no need for any additional checks in the Windows version.
+
+ * WebView.cpp:
+ (PreferencesChangedOrRemovedObserver::onNotify): Fix backwards null check
+ that was preventing this notification from ever being sent, which in turn
+ meant that page cache had a capacity of 0.
+ (WebView::initWithFrame): Removed unneeded setUsesPageCache(false) code.
+ This actually was ineffective and ended up doing no harm, but we don't
+ need it.
+
2007-12-16 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Darin.
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void WebFrame::forceLayout()
{
- notImplemented();
+ core(this)->forceLayout(true);
}
void WebFrame::forceLayoutForNonHTML()
return;
}
- COMPtr<IDOMElement> formElement;
- formElement.adoptRef(DOMElement::createInstance(formState->form()));
+ COMPtr<IDOMElement> formElement(AdoptCOM, DOMElement::createInstance(formState->form()));
// FIXME: The FormValuesPropertyBag constructor should take a const pointer
FormValuesPropertyBag formValuesPropBag(const_cast<HashMap<String, String>*>(&formState->values()));
void WebFrame::restoreViewState()
{
- // FIXME: Need to restore view state for page caching
- notImplemented();
}
void WebFrame::provisionalLoadStarted()
bool WebFrame::shouldGoToHistoryItem(HistoryItem*) const
{
- notImplemented();
return true;
}
void WebFrame::saveViewStateToItem(HistoryItem*)
{
- // FIXME: Need to save view state for page caching
- notImplemented();
}
bool WebFrame::canCachePage() const
{
- notImplemented();
- return false;
+ return true;
}
PassRefPtr<DocumentLoader> WebFrame::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
return hr;
COMPtr<IWebPreferences> preferences(Query, unkPrefs);
- if (preferences)
+ if (!preferences)
return E_NOINTERFACE;
WebCacheModel cacheModel;
WebKitSetWebDatabasesPathIfNecessary();
m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this));
- // FIXME: 4931464 - When we do cache pages on Windows this needs to be removed so the "should I cache this page?" check
- // in FrameLoader::provisionalLoadStarted() doesn't always fail
- m_page->settings()->setUsesPageCache(false);
if (m_uiDelegate) {
COMPtr<IWebUIDelegate2> uiDelegate2;