Commit 4c6a0a37 authored by aroben@apple.com's avatar aroben@apple.com
Browse files

Fix <rdar://5133816> keepWebHistory is not implemented

 WebCore:

         Add wrappers around CoCreateInstance to COMPtr

         I followed the example of the Query constructor and query method by
         adding a Create constructor and create method.

         Reviewed by Darin.

         * platform/win/COMPtr.h:
         (COMPtr::COMPtr): Added a new constructor that calls
         CoCreateInstance.
         (COMPtr::create): Added.
         (COMPtr::createInstance): Added.

 WebKitTools:

         Fix <rdar://5133816> keepWebHistory is not implemented

         Fixes fast/history/clicked-link-is-visited.html.

         Reviewed by Darin.

         * DumpRenderTree/win/DumpRenderTree.cpp:
         (runTest): Clear the optionalSharedHistory.
         * DumpRenderTree/win/LayoutTestControllerWin.cpp:
         (LayoutTestController::keepWebHistory): Set the optionalSharedHistory.

 LayoutTests:

         Remove a now-passing test from the Windows Skipped file

         Reviewed by Darin.

         * platform/win/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ff51b523
2007-11-11 Adam Roben <aroben@apple.com>
Remove a now-passing test from the Windows Skipped file
Reviewed by Darin.
* platform/win/Skipped:
2007-11-10 Darin Adler <darin@apple.com>
* platform/win/fast/dom/Window/window-properties-expected.txt: Update for
......
......@@ -336,9 +336,6 @@ fast/frames/iframe-window-focus.html
# fast/frames/frame-src-attribute.html fails on boomer <rdar://problem/5134044>
fast/frames/frame-src-attribute.html
# keepWebHistory is not implemented in DRT in boomer <rdar://problem/5133816>
fast/history/clicked-link-is-visited.html
# fast/html/keygen.html is failing on boomer <rdar://problem/5133799>
fast/html/keygen.html
fast/invalid/residual-style.html
......
2007-11-11 Adam Roben <aroben@apple.com>
Add wrappers around CoCreateInstance to COMPtr
I followed the example of the Query constructor and query method by
adding a Create constructor and create method.
Reviewed by Darin.
* platform/win/COMPtr.h:
(COMPtr::COMPtr): Added a new constructor that calls
CoCreateInstance.
(COMPtr::create): Added.
(COMPtr::createInstance): Added.
2007-11-11 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
......
......@@ -40,6 +40,7 @@ typedef long HRESULT;
enum AdoptCOMTag { AdoptCOM };
enum QueryTag { Query };
enum CreateTag { Create };
template <typename T> class COMPtr {
public:
......@@ -51,6 +52,8 @@ public:
inline COMPtr(QueryTag, IUnknown* ptr) : m_ptr(copyQueryInterfaceRef(ptr)) { }
template <typename U> inline COMPtr(QueryTag, const COMPtr<U>& ptr) : m_ptr(copyQueryInterfaceRef(ptr.get())) { }
inline COMPtr(CreateTag, const IID& clsid) : m_ptr(createInstance(clsid)) { }
~COMPtr() { if (m_ptr) m_ptr->Release(); }
T* get() const { return m_ptr; }
......@@ -70,19 +73,30 @@ public:
COMPtr& operator=(const COMPtr&);
COMPtr& operator=(T*);
template <typename U> COMPtr& operator=(const COMPtr<U>&);
void query(IUnknown* ptr) { adoptRef(copyQueryInterfaceRef(ptr)); }
template <typename U> inline void query(const COMPtr<U>& ptr) { query(ptr.get()); }
void create(const IID& clsid) { adoptRef(createInstance(clsid)); }
template <typename U> HRESULT copyRefTo(U**);
void adoptRef(T*);
private:
static T* copyQueryInterfaceRef(IUnknown*);
static T* createInstance(const IID& clsid);
T* m_ptr;
};
template <typename T> inline T* COMPtr<T>::createInstance(const IID& clsid)
{
T* result;
if (FAILED(CoCreateInstance(clsid, 0, CLSCTX_ALL, __uuidof(result), reinterpret_cast<void**>(&result))))
return 0;
return result;
}
template <typename T> inline T* COMPtr<T>::copyQueryInterfaceRef(IUnknown* ptr)
{
if (!ptr)
......
2007-11-11 Adam Roben <aroben@apple.com>
Fix <rdar://5133816> keepWebHistory is not implemented
Fixes fast/history/clicked-link-is-visited.html.
Reviewed by Darin.
* DumpRenderTree/win/DumpRenderTree.cpp:
(runTest): Clear the optionalSharedHistory.
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::keepWebHistory): Set the optionalSharedHistory.
2007-11-10 Sam Weinig <sam@webkit.org>
Reviewed by Tim Hatcher.
......
......@@ -602,6 +602,10 @@ static void runTest(const char* pathOrURL)
topLoadingFrame = 0;
timedOut = false;
COMPtr<IWebHistory> history(Create, CLSID_WebHistory);
if (history)
history->setOptionalSharedHistory(0);
prevTestBFItem = 0;
COMPtr<IWebView> webView;
if (SUCCEEDED(frame->webView(&webView))) {
......
......@@ -40,7 +40,9 @@
#include <JavaScriptCore/Assertions.h>
#include <JavaScriptCore/JavaScriptCore.h>
#include <JavaScriptCore/JSRetainPtr.h>
#include <WebKit/IWebHistory.h>
#include <WebKit/IWebViewPrivate.h>
#include <WebKit/WebKit.h>
#include <string>
#include <CoreFoundation/CoreFoundation.h>
......@@ -120,7 +122,15 @@ void LayoutTestController::display()
void LayoutTestController::keepWebHistory()
{
// FIXME: Implement!
COMPtr<IWebHistory> history(Create, CLSID_WebHistory);
if (!history)
return;
COMPtr<IWebHistory> sharedHistory(Create, CLSID_WebHistory);
if (!sharedHistory)
return;
history->setOptionalSharedHistory(sharedHistory.get());
}
void LayoutTestController::notifyDone()
......
Markdown is supported
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