diff options
Diffstat (limited to 'WebKit/win')
229 files changed, 12323 insertions, 6464 deletions
diff --git a/WebKit/win/AccessibleBase.cpp b/WebKit/win/AccessibleBase.cpp new file mode 100644 index 0000000..fdf9404 --- /dev/null +++ b/WebKit/win/AccessibleBase.cpp @@ -0,0 +1,612 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebKitDLL.h" +#include "AccessibleBase.h" + +#include <oleacc.h> +#include <WebCore/AccessibilityObject.h> +#include <WebCore/AXObjectCache.h> +#include <WebCore/BString.h> +#include <WebCore/Element.h> +#include <WebCore/EventHandler.h> +#include <WebCore/FrameView.h> +#include <WebCore/HostWindow.h> +#include <WebCore/HTMLNames.h> +#include <WebCore/HTMLFrameElementBase.h> +#include <WebCore/HTMLInputElement.h> +#include <WebCore/IntRect.h> +#include <WebCore/PlatformKeyboardEvent.h> +#include <WebCore/RenderFrame.h> +#include <WebCore/RenderObject.h> +#include <WebCore/RenderView.h> +#include "WebView.h" +#include <wtf/RefPtr.h> + +using namespace WebCore; + +AccessibleBase::AccessibleBase(AccessibilityObject* obj) + : AccessibilityObjectWrapper(obj) + , m_refCount(0) +{ + ASSERT_ARG(obj, obj); + m_object->setWrapper(this); + ++gClassCount; + gClassNameCount.add("AccessibleBase"); +} + +AccessibleBase::~AccessibleBase() +{ + --gClassCount; + gClassNameCount.remove("AccessibleBase"); +} + +AccessibleBase* AccessibleBase::createInstance(AccessibilityObject* obj) +{ + ASSERT_ARG(obj, obj); + + return new AccessibleBase(obj); +} + +// IUnknown +HRESULT STDMETHODCALLTYPE AccessibleBase::QueryInterface(REFIID riid, void** ppvObject) +{ + if (IsEqualGUID(riid, __uuidof(IAccessible))) + *ppvObject = this; + else if (IsEqualGUID(riid, __uuidof(IDispatch))) + *ppvObject = this; + else if (IsEqualGUID(riid, __uuidof(IUnknown))) + *ppvObject = this; + else { + *ppvObject = 0; + return E_NOINTERFACE; + } + AddRef(); + return S_OK; +} + +ULONG STDMETHODCALLTYPE AccessibleBase::Release(void) +{ + ASSERT(m_refCount > 0); + if (--m_refCount) + return m_refCount; + delete this; + return 0; +} + +// IAccessible +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accParent(IDispatch** parent) +{ + *parent = 0; + + if (!m_object) + return E_FAIL; + + return WebView::AccessibleObjectFromWindow(m_object->topDocumentFrameView()->hostWindow()->platformWindow(), + OBJID_WINDOW, __uuidof(IAccessible), reinterpret_cast<void**>(parent)); +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accChildCount(long* count) +{ + if (!m_object) + return E_FAIL; + if (!count) + return E_POINTER; + *count = static_cast<long>(m_object->children().size()); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accChild(VARIANT vChild, IDispatch** ppChild) +{ + if (!ppChild) + return E_POINTER; + + *ppChild = 0; + + AccessibilityObject* childObj; + + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + if (FAILED(hr)) + return hr; + + *ppChild = static_cast<IDispatch*>(wrapper(childObj)); + (*ppChild)->AddRef(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accName(VARIANT vChild, BSTR* name) +{ + if (!name) + return E_POINTER; + + *name = 0; + + AccessibilityObject* childObj; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + + if (FAILED(hr)) + return hr; + + if (*name = BString(wrapper(childObj)->name()).release()) + return S_OK; + return S_FALSE; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accValue(VARIANT vChild, BSTR* value) +{ + if (!value) + return E_POINTER; + + *value = 0; + + AccessibilityObject* childObj; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + + if (FAILED(hr)) + return hr; + + if (*value = BString(wrapper(childObj)->value()).release()) + return S_OK; + return S_FALSE; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accDescription(VARIANT vChild, BSTR* description) +{ + if (!description) + return E_POINTER; + + *description = 0; + + AccessibilityObject* childObj; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + + if (FAILED(hr)) + return hr; + + // TODO: Description, for SELECT subitems, should be a string describing + // the position of the item in its group and of the group in the list (see + // Firefox). + if (*description = BString(wrapper(childObj)->description()).release()) + return S_OK; + return S_FALSE; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accRole(VARIANT vChild, VARIANT* pvRole) +{ + if (!pvRole) + return E_POINTER; + + ::VariantInit(pvRole); + + AccessibilityObject* childObj; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + + if (FAILED(hr)) + return hr; + + pvRole->vt = VT_I4; + pvRole->lVal = wrapper(childObj)->role(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accState(VARIANT vChild, VARIANT* pvState) +{ + if (!pvState) + return E_POINTER; + + ::VariantInit(pvState); + + AccessibilityObject* childObj; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + + if (FAILED(hr)) + return hr; + + pvState->vt = VT_I4; + pvState->lVal = 0; + + if (childObj->isAnchor()) + pvState->lVal |= STATE_SYSTEM_LINKED; + + if (childObj->isHovered()) + pvState->lVal |= STATE_SYSTEM_HOTTRACKED; + + if (!childObj->isEnabled()) + pvState->lVal |= STATE_SYSTEM_UNAVAILABLE; + + if (childObj->isReadOnly()) + pvState->lVal |= STATE_SYSTEM_READONLY; + + if (childObj->isOffScreen()) + pvState->lVal |= STATE_SYSTEM_OFFSCREEN; + + if (childObj->isMultiSelect()) + pvState->lVal |= STATE_SYSTEM_MULTISELECTABLE; + + if (childObj->isPasswordField()) + pvState->lVal |= STATE_SYSTEM_PROTECTED; + + if (childObj->isIndeterminate()) + pvState->lVal |= STATE_SYSTEM_INDETERMINATE; + + if (childObj->isChecked()) + pvState->lVal |= STATE_SYSTEM_CHECKED; + + if (childObj->isPressed()) + pvState->lVal |= STATE_SYSTEM_PRESSED; + + if (childObj->isFocused()) + pvState->lVal |= STATE_SYSTEM_FOCUSED; + + if (childObj->isVisited()) + pvState->lVal |= STATE_SYSTEM_TRAVERSED; + + if (childObj->canSetFocusAttribute()) + pvState->lVal |= STATE_SYSTEM_FOCUSABLE; + + // TODO: Add selected and selectable states. + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accHelp(VARIANT vChild, BSTR* helpText) +{ + if (!helpText) + return E_POINTER; + + *helpText = 0; + + AccessibilityObject* childObj; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + + if (FAILED(hr)) + return hr; + + if (*helpText = BString(childObj->helpText()).release()) + return S_OK; + return S_FALSE; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accKeyboardShortcut(VARIANT vChild, BSTR* shortcut) +{ + if (!shortcut) + return E_POINTER; + + *shortcut = 0; + + AccessibilityObject* childObj; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + + if (FAILED(hr)) + return hr; + + String accessKey = childObj->accessKey(); + if (accessKey.isNull()) + return S_FALSE; + + static String accessKeyModifiers; + if (accessKeyModifiers.isNull()) { + unsigned modifiers = EventHandler::accessKeyModifiers(); + // Follow the same order as Mozilla MSAA implementation: + // Ctrl+Alt+Shift+Meta+key. MSDN states that keyboard shortcut strings + // should not be localized and defines the separator as "+". + if (modifiers & PlatformKeyboardEvent::CtrlKey) + accessKeyModifiers += "Ctrl+"; + if (modifiers & PlatformKeyboardEvent::AltKey) + accessKeyModifiers += "Alt+"; + if (modifiers & PlatformKeyboardEvent::ShiftKey) + accessKeyModifiers += "Shift+"; + if (modifiers & PlatformKeyboardEvent::MetaKey) + accessKeyModifiers += "Win+"; + } + *shortcut = BString(accessKeyModifiers + accessKey).release(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long, VARIANT) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accSelection(VARIANT*) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accFocus(VARIANT* pvFocusedChild) +{ + if (!pvFocusedChild) + return E_POINTER; + + ::VariantInit(pvFocusedChild); + + if (!m_object) + return E_FAIL; + + AccessibilityObject* focusedObj = m_object->focusedUIElement(); + if (!focusedObj) + return S_FALSE; + + if (focusedObj == m_object) { + V_VT(pvFocusedChild) = VT_I4; + V_I4(pvFocusedChild) = CHILDID_SELF; + return S_OK; + } + + V_VT(pvFocusedChild) = VT_DISPATCH; + V_DISPATCH(pvFocusedChild) = wrapper(focusedObj); + V_DISPATCH(pvFocusedChild)->AddRef(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::get_accDefaultAction(VARIANT vChild, BSTR* action) +{ + if (!action) + return E_POINTER; + + *action = 0; + + AccessibilityObject* childObj; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + + if (FAILED(hr)) + return hr; + + if (*action = BString(childObj->actionVerb()).release()) + return S_OK; + return S_FALSE; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::accLocation(long* left, long* top, long* width, long* height, VARIANT vChild) +{ + if (!left || !top || !width || !height) + return E_POINTER; + + *left = *top = *width = *height = 0; + + AccessibilityObject* childObj; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + + if (FAILED(hr)) + return hr; + + IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->boundingBoxRect())); + *left = screenRect.x(); + *top = screenRect.y(); + *width = screenRect.width(); + *height = screenRect.height(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::accNavigate(long direction, VARIANT vFromChild, VARIANT* pvNavigatedTo) +{ + if (!pvNavigatedTo) + return E_POINTER; + + ::VariantInit(pvNavigatedTo); + + AccessibilityObject* childObj = 0; + + switch (direction) { + case NAVDIR_DOWN: + case NAVDIR_UP: + case NAVDIR_LEFT: + case NAVDIR_RIGHT: + // These directions are not implemented, matching Mozilla and IE. + return E_NOTIMPL; + case NAVDIR_LASTCHILD: + case NAVDIR_FIRSTCHILD: + // MSDN states that navigating to first/last child can only be from self. + if (vFromChild.lVal != CHILDID_SELF) + return E_INVALIDARG; + + if (!m_object) + return E_FAIL; + + if (direction == NAVDIR_FIRSTCHILD) + childObj = m_object->firstChild(); + else + childObj = m_object->lastChild(); + break; + case NAVDIR_NEXT: + case NAVDIR_PREVIOUS: { + // Navigating to next and previous is allowed from self or any of our children. + HRESULT hr = getAccessibilityObjectForChild(vFromChild, childObj); + if (FAILED(hr)) + return hr; + + if (direction == NAVDIR_NEXT) + childObj = childObj->nextSibling(); + else + childObj = childObj->previousSibling(); + break; + } + default: + ASSERT_NOT_REACHED(); + return E_INVALIDARG; + } + + if (!childObj) + return S_FALSE; + + V_VT(pvNavigatedTo) = VT_DISPATCH; + V_DISPATCH(pvNavigatedTo) = wrapper(childObj); + V_DISPATCH(pvNavigatedTo)->AddRef(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::accHitTest(long x, long y, VARIANT* pvChildAtPoint) +{ + if (!pvChildAtPoint) + return E_POINTER; + + ::VariantInit(pvChildAtPoint); + + if (!m_object) + return E_FAIL; + + IntPoint point = m_object->documentFrameView()->screenToContents(IntPoint(x, y)); + AccessibilityObject* childObj = m_object->doAccessibilityHitTest(point); + + if (!childObj) { + // If we did not hit any child objects, test whether the point hit us, and + // report that. + if (!m_object->boundingBoxRect().contains(point)) + return S_FALSE; + childObj = m_object; + } + + if (childObj == m_object) { + V_VT(pvChildAtPoint) = VT_I4; + V_I4(pvChildAtPoint) = CHILDID_SELF; + } else { + V_VT(pvChildAtPoint) = VT_DISPATCH; + V_DISPATCH(pvChildAtPoint) = static_cast<IDispatch*>(wrapper(childObj)); + V_DISPATCH(pvChildAtPoint)->AddRef(); + } + return S_OK; +} + +HRESULT STDMETHODCALLTYPE AccessibleBase::accDoDefaultAction(VARIANT vChild) +{ + AccessibilityObject* childObj; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObj); + + if (FAILED(hr)) + return hr; + + if (!childObj->performDefaultAction()) + return S_FALSE; + + return S_OK; +} + +// AccessibleBase +String AccessibleBase::name() const +{ + return m_object->title(); +} + +String AccessibleBase::value() const +{ + return m_object->stringValue(); +} + +String AccessibleBase::description() const +{ + String desc = m_object->accessibilityDescription(); + if (desc.isNull()) + return desc; + + // From the Mozilla MSAA implementation: + // "Signal to screen readers that this description is speakable and is not + // a formatted positional information description. Don't localize the + // 'Description: ' part of this string, it will be parsed out by assistive + // technologies." + return "Description: " + desc; +} + +static long MSAARole(AccessibilityRole role) +{ + switch (role) { + case WebCore::ButtonRole: + return ROLE_SYSTEM_PUSHBUTTON; + case WebCore::RadioButtonRole: + return ROLE_SYSTEM_RADIOBUTTON; + case WebCore::CheckBoxRole: + return ROLE_SYSTEM_CHECKBUTTON; + case WebCore::SliderRole: + return ROLE_SYSTEM_SLIDER; + case WebCore::TabGroupRole: + return ROLE_SYSTEM_PAGETABLIST; + case WebCore::TextFieldRole: + case WebCore::TextAreaRole: + case WebCore::ListMarkerRole: + return ROLE_SYSTEM_TEXT; + case WebCore::StaticTextRole: + return ROLE_SYSTEM_STATICTEXT; + case WebCore::OutlineRole: + return ROLE_SYSTEM_OUTLINE; + case WebCore::ColumnRole: + return ROLE_SYSTEM_COLUMN; + case WebCore::RowRole: + return ROLE_SYSTEM_ROW; + case WebCore::GroupRole: + return ROLE_SYSTEM_GROUPING; + case WebCore::ListRole: + return ROLE_SYSTEM_LIST; + case WebCore::TableRole: + return ROLE_SYSTEM_TABLE; + case WebCore::LinkRole: + case WebCore::WebCoreLinkRole: + return ROLE_SYSTEM_LINK; + case WebCore::ImageMapRole: + case WebCore::ImageRole: + return ROLE_SYSTEM_GRAPHIC; + default: + // This is the default role for MSAA. + return ROLE_SYSTEM_CLIENT; + } +} + +long AccessibleBase::role() const +{ + return MSAARole(m_object->roleValue()); +} + +HRESULT AccessibleBase::getAccessibilityObjectForChild(VARIANT vChild, AccessibilityObject*& childObj) const +{ + childObj = 0; + + if (!m_object) + return E_FAIL; + + if (vChild.vt != VT_I4) + return E_INVALIDARG; + + if (vChild.lVal == CHILDID_SELF) + childObj = m_object; + else { + size_t childIndex = static_cast<size_t>(vChild.lVal - 1); + + if (childIndex >= m_object->children().size()) + return E_FAIL; + childObj = m_object->children().at(childIndex).get(); + } + + if (!childObj) + return E_FAIL; + + return S_OK; +} + +AccessibleBase* AccessibleBase::wrapper(AccessibilityObject* obj) +{ + AccessibleBase* result = static_cast<AccessibleBase*>(obj->wrapper()); + if (!result) + result = createInstance(obj); + return result; +} diff --git a/WebKit/win/AccessibleBase.h b/WebKit/win/AccessibleBase.h new file mode 100644 index 0000000..c69c57d --- /dev/null +++ b/WebKit/win/AccessibleBase.h @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef AccessibleBase_h +#define AccessibleBase_h + +#include <oleacc.h> +#include <WebCore/AccessibilityObject.h> +#include <WebCore/AccessibilityObjectWrapperWin.h> + +class AccessibleBase : public IAccessible, public WebCore::AccessibilityObjectWrapper { +public: + static AccessibleBase* createInstance(WebCore::AccessibilityObject*); + + // IUnknown + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(void) { return ++m_refCount; } + virtual ULONG STDMETHODCALLTYPE Release(void); + + // IAccessible + virtual HRESULT STDMETHODCALLTYPE get_accParent(IDispatch**); + virtual HRESULT STDMETHODCALLTYPE get_accChildCount(long*); + virtual HRESULT STDMETHODCALLTYPE get_accChild(VARIANT vChild, IDispatch** ppChild); + virtual HRESULT STDMETHODCALLTYPE get_accName(VARIANT vChild, BSTR*); + virtual HRESULT STDMETHODCALLTYPE get_accValue(VARIANT vChild, BSTR*); + virtual HRESULT STDMETHODCALLTYPE get_accDescription(VARIANT, BSTR*); + virtual HRESULT STDMETHODCALLTYPE get_accRole(VARIANT vChild, VARIANT* pvRole); + virtual HRESULT STDMETHODCALLTYPE get_accState(VARIANT vChild, VARIANT* pvState); + virtual HRESULT STDMETHODCALLTYPE get_accHelp(VARIANT vChild, BSTR* helpText); + virtual HRESULT STDMETHODCALLTYPE get_accKeyboardShortcut(VARIANT vChild, BSTR*); + virtual HRESULT STDMETHODCALLTYPE get_accFocus(VARIANT* pvFocusedChild); + virtual HRESULT STDMETHODCALLTYPE get_accSelection(VARIANT* pvSelectedChild); + virtual HRESULT STDMETHODCALLTYPE get_accDefaultAction(VARIANT vChild, BSTR* actionDescription); + virtual HRESULT STDMETHODCALLTYPE accSelect(long selectionFlags, VARIANT vChild); + virtual HRESULT STDMETHODCALLTYPE accLocation(long* left, long* top, long* width, long* height, VARIANT vChild); + virtual HRESULT STDMETHODCALLTYPE accNavigate(long direction, VARIANT vFromChild, VARIANT* pvNavigatedTo); + virtual HRESULT STDMETHODCALLTYPE accHitTest(long x, long y, VARIANT* pvChildAtPoint); + virtual HRESULT STDMETHODCALLTYPE accDoDefaultAction(VARIANT vChild); + + // IAccessible - Not to be implemented. + virtual HRESULT STDMETHODCALLTYPE put_accName(VARIANT, BSTR) { return E_NOTIMPL; } + virtual HRESULT STDMETHODCALLTYPE put_accValue(VARIANT, BSTR) { return E_NOTIMPL; } + virtual HRESULT STDMETHODCALLTYPE get_accHelpTopic(BSTR* helpFile, VARIANT, long* topicID) + { + *helpFile = 0; + *topicID = 0; + return E_NOTIMPL; + } + + // IDispatch - Not to be implemented. + virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT* count) + { + *count = 0; + return E_NOTIMPL; + } + virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT, LCID, ITypeInfo** ppTInfo) + { + *ppTInfo = 0; + return E_NOTIMPL; + } + virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID, LPOLESTR*, UINT, LCID, DISPID*) { return E_NOTIMPL; } + virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID, REFIID, LCID, WORD, DISPPARAMS*, VARIANT*, EXCEPINFO*, UINT*) { return E_NOTIMPL; } + + // WebCore::AccessiblityObjectWrapper + virtual void detach() { + ASSERT(m_object); + m_object = 0; + } + +protected: + AccessibleBase(WebCore::AccessibilityObject*); + virtual ~AccessibleBase(); + + virtual WebCore::String name() const; + virtual WebCore::String value() const; + virtual WebCore::String description() const; + virtual long role() const; + + HRESULT getAccessibilityObjectForChild(VARIANT vChild, WebCore::AccessibilityObject*&) const; + + static AccessibleBase* wrapper(WebCore::AccessibilityObject*); + + int m_refCount; + +private: + AccessibleBase() { } +}; + +#endif // AccessibleBase_h + diff --git a/WebKit/win/AccessibleDocument.cpp b/WebKit/win/AccessibleDocument.cpp new file mode 100644 index 0000000..600443f --- /dev/null +++ b/WebKit/win/AccessibleDocument.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "AccessibleDocument.h" + +#include <WebCore/AXObjectCache.h> +#include <WebCore/Document.h> +#include <WebCore/RenderObject.h> + +using namespace WebCore; + +// AccessibleDocument +AccessibleDocument::AccessibleDocument(Document* doc) + : AccessibleBase(doc->axObjectCache()->get(doc->renderer())) +{ +} + +Document* AccessibleDocument::document() const +{ + if (!m_object) + return 0; + return m_object->document(); +} diff --git a/WebKit/win/AccessibleDocument.h b/WebKit/win/AccessibleDocument.h new file mode 100644 index 0000000..50bf919 --- /dev/null +++ b/WebKit/win/AccessibleDocument.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef AccessibleDocument_h +#define AccessibleDocument_h + +#include "AccessibleBase.h" +#include "WebKit.h" + +using WebCore::Document; + +class AccessibleDocument : public AccessibleBase { +public: + AccessibleDocument(Document*); + Document* document() const; +}; + +#endif // AccessibleDocument_h diff --git a/WebKit/win/CFDictionaryPropertyBag.cpp b/WebKit/win/CFDictionaryPropertyBag.cpp index 22de1b8..32457f1 100644 --- a/WebKit/win/CFDictionaryPropertyBag.cpp +++ b/WebKit/win/CFDictionaryPropertyBag.cpp @@ -35,6 +35,14 @@ CFDictionaryPropertyBag::CFDictionaryPropertyBag() : m_refCount(1) { + gClassCount++; + gClassNameCount.add("CFDictionaryPropertyBag"); +} + +CFDictionaryPropertyBag::~CFDictionaryPropertyBag() +{ + gClassCount--; + gClassNameCount.remove("CFDictionaryPropertyBag"); } CFDictionaryPropertyBag* CFDictionaryPropertyBag::createInstance() @@ -171,7 +179,7 @@ HRESULT STDMETHODCALLTYPE CFDictionaryPropertyBag::Write(LPCOLESTR pszPropName, if (!pszPropName || !pVar) return E_POINTER; if (!m_dictionary) { - m_dictionary = CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + m_dictionary.adoptCF(CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); } void* cfObj; if (ConvertVariantToCFType(pVar, &cfObj)) { diff --git a/WebKit/win/CFDictionaryPropertyBag.h b/WebKit/win/CFDictionaryPropertyBag.h index 4e74689..23763b3 100644 --- a/WebKit/win/CFDictionaryPropertyBag.h +++ b/WebKit/win/CFDictionaryPropertyBag.h @@ -35,6 +35,7 @@ public: static CFDictionaryPropertyBag* createInstance(); protected: CFDictionaryPropertyBag(); + ~CFDictionaryPropertyBag(); public: // IUnknown diff --git a/WebKit/win/COMEnumVariant.h b/WebKit/win/COMEnumVariant.h index be0ac8c..98b770d 100644 --- a/WebKit/win/COMEnumVariant.h +++ b/WebKit/win/COMEnumVariant.h @@ -1,29 +1,26 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 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 * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef COMEnumVariant_h @@ -32,49 +29,9 @@ #define NOMINMAX #include <unknwn.h> -#include <WebCore/BString.h> -#include <wtf/Assertions.h> #include <wtf/Noncopyable.h> -namespace WebCore { - class String; -} - -template<typename T> struct COMVariantSetter {}; - -template<> struct COMVariantSetter<WebCore::String> -{ - static void setVariant(VARIANT* variant, const WebCore::String& value) - { - ASSERT(V_VT(variant) == VT_EMPTY); - - V_VT(variant) = VT_BSTR; - V_BSTR(variant) = WebCore::BString(value).release(); - } -}; - -template<> struct COMVariantSetter<unsigned long long> -{ - static void setVariant(VARIANT* variant, unsigned long long value) - { - ASSERT(V_VT(variant) == VT_EMPTY); - - V_VT(variant) = VT_UI8; - V_UI8(variant) = value; - } -}; - -template<typename COMType, typename UnderlyingType> -struct COMIUnknownVariantSetter -{ - static void setVariant(VARIANT* variant, const UnderlyingType& value) - { - ASSERT(V_VT(variant) == VT_EMPTY); - - V_VT(variant) = VT_UNKNOWN; - V_UNKNOWN(variant) = COMType::createInstance(value); - } -}; +#include "COMVariantSetter.h" template<typename ContainerType> class COMEnumVariant : public IEnumVARIANT, Noncopyable { diff --git a/WebKit/win/COMPropertyBag.h b/WebKit/win/COMPropertyBag.h new file mode 100644 index 0000000..6bec57f --- /dev/null +++ b/WebKit/win/COMPropertyBag.h @@ -0,0 +1,220 @@ +/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef COMPropertyBag_h
+#define COMPropertyBag_h
+
+#define NOMINMAX
+#include <unknwn.h>
+
+#include <wtf/Noncopyable.h>
+#include <wtf/HashMap.h>
+
+#include "COMVariantSetter.h"
+
+template<typename ValueType, typename HashType = typename WebCore::StringHash>
+class COMPropertyBag : public IPropertyBag, public IPropertyBag2, Noncopyable {
+public:
+ typedef HashMap<WebCore::String, ValueType, HashType> HashMapType;
+
+ static COMPropertyBag* createInstance(const HashMapType&);
+ static COMPropertyBag* adopt(HashMapType&);
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef();
+ virtual ULONG STDMETHODCALLTYPE Release();
+
+ // IPropertyBag
+ virtual HRESULT STDMETHODCALLTYPE Read(LPCOLESTR pszPropName, VARIANT*, IErrorLog*);
+ virtual HRESULT STDMETHODCALLTYPE Write(LPCOLESTR pszPropName, VARIANT*);
+
+ // IPropertyBag2
+ virtual HRESULT STDMETHODCALLTYPE Read(ULONG cProperties, PROPBAG2*, IErrorLog*, VARIANT* pvarValue, HRESULT* phrError);
+ virtual HRESULT STDMETHODCALLTYPE Write(ULONG cProperties, PROPBAG2*, VARIANT*);
+ virtual HRESULT STDMETHODCALLTYPE CountProperties(ULONG* pcProperties);
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyInfo(ULONG iProperty, ULONG cProperties, PROPBAG2* pPropBag, ULONG* pcProperties);
+ virtual HRESULT STDMETHODCALLTYPE LoadObject(LPCOLESTR pstrName, DWORD dwHint, IUnknown*, IErrorLog*);
+
+private:
+ COMPropertyBag()
+ : m_refCount(0)
+ {
+ }
+
+ COMPropertyBag(const HashMapType& hashMap)
+ : m_refCount(0)
+ , m_hashMap(hashMap)
+ {
+ }
+
+ ~COMPropertyBag() {}
+
+ ULONG m_refCount;
+ HashMapType m_hashMap;
+};
+
+// COMPropertyBag ------------------------------------------------------------------
+template<typename ValueType, typename HashType>
+COMPropertyBag<ValueType, HashType>* COMPropertyBag<typename ValueType, HashType>::createInstance(const HashMapType& hashMap)
+{
+ COMPropertyBag* instance = new COMPropertyBag(hashMap);
+ instance->AddRef();
+ return instance;
+}
+
+template<typename ValueType, typename HashType>
+COMPropertyBag<ValueType, HashType>* COMPropertyBag<typename ValueType, HashType>::adopt(HashMapType& hashMap)
+{
+ COMPropertyBag* instance = new COMPropertyBag;
+ instance->m_hashMap.swap(hashMap);
+ instance->AddRef();
+ return instance;
+}
+
+// IUnknown ------------------------------------------------------------------------
+template<typename ValueType, typename HashType>
+HRESULT STDMETHODCALLTYPE COMPropertyBag<ValueType, HashType>::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualGUID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IPropertyBag*>(this);
+ else if (IsEqualGUID(riid, IID_IPropertyBag))
+ *ppvObject = static_cast<IPropertyBag*>(this);
+ else if (IsEqualGUID(riid, IID_IPropertyBag2))
+ *ppvObject = static_cast<IPropertyBag2*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+template<typename ValueType, typename HashType>
+ULONG STDMETHODCALLTYPE COMPropertyBag<ValueType, HashType>::AddRef()
+{
+ return ++m_refCount;
+}
+
+template<typename ValueType, typename HashType>
+ULONG STDMETHODCALLTYPE COMPropertyBag<ValueType, HashType>::Release()
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete this;
+
+ return newRef;
+}
+
+// IPropertyBag --------------------------------------------------------------------
+
+template<typename ValueType, typename HashType>
+HRESULT STDMETHODCALLTYPE COMPropertyBag<ValueType, HashType>::Read(LPCOLESTR pszPropName, VARIANT* pVar, IErrorLog* pErrorLog)
+{
+ if (!pszPropName)
+ return E_POINTER;
+
+ HashMapType::const_iterator it = m_hashMap.find(String(pszPropName));
+ HashMapType::const_iterator end = m_hashMap.end();
+ if (it == end)
+ return E_INVALIDARG;
+
+ VARTYPE requestedType = V_VT(pVar);
+ V_VT(pVar) = VT_EMPTY;
+ COMVariantSetter<ValueType>::setVariant(pVar, it->second);
+
+ if (requestedType != COMVariantSetter<ValueType>::VariantType && requestedType != VT_EMPTY)
+ return ::VariantChangeType(pVar, pVar, VARIANT_NOUSEROVERRIDE | VARIANT_ALPHABOOL, requestedType);
+
+ return S_OK;
+}
+
+template<typename ValueType, typename HashType>
+HRESULT STDMETHODCALLTYPE COMPropertyBag<ValueType, HashType>::Write(LPCOLESTR pszPropName, VARIANT* pVar)
+{
+ return E_FAIL;
+}
+
+template<typename ValueType, typename HashType>
+HRESULT STDMETHODCALLTYPE COMPropertyBag<ValueType, HashType>::Read(ULONG cProperties, PROPBAG2*, IErrorLog*, VARIANT* pvarValue, HRESULT* phrError)
+{
+ return E_NOTIMPL;
+}
+
+template<typename ValueType, typename HashType>
+HRESULT STDMETHODCALLTYPE COMPropertyBag<ValueType, HashType>::Write(ULONG cProperties, PROPBAG2*, VARIANT*)
+{
+ return E_NOTIMPL;
+}
+
+template<typename ValueType, typename HashType>
+HRESULT STDMETHODCALLTYPE COMPropertyBag<ValueType, HashType>::CountProperties(ULONG* pcProperties)
+{
+ if (!pcProperties)
+ return E_POINTER;
+
+ *pcProperties = m_hashMap.size();
+ return S_OK;
+}
+
+template<typename ValueType, typename HashType>
+HRESULT STDMETHODCALLTYPE COMPropertyBag<ValueType, HashType>::GetPropertyInfo(ULONG iProperty, ULONG cProperties, PROPBAG2* pPropBag, ULONG* pcProperties)
+{
+ if (!pPropBag || !pcProperties)
+ return E_POINTER;
+
+ if (m_hashMap.size() <= iProperty)
+ return E_INVALIDARG;
+
+ *pcProperties = 0;
+ typedef HashMapType::const_iterator Iterator;
+ Iterator current = m_hashMap.begin();
+ Iterator end = m_hashMap.end();
+ for (ULONG i = 0; i < iProperty; ++i, ++current)
+ ;
+ for (ULONG j = 0; j < cProperties && current != end; ++j, ++current) {
+ // FIXME: the following fields aren't filled in
+ //pPropBag[j].dwType; // (DWORD) Type of property. This will be one of the PROPBAG2_TYPE values. + //pPropBag[j].cfType; // (CLIPFORMAT) Clipboard format or MIME type of the property. + //pPropBag[j].clsid; // (CLSID) CLSID of the object. This member is valid only if dwType is PROPBAG2_TYPE_OBJECT. +
+ pPropBag[j].vt = COMVariantSetter<ValueType>::VariantType;
+ pPropBag[j].dwHint = iProperty + j;
+ pPropBag[j].pstrName = (LPOLESTR)CoTaskMemAlloc(sizeof(wchar_t)*(current->first.length()+1));
+ if (!pPropBag[j].pstrName)
+ return E_OUTOFMEMORY;
+ wcscpy_s(pPropBag[j].pstrName, current->first.length()+1, static_cast<String>(current->first).charactersWithNullTermination());
+ ++*pcProperties;
+ }
+ return S_OK;
+}
+
+template<typename ValueType, typename HashType>
+HRESULT STDMETHODCALLTYPE COMPropertyBag<ValueType, HashType>::LoadObject(LPCOLESTR pstrName, DWORD dwHint, IUnknown*, IErrorLog*)
+{
+ return E_NOTIMPL;
+}
+
+#endif // COMPropertyBag_h
diff --git a/WebKit/win/COMVariantSetter.h b/WebKit/win/COMVariantSetter.h new file mode 100644 index 0000000..5c6b21c --- /dev/null +++ b/WebKit/win/COMVariantSetter.h @@ -0,0 +1,106 @@ +/*
+ * Copyright (C) 2007, 2008 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef COMVariantSetter_h
+#define COMVariantSetter_h
+
+#include <WebCore/BString.h>
+#include <WebCore/COMPtr.h>
+#include <wtf/Assertions.h>
+
+namespace WebCore {
+ class String;
+}
+
+template<typename T> struct COMVariantSetter {};
+
+template<> struct COMVariantSetter<WebCore::String>
+{
+ static const VARENUM VariantType = VT_BSTR;
+
+ static void setVariant(VARIANT* variant, const WebCore::String& value)
+ {
+ ASSERT(V_VT(variant) == VT_EMPTY);
+
+ V_VT(variant) = VariantType;
+ V_BSTR(variant) = WebCore::BString(value).release();
+ }
+};
+
+template<> struct COMVariantSetter<unsigned long long>
+{
+ static const VARENUM VariantType = VT_UI8;
+
+ static void setVariant(VARIANT* variant, unsigned long long value)
+ {
+ ASSERT(V_VT(variant) == VT_EMPTY);
+
+ V_VT(variant) = VariantType;
+ V_UI8(variant) = value;
+ }
+};
+
+template<> struct COMVariantSetter<int>
+{
+ static const VARENUM VariantType = VT_I4;
+
+ static void setVariant(VARIANT* variant, int value)
+ {
+ ASSERT(V_VT(variant) == VT_EMPTY);
+
+ V_VT(variant) = VariantType;
+ V_I4(variant) = value;
+ }
+};
+
+template<typename T> struct COMVariantSetter<COMPtr<T> >
+{
+ static const VARENUM VariantType = VT_UNKNOWN;
+
+ static void setVariant(VARIANT* variant, const COMPtr<T>& value)
+ {
+ ASSERT(V_VT(variant) == VT_EMPTY);
+
+ V_VT(variant) = VariantType;
+ V_UNKNOWN(variant) = value.get();
+ value->AddRef();
+ }
+};
+
+template<typename COMType, typename UnderlyingType>
+struct COMIUnknownVariantSetter
+{
+ static const VARENUM VariantType = VT_UNKNOWN;
+
+ static void setVariant(VARIANT* variant, const UnderlyingType& value)
+ {
+ ASSERT(V_VT(variant) == VT_EMPTY);
+
+ V_VT(variant) = VariantType;
+ V_UNKNOWN(variant) = COMType::createInstance(value);
+ }
+};
+
+#endif // COMVariantSetter
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index 90fc29d..ae26480 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,4519 @@ +2008-11-01 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=22030 + Make EventNames usable from multiple threads + + * WebView.cpp: (WebView::interpretKeyEvent): Access event names via eventNames() function. + +2008-11-03 Cameron Zwarich <zwarich@apple.com> + + Rubber-stamped by Maciej Stachowiak. + + Move more files into the runtime subdirectory of JavaScriptCore. + + * WebJavaScriptCollector.cpp: + +2008-11-03 Dan Bernstein <mitz@apple.com> + + Reviewed by Steve Falkenburg. + + - implement WebMutableURLRequest::setHTTPShouldHandleCookies() + - add and implement WebMutableURLRequest::mutableCopy() + + * Interfaces/IWebURLRequest.idl: + * WebMutableURLRequest.cpp: + (WebMutableURLRequest::setHTTPShouldHandleCookies): + (WebMutableURLRequest::mutableCopy): + * WebMutableURLRequest.h: + +2008-10-31 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - WebKit/win part of <rdar://problem/6334641> Add WebView SPI for disabling document.cookie + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::setCookieEnabled): + (WebView::cookieEnabled): + * WebView.h: + +2008-10-31 Adele Peterson <adele@apple.com> + + Reviewed by Darin Adler. + + WebKit Windows part of fix for <rdar://problem/5839256> FILE CONTROL: multi-file upload. + https://bugs.webkit.org/show_bug.cgi?id=22008 + + * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::runOpenPanel): + Add support for mulitple file selection. + +2008-10-31 Darin Adler <darin@apple.com> + + - try to fix build + + * WebView.cpp: + (WebView::setCacheModel): Roll out the part of my last change + that involved no longer using wkCopyFoundationCacheDirectory. + +2008-10-30 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + - https://bugs.webkit.org/show_bug.cgi?id=21986 + <rdar://problem/6294285> adopt CFURLCopySharedURLCache + + * WebView.cpp: + (WebView::setCacheModel): Use CFURLCopySharedURLCache if present. + +2008-10-30 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + - export WTFReportAssertionFailureWithMessage() + + * WebKit.vcproj/WebKit_debug.def: + +2008-10-29 Steve Falkenburg <sfalken@apple.com> + + <rdar://problem/6326563> Crash on launch + + For Windows, export explicit functions rather than exporting data for atomicallyInitializedStaticMutex. + + Exporting data from a DLL on Windows requires specifying __declspec(dllimport) in the header used by + callers, but __declspec(dllexport) when defined in the DLL implementation. By instead exporting + the explicit lock/unlock functions, we can avoid this. + + Fixes a crash on launch, since we were previously erroneously exporting atomicallyInitializedStaticMutex as a function. + + Reviewed by Darin Adler. + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + +2008-10-29 Jon Honeycutt <jhoneycutt@apple.com> + + Export atomicallyInitializedStaticMutex. + + Rubber-stamped by Steve Falkenburg. + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + +2008-10-28 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Mark Rowe. + + Move ForwardingHeaders to their correct location after the creation of + the runtime directory in JavaScriptCore. + + * WebScriptCallFrame.h: + +2008-10-28 Adele Peterson <adele@apple.com> + + Reviewed by John Sullivan. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=21880 + "files" string for multifile uploads needs to be localized + + * WebCoreLocalizedStrings.cpp: (multipleFileUploadText): + +2008-10-28 Adele Peterson <adele@apple.com> + + Reviewed by Sam Weinig. + + * English.lproj: Removed. + * English.lproj/Localizable.strings: Removed. + * WebKit.vcproj/WebKit.vcproj: Updated to use Localizable.strings in the top directory, to share with the Mac. + +2008-10-28 Timothy Hatcher <timothy@apple.com> + + Add IWebInspector methods to enable the profiler. + + https://bugs.webkit.org/show_bug.cgi?id=21927 + + <rdar://problem/6211578> Make the JavaScript profiler opt-in, so it does + not slow down JavaScript all the time + + Reviewed by Darin Adler and Kevin McCullough. + + * WebInspector.cpp: + (WebInspector::isJavaScriptProfilingEnabled): Added. Calls InspectorController::profilerEnabled. + (WebInspector::setJavaScriptProfilingEnabled): Added. Call InspectorController's disableProfiler + or enableProfiler methods. + * WebInspector.h: + +2008-10-27 Timothy Hatcher <timothy@apple.com> + + Rename a few methods related to attaching and detaching the debugger. + + * Rename attachDebugger to enableDebugger. + * Rename detachDebugger to disableDebugger. + * Rename the debuggerAttached getter to debuggerEnabled. + + Reviewed by Darin Adler. + + * WebInspector.cpp: + (WebInspector::isDebuggingJavaScript): + (WebInspector::toggleDebuggingJavaScript): + +2008-10-24 Sam Weinig <sam@webkit.org> + + Yet another windows build fix. + + * WebCoreSupport/WebChromeClient.cpp: + +2008-10-24 Sam Weinig <sam@webkit.org> + + Another windows build fix. + + * WebCoreSupport/WebChromeClient.cpp: + +2008-10-24 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Fix https://bugs.webkit.org/show_bug.cgi?id=21759 + Layering violation: FileChooser should not depend on Document/Frame/Page + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::runOpenPanel): + * WebCoreSupport/WebChromeClient.h: + +2008-10-24 Timothy Hatcher <timothy@apple.com> + + Implement new InspectorClient methods to work with Settings. + + https://bugs.webkit.org/show_bug.cgi?id=21856 + + Reviewed by Adam Roben. + + * WebKit.vcproj/WebKit.vcproj: Add the new InspectorClientCF.cpp file. + * WebCoreSupport/WebInspectorClient.h: Add the new methods. + +2008-10-24 Darin Adler <darin@apple.com> + + - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732 + + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::jsValueToString): + (WebScriptCallFrame::stringByEvaluatingJavaScriptFromString): + (WebScriptCallFrame::valueForVariable): + (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString): + * WebScriptCallFrame.h: + * WebView.cpp: + (WebView::stringByEvaluatingJavaScriptFromString): + Use JSValue* instead of JSValuePtr. + +2008-10-22 Brent Fulgham <bfulgham@gmail.com> + + Correct build regressions in Cairo port for Windows. + http://bugs.webkit.org/show_bug.cgi?id=21724 + + Reviewed by Adam Roben. + + * WebView.cpp: + (WebView::notifyPreferencesChanged): Don't try to call + setShouldPaintNativeControls when SafariTheme support is disabled, as + that function doesn't exist in that case. + +2008-10-22 Brady Eidson <beidson@apple.com> + + Reviewed by Adam Roben + + Move elementDoesAutoComplete() to IWebFramePrivate so it is exposed for DRT to use + + * Interfaces/IWebFramePrivate.idl: + + * WebFrame.cpp: + (WebFrame::elementDoesAutoComplete): + * WebFrame.h: + + * WebHTMLRepresentation.cpp: + (WebHTMLRepresentation::elementDoesAutoComplete): + +2008-10-20 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Remove FrameLoaderClient::detachedFromParent4. It is no longer used by any port. + + * WebFrame.cpp: + * WebFrame.h: + +2008-10-19 Darin Adler <darin@apple.com> + + Reviewed by Oliver Hunt. + + - next step of https://bugs.webkit.org/show_bug.cgi?id=21732 + improve performance by eliminating JSValue as a base class for JSCell + + Remove most uses of JSValue, which will be removed in a future patch. + + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::jsValueToString): Use JSValuePtr. + (WebScriptCallFrame::stringByEvaluatingJavaScriptFromString): Ditto. + (WebScriptCallFrame::valueForVariable): Put more code inside and ifdef. + (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString): Ditto. + * WebScriptCallFrame.h: Use JSValuePtr. + + * WebView.cpp: + (WebView::stringByEvaluatingJavaScriptFromString): Use JSValuePtr. + +2008-10-18 Dan Bernstein <mitz@apple.com> + + - build fix + + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::jsValueToString): + +2008-10-18 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + - WebKit/win part of https://bugs.webkit.org/show_bug.cgi?id=21736 + Long-dead decoded image data make up for most of the object cache's memory use over time + + * WebView.cpp: + (WebView::setCacheModel): In the primary web browser model, + set the cache's dead decoded data deletion interval to 60 seconds. + +2008-10-16 Kevin McCullough <kmccullough@apple.com> + + Reviewed by Steve Falkenburg. + + <rdar://problem/6292718> + Implement a standard way to get the UA given an application name. + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::standardUserAgentWithApplicationName): + * WebView.h: + +2008-10-17 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + - export WTF::initializeOnMainThread() + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + +2008-10-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Fixed https://bugs.webkit.org/show_bug.cgi?id=21345 + Start the debugger without reloading the inspected page + + * WebInspector.cpp: + (WebInspector::toggleDebuggingJavaScript): Updated for rename. + +2008-10-15 Adam Roben <aroben@apple.com> + + Export WTF::Mutex::tryLock + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + +2008-10-14 Jon Honeycutt <jhoneycutt@apple.com> + + Export currentThread. + + Rubber-stamped by Dan Bernstein. + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + +2008-10-13 Steve Falkenburg <sfalken@apple.com> + + Reorder methods to preserve compatibility. + + Rubber stamped by Oliver Hunt. + + * Interfaces/IWebViewPrivate.idl: + +2008-10-11 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + - add SPI for forcing the complex text code path to be used for all text + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::setAlwaysUsesComplexTextCodePath): + (WebView::alwaysUsesComplexTextCodePath): + * WebView.h: + +2008-10-10 Ada Chan <adachan@apple.com> + + Bug 21526: The hashmap webPreferencesInstances in WebPreferences.cpp can + potentially hold onto stale instances of WebPreferences + https://bugs.webkit.org/show_bug.cgi?id=21526 + + webPreferencesInstances now keeps a reference to all the instances it holds. + Fix up callers of WebPreferences::removeReferenceForIdentifier() to call + it after they have released their references to the WebPreferences objects. + + Reviewed by Adam Roben. + + * WebPreferences.cpp: + (WebPreferences::getInstanceForIdentifier): + (WebPreferences::removeReferenceForIdentifier): + * WebView.cpp: + (WebView::close): + (WebView::setPreferences): + +2008-10-06 David Hyatt <hyatt@apple.com> + + Enable viewless Mac WebKit to paint some basic pages. + + Reviewed by Sam Weinig + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::createFrame): + * WebCoreSupport/WebFrameLoaderClient.h: + +2008-10-03 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21340 + + Remove "containingWindow()/setContainingWindow()" from Widget. HostWindow covers this now. + + Reviewed by Dan Bernstein & Darin Adler + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::transitionToCommittedForNewPage): + * WebScrollBar.cpp: + (WebScrollBar::WebScrollBar): + (WebScrollBar::init): + (WebScrollBar::invalidateScrollbarRect): + * WebScrollBar.h: + +2008-10-03 David Hyatt <hyatt@apple.com> + + Remove addToDirtyRegion. + + Reviewed by Oliver Hunt + + * WebCoreSupport/WebChromeClient.cpp: + +2008-10-02 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21328 + + Make widget invalidation more cross-platform. + + (1) Make invalidateRect a pure virtual function on Widget. All leaf widgets must now implement this function. + + (2) Scrollbars now send invalidations through the ScrollbarClient. windowClipRect on ScrollbarClient has been removed and replaced with this invalidation call. + This allows all scrollbar invalidations to go through the render tree so that transforms and reflections will be respected. + + (3) Plugins now have the native window invalidation code for windowed plugins. Windowless plugins do a repaintRectangle on the plugin's renderer. + + (4) FrameViews now do a repaintRectangle on their owner element's renderer. + + Reviewed by Sam Weinig + + * WebCoreSupport/EmbeddedWidget.cpp: + (EmbeddedWidget::invalidateRect): + * WebCoreSupport/EmbeddedWidget.h: + * WebScrollBar.cpp: + (WebScrollBar::invalidateScrollbarRect): + * WebScrollBar.h: + +2008-10-02 Darin Adler <darin@apple.com> + + - https://bugs.webkit.org/show_bug.cgi?id=21321 + Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData + + * WebCoreStatistics.cpp: + (WebCoreStatistics::javaScriptObjectsCount): Use heap. instead of heap-> to + work with the heap. + (WebCoreStatistics::javaScriptGlobalObjectsCount): Ditto. + (WebCoreStatistics::javaScriptProtectedObjectsCount): Ditto. + (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): Ditto. + (WebCoreStatistics::javaScriptProtectedObjectTypeCounts): Ditto. + * WebJavaScriptCollector.cpp: + (WebJavaScriptCollector::objectCount): Ditto. + +2008-10-02 Dave Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21316 + + Reviewed by Adele + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::transitionToCommittedForNewPage): + +2008-10-02 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21314 + + Make scrollBackingStore cross-platform. + + Reviewed by Sam Weinig + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::repaint): + (WebChromeClient::scroll): + * WebCoreSupport/WebChromeClient.h: + * WebView.cpp: + (WebView::repaint): + * WebView.h: + +2008-10-01 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21298 + + Make updateScrollbars cross-platform. For now a stubbed out scrollContents function is invoked to do the scrolling of the backing store. Next patch + will make that cross-platform. + + The ScrollView now implements ScrollbarClient, which means that there was a clash of windowClipRect methods from the + multiple inheritance. For now I solved this by adding a Scrollbar* to the ScrollbarClient version of the method, but longer term + windowClipRect is going to be removed from ScrollbarClient (when Widget invalidation gets rewritten). + + Reviewed by Sam Weinig + + * WebScrollBar.cpp: + (WebScrollBar::windowClipRect): + * WebScrollBar.h: + +2008-10-01 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21282 + + Make contentsToScreen/screenToContents cross-platform. Only implemented by Mac/Win right now. + + Reviewed by Adam Roben + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::windowToScreen): + (WebChromeClient::screenToWindow): + * WebCoreSupport/WebChromeClient.h: + +2008-09-30 Dave Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21269 + + This patch makes the ScrollView::paint method cross-platform. The paint method calls the base class + Widget paint on platforms with native widgets (Mac and wx). Otherwise it calls a virtual function, + paintContents, to paint the ScrollView's contents, and then it paints each of the two scrollbars and + the scrollbar corner. + + The scrollbar themes are now responsible for painting scrollbar corners. At the moment ScrollbarThemeWin still + paints white (which is incorrect), so a future patch will actually implement proper native scroll corner painting + for Windows. + + paintContents is implemented by FrameView, and replaces Frame::paint. All of the FramePrivate member + variables used by Frame::paint have moved to FrameViewPrivate instead. All callers of Frame::paint have + been patched to use FrameView::paintContents instead. + + Reviewed by Darin Adler + + * WebFrame.cpp: + (WebFrame::paintDocumentRectToContext): + (WebFrame::spoolPages): + +2008-09-30 Dave Hyatt <hyatt@apple.com> + + http://bugs.webkit.org/show_bug.cgi?id=21250 + + Rename updateContents to repaintContentRectangle and make it cross-platform by always sending + repaints up through the ChromeClient. + + Reviewed by Darin Adler + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::repaint): + * WebCoreSupport/WebChromeClient.h: + * WebView.cpp: + (WebView::repaint): + * WebView.h: + +2008-09-29 Dan Bernstein <mitz@apple.com> + + Reviewed by Adam Roben. + + - WebKit/win part of fixing <rdar://problem/6247906> REGRESSION (r19500): Crash on quit beneath CloseThemeData + + * WebKitDLL.cpp: + (DllMain): Call RenderThemeWin::setWebKitIsBeingUnloaded() when WebKit + is being unloaded. + +2008-09-27 David Hyatt <hyatt@apple.com> + + Land the frameGeometry->frameRect changes that I forgot to land in WebKit. + + * Interfaces/IWebScrollBarPrivate.idl: + * WebCoreSupport/EmbeddedWidget.cpp: + (EmbeddedWidget::setFrameRect): + (EmbeddedWidget::frameRectsChanged): + * WebCoreSupport/EmbeddedWidget.h: + * WebScrollBar.cpp: + (WebScrollBar::setRect): + (WebScrollBar::frameRect): + * WebScrollBar.h: + +2008-09-27 Anders Carlsson <andersca@apple.com> + + Fix build. + + * WebCoreSupport/EmbeddedWidget.cpp: + (EmbeddedWidget::setFrameRect): + (EmbeddedWidget::frameRectsChanged): + * WebCoreSupport/EmbeddedWidget.h: + * WebScrollBar.cpp: + (WebScrollBar::setRect): + (WebScrollBar::frameGeometry): + +2008-09-26 David Kilzer <ddkilzer@apple.com> + + Speculative Windows build fix with XSLT disabled + + Reviewed by Alexey. + + * WebCache.cpp: + (WebCache::statistics): Populate xslStyleSheet statistics with + zeros if XSLT is disabled. + +2008-09-24 Matt Lilek <webkit@mattlilek.com> + + Reviewed by Darin Adler. + + Bug 20999: Inspector hover to select does not work properly on Windows + https://bugs.webkit.org/show_bug.cgi?id=20999 + <rdar://problem/6236524> + + * WebNodeHighlight.cpp: + (WebNodeHighlight::show): + +2008-09-24 Darin Adler <darin@apple.com> + + * English.lproj/Localizable.strings: Updated for recent changes. + +2008-09-22 Alice Liu <alice.liu@apple.com> + + Added record-memory-win.vcproj tool to the solution + + Reviewed by Steve Falkenburg. + + * WebKit.vcproj/WebKit.sln: + +2008-09-20 Darin Adler <darin@apple.com> + + - fix build + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::paintCustomScrollbar): Tweaked constant names to make this + compile, but it may not be working correctly. Hyatt should do the real fix. + +2008-09-19 Alice Liu <alice.liu@apple.com> + + Fix crash when submitting form at bugreport.apple.com rdar://6234126 + + Reviewed by Mark Rowe. + + * COMPropertyBag.h: + (::GetPropertyInfo): + correct mis-use of comma operator + +2008-09-18 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + Add SPI to WebView to allow DRT to clear the main frame's name between tests. + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::clearMainFrameName): + * WebView.h: + +2008-09-16 Alp Toker <alp@nuanti.com> + + Suggested by Dave Hyatt. + + Build fix and cleanup. Rename ScrollBar to Scrollbar. + + * WebScrollBar.cpp: + * WebScrollBar.h: + +2008-09-16 David Hyatt <hyatt@apple.com> + + Eliminate PlatformScrollbar. + + Reviewed by Sam Weinig + + * WebScrollBar.cpp: + (WebScrollBar::init): + * WebScrollBar.h: + +2008-09-15 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler, Beth Dakin + + Support strings for AXLists + + * WebCoreLocalizedStrings.cpp: + (WebCore::AXDefinitionListTermText): + (WebCore::AXDefinitionListDefinitionText): + +2008-09-13 Dave Hyatt <hyatt@apple.com> + + Add ScrollbarTheme to the build. + + Reviewed by Sam Weinig + + * WebScrollBar.cpp: + (WebScrollBar::requestedWidth): + (WebScrollBar::requestedHeight): + +2008-09-13 Dave Hyatt <hyatt@apple.com> + + More scrollbar refactoring. + + Reviewed by Sam Weinig + + * WebScrollBar.h: + +2008-09-08 Adam Roben <aroben@apple.com> + + Respect the font smoothing preference when drawing via WebKitGraphics + + Reviewed by Dave Hyatt. + + * WebKitGraphics.cpp: + (makeFont): Check the font smoothing preference and update the + FontDescription's rendering mode based on it. + +2008-09-08 Steve Falkenburg <sfalken@apple.com> + + Another Windows nightly build fix. + + Remove non-production versions of CLSIDs since we'll use registry free COM with + an embedded manifest now in all cases to find COM classes. + + Reviewed by Sam Weinig. + + * ForEachCoClass.cpp: + (setUseOpenSourceWebKit): Remove COM registration code. + * Interfaces/WebKit.idl: Remove non-production COM classes + +2008-09-07 Cameron Zwarich <cwzwarich@uwaterloo.ca> + + Reviewed by Maciej Stachowiak. + + Bug 20704: Replace the KJS namespace + <https://bugs.webkit.org/show_bug.cgi?id=20704> + + Rename the KJS namespace to JSC. + + * WebCoreStatistics.cpp: + * WebJavaScriptCollector.cpp: + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::jsValueToString): + * WebScriptCallFrame.h: + (WebScriptCallFrame::state): + * WebView.cpp: + (WebView::WebView): + (WebView::stringByEvaluatingJavaScriptFromString): + +2008-09-05 Dave Hyatt <hyatt@apple.com> + + Add support for runtime switchability of the Aqua look and the native look on Windows. + Make RenderThemeWin compile by default even when USE(SAFARI_THEME) is set. + + Reviewed by Adam Roben + + * Interfaces/IWebPreferencesPrivate.idl: + * WebPreferenceKeysPrivate.h: + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): + (WebPreferences::shouldPaintNativeControls): + (WebPreferences::setShouldPaintNativeControls): + * WebPreferences.h: + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +2008-09-04 Adam Roben <aroben@apple.com> + + Make JavaScriptCoreGenerated build first instead of WTF + + JavaScriptCoreGenerated does some setup work that we want to happen + before WTF builds. + + * WebKit.vcproj/WebKit.sln: Reversed the dependencies of WTF and + JavaScriptCoreGenerated. + +2008-08-30 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Add WebView SPI to defer loading callbacks. + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::setDefersCallbacks): + (WebView::defersCallbacks): + * WebView.h: + +2008-08-28 Adele Peterson <adele@apple.com> + + Build fix. + + * WebIconDatabase.cpp: (WebIconDatabase::getOrCreateDefaultIconBitmap): + +2008-08-28 Holger Hans Peter Freyther <zecke@selfish.org> + + Rubber-stamped by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=17261 + + Remove the urlIcon.png from the project and the resource file. Remove + the usage of this icon from WebKitDLL.cpp and change WebIconDatabase + to get the icon from the IconDatabase code which is using a version of + the icon that is compiled into the code. + + * WebIconDatabase.cpp: + (WebIconDatabase::getOrCreateDefaultIconBitmap): Use the icon from the + IconDatabase.cpp + * WebKit.vcproj/WebKit.rc: Remove urlIcon.cpp + * WebKit.vcproj/urlIcon.png: Removed. + * WebKitDLL.cpp: + (loadResourceIntoBuffer): Remove "urlIcon" + +2008-08-27 Alice Liu <alice.liu@apple.com> + + Add interface for obtaining JS object counts broken down by type + + Reviewed by Steve Falkenburg. + + * Interfaces/IWebCoreStatistics.idl: + * WebCoreStatistics.cpp: + (WebCoreStatistics::javaScriptProtectedObjectTypeCounts): + * WebCoreStatistics.h: + +2008-08-27 Ada Chan <adachan@apple.com> + + Fixed build. + + * WebFrame.cpp: + (WebFrame::pluginWillHandleLoadError): + +2008-08-27 Brady Eidson <beidson@apple.com> + + Reviewed by Anders + + <rdar://problem/6134133> - Crash when loading large movie as a standalone document + + * WebFrame.cpp: + (WebFrame::pluginWillHandleLoadError): + * WebFrame.h: + +2008-08-26 Alice Liu <alice.liu@apple.com> + + Implement COMPropertyBag::GetPropertyInfo + and a variant setter for type int + + Reviewed by Anders Carlsson. + + * COMPropertyBag.h: + (::GetPropertyInfo): + * COMVariantSetter.h: + +2008-08-25 Adam Roben <aroben@apple.com> + + Fix an assertion when showing the Web Inspector + + Reviewed by Kevin McCullough. + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::attachWindow): + (WebInspectorClient::detachWindow): + Recent code changes have caused these functions to get called even + when the window is already attached/detached, respectively. Handle + this case gracefully instead of asserting something that is no longer + true. + +2008-08-24 Beth Dakin <bdakin@apple.com> + + Reviewed by John Sullivan. + + Provide the excludeFromTextSearch SPI on Windows as well. + + * Interfaces/IWebFrame.idl: + * WebFrame.cpp: + (WebFrame::setExcludeFromTextSearch): + * WebFrame.h: + +2008-08-24 Jon Honeycutt <jhoneycutt@apple.com> + + Cannot get the focused accessible object from the root object. + + AccessibleBase::get_AccFocus() checks whether the focused object is a + child of the current object, but + http://msdn.microsoft.com/en-us/library/ms696150(VS.85).aspx states that + the result is the object itself, if it has focus, or a child object of + the active window, not a child of the object. + + Reviewed by Sam Weinig. + + * AccessibleBase.cpp: + (AccessibleBase::get_accFocus): Don't check whether the focused object + is our child. + +2008-08-18 Jon Honeycutt <jhoneycutt@apple.com> + + Add SPI to make a Windows WebView transparent. + + Reviewed by Dan Bernstein. + + * Interfaces/IWebViewPrivate.idl: + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::transitionToCommittedForNewPage): Call + updateBackground() when a new frame is attached, matching the Mac. + * WebFrame.cpp: + (WebFrame::updateBackground): Propagate WebView transparency to ourself + and our child frames. + * WebFrame.h: + * WebView.cpp: + (WebView::WebView): + (WebView::paintIntoBackingStore): Pass m_transparent when creating a + GraphicsContext, so the context will be created with an alpha channel. + (WebView::setTransparent): + (WebView::transparent): + * WebView.h: + +2008-08-12 Jon Honeycutt <jhoneycutt@apple.com> + + Add SPI to get a handle to the WebView's backing store bitmap. + + Reviewed by Dan Bernstein. + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::backingStore): + * WebView.h: + +2008-08-21 Jonas Klink <klinktech@gmail.com> + + Reviewed by Jon Honeycutt. + + Fix https://bugs.webkit.org/show_bug.cgi?id=20231 + Bug 20231: accNavigate: no screen element found in the specified direction should return S_FALSE + + Per <http://msdn.microsoft.com/en-us/library/ms696145(VS.85).aspx>, we should return S_FALSE + from accNavigate if no screen element is found in the specified direction. + + * AccessibleBase.cpp: + (AccessibleBase::accNavigate): + +2008-08-21 Jonas Klink <klinktech@gmail.com> + + Reviewed by Jon Honeycutt. + + Fix http://bugs.webkit.org/show_bug.cgi?id=20230 + Bug 20230: get_accState should be testing state on childObj + + Also initializes output parameter action to 0 in get_accDefaultAction. + + * AccessibleBase.cpp: + (AccessibleBase::get_accState): + (AccessibleBase::get_accDefaultAction): + +2008-08-20 Maxime Britto <britto@apple.com> + + Reviewed by Ada Chan. + + rdar://5259746 + Mouse events are sent to page while resizing window (affects Gmail) + In the WebView, if the MouseEvent is located in the resize corner, we send it back to the UIDelegate and early return. + + * Interfaces/IWebUIDelegatePrivate.idl: Add a new method to the UIDelegate to send the resize message + * WebView.cpp: + (WebView::handleMouseEvent): If the mouse event is in the resize corner and our UIDelegate supports the message it sends the new message and early returns + +2008-08-19 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Geoff Garen. + + Bring back shared JSGlobalData and implicit locking, because too many clients rely on it. + + * WebCoreStatistics.cpp: + (WebCoreStatistics::javaScriptObjectsCount): + (WebCoreStatistics::javaScriptGlobalObjectsCount): + (WebCoreStatistics::javaScriptProtectedObjectsCount): + (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): + * WebJavaScriptCollector.cpp: + (WebJavaScriptCollector::objectCount): + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::stringByEvaluatingJavaScriptFromString): + * WebView.cpp: + (WebView::stringByEvaluatingJavaScriptFromString): + +2008-08-19 Steve Falkenburg <sfalken@apple.com> + + Fix build. + + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::jsValueToString): + +2008-08-14 Steve Falkenburg <sfalken@apple.com> + + Update cache capacities to match values used on Mac. + + Reviewed by Dan Bernstein. + + * WebView.cpp: + (WebView::setCacheModel): + +2008-08-14 Sam Weinig <sam@webkit.org> + + Reviewed by Jon Honeycutt. + + Add WebView SPI to set HTMLTokenizer yielding parameters. + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::setCustomHTMLTokenizerTimeDelay): + (WebView::setCustomHTMLTokenizerChunkSize): + * WebView.h: + +2008-08-13 Eric Seidel <eric@webkit.org> + + Attempt to fix the windows build, not review. + + * WebIconDatabase.cpp: + (WebIconDatabase::getOrCreateDefaultIconBitmap): + +2008-08-13 Ada Chan <adachan@apple.com> + + Implemented DOMHTMLElement::idName() and WebFrame::frameElement(). + Added IWebFrame::paintDocumentRectToContext() so we can paint a frame's + content into a device context. Changed WebView::paintDocumentRectToContext() + to call that WebFrame method. + + Reviewed by Adam Roben. + + * DOMHTMLClasses.cpp: + (DOMHTMLElement::idName): + * Interfaces/IWebFramePrivate.idl: + * WebFrame.cpp: + (WebFrame::paintDocumentRectToContext): + (WebFrame::frameElement): + * WebFrame.h: + * WebView.cpp: + (WebView::paintDocumentRectToContext): + +2008-08-12 Timothy Hatcher <timothy@apple.com> + + Add a stub for InspectorClient::setAttachedWindowHeight. + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::setAttachedWindowHeight): Add a FIXME to implement this. + * WebCoreSupport/WebInspectorClient.h: + +2008-08-12 Adam Roben <aroben@apple.com> + + Export WTFLog in Debug builds + + Reviewed by John Sullivan. + + * WebKit.vcproj/WebKit_debug.def: + +2008-08-07 Steve Falkenburg <sfalken@apple.com> + + Delete backing stores before 5 second WM_TIMER fires if more than 2 are already queued. + + WM_TIMER-based timers can be starved if enough other events are keeping + our message loop busy. This change prevents many backing store deletes from stacking + up in this case. + + Reviewed by Geoff Garen. + + * WebView.cpp: + (WebView::deleteBackingStore): + (WebView::deleteBackingStoreSoon): + (WebView::cancelDeleteBackingStoreSoon): + +2008-08-05 Ada Chan <adachan@apple.com> + + Add a getter for CFURLRequestRef in WebMutableURLRequest. + + Reviewed by Anders Carlsson. + + * Interfaces/IWebMutableURLRequestPrivate.idl: + * WebMutableURLRequest.cpp: + (WebMutableURLRequest::cfRequest): + * WebMutableURLRequest.h: + +2008-08-05 Steve Falkenburg <sfalken@apple.com> + + Don't invalidate a WebView in the process of being closed when prefs change. + + Reviewed by Ada Chan. + + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +2008-08-04 Alice Liu <alice.liu@apple.com> + + Reviewed by Steve Falkenburg. + + Fix CFDictionary leak + + * CFDictionaryPropertyBag.cpp: + (CFDictionaryPropertyBag::Write): + m_dictionary is a RetainPtr and should adopt the CF type created + +2008-08-02 Maxime Britto <britto@apple.com> + + Reviewed by Eric Seidel. + + These icons are copies from the resizers in WebCore/Ressources + + * ChangeLog: + * WebKit.vcproj/WebKit.rc: + * WebKit.vcproj/panEastCursor.png: Added. + * WebKit.vcproj/panNorthCursor.png: Added. + * WebKit.vcproj/panNorthEastCursor.png: Added. + * WebKit.vcproj/panNorthWestCursor.png: Added. + * WebKit.vcproj/panSouthCursor.png: Added. + * WebKit.vcproj/panSouthEastCursor.png: Added. + * WebKit.vcproj/panSouthWestCursor.png: Added. + * WebKit.vcproj/panWestCursor.png: Added. + * WebKit.vcproj/resource.h: + * WebKitDLL.cpp: + (loadResourceIntoBuffer): + +2008-08-01 Beth Dakin <bdakin@apple.com> + + Reviewed by Adam Roben. + + Fix for <rdar://problem/6119382> Need to hook up WebFrame's + disconnected frame API on Windows. + + * Interfaces/IWebFrame.idl: + * WebFrame.cpp: + (WebFrame::setIsDisconnected): + * WebFrame.h: + +2008-08-01 Adam Roben <aroben@apple.com> + + Fix <rdar://6118733> REGRESSION (r35502): Crash when submitting any + form + + Reviewed by Darin Adler. + + * COMPropertyBag.h: + (COMPropertyBag::QueryInterface): Cast to an appropriate type before + assigning into ppvObject. + +2008-07-31 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Get rid of FormValuesPropertyBag and use COMPropertyBag instead. + + * COMPropertyBag.h: + Implement parts of IPropertyBag2. + Currently just one method (CountProperties) is implemented. + + * WebCoreSupport/FormValuesPropertyBag.cpp: Removed. + * WebCoreSupport/FormValuesPropertyBag.h: Removed. + + * WebFrame.cpp: + (WebFrame::dispatchWillSubmitForm): + Create a COMPropertyBag instead. + + * WebKit.vcproj/WebKit.vcproj: + +2008-07-31 Anders Carlsson <andersca@apple.com> + + Reviewed by Jon. + + Tweak the names. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::createPlugin): + +2008-07-31 Anders Carlsson <andersca@apple.com> + + Reviewed by Jon. + + <rdar://problem/5826110> + + Add a way for WebKit clients to embed custom content in web pages. + + * Interfaces/IWebEmbeddedView.idl: Added. + New interface which an embedded view must implement. + + * Interfaces/IWebUIDelegatePrivate.idl: + Add new UI delegate method for creating an embedded view. + + * Interfaces/WebKit.idl: + Include IWebEmbeddedView.idl. + + * WebCoreSupport/EmbeddedWidget.cpp: Added. + * WebCoreSupport/EmbeddedWidget.h: Added. + Add EmbeddedWidget, a widget subclass which can hold an IWebEmbeddedView. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::createPlugin): + Check if the UI delegate wants to create an embedded view. + + * WebKit.vcproj/WebKit.vcproj: + Add EmbeddedWidget.{cpp|h} + +2008-07-31 Alexey Proskuryakov <ap@webkit.org> + + Rubber-stamped by Maciej. + + Eliminate JSLock (it was already disabled, removing the stub implementaion and all + call sites now). + + * WebCoreStatistics.cpp: + (WebCoreStatistics::javaScriptObjectsCount): + (WebCoreStatistics::javaScriptGlobalObjectsCount): + (WebCoreStatistics::javaScriptProtectedObjectsCount): + (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): + * WebJavaScriptCollector.cpp: + (WebJavaScriptCollector::objectCount): + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::stringByEvaluatingJavaScriptFromString): + * WebView.cpp: + (WebView::stringByEvaluatingJavaScriptFromString): + +2008-07-31 Jon Honeycutt <jhoneycutt@apple.com> + + Windows build fix. + + * WebURLResponse.cpp: + +2008-07-30 Mark Rowe <mrowe@apple.com> + + Windows build fix. + + * WebURLResponse.cpp: Don't include a header file that we just deleted. + +2008-07-30 Anders Carlsson <andersca@apple.com> + + Reviewed by Mitz. + + Use a COMPropertyBag instead of the HTTPHeaderPropertyBag. + + * HTTPHeaderPropertyBag.cpp: Removed. + * HTTPHeaderPropertyBag.h: Removed. + * WebURLResponse.cpp: + (WebURLResponse::allHeaderFields): + +2008-07-30 Anders Carlsson <andersca@apple.com> + + Fix copyright years. + + * COMPropertyBag.h: + * COMVariantSetter.h: + +2008-07-30 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam. + + More property bag work. + + * COMPropertyBag.h: + (COMPropertyBag::COMPropertyBag): + (::adopt): + (::Read): + * COMVariantSetter.h: + (COMIUnknownVariantSetter::setVariant): + +2008-07-30 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam. + + Add COMPropertyBag, a simple template class that implements the IPropertyBag interface. All + property bag values must be of the same type. + + The COMVariantSetter helpers are now in COMVariantSetter.h + + * COMEnumVariant.h: + * COMPropertyBag.h: Added. + * COMVariantSetter.h: Added. + * WebKit.vcproj/WebKit.vcproj: + +2008-07-30 Alice Liu <alice.liu@apple.com> + + Reviewed by Adam Roben. + + Adding logging of COM class names and counts to facilitate + investigating memory issues. + + * Interfaces/IWebKitStatistics.idl: + * WebKitDLL.cpp: + * WebKitDLL.h: + * WebKitStatistics.cpp: + (WebKitStatistics::comClassNameCounts): + * WebKitStatistics.h: + +2008-07-29 Alice Liu <alice.liu@apple.com> + + Reviewed by Geoff Garen. + + Fix WebDocumentLoader leak on Windows. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::createDocumentLoader): + * WebDocumentLoader.cpp: + (WebDocumentLoader::create): + * WebDocumentLoader.h: + +2008-07-29 Adam Roben <aroben@apple.com> + + Export detachThread + + Reviewed by Geoff Garen. + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + +2008-07-29 Adam Roben <aroben@apple.com> + + Export the new version of createThread + + Reviewed by Anders Carlsson. + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + Also moved the old version of createThread into the deprecated + section. + +2008-07-26 Matt Lilek <webkit@mattlilek.com> + + Reviewed by Geoff Garen. + + Changes to accommodate newly named/signatured loading methods in WebCore. + + * WebCoreSupport/WebContextMenuClient.cpp: + (WebContextMenuClient::searchWithGoogle): + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::loadURLIntoChild): + +2008-07-25 Adam Roben <aroben@apple.com> + + Try to fix the Windows build bot + + * WebKit.vcproj/WebKit.sln: Linearize the project dependencies. Each + project now depends only on the project that should immediately + precede it in the build. For the frameworks, this order makes sense. + For the applications built on top of the frameworks, the order is + arbitrary (but roughly follows the applications' complexity). + +2008-07-17 Adele Peterson <adele@apple.com> + + Reviewed by Adam. + + WebKit part of fix for <rdar://problem/5698672> Add drawing callback for a WebKit app to draw its own scrollbars + + Added a setting so an application can tell WebKit its going to draw custom scrollbars. Also added delegate methods for the actual painting. + + * Interfaces/IWebPreferences.idl: Added setShouldPaintCustomScrollbars and shouldPaintCustomScrollbars. + * Interfaces/IWebScrollBarPrivate.idl: Moved types to WebScrollbarTypes.idl + * Interfaces/IWebUIDelegate.idl: Added WebUIDelegate4 with new delegate methods, paintCustomScrollbar and paintCustomScrollCorner + * Interfaces/WebKit.idl: Include new WebScrollbarTypes.idl + * Interfaces/WebScrollbarTypes.idl: Added. Has types that the new delegate methods use. + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::paintCustomScrollbar): Added. Calls new delegate method and converts between WebCore types and types exported in WebScrollbarTypes.idl + (WebChromeClient::paintCustomScrollCorner): Added. Calls new delegate method. + (WebChromeClient::uiDelegate4): Added. + * WebCoreSupport/WebChromeClient.h: + * WebPreferenceKeysPrivate.h: Added WebKitPaintCustomScrollbarsPreferenceKey + * WebPreferences.cpp: + (WebPreferences::): Added. + (WebPreferences::shouldPaintCustomScrollbars): Added. + * WebPreferences.h: + * WebView.cpp: (WebView::notifyPreferencesChanged): + +2008-07-15 Adam Roben <aroben@apple.com> + + Add WebKit[Set]ShouldUseFontSmoothing functions + + <rdar://6059127> + + Reviewed by John Sullivan. + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + Export the new functions. + * WebKitGraphics.cpp: + (WebKitSetShouldUseFontSmoothing): + (WebKitShouldUseFontSmoothing): + Call through to the relevant WebCore functions. + * WebKitGraphics.h: + +2008-07-14 Steve Falkenburg <sfalken@apple.com> + + Don't include autoversion.h in WebKitDLL.cpp. + autoversion.h changes for every build, so we don't want to include it unless necessary. + + Rubber stamped by Ada Chan. + + * WebKitDLL.cpp: + +2008-07-14 Adam Roben <aroben@apple.com> + + Windows build fix + + * WebJavaScriptCollector.cpp: + (WebJavaScriptCollector::objectCount): Updated to match + -[WebCoreStatistics javaScriptsObjectCount]. + +2008-07-14 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Geoff Garen. + + Eliminate per-thread JavaScript global data instance support and make arbitrary + global data/global object combinations possible. + + * WebCoreStatistics.cpp: + (WebCoreStatistics::javaScriptObjectsCount): + (WebCoreStatistics::javaScriptGlobalObjectsCount): + (WebCoreStatistics::javaScriptProtectedObjectsCount): + (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): + Ask WebCore for its instance of JSGlobalData, now that it is not in per-thread storage. + +2008-07-11 Steve Falkenburg <sfalken@apple.com> + + Build fix. + + * WebKit.vcproj/WebKit.vcproj: + +2008-07-10 Steve Falkenburg <sfalken@apple.com> + + Build fix. + + * WebKit.vcproj/Interfaces.vcproj: + +2008-07-10 Adam Roben <aroben@apple.com> + + Windows build fix + + * WebKit.vcproj/resource.h: Revert some changes that VS made to this + file in r35083. + +2008-07-09 Maxime Britto <britto@apple.com> + + Reviewed by Adele. + + Added the panning icon in the ressources. + Its name is compass.png to make a difference with moveCursor.png (from the WebCore ressources) + + * ChangeLog: + * WebKit.vcproj/WebKit.rc: + * WebKit.vcproj/panIcon.png: Added. + * WebKit.vcproj/resource.h: + * WebKitDLL.cpp: Declared the new ressource with the name "panIcon" + (loadResourceIntoBuffer): + +2008-07-02 Dan Bernstein <mitz@apple.com> + + - try to fix the Windows build + + * WebScriptCallFrame.cpp: + +2008-07-01 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + Disable JSLock for per-thread contexts. + + * WebCoreStatistics.cpp: + (WebCoreStatistics::javaScriptObjectsCount): + (WebCoreStatistics::javaScriptGlobalObjectsCount): + (WebCoreStatistics::javaScriptProtectedObjectsCount): + (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::stringByEvaluatingJavaScriptFromString): + * WebView.cpp: + (WebView::stringByEvaluatingJavaScriptFromString): + Pass a parameter (false) to JSLock to indicate that WebKit doesn't need locking. + Include JSLock.h, as it is no longer brought in implicitly. + +2008-06-27 Adam Roben <aroben@apple.com> + + Change WebKitGraphics truncation functions to return the length of the + truncated string + + Reviewed by Darin Adler. + + * WebKitGraphics.cpp: + (CenterTruncateStringToWidth): + (RightTruncateStringToWidth): + Return the length. + * WebKitGraphics.h: + The truncation functions now return an unsigned int that is the length + of the truncated string. The whole file has been marked extern "C" to + keep the symbols for these functions from changing (which would break + nightly builds). + +2008-06-19 Alexey Proskuryakov <ap@webkit.org> + + Windows build fix. + + * WebJavaScriptCollector.cpp: Added a missing include. + +2008-06-17 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + Prepare JavaScript heap for being per-thread. + + * WebCoreStatistics.cpp: + (WebCoreStatistics::javaScriptObjectsCount): + (WebCoreStatistics::javaScriptGlobalObjectsCount): + (WebCoreStatistics::javaScriptProtectedObjectsCount): + (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): + * WebJavaScriptCollector.cpp: + (WebJavaScriptCollector::objectCount): + Use JSGlobalData::threadInstance()->heap instead of static Collector calls. + + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString): Pass ExecState* where + now required. + +2008-06-16 Alexey Proskuryakov <ap@webkit.org> + + Trying to fix Windows build. + + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::variableNames): + (WebScriptCallFrame::valueForVariable): + Give ExecState to functions that now take it. + +2008-06-16 Adam Roben <aroben@apple.com> + + Windows build fix + + * WebScriptCallFrame.cpp: Fixed a header name. + +2008-06-15 Darin Adler <darin@apple.com> + + - give Frame object functions shorter names: scriptProxy() -> script(), + selectionController() -> selection(), animationController() -> animation() + + * WebFrame.cpp: + (WebFrame::globalContext): + (WebFrame::windowObjectCleared): + * WebView.cpp: + (WebView::handleContextMenuEvent): + (WebViewWndProc): + (WebView::updateFocusedAndActiveState): + (WebView::hasSelectedRange): + (WebView::replaceSelectionWithText): + (WebView::clearSelection): + (WebView::prepareCandidateWindow): + (WebView::onIMERequestCharPosition): + (WebView::onIMERequestReconvertString): + +2008-06-15 Darin Adler <darin@apple.com> + + - rename KJS::List to KJS::ArgList + + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString): + +2008-06-15 Darin Adler <darin@apple.com> + + - new names for a few key JavaScriptCore files + + * WebView.cpp: + +2008-06-15 Darin Adler <darin@apple.com> + + Rubber stamped by Sam. + + - use JS prefix and simpler names for basic JavaScriptCore types, + to complement JSValue and JSObject + + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::functionName): + +2008-06-15 Maciej Stachowiak <mjs@apple.com> + + Rubber stamped by Oliver. + + - fix WebKit solution for testkjs --> jsc rename + + * WebKit.vcproj/WebKit.sln: + +2008-06-14 Darin Adler <darin@apple.com> + + Rubber stamped by Sam. + + - new names for kjs_binding.h and kjs_proxy.h + + * WebFrame.cpp: + +2008-06-14 Darin Adler <darin@apple.com> + + Rubber stamped by Sam. + + - renamed HTMLGenericFormElement to HTMLFormControlElement + + * WebFrame.cpp: + (WebFrame::elementWithName): + (WebFrame::controlsInForm): + +2008-06-14 Darin Adler <darin@apple.com> + + - try to fix Windows build, again + + * WebFrame.cpp: + (WebFrame::dispatchDecidePolicyForNewWindowAction): Fix arguments. Pass form. + (WebFrame::dispatchDecidePolicyForNavigationAction): Ditto. + * WebFrame.h: Fix arguments. + +2008-06-14 Darin Adler <darin@apple.com> + + - try to fix Windows build + + * WebActionPropertyBag.cpp: + (WebActionPropertyBag::Read): Use IDOMNode, not IHTMLFormElement. + * WebFrame.h: Added missing FormState arguments. + * WebScrollBar.cpp: + (WebScrollBar::init): Use create instead of new. + +2008-06-14 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + - more of https://bugs.webkit.org/show_bug.cgi?id=17257 + start ref counts at 1 instead of 0 for speed + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by + a ref call inside the Frame constructor. The lifetime rules for Frame are now the + conventional ones without a special case. + + * WebFrame.cpp: + (WebFrame::init): Renamed function from initWithWebFrameView and removed the unused + IWebFrameView argument (every caller was passing 0). Also changed this to return the + WebCore Frame object, which is needed to straighten out the lifetime and ownership + issues. + * WebFrame.h: Ditto. + + * WebView.cpp: + (WebView::initWithFrame): Changed to call new init function and use the return value. + +2008-06-13 Darin Adler <darin@apple.com> + + Reviewed by John Sullivan. + + - updated for addition of FormState argument to action policy functions + - added WebActionFormKey + + * Interfaces/IWebPolicyDelegate.idl: + * WebActionPropertyBag.cpp: + (WebActionPropertyBag::WebActionPropertyBag): + (WebActionPropertyBag::createInstance): + (WebActionPropertyBag::AddRef): + (WebActionPropertyBag::Release): + (WebActionPropertyBag::Read): + * WebActionPropertyBag.h: + * WebFrame.cpp: + (WebFrame::dispatchDecidePolicyForNewWindowAction): + (WebFrame::dispatchDecidePolicyForNavigationAction): + +2008-06-07 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - work on https://bugs.webkit.org/show_bug.cgi?id=17257 + start ref counts at 1 instead of 0 for speed + + * WebHistoryItem.cpp: + (WebHistoryItem::createInstance): + (WebHistoryItem::initFromDictionaryRepresentation): + (WebHistoryItem::initWithURLString): + +2008-05-30 Steve Falkenburg <sfalken@apple.com> + + Registry-free COM. + + WebKit no longer requires COM registration. + Registry-free COM information is read from the application manifest. + + Only 1 set of CLSIDs are now used, since we don't need to worry about registry collisions. + The second set remains, but only temporarily so nightlies continue to work. + + This is supported for XPSP2 and later. Earlier systems require an installer + to write the required registry keys. Nightlies and developer builds require + XPSP2, Server 2003, or later. + + Reviewed by Adam. + + * ForEachCoClass.cpp: Moved COM registration code here from WebKitDLL.cpp. This is ONLY used in the nightly case. + (substituteGUID): Moved here from WebKitDLL.cpp. + (registerWebKit): Moved here from WebKitDLL.cpp. + (setUseOpenSourceWebKit): Call registerWebKit instead of swapping progids. There is only 1 set of progids now - for the nightly. + * ForEachCoClass.h: Removed production progids. + * Interfaces/WebKit.idl: Added prototype for shutDownWebKit. + * WebKit.vcproj/Interfaces.vcproj: Changed path to type library to move it out of project directory. + * WebKit.vcproj/WebKit.vcproj: Changed path to type library to move it out of project directory. + * WebKitDLL.cpp: + (DllUnregisterServer): Does nothing. Entry point is still present for backward compatibility. + (DllRegisterServer): Does nothing. Entry point is still present for backward compatibility. + (RunAsLocalServer): Does nothing. Entry point is still present for backward compatibility. + (shutDownWebKit): Moved from ForEachCoClass. + * WebKitDLL.h: + +2008-05-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Brady. + + <rdar://problem/5970312> + icon file specified for stand alone web app causes crash if the icon can't be found + + Handle the case where iconData is null. + + * WebIconFetcher.cpp: + (WebIconFetcherClient::finishedFetchingIcon): + +2008-05-22 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Add IWebIconFetcher interface and implementation. + + * Interfaces/IWebFramePrivate.idl: + * Interfaces/IWebIconFetcher.idl: Added. + * Interfaces/WebKit.idl: + * WebFrame.cpp: + * WebFrame.h: + * WebIconFetcher.cpp: Added. + * WebIconFetcher.h: Added. + * WebKit.vcproj/WebKit.vcproj: + +2008-05-22 Adam Roben <aroben@apple.com> + + Add functions to IWebInspector to start/stop profiling/debugging + + <rdar://5956403> + + Reviewed by Jon Honeycutt. + + * Interfaces/IWebInspector.idl: + * WebInspector.cpp: + (WebInspector::isDebuggingJavaScript): + (WebInspector::toggleDebuggingJavaScript): + (WebInspector::isProfilingJavaScript): + (WebInspector::toggleProfilingJavaScript): + * WebInspector.h: + +2008-05-22 Steve Falkenburg <sfalken@apple.com> + + Build fix. + + * Interfaces/IWebInspector.idl: + * Interfaces/WebKit.idl: + * WebInspector.cpp: + (WebInspector::unused1): + * WebInspector.h: + +2008-05-22 Timothy Hatcher <timothy@apple.com> + + Changes to keep Windows building. + + <rdar://problem/5956403> Update the Develop menu to match the new Inspector items + + Reviewed by Adam Roben. + + * English.lproj/Localizable.strings: Added new strings. + * WebInspector.cpp: + (WebInspector::showConsole): Call showPanel. + * WebInspector.h: + +2008-05-21 Adele Peterson <adele@apple.com> + + Reviewed by Adam. + + WebKit part of for <rdar://problem/5787733> fast/dom/HTMLDocument/hasFocus.html fails on Windows + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::focus): Call updateActiveState directly. + Normally this would happen on a timer, but JS might need to know this earlier, so we'll update here. + (WebChromeClient::unfocus): ditto. + * WebView.cpp: (WebView::updateActiveStateSoon): Added comment about why we use a timer for this. + +=== End merge of squirrelfish === + +2008-05-13 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Updated for new JS debugging APIs. + + * WebScriptDebugServer.cpp: + (WebScriptDebugServer::didParseSource): + (WebScriptDebugServer::failedToParseSource): + * WebScriptDebugServer.h: + +2008-05-09 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff. + + Build fixes for SquirrelFish on windows. + + * WebScriptCallFrame.cpp: + (callingFunctionOrGlobalExecState): + (WebScriptCallFrame::caller): + (WebScriptCallFrame::functionName): + (WebScriptCallFrame::variableNames): + (WebScriptCallFrame::valueForVariable): + (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString): + * WebScriptDebugServer.cpp: + (WebScriptDebugServer::willLeaveCallFrame): + +2008-05-19 Adam Roben <aroben@apple.com> + + Make WebKit.idl rebuild whenever any of its included interfaces are + changed + + Reviewed by Tim Hatcher. + + * WebKit.vcproj/DerivedSources.make: Touch WebKit.idl whenever any + other IDL file is changed. This will force VS to rebuild WebKit.idl. + +2008-05-19 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + <rdar://problem/5946454> + Support navigator.onLine from HTML5. + + Link with iphlpapi.lib, and make iphlpapi.dll a delay loaded library. + + * WebKit.vcproj/WebKit.vcproj: + +=== Start merge of squirrelfish === + +2008-05-19 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin, Alexey, Jess and Brady. + + Set the application cache path. + + * WebView.cpp: + (WebKitSetApplicationCachePathIfNecessary): + New function that sets the cache path. + + (WebView::initWithFrame): + Set the application cache path. + +2008-05-19 Ada Chan <adachan@apple.com> + + Added IWebCookieManager interface which allows client to set the + CFHTTPCookieStorageRef that WebCore should use. + + Implement IWebCookieManager interface in WebCookieManager. + + Update the cookie accept policy in the current cookie storage. + + Reviewed by Steve Falkenburg. + + * ForEachCoClass.h: + * Interfaces/IWebCookieManager.idl: Added. + * Interfaces/WebKit.idl: + * WebCookieManager.cpp: Added. + (WebCookieManager::createInstance): + (WebCookieManager::WebCookieManager): + (WebCookieManager::~WebCookieManager): + (WebCookieManager::QueryInterface): + (WebCookieManager::AddRef): + (WebCookieManager::Release): + (WebCookieManager::cookieStorage): + (WebCookieManager::setCookieStorage): + * WebCookieManager.h: Added. + * WebKit.vcproj/WebKit.vcproj: + * WebKitClassFactory.cpp: + * WebView.cpp: + (updateSharedSettingsFromPreferencesIfNeeded): + +2008-05-16 Stephanie Lewis <slewis@apple.com> + + Reviewed by Steve. + + Get pending unload event count from WebCore. + + * Interfaces/IWebFramePrivate.idl: + * WebFrame.cpp: + (WebFrame::pendingFrameUnloadEventCount): + * WebFrame.h: + +2008-05-16 Matt Lilek <webkit@mattlilek.com> + + Rubber stamped by Oliver. + + Remove the Drosera sub-project. + + * WebKit.vcproj/WebKit.sln: + +2008-05-16 Brady Eidson <beidson@apple.com> + + Reviewed by Steve Falkenburg + + <rdar://problem/5942624> - Get LocalStorage persistence working on Windows + + * WebPreferenceKeysPrivate.h: Add the LocalStorageDirectory defaults key + + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): + (WebPreferences::localStorageDatabasePath): + (WebPreferences::setLocalStorageDatabasePath): + * WebPreferences.h: + * Interfaces/IWebPreferencesPrivate.idl: + + * WebView.cpp: + (WebView::initWithFrame): Set the path in the WebCore::Settings after new Page creation + +2008-05-06 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher + + Until the settings/preferences equation can be reworked, we'll need to manually set the local storage path + before setting the page group of the new page. + + Since I still need to add the local storage path to WebPreferences on Windows, mark this with a FIXME for now. + + * WebView.cpp: + (WebView::initWithFrame): Mark an important FIXME for setting the LocalStorage path as + appropriate. Until this FIXME is handled, Windows will have no persistent LocalStorage + +2008-05-14 Adam Roben <aroben@apple.com> + + Fix Bug 18767: Inspector is currently pretty much useless on Windows + + <https://bugs.webkit.org/show_bug.cgi?id=18767> + + Reviewed by Tim Hatcher. + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::highlight): Only move the highlight behind the + Inspector window when first creating the highlight, not every time we + update it. + +2008-05-13 Adam Roben <aroben@apple.com> + + Neuter WebScriptDebugServer + + Some upcoming changes to JavaScriptDebugServer and + JavaScriptDebugListener will break WebScriptDebugServer. Since Drosera + is being replaced by the Inspector's debugger, and Drosera is the only + client of WebScriptDebugServer, it makes more sense to get rid of + WebScriptDebugServer than to update it to keep it working. + + We can't actually remove WebScriptDebugServer entirely yet, so I've + just made it non-functional. This will completely break Drosera, but + as stated above, Drosera's days are numbered anyway. + + Reviewed by Tim Hatcher and Kevin McCullough. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::dispatchDidLoadMainResource): Removed all code + in this function. + * WebKitDLL.cpp: + (LocalServerDidDie): Ditto. + * WebScriptDebugServer.cpp: Made all IWebScriptDebugServer functions + return E_NOTIMPL. + * WebScriptDebugServer.h: Removed everything but the + IWebScriptDebugServer functions. + +2008-05-12 Dan Bernstein <mitz@apple.com> + + - build fix + + * Interfaces/WebKit.idl: Touched. + +2008-05-12 Dan Bernstein <mitz@apple.com> + + Reviewed by Ada Chan. + + - WebKit/win changes for https://bugs.webkit.org/show_bug.cgi?id=17097 + <rdar://problem/5715471> CGFontRefs (and HFONTs on Windows) leak because FontCache grows without bound + + Added font cache statistics and a function to purge inactive font data. + + * Interfaces/IWebCoreStatistics.idl: + * WebCoreStatistics.cpp: + (WebCoreStatistics::cachedFontDataCount): + (WebCoreStatistics::cachedFontDataInactiveCount): + (WebCoreStatistics::purgeInactiveFontData): + (WebCoreStatistics::glyphPageCount): + * WebCoreStatistics.h: + +2008-05-12 Adam Roben <aroben@apple.com> + + Build fix + + * WebKitPrefix.cpp: Touch this so that it will rebuild after + ENABLE_CROSS_DOCUMENT_MESSAGING was removed. + +2008-05-12 Alexey Proskuryakov <ap@webkit.org> + + Roll out recent threading changes (r32807, r32810, r32819, r32822) to simplify + SquirrelFish merging. + + * WebCoreStatistics.cpp: + (WebCoreStatistics::javaScriptObjectsCount): + (WebCoreStatistics::javaScriptGlobalObjectsCount): + (WebCoreStatistics::javaScriptProtectedObjectsCount): + (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): + * WebJavaScriptCollector.cpp: + (WebJavaScriptCollector::objectCount): + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString): + +2008-05-09 Brady Eidson <beidson@apple.com> + + Reviewed by Adam Roben + + Fix a hang-on-quit bug where in the DLL_PROCESS_DETACH DllMain callback, we assummed that + we could cleanly shutdown WebKit but we couldn't because any background threads have already + been uncleanly aborted at that point. + + * ForEachCoClass.cpp: + (shutDownWebKit): Moved from WebKitDLL to here, to be exposed via WebKit.def + * ForEachCoClass.h: + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + + * WebKitDLL.cpp: + (DllMain): Don't call shutDownWebKit here + +2008-05-09 Sam Weinig <sam@webkit.org> + + Rubber-stamped by Mark Rowe. + + Remove the ENABLE_CROSS_DOCUMENT_MESSAGING #ifdefs. + + * WebKit.vcproj/WebKit.vcproj: + +2008-05-09 Adam Roben <aroben@apple.com> + + Build fix + + * Interfaces/WebKit.idl: Touched. + +2008-05-06 Alice Liu <alice.liu@apple.com> + + Reviewed by Adele Peterson and John Sullivan. + + changes needed to build on Windows after r32911 and r32927 + + * AccessibleBase.cpp: + (AccessibleBase::get_accParent): + * AccessibleDocument.cpp: + (AccessibleDocument::document): + +2008-05-06 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler + + Preparation for upcoming work making LocalStorage persistent. + + When the application terminates, all LocalStorage areas must be sync'ed out to disk first. + + * WebKitDLL.cpp: + (shutDownWebKit): Close all LocalStorage areas before quitting. + +2008-05-05 Anders Carlsson <andersca@apple.com> + + Reviewed by John. + + Add preference for enabling the offline web application cache. + + * Interfaces/IWebPreferencesPrivate.idl: + * WebPreferenceKeysPrivate.h: + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): + (WebPreferences::setOfflineWebApplicationCacheEnabled): + (WebPreferences::offlineWebApplicationCacheEnabled): + * WebPreferences.h: + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +2008-05-05 Sam Weinig <sam@webkit.org> + + Reviewed by Tim Hatcher. + + Make the Inspector's localizable strings file match the format used by Dashboard widgets. + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::localizedStringsURL): + +2008-05-05 Steve Falkenburg <sfalken@apple.com> + + Add WebPreference for application chrome mode. + + Reviewed by Dave Hyatt. + + * Interfaces/IWebPreferencesPrivate.idl: + * WebPreferenceKeysPrivate.h: + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): + (WebPreferences::inApplicationChromeMode): + (WebPreferences::setApplicationChromeMode): + * WebPreferences.h: + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +2008-05-02 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=18826 + Make JavaScript heap per-thread + + * WebCoreStatistics.cpp: + (WebCoreStatistics::javaScriptObjectsCount): + (WebCoreStatistics::javaScriptGlobalObjectsCount): + (WebCoreStatistics::javaScriptProtectedObjectsCount): + (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): + * WebJavaScriptCollector.cpp: + (WebJavaScriptCollector::objectCount): + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString): + Replaced static Collector calls with calls to a current thread's instance. Pass ExecState to jsString(). + +2008-04-29 Ada Chan <adachan@apple.com> + + Support text shadow in WebDrawText(). + Remove DrawTextAtPoint() since it is only called by WebDrawText(). + + Reviewed by Adam. + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + * WebKitGraphics.cpp: + (WebDrawText): + * WebKitGraphics.h: + +2008-04-29 Adam Roben <aroben@apple.com> + + Restore the beloved COMPtr::operator& + +2008-04-29 Adam Roben <aroben@apple.com> + + Windows build fix + + Replaced uses of COMPtr::operator& with COMPtr::adoptionPointer. + +2008-04-29 Adam Roben <aroben@apple.com> + + Fix a Windows build error + + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::variableNames): Don't use ::adopt now that + PropertyNameArray has no swap function. + +2008-04-28 Adam Roben <aroben@apple.com> + + Fix some Windows build errors in WebKit + + * Interfaces/WebKit.idl: Touched to force Interfaces to rebuild. + * WebKitPrefix.cpp: Touched to force WebKit to rebuild. + +2008-04-25 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + Fix run-webkit-tests --threading + and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661> + Proxy server issue in Sunday's Nightly + + * WebView.cpp: (WebView::WebView): Initialize threading. Previously, this was only done from + icon database code, which is not robust enough. + +2008-04-26 Adam Barth <hk9565@gmail.com> + + Reviewed by Adam Roben and Sam Weinig. + + Renamed "domain" method to "host" to match SecurityOrigin. + + * Interfaces/IWebSecurityOrigin.idl: + * WebSecurityOrigin.cpp: + (WebSecurityOrigin::host): + * WebSecurityOrigin.h: + +2008-04-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Fix internal debug build. + + * WebKit.vcproj/WebKit.vcproj: + +2008-04-24 Dan Bernstein <mitz@apple.com> + + - build fix + + * WebView.cpp: + (WebView::handleContextMenuEvent): + +2008-04-24 Brady Eidson <beidson@apple.com> + + Reviewed by Darin + + Revert my previous change to WebKit/Win until I can make it act more like the new Mac code + + * WebView.cpp: + (WebView::initWithFrame): + +2008-04-24 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam. + + Change some String arguments to be const references instead. + + * WebCoreSupport/WebEditorClient.cpp: + (WebEditorClient::shouldInsertText): + * WebCoreSupport/WebEditorClient.h: + +2008-04-23 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + In some current work I noticed that when a new Page is created, it is possible that it requires info from its Settings + object before the Settings object is initialized. It seems quite prudent to post the preferences changed notification, + thereby populating the Settings object, immediately after the Page is created. + + * WebView.cpp: + (WebView::initWithFrame): Post the notification right after the Page is created + +2008-04-23 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Brady. + + Implement accDoDefaultAction(). + + * AccessibleBase.cpp: + (AccessibleBase::accDoDefaultAction): Call the object's + performDefaultAction() method. Return S_FALSE if the call returns false, + indicating that the object has no default action associated with it. + +2008-04-23 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Adam. + + Implement accHitTest(). + + * AccessibleBase.cpp: + (AccessibleBase::accHitTest): Perform a hit test for a child object. If + none is found, report whether the point was within our own bounding box. + +2008-04-23 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Adam and Darin. + + Implement accNavigate(). + + * AccessibleBase.cpp: + (AccessibleBase::accNavigate): This method navigates between elements, + given a start point and a direction. The directions UP, DOWN, LEFT, + RIGHT are not are not implemented, matching Mozilla and IE. The + directions FIRSTCHILD and LASTCHILD are only allowed from self. NEXT and + PREVIOUS are allowed from self or any of our children. + +2008-04-23 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Adam. + + Implement accLocation(). + + * AccessibleBase.cpp: + (AccessibleBase::accLocation): Report the screen coordinates for the + object's bounding box. + +2008-04-23 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Adam, Darin, Oliver. + + Implement get_accDefaultAction(). + + * AccessibleBase.cpp: + (AccessibleBase::get_accDefaultAction): Report the result of calling the + object's actionVerb method. + * English.lproj/Localizable.strings: Updated with new strings. + * WebCoreLocalizedStrings.cpp: + (WebCore::AXButtonActionVerb): Return a localized string representing + the object's default action. + (WebCore::AXRadioButtonActionVerb): Same. + (WebCore::AXTextFieldActionVerb): Same. + (WebCore::AXCheckedCheckBoxActionVerb): Same + (WebCore::AXUncheckedCheckBoxActionVerb): Same. + (WebCore::AXLinkActionVerb): Same. + +2008-04-23 Daniel Zucker <zucker@wake3.com> + + Reviewed by Adam Roben. + + <https://bugs.webkit.org/show_bug.cgi?id=18468> + + * WebError.h: include RetainPtr.h to fix build errors in Cairo build + +2008-04-23 Daniel Zucker <zucker@wake3.com> + + Reviewed by Adam Roben. + + Move the location of #if USE(CFNETWORK) to fix a cairo/curl build error. + <https://bugs.webkit.org/show_bug.cgi?id=18470> + + * WebError.cpp: + (WebError::sslPeerCertificate): + +2008-04-22 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Adam. + + Implement get_accFocus(). + + * AccessibleBase.cpp: + (AccessibleBase::get_accRole): Remove redundant initialization; + VariantInit does this. + (AccessibleBase::get_accState): Same. + (AccessibleBase::get_accSelection): Relocated next to accSelect(). + (AccessibleBase::get_accFocus): If the focused object is this object or + a child of this object, report it. Otherwise, report VT_EMPTY. + +2008-04-22 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Sam. + + Implement get_accKeyboardShortcut(). + + * AccessibleBase.cpp: + (AccessibleBase::get_accKeyboardShortcut): Report the key combination + that will perform the object's access key action, represented as a + string. + +2008-04-19 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Darin Adler. + + Implement get_accHelp(). + + * AccessibleBase.cpp: + (AccessibleBase::get_accHelp): Report the result of calling the object's + helpText() method. + +2008-04-19 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Darin Adler. + + Implement get_accState(). + + * AccessibleBase.cpp: + (AccessibleBase::get_accState): + +2008-04-21 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + Move collector main thread initialization from WebKit/win to KJS::initializeThreading. + + * WebView.cpp: + (WebView::WebView): + +2008-04-18 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Darin Adler. + + Implement get_accRole(). + + * AccessibleBase.cpp: + (AccessibleBase::get_accRole): Report the result of role(). + (MSAARole): Added; returns the MSAA role for a WebCore role. + (AccessibleBase::role): Return the MSAA role for the object's roleValue. + * AccessibleBase.h: Add declaration for role(). + +2008-04-18 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Darin Adler. + + Implement get_accName(), get_accValue(), get_accDescription(). Added + virtual methods that accessible objects can override to customize the + result. + + * AccessibleBase.cpp: + (AccessibleBase::get_accName): Report result of name(). + (AccessibleBase::get_accValue): Report result of value(). + (AccessibleBase::get_accDescription): Report result of description(). + (AccessibleBase::name): Added; returns AccessibilityObject::title(). + (AccessibleBase::value): Added; returns + AccessibilityObject::stringValue(). + (AccessibleBase::description): Added; returns + AccessibilityObject::accessibilityDescription(). + * AccessibleBase.h: Added declarations for name(), value(), and + description(). + * ChangeLog: Fix my misuse of "definition." + +2008-04-18 Jon Honeycutt <jhoneycutt@apple.com> + + Fix build after r32231. + + * WebFrame.cpp: + (WebFrame::renderTreeAsExternalRepresentation): renderer() -> + contentRenderer() + +2008-04-18 Jon Honeycutt <jhoneycutt@apple.com> + + Fix build after r32231. + + * WebView.cpp: + (WebView::paintIntoBackingStore): renderer() -> contentRenderer() + (WebView::elementAtPoint): Same. + +2008-04-18 Jon Honeycutt <jhoneycutt@apple.com> + + * AccessibleBase.cpp: Build fix for copy/paste error. + +2008-04-18 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Darin Adler. + + Implement IAccessible::get_accChild(). + + * AccessibleBase.cpp: + (AccessibleBase::get_accChild): Call getAccessibilityObjectForChild + to find the AccessibilityObject for the VARIANT vChild. Get the + AccessibilityObjectWrapper for the child, add a ref, and pass it back. + (AccessibleBase::getAccessibilityObjectForChild): Added; finds the + AccessibilityObject referred to by a VARIANT, or returns a COM error on + failure. + (AccessibleBase::wrapper): Added; returns the wrapper for the + AccessibilityObject. Creates one if necessary. + * AccessibleBase.h: Added declarations for wrapper() and + getAccessibilityObjectForChild(). + +2008-04-18 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Darin, Ollie. + + * AccessibleBase.cpp: + (AccessibleBase::get_accChildCount): Implement get_accChildCount. + +2008-04-17 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Darin Adler. + + Implement IAccessible::get_accParent(). + + * AccessibleBase.cpp: + (AccessibleBase::get_accParent): Call AccessibleObjectFromWindow with + OBJID_WINDOW. This will be handled by Windows to return the default + accessible object for the WebView, because we only handle OBJID_CLIENT. + * WebView.cpp: + (WebView::AccessibleObjectFromWindow): Added; calls through to the + AccessibleObjectFromWindow in the MSAA DLL. + * WebView.h: Added declaration for AccessibleObjectFromWindow. + +2008-04-17 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Darin Adler. + + Return an AccessibleDocument when our root accessible object is queried + for. + + * AccessibleDocument.cpp: Added; represents an AccessibilityObject that + itself represents a Document. + (AccessibleDocument::AccessibleDocument): Initialize AccessibleBase with + the AccessibilityObject for this Document. + * AccessibleDocument.h: Added. + * WebFrame.cpp: + (WebFrame::accessible): If m_accessible is 0, or if Document in this + frame does not match the Document in the cached m_accessible object, + create a new AccessibleDocument for this frame's Document. + * WebFrame.h: Swap AccessibleBase.h for AccessibleDocument.h + * WebKit.vcproj/WebKit.vcproj: Add AccessibleDocument.{h,cpp} + +2008-04-17 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Darin Adler. + + Respond to WM_GETOBJECT messages. Currently returns NULL. + + * WebFrame.cpp: + (WebFrame::accessible): Added; will return the root accessible object + for this frame. + * WebFrame.h: Added declaration for accessible(). + * WebView.cpp: + (WebViewWndProc): Handle WM_GETOBJECT messages by calling onGetObject(). + (WebView::onGetObject): Added; enables the AXObjectCache in WebCore, + queries the top-level frame for its root accessible object, and loads + the MSAA DLL and locates its LresultFromObject function. If calling + LresultFromObject succeeds, it returns a reference to the accessible + object to pass back to Windows. If not, we return false and let Windows + handle the request through DefWindowProc. + * WebView.h: Added declaration for onGetObject(). + +2008-04-18 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + Don't clear the PageGroup on _close, as the WebCore::Page destructor already does this. + No reason to do the work twice... + + * WebView.cpp: + (WebView::close): + +2008-04-18 Adam Roben <aroben@apple.com> + + Update WebScriptDebugServer for JavaScriptDebugListener changes + + Reviewed by Tim Hatcher. + + * WebScriptDebugServer.cpp: Changed to use KJS::UString instead of + WebCore::String. + * WebScriptDebugServer.h: Ditto. + +2008-04-16 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Darin Adler. + + Add a base AccessibilityObject wrapper class. Currently just stubs all + of the IAccessible methods. + + * AccessibleBase.cpp: Added. Implements IAccessible, and inherits from + WebCore::AccessibilityObjectWrapper. + (AccessibleBase::AccessibleBase): Set the object's wrapper to this + instance. + (AccessibleBase::~AccessibleBase): + (AccessibleBase::createInstance): Create an instance of a wrapper for + this AccessibilityObject. + (AccessibleBase::QueryInterface): + (AccessibleBase::Release): + (AccessibleBase::get_accParent): + (AccessibleBase::get_accChildCount): + (AccessibleBase::get_accChild): + (AccessibleBase::get_accName): + (AccessibleBase::get_accValue): + (AccessibleBase::get_accDescription): + (AccessibleBase::get_accRole): + (AccessibleBase::get_accState): + (AccessibleBase::get_accHelp): + (AccessibleBase::get_accKeyboardShortcut): + (AccessibleBase::accSelect): + (AccessibleBase::get_accFocus): + (AccessibleBase::get_accSelection): + (AccessibleBase::get_accDefaultAction): + (AccessibleBase::accLocation): + (AccessibleBase::accNavigate): + (AccessibleBase::accHitTest): + * AccessibleBase.h: Added. + (AccessibleBase::AddRef): + (AccessibleBase::put_accName): + (AccessibleBase::put_accValue): + (AccessibleBase::get_accHelpTopic): + (AccessibleBase::GetTypeInfoCount): + (AccessibleBase::GetTypeInfo): + (AccessibleBase::GetIDsOfNames): + (AccessibleBase::Invoke): + (AccessibleBase::detach): Detach this wrapper from its object. + * WebKit.vcproj/WebKit.vcproj: + +2008-04-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES. + + * WebKit.vcproj/WebKit.vcproj: + +2008-04-12 Matt Lilek <webkit@mattlilek.com> + + Not reviewed, build fix. + + * WebView.cpp: + (WebView::paintDocumentRectToContext): + +2008-04-11 Steve Falkenburg <sfalken@apple.com> + + Fix caching typo. + + Made this code match the Mac. + + Reviewed by Mark Rowe. + + * WebView.cpp: + (PreferencesChangedOrRemovedObserver::notifyPreferencesChanged): + +2008-04-11 Adam Roben <aroben@apple.com> + + * ForEachCoClass.h: Added a deprecation notice. + +2008-04-11 Adam Roben <aroben@apple.com> + + Fix Bug 18376: r31733 and 27 don't work w/Safari 3.1 + + <https://bugs.webkit.org/show_bug.cgi?id=18376> + + Rubberstamped by Steve. + + * ForEachCoClass.h: Move post-3.1 classes to the end of the + FOR_EACH_COCLASS macro so that pre-3.1 classes will be in the place + Safari expects them to be. We will soon be deprecating + setUseOpenSourceWebKit/progIDForClass because it is clearly very + fragile. + +2008-04-10 Ada Chan <adachan@apple.com> + + Added WebCoreStatistics that provides stats on Javascript objects + and IconDatabase. + + Changed WebCache::statistics() to additionally return xsl stylesheets data + and data on live sizes and decoded sizes. + + Reviewed by Steve. + + * ForEachCoClass.h: + * Interfaces/IWebCoreStatistics.idl: Added. + * Interfaces/WebKit.idl: + * WebCache.cpp: + (WebCache::statistics): + * WebCoreStatistics.cpp: Added. + (WebCoreStatistics::WebCoreStatistics): + (WebCoreStatistics::~WebCoreStatistics): + (WebCoreStatistics::createInstance): + (WebCoreStatistics::QueryInterface): + (WebCoreStatistics::AddRef): + (WebCoreStatistics::Release): + (WebCoreStatistics::javaScriptObjectsCount): + (WebCoreStatistics::javaScriptGlobalObjectsCount): + (WebCoreStatistics::javaScriptProtectedObjectsCount): + (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): + (WebCoreStatistics::iconPageURLMappingCount): + (WebCoreStatistics::iconRetainedPageURLCount): + (WebCoreStatistics::iconRecordCount): + (WebCoreStatistics::iconsWithDataCount): + * WebCoreStatistics.h: Added. + * WebKit.vcproj/WebKit.vcproj: + * WebKitClassFactory.cpp: + +2008-04-09 Steve Falkenburg <sfalken@apple.com> + + Delete backing store (after a delay) when a WebView's top-level parent becomes inactive. + + Reviewed by Brady Eidson. + + * WebView.cpp: + (WebView::windowReceivedMessage): + +2008-04-08 Adam Roben <aroben@apple.com> + + Export callOnMainThread from WebKit.dll + + Rubberstamped by Anders. + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + +2008-04-08 Adam Roben <aroben@apple.com> + + Move callOnMainThread to WTF + + Reviewed by Alexey Proskuryakov. + + * WebIconDatabase.cpp: Updated #include + +2008-04-08 Steve Falkenburg <sfalken@apple.com> + + Add missing increment/decrement COM class counts to detect leaks. + + Reviewed by Adam Roben. + + * CFDictionaryPropertyBag.cpp: + (CFDictionaryPropertyBag::CFDictionaryPropertyBag): + (CFDictionaryPropertyBag::~CFDictionaryPropertyBag): + * CFDictionaryPropertyBag.h: + * HTTPHeaderPropertyBag.cpp: + (HTTPHeaderPropertyBag::HTTPHeaderPropertyBag): + (HTTPHeaderPropertyBag::~HTTPHeaderPropertyBag): + * HTTPHeaderPropertyBag.h: + * WebActionPropertyBag.cpp: + (WebActionPropertyBag::WebActionPropertyBag): + (WebActionPropertyBag::~WebActionPropertyBag): + * WebDocumentLoader.cpp: + (WebDocumentLoader::WebDocumentLoader): + (WebDocumentLoader::~WebDocumentLoader): + * WebDropSource.cpp: + (WebDropSource::WebDropSource): + (WebDropSource::~WebDropSource): + * WebDropSource.h: + * WebElementPropertyBag.cpp: + (WebElementPropertyBag::WebElementPropertyBag): + (WebElementPropertyBag::~WebElementPropertyBag): + * WebTextRenderer.cpp: + (WebTextRenderer::WebTextRenderer): + (WebTextRenderer::~WebTextRenderer): + +2008-04-07 Brady Eidson <beidson@apple.com> + + Reviewed by John Honeycutt + + ENABLE_DOM_STORAGE for Windows + + * WebKit.vcproj/WebKit.vcproj: + +2008-04-04 Adam Roben <aroben@apple.com> + + Export some more WTF functions from WebKit.dll + + Reviewed by Alexey Proskuryakov. + + * WebKit.vcproj/WebKit.def: + * WebKit.vcproj/WebKit_debug.def: + +2008-04-04 Steve Falkenburg <sfalken@apple.com> + + Only delete the backing store of background windows. + + Reviewed by Ada Chan. + + * WebView.cpp: + (WebView::WebView): + (WebView::deleteBackingStore): + (WebView::paint): Added active check. + (WebView::deleteBackingStoreSoon): + (WebView::cancelDeleteBackingStoreSoon): Added. + (WebView::active): Added. + (WebView::updateActiveState): Moved active check code from here to active(). + * WebView.h: + +2008-04-04 Steve Falkenburg <sfalken@apple.com> + + Fix tooltip window leak. + + Explicitly call DestroyWindow on the tooltip. + Destroying its parent won't destroy the tooltip, since it not a WS_CHILD style window. + + Reviewed by Ada Chan. + + * WebView.cpp: + (WebView::~WebView): + +2008-04-04 Steve Falkenburg <sfalken@apple.com> + + Delete backing store after we go 5 seconds without a paint. + + Timer will be reset if a paint occurs, so this won't negatively impact performance. + + Reviewed by Ada Chan. + + * WebView.cpp: + (WebView::paint): Call deleteBackingStoreSoon after paint. + (WebViewWndProc): Add DeleteBackingStoreTimer. + (WebView::deleteBackingStoreSoon): Added. + * WebView.h: Add deleteBackingStoreSoon. + +2008-04-04 Ada Chan <adachan@apple.com> + + <rdar://problem/5830598> Image file opened in the browser window shows "Localized String Not Found' in window's title bar instead file name + Save WebCoreLocalizedStrings.cpp with UTF8 encoding. + Changed the format string to take in integers. + + Reviewed by Dan. + + * English.lproj/Localizable.strings: Updated. + * WebCoreLocalizedStrings.cpp: + (WebCore::imageTitle): + +2008-04-03 Dan Bernstein <mitz@apple.com> + + Reviewed by Dave Hyatt. + + - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=6484 + font-weight does not properly support graded weights + + * DOMCoreClasses.cpp: + (DOMElement::font): Updated for the change to FontDescription. + * WebCoreSupport/WebDragClient.cpp: + (dragLabelFont): Ditto. + * WebKitGraphics.cpp: + (makeFont): Ditto. + * WebKitGraphics.h: Added a FIXME. + +2008-04-03 Steve Falkenburg <sfalken@apple.com> + + <rdar://problem/5835382> Calling window.open immediately after window.close can sometimes result in no window being created + + Group name tracking needs to happen using code in WebCore::Page, since it is more involved than + just setting a string. + + Reviewed by Adam Roben. + + * WebView.cpp: + (WebView::close): Add null check (found via code inspection). + (WebView::initWithFrame): Store the group name directly in Page. + (WebView::setGroupName): Store the group name directly in Page. + (WebView::groupName): Retrieve the group name directly from Page. + * WebView.h: Removed m_groupName + +2008-04-03 Simon Hausmann <hausmann@webkit.org> + + Reviewed by Mark Rowe. + + Roll out r31599 and r31605 again after discussion with Mark Rowe. + + * WebIconDatabase.cpp: + (WebIconDatabase::iconForURL): + +2008-04-03 Simon Hausmann <hausmann@webkit.org> + + Attempted build fix + + * WebIconDatabase.cpp: + (WebIconDatabase::iconForURL): Adjust to changed iconForPageURL + signature + +2008-04-03 Ada Chan <adachan@apple.com> + + Allow WebArchive to be created via COM. + Replaced IID_DOMNode with __uuidof(DOMNode). + + Reviewed by Adam and Steve. + + * DOMCoreClasses.cpp: + (DOMNode::QueryInterface): + (DOMNode::isSameNode): + * DOMCoreClasses.h: + * ForEachCoClass.h: + * Interfaces/WebKit.idl: + * WebArchive.cpp: + (WebArchive::createInstance): + * WebArchive.h: + * WebKitClassFactory.cpp: + +2008-04-01 Brady Eidson <beidson@apple.com> + + Reviewed by Jon Honeycutt and Cake + + Hookup WebArchive API enough to be able to save the archive of a DOMNode + + * DOMCoreClasses.h: Add a GUID for DOMNode + + * Interfaces/IWebArchive.idl: Add initWithNode() + + * WebArchive.cpp: + (WebArchive::initWithNode): + (WebArchive::data): Actually return LegacyWebArchive-style data + * WebArchive.h: + +2008-04-01 Brady Eidson <beidson@apple.com> + + Reviewed by Adam Roben + + Add empty implementations of WebArchive for future work + + * WebArchive.cpp: Added. + (WebArchive::createInstance): + (WebArchive::WebArchive): + (WebArchive::~WebArchive): + (WebArchive::QueryInterface): + (WebArchive::AddRef): + (WebArchive::Release): + (WebArchive::initWithMainResource): + (WebArchive::initWithData): + (WebArchive::mainResource): + (WebArchive::subResources): + (WebArchive::subframeArchives): + (WebArchive::data): + * WebArchive.h: Added. + + * WebKit.vcproj/WebKit.vcproj: + +2008-03-29 Adam Roben <aroben@apple.com> + + Rename IWebViewPrivate::addAdditionalPluginPath to + addAdditionalPluginDirectory + + Reviewed by Mitz Pettel. + + * Interfaces/IWebViewPrivate.idl: + * Interfaces/WebKit.idl: Touched to make sure the Interfaces project + rebuilds. + * WebView.cpp: + (WebView::addAdditionalPluginDirectory): + * WebView.h: + +2008-03-26 Brent Fulgham <bfulgham@gmail.com> + + Reviewed by Adam Roben. + + Add necessary files and build commands to vcproj files to + build a Curl-based Windows WebKit. For details, see + http://bugs.webkit.org/show_bug.cgi?id=17985 + + * WebKit.vcproj/WebKit.vcproj: + +2008-03-25 Adam Roben <aroben@apple.com> + + Attempted build fix + + * WebKit.vcproj/WebKit.sln: Make testapi build after most other + projects. + +2008-03-25 Adam Roben <aroben@apple.com> + + Fix Bug 18077: Integrate testapi.c into the Windows build + + <http://bugs.webkit.org/show_bug.cgi?id=18077> + + Reviewed by Steve Falkenburg. + + * WebKit.vcproj/WebKit.sln: Added testapi.vcproj to the solution. + +2008-03-25 Brady Eidson <beidson@apple.com> + + Reviewed by Darin + + Remove newly obsolete FrameLoaderClient methods + + * WebFrame.cpp: + * WebFrame.h: + +2008-03-25 Darin Adler <darin@apple.com> + + Suggested by Adam. + + * Interfaces/WebKit.idl: Touch this file to make the Interface project rebuild. + +2008-03-21 Ada Chan <adachan@apple.com> + + <rdar://problem/5810324> visitCount not updated in History.plist + Call WebCore::HistoryItem::mergeAutoCompleteHints() in WebHistoryItem::mergeAutoCompleteHints(). + + Reviewed by Steve. + + * WebHistoryItem.cpp: + (WebHistoryItem::mergeAutoCompleteHints): + (WebHistoryItem::QueryInterface): + +2008-03-20 Dan Bernstein <mitz@apple.com> + + Reviewed by Adam Roben. + + - make makeTextLarger() and zoomPageIn() do what they are supposed to do + + * WebView.cpp: + (WebView::makeTextLarger): Changed call to canZoomIn() to zoomIn(). + (WebView::zoomPageIn): Ditto. + +2008-03-20 Dave Hyatt <hyatt@apple.com> + + Add full page zoom API for Windows WebKit. + + Reviewed by aroben + + * Interfaces/IWebView.idl: + * WebView.cpp: + (WebView::WebView): + (WebView::setTextSizeMultiplier): + (WebView::setPageSizeMultiplier): + (WebView::setZoomMultiplier): + (WebView::textSizeMultiplier): + (WebView::pageSizeMultiplier): + (WebView::zoomMultiplier): + (WebView::canMakeTextLarger): + (WebView::canZoomPageIn): + (WebView::canZoomIn): + (WebView::makeTextLarger): + (WebView::zoomPageIn): + (WebView::zoomIn): + (WebView::canMakeTextSmaller): + (WebView::canZoomPageOut): + (WebView::canZoomOut): + (WebView::makeTextSmaller): + (WebView::zoomPageOut): + (WebView::zoomOut): + (WebView::canMakeTextStandardSize): + (WebView::canResetPageZoom): + (WebView::canResetZoom): + (WebView::makeTextStandardSize): + (WebView::resetPageZoom): + (WebView::resetZoom): + * WebView.h: + +2008-03-20 John Sullivan <sullivan@apple.com> + + * English.lproj/Localizable.strings: + Brought this file up to date + +2008-03-19 Dan Bernstein <mitz@apple.com> + + - build fix + + * Interfaces/WebKit.idl: Touched. + +2008-03-19 Adam Roben <aroben@apple.com> + + Fix a couple of bugs where the node highlight would appear when it shouldn't + + There were at least two ways you could get the highlight to appear + when it shouldn't: + 1) Selecting a node in the Inspector while the inspected WebView was + in a background tab. + 2) Selecting a node in the Inspector, switching to another tab, + closing the Inspector, then switching back to the inspected + WebView's tab. + + This patch fixes the above two issues, and possibly others. + + show() and hide() are now private methods of WebNodeHighlight. They + are replaced by a single public method, + setShowsWhileWebViewIsVisible(bool). WebInspectorClient uses this to + tell the highlight whether it should be showing when the inspected + WebView is visible. + + Reviewed by John Sullivan. + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::highlight): If the highlight is already showing, + it just needs to update since the highlighted node has changed. If the + highlight is not showing, call setShowsWhileWebViewIsVisible(true) so + that the highlight will show when the WebView is shown. + (WebInspectorClient::hideHighlight): Changed to call + setShowsWhileWebViewIsVisible(false) instead of hide(). + * WebNodeHighlight.cpp: + (WebNodeHighlight::WebNodeHighlight): Initialize new member, and + initialize m_inspectedWebViewWindow to its final value here instead of + in show(). + (WebNodeHighlight::setShowsWhileWebViewIsVisible): Added. If we're not + supposed to show ourselves when the WebView is visible, we hide + ourselves and return. Otherwise, we make our visibility match the + WebView's. + (WebNodeHighlight::isWebViewVisible): Added. + (WebNodeHighlight::show): Removed initialization of + m_inspectedWebViewWindow (this is now done by our constructor). Added + an assertion that we're supposed to show ourselves when the WebView is + visible. + (WebNodeHighlight::onWebViewShowWindow): If we shouldn't show + ourselves when the WebView is visible, then we don't need to do + anything at all when the WebView's visibility changes. + * WebNodeHighlight.h: + +2008-03-19 Adam Roben <aroben@apple.com> + + Small WebNodeHighlight cleanup + + Renamed the following methods: + visible() -> isShowing() + updateWindow() -> update() + + Removed the window() method. + + Added a new method, placeBehindWindow(HWND), that moves the highlight + overlay in the window z-order to be just behind the passed-in window. + WebInspectorClient calls this instead of doing the move directly using + the old window() method. + + Reviewed by John Sullivan. + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::attachWindow): + (WebInspectorClient::detachWindow): + (WebInspectorClient::highlight): Call placeBehindWindow instead of + calling SetWindowPos directly. + * WebNodeHighlight.cpp: + (WebNodeHighlight::show): + (WebNodeHighlight::isShowing): + (WebNodeHighlight::placeBehindWindow): Added. Code came from + WebInspectorClient::highlight. + (WebNodeHighlight::onWebViewWindowPosChanged): + (WebNodeHighlight::onRootWindowPosChanged): + * WebNodeHighlight.h: + +2008-03-19 Ada Chan <adachan@apple.com> + + Added a method to paint WebView content specified by + the document rect into a device context. + + Reviewed by Darin Adler. + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::paintDocumentRectToContext): + * WebView.h: + +2008-03-18 Brent Fulgham <bfulgham@gmail.com> + + Reviewed by Adam Roben. + + Provide some stub implementations for things that WebKit + uses for performing authentication/challenge activities. This + is in support of http://bugs.webkit.org/show_bug.cgi?id=17837 + + * WebDataSource.cpp: + * WebError.cpp: Conditionalize CFNetwork-specific logic + * WebURLAuthenticationChallenge.cpp: Conditionalize constructor + for authentication/challenge member. + (WebURLAuthenticationChallenge::initWithAuthenticationChallenge): + * WebURLResponse.cpp: Remove CFNetwork-specific logic. + * WebURLResponse.h: Conditionalize CFNetwork-specific member. + * WebView.cpp: Conditionalize CFNetwork-specific network protocol test. + (WebView::canHandleRequest): + +2008-03-18 Adam Roben <aroben@apple.com> + + Focus the Inspector's WebView whenever the Inspector window is focused + + Reviewed by Mitz. + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::onSetFocus): Send focus to the WebView. + (WebInspectorWndProc): Added a handler for WM_SETFOCUS. + * WebCoreSupport/WebInspectorClient.h: + +2008-03-18 Adam Roben <aroben@apple.com> + + Fix Bug 14276: Element highlight also covers Web inspector + + <http://bugs.webkit.org/show_bug.cgi?id=14276> + <rdar://5712796> + + Also fixes <rdar://5622837> Browser window comes to front when node + highlight appears, potentially blocking Inspector + + Reviewed by Mitz. + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::highlight): After showing the highlight, + reposition it just behind the Inspector's window. + * WebNodeHighlight.cpp: + (WebNodeHighlight::show): + - Changed flags passed to CreateWindowEx to not specify WS_VISIBLE. + This is not needed because we'll show the window later in this + function. + - Removed call to SetWindowPos that tried to position the overlay + just in front of the WebView. This is now handled by + WebInspectorClient. + - Changed call to ShowWindow to use SetWindowPos so that we can pass + SWP_NOACTIVATE. This prevents the highlight from jumping in front + of the Inspector every time it's shown. + * WebNodeHighlight.h: Added a method to get the highlight's HWND. + +2008-03-14 Steve Falkenburg <sfalken@apple.com> + + PGO build fixes. + + * WebKit.vcproj/WebKit.vcproj: + +2008-03-13 Adam Roben <aroben@apple.com> + + Another Windows build fix after r31034 + + * WebKitDLL.cpp: + (loadResourceIntoBuffer): Use SharedBuffer::create. + +2008-03-13 Adam Roben <aroben@apple.com> + + Windows build fix after r31034 + + * WebFrame.cpp: + (WebFrame::loadData): Use SharedBuffer::create. + (WebFrame::loadHTMLString): Ditto. + +2008-03-13 Steve Falkenburg <sfalken@apple.com> + + More PGO build fixes. + + * WebKit.vcproj/WebKit.pgd: Removed. + * WebKit.vcproj/WebKit.vcproj: + * WebKitPrefix.cpp: + +2008-03-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Call originalRequest instead of initialRequest. + + * WebDataSource.cpp: + (WebDataSource::initialRequest): + +2008-03-13 Steve Falkenburg <sfalken@apple.com> + + PGO build fixes. + + Disable PGO for normal release builds. + Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets. + + * WebKit.vcproj/WebKit.vcproj: + +2008-03-12 Steve Falkenburg <sfalken@apple.com> + + Fix build. + + * WebKit.vcproj/WebKit.vcproj: + +2008-03-12 Ada Chan <adachan@apple.com> + + <rdar://problem/5795843> + CFURLDownload needs to be cancelled if we don't have a destination path + to save resume information. + + Reviewed by Brady. + + * WebDownload.cpp: + (WebDownload::cancelForResume): + +2008-03-12 David Hyatt <hyatt@apple.com> + + Make the zoom factor a float and not a percent. + + Reviewed by antti + + * WebFrame.cpp: + (WebFrame::setTextSizeMultiplier): + +2008-03-12 Steve Falkenburg <sfalken@apple.com> + + Build fix. + + * WebKit.vcproj/WebKit.pgd: + * WebKit.vcproj/WebKit.vcproj: + +2008-03-12 Steve Falkenburg <sfalken@apple.com> + + Re-enabled PGO. + + Rubber stamped by Mark Rowe. + + * WebKit.vcproj/WebKit.pgd: + * WebKit.vcproj/WebKit.vcproj: + * WebKitPrefix.cpp: touched this file to force a re-build. + +2008-03-12 Steve Falkenburg <sfalken@apple.com> + + Fix build. + + * WebKit.vcproj/WebKit.vcproj: + +2008-03-11 Steve Falkenburg <sfalken@apple.com> + + Use PGO to build WebKit.dll. + + Reviewed by Oliver. + + * WebKit.vcproj/WebKit.pgd: Added. + * WebKit.vcproj/WebKit.vcproj: + +2008-03-11 Brent Fulgham <bfulgham@gmail.com> + + Reviewed by Adam Roben. + + Enabled WinLauncher as part of normal Windows build. + http://bugs.webkit.org/show_bug.cgi?id=17715. + + * WebKit.vcproj/WebKit.sln: Add WinLauncher to the set of things + build during a Windows build. + +2008-03-11 Adam Roben <aroben@apple.com> + + Roll out r30961 since it broke the default site icon on Windows + + * WebKit.vcproj/WebKit.rc: + * WebKit.vcproj/urlIcon.png: Renamed from WebCore/Resources/urlIcon.png. + * WebKitDLL.cpp: + (loadResourceIntoBuffer): + +2008-03-11 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Darin Adler. + + r25512 inlined the urlIcon to improve the startup time of Safari on Mac. Inlining is + not suitable for platforms where this icon is themable. E.g. the Qt platform is allowing + to theme this icon and the Gtk+ platform will probably end up with themable icons + as well. + + Remove dead code from the windows port and move the urlIcon from the windows + directory to the Resource directory to be used by Qt and other ports. + + Ifdef the usage of the built-in icon in IconDatabase.cpp and for Qt do not use + it. Gtk+ currently has no proper implementation of Image::loadPlatformResource but + once it does it wants to use this for getting the urlIcon as well. + + * WebKit.vcproj/WebKit.rc: + * WebKitDLL.cpp: + (loadResourceIntoBuffer): + +2008-03-10 Eric Seidel <eric@webkit.org> + + No review, build fix only. + + Speculative fix for Windows build, use ::UChar instead of KJS::UChar + + * WebScriptCallFrame.cpp: + (WebScriptCallFrame::valueForVariable): + (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString): + +2008-03-10 Steve Falkenburg <sfalken@apple.com> + + Fix build break caused by r30920. + + Serialize remaining dependent builds by adding dependencies. + Visual Studio per-vcproj parallelization doesn't add a lot of value + since so many of our builds are dependent - this just enforces that. + We do our parallelization via pdevenv, which works much better. + + * WebKit.vcproj/WebKit.sln: + * WebKit.vcproj/WebKit.submit.sln: + +2008-03-09 Steve Falkenburg <sfalken@apple.com> + + Stop Windows build if an error occurs in a prior project. + + Rubber stamped by Darin Adler. + + * WebKit.vcproj/Interfaces.vcproj: + * WebKit.vcproj/InterfacesGenerated.vcproj: + * WebKit.vcproj/WebKit.vcproj: + * WebKit.vcproj/WebKitGUID.vcproj: + +2008-03-09 Adam Roben <aroben@apple.com> + + Make WebInspectorClient use WindowMessageBroadcaster instead of manual subclassing + + Reviewed by Darin Adler. + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::WebInspectorClient): Removed + m_orignalWebViewWndProc member. + (WebInspectorClient::attachWindow): Register as a listener with + WindowMessageBroadcaster instead of subclassing. + (WebInspectorClient::detachWindow): Deregister as a listener with + WindowMessageBroadcaster instead of unsubclassing. + (WebInspectorClient::windowReceivedMessage): Renamed from + SubclassedWebViewWndProc. Also added a missing break statement after + the call to onWebViewWindowPosChanging. + * WebCoreSupport/WebInspectorClient.h: + +2008-03-09 Adam Roben <aroben@apple.com> + + Make the node highlight not obscure the tab bar when it first appears + + Reviewed by Darin Adler. + + * WebNodeHighlight.cpp: + (WebNodeHighlight::onWebViewWindowPosChanged): Added. Listens for + changes to the WebView's size and resizes the highlight window to + match. + (WebNodeHighlight::onRootWindowPosChanged): Added. Listens for changes + to the WebView's root window's position and moves the highlight window + to match. + (WebNodeHighlight::windowReceivedMessage): Call + onWebViewWindowPosChanged/onRootWindowPosChanged as appropriate. + * WebNodeHighlight.h: + +2008-03-09 Adam Roben <aroben@apple.com> + + Fix Bug 14254: Inspector node highlight applied to all tabs + + <http://bugs.webkit.org/show_bug.cgi?id=14254> + <rdar://problem/5322306> + + WebNodeHighlight now listens for the WM_SHOWWINDOW message being sent + to the inspected WebView so that it can hide/show itself as the + WebView is hidden/shown. + + Reviewed by Anders. + + * WebNodeHighlight.cpp: + (WebNodeHighlight::~WebNodeHighlight): Remove ourselves as a listener + for our inspected WebView's window's messages. + (WebNodeHighlight::show): Add ourselves as a listener for our + inspected WebView's window's messages. + (WebNodeHighlight::onWebViewShowWindow): Added. Hide ourselves when + the WebView hides, show ourselves when the WebView is shown. + (WebNodeHighlight::windowReceivedMessage): Added a separate switch + statement to handle the inspected WebView's window's messages. + * WebNodeHighlight.h: + +2008-03-07 Brent Fulgham <bfulgham@gmail.com> + + Reviewed by Mark Rowe. + + Correct build intermediary output + (http://bugs.webkit.org/show_bug.cgi?id=17713) + + * WebKit/win/WebKit.vcproj/WebKit.vcproj: Correct output and intermediary paths + +2008-03-07 Brent Fulgham <bfulgham@gmail.com> + + Reviewed by Adam Roben. + + Do not link (or attempt to initialize) the SafariTheme.dll + when not building with USE(SAFARI_THEME) enabled. + (http://bugs.webkit.org/show_bug.cgi?id=17707) + + * WebKit/win/WebKitClassFactory.cpp: Conditionalize use of SafariTheme.dll + +2008-03-07 Brent Fulgham <bfulgham@gmail.com> + + Reviewed by Steve Falkenburg. + + Update solution to understand Cairo build target. Add + library dependencies for Cairo build target. + (http://bugs.webkit.org/show_bug.cgi?id=17300) + + * WebKit.vcproj/WebKit.sln: + * WebKit.vcproj/WebKit.vcproj: + +2008-03-06 Adam Roben <aroben@apple.com> + + Change WebScriptDebugServer to use WebCore::JavaScriptDebugServer + + WebScriptDebugServer is now a JavaScriptDebugListener. + + Reviewed by Darin Adler. + + * WebScriptDebugServer.cpp: + (WebScriptDebugServer::WebScriptDebugServer): Removed initialization + of m_callingListeners member. + (WebScriptDebugServer::addListener): Register as a listener with + JavaScriptDebugServer if we've just added our first listener. + (WebScriptDebugServer::removeListener): Deregister as a listener with + JavaScriptDebugServer if we've just removed our last listener. + (WebScriptDebugServer::didParseSource): Added. Code came from the old + sourceParsed method. Removed m_callingListeners code because + JavaScriptDebugServer guards against re-entry for us. + (WebScriptDebugServer::failedToParseSource): Ditto. + (WebScriptDebugServer::didEnterCallFrame): Ditto for callEvent. + (WebScriptDebugServer::willExecuteStatement): Ditto for atStatement. + (WebScriptDebugServer::willLeaveCallFrame): Ditto for + willLeaveCallFrame. + (WebScriptDebugServer::exceptionWasRaised): Ditto for exception. + * WebScriptDebugServer.h: Changed to inherit from + WebCore::JavaScriptDebugListener. + * WebView.cpp: + (WebView::initWithFrame): Removed call to + WebScriptDebugServer::pageCreated. This is now handled by WebCore. + +2008-03-06 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - fix regression test failures and crashes from the visited-link change + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::populateVisitedLinks): Check for null before calling + addVisitedLinksToPageGroup. + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::updateGlobalHistory): Ditto. + * WebHistory.cpp: + (WebHistory::setOptionalSharedHistory): Call PageGroup::setShouldTrackVisitedLinks + to turn off visited links if there is no history object. Also call + removeAllVisitedLinks so we can start over from scratch with the new history. + +2008-03-06 Matt Lilek <webkit@mattlilek.com> + + Reviewed by Adam Roben. + + Bug 17691: REGRESSION: FindSafari doesn't work + http://bugs.webkit.org/show_bug.cgi?id=17691 + + Swap my change from r30394 to use the Release libraries instead of Debug + since some machines don't have the Debug version. + + * WebKit.vcproj/WebKit.sln: + +2008-03-06 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - fix http://bugs.webkit.org/show_bug.cgi?id=17526 + REGRESSION: iframes are added to Safari's History menu + by separating the visited link machinery from global history + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::populateVisitedLinks): Added a call to the new + WebHistory::addVisitedLinksToPageGroup function. + * WebCoreSupport/WebChromeClient.h: Added populateVisitedLinks. + Also fixed the webView function to be non-virtual. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::updateGlobalHistory): Changed to use the + new WebHistory::addItem function. + (WebFrameLoaderClient::webHistory): Changed to return a WebHistory*, + there's no reason to AddRef the result from this function. + * WebCoreSupport/WebFrameLoaderClient.h: Ditto. + + * WebHistory.cpp: Removed IWebHistoryPrivate and _WebCoreHistoryProvider. + (WebHistory::QueryInterface): Removed IWebHistoryPrivate. + (sharedHistoryStorage): Added. + (WebHistory::sharedHistory): Added. + (WebHistory::optionalSharedHistory): Changed to use sharedHistory(). + (WebHistory::setOptionalSharedHistory): Changed to require a WebHistory + object, not just an IWebHistory. + (WebHistory::removeAllItems): Call PageGroup::removeAllVisitedLinks. + (WebHistory::addItem): Changed parameter types since this is called with + arguments from WebCore -- at some point this could allow better efficiency. + (WebHistory::removeItemForURLString): Call PageGroup::removeAllVisitedLinks + if the last URL is being removed. + (addVisitedLinkToPageGroup): Added. Helper. Adds a single link to a group's + visited link set. + (WebHistory::addVisitedLinksToPageGroup): Added. Adds all links to a group's + visited link. + * WebHistory.h: Removed IWebHistoryPrivate. Removed optionalSharedHistoryInternal + and added sharedHistory. Replaced addItemForURL and containsItemForURLString with + non-virtual addItem and addVisitedLinksToPageGroup functions. + +2008-03-05 Anders Carlsson <andersca@apple.com> + + Build fix. + + * WebKit.vcproj/WebKit.vcproj: + +2008-03-04 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including + JSDOMWindow.h + + * WebFrame.cpp: + +2008-03-04 Adam Roben <aroben@apple.com> + + WebScriptDebugServer cleanup + + Reviewed by Anders. + + * WebScriptDebugServer.cpp: Renamed m_callingServer to + m_callingListeners. + (WebScriptDebugServer::WebScriptDebugServer): + (WebScriptDebugServer::sharedWebScriptDebugServer): Changed to keep + the shared instance as a function-level static. + (WebScriptDebugServer::didLoadMainResourceForDataSource): Made return + void. + (WebScriptDebugServer::sourceParsed): + (WebScriptDebugServer::callEvent): + (WebScriptDebugServer::atStatement): + (WebScriptDebugServer::returnEvent): + (WebScriptDebugServer::exception): + (WebScriptDebugServer::serverDidDie): Made return void. + * WebScriptDebugServer.h: + - Removed unnecessary #includes + - Made inheritance from KJS::Debugger private + - Made some methods private + +2008-03-04 Adam Roben <aroben@apple.com> + + Remove WebScriptDebugger + + Reviewed by Anders. + + * WebKit.vcproj/WebKit.vcproj: Removed files from project. + * WebScriptDebugServer.cpp: + (frame): Moved here from WebScriptDebugger.cpp. + (webFrame): Ditto. + (webView): Ditto. + (WebScriptDebugServer::WebScriptDebugServer): Initialize new member. + * WebScriptDebugServer.h: Changed to inherit directly from + KJS::Debugger instead of from WebScriptDebugger, and added + m_callingServer member that WebScriptDebugger used to own. + * WebScriptDebugger.cpp: Removed. + * WebScriptDebugger.h: Removed. + +2008-03-04 Adam Roben <aroben@apple.com> + + Move sourceParsed to WebScriptDebugServer + + Reviewed by Anders. + + * WebScriptDebugServer.cpp: + (WebScriptDebugServer::sourceParsed): Moved here from + WebScriptDebugger and merged with didParseSource/failedToParseSource. + * WebScriptDebugServer.h: Removed didParseSource/failedToParseSource. + * WebScriptDebugger.cpp: Removed sourceParsed. + * WebScriptDebugger.h: Ditto. + +2008-03-04 Adam Roben <aroben@apple.com> + + Move callEvent, returnEvent, and exception to WebScriptDebugServer + + Reviewed by Anders. + + * WebScriptDebugServer.cpp: + (WebScriptDebugServer::callEvent): Moved here from WebScriptDebugger + and merged with didEnterCallFrame. + (WebScriptDebugServer::returnEvent): Ditto for willLeaveCallFrame. + (WebScriptDebugServer::exception): Ditto for exceptionWasRaised. + * WebScriptDebugServer.h: Removed didEnterCallFrame, + willLeaveCallFrame, and exceptionWasRaised. + * WebScriptDebugger.cpp: Removed callEvent, returnEvent, and + exception. + * WebScriptDebugger.h: Ditto. + +2008-03-04 Adam Roben <aroben@apple.com> + + Move atStatement to WebScriptDebugServer + + Reviewed by Anders. + + * WebScriptDebugServer.cpp: + (WebScriptDebugServer::atStatement): Moved here and merged with the + old willExecuteStatement method. + * WebScriptDebugServer.h: Removed inheritance from + IWebScriptDebugListener, which no one was relying on. + * WebScriptDebugger.cpp: + (webFrame): Made non-static. + (webView): Ditto. + * WebScriptDebugger.h: Added declarations of webFrame and webView + methods for WebScriptDebugServer's benefit. Removed unused m_webView + and m_frame members. + +2008-03-04 Adam Roben <aroben@apple.com> + + Start to merge WebScriptDebugger and WebScriptDebugServer + + WebScriptDebugServer now inherits from WebScriptDebugger. + + Reviewed by Anders. + + * WebScriptDebugServer.cpp: + (WebScriptDebugServer::pageCreated): Use sharedWebScriptDebugServer + instead of WebScriptDebugger::shared. + (WebScriptDebugServer::addListener): Ditto. + (WebScriptDebugServer::removeListener): Ditto. + * WebScriptDebugServer.h: Changed to inherit from WebScriptDebugger. + * WebScriptDebugger.cpp: Removed shared method. + * WebScriptDebugger.h: Made constructor/destructor protected, and + removed shared method. + +2008-03-04 Adam Roben <aroben@apple.com> + + Use WebCore's new debugger-attaching code + + Reviewed by Kevin M. + + * WebCoreSupport/WebFrameLoaderClient.cpp: Moved a kit() function to + WebView.{cpp,h} so that other files can call it. + * WebFrame.cpp: + (WebFrame::WebFrame): Removed m_scriptDebugger member. + (WebFrame::windowObjectCleared): Removed attach/detach calls. This is + no longer needed because WebScriptDebugger no longer stores any + per-WebFrame state. + * WebFrame.h: + * WebScriptDebugServer.cpp: + (WebScriptDebugServer::pageCreated): Added. Attaches our shared + debugger to the Page if we have any listeners. + (WebScriptDebugServer::addListener): Sets our shared debugger for all + Pages when we get our first listener. + (WebScriptDebugServer::removeListener): Removes our shared debugger + from all Pages when we lose our last listener. + * WebScriptDebugServer.h: + * WebScriptDebugger.cpp: + (WebScriptDebugger::shared): Added. + (WebScriptDebugger::WebScriptDebugger): Removed m_frame member. + (WebScriptDebugger::~WebScriptDebugger): Added. + (frame): Gets a Frame from an ExecState. + (webFrame): Gets a WebFrame from an ExecState. + (webView): Gets a WebView from an ExecState. + (WebScriptDebugger::sourceParsed): Changed to call webFrame() and + webView() instead of using m_frame and m_webView members. + (WebScriptDebugger::callEvent): Ditto. + (WebScriptDebugger::atStatement): Ditto. + (WebScriptDebugger::returnEvent): Ditto. + (WebScriptDebugger::exception): Ditto. + * WebScriptDebugger.h: + * WebView.cpp: + (kit): Moved here from WebFrameLoaderClient.cpp. + (WebView::initWithFrame): Tell the WebScriptDebugServer about the new + Page so it can attach a debugger if needed. + * WebView.h: + +2008-03-04 Adam Roben <aroben@apple.com> + + Change WebView's string-finding methods to call through to Page + + These methods were added to Page back in r28878 (and the + implementation was copied from WebView!) but we never switched over to + using them. + + Reviewed by Sam. + + * WebView.cpp: + (WebView::searchFor): Call through to Page::findString. + (WebView::markAllMatchesForText): Call through to Page. + (WebView::unmarkAllTextMatches): Ditto. + +2008-03-04 Adam Roben <aroben@apple.com> + + Actually pause the process while Drosera is at a breakpoint + + WebScriptDebugServer::suspendProcessIfPaused is supposed to pause the + process while Drosera is at a breakpoint. Previously we were just + starting a message pump that would deliver messages to all windows in + the process, allowing mouse events, JS timers, etc. to execute. + + Now we only deliver messages to COM's message window, which is all we + need to allow RPC to function. + + Reviewed by Anders. + + * WebScriptDebugServer.cpp: + (comMessageWindow): Added. Finds COM's message window. + (WebScriptDebugServer::suspendProcessIfPaused): Only deliver messages + to COM's message window so that mouse events, JS timers, etc., won't + execute. + +2008-03-03 Adam Roben <aroben@apple.com> + + Generate WebScriptCallFrame instances dynamically + + WebScriptDebugger no longer holds a reference to the topmost call + frame, and WebScriptCallFrame no longer holds a reference to its + caller. We now generate WebScriptCallFrame instances as needed by + walking the callingExecState chain. + + By making WebKit no longer responsible for keeping track of the call + stack, we get one step closer to moving most JS debugging code out of + WebKit entirely. + + This incidentally fixes a bug in Drosera where we'd never show the + global scope in the call stack. + + Reviewed by Sam and Kevin M. + + * WebScriptCallFrame.cpp: + (callingFunctionOrGlobalExecState): Finds the nearest calling + ExecState that is a FunctionExecState or GlobalExecState, if any, and + returns it. + (WebScriptCallFrame::WebScriptCallFrame): + - No longer takes a caller parameter. + - Sets m_state to the callingFunctionOrGlobalExecState of the + ExecState passed in. + (WebScriptCallFrame::createInstance): Removed the caller parameter. + (WebScriptCallFrame::caller): Generate a new WebScriptCallFrame on the + fly from our ExecState. + * WebScriptCallFrame.h: No longer holds a reference to the caller. + * WebScriptDebugger.cpp: + (WebScriptDebugger::WebScriptDebugger): Removed the call to callEvent + that was supposed to set up the global scope call frame, but never + worked because m_callingServer was set to true, which would cause + callEvent to return early without doing anything. Also removed the + m_callingServer guards since we're not calling callEvent anymore. + (WebScriptDebugger::callEvent): Create a WebScriptCallFrame on the + fly from the passed-in ExecState. + (WebScriptDebugger::atStatement): Ditto. + (WebScriptDebugger::returnEvent): Ditto, but use the callingExecState. + This is equivalent to what calling leaveFrame() did before. + (WebScriptDebugger::exception): Ditto, using the passed-in ExecState. + * WebScriptDebugger.h: Removed m_topStackFrame member and + enterFrame/leaveFrame methods. + +2008-03-03 Sam Weinig <sam@webkit.org> + + Windows build fix. + + * WebFrame.cpp: + (WebFrame::windowObjectCleared): + +2008-03-03 David Hyatt <hyatt@apple.com> + + Full page zoom work. Make setting of a zoom factor take a boolean saying whether it is a text only + or full page zoom. + + Reviewed by Tim H. + + * WebFrame.cpp: + (WebFrame::setTextSizeMultiplier): + +2008-02-29 Adam Roben <aroben@apple.com> + + Delete an unused file + + Rubberstamped by Brady. + + * Interfaces/IWebScriptScope.idl: Removed. + +2008-02-28 Adam Roben <aroben@apple.com> + + Change WebPreferences to be backed by CFPreferences + + Reviewed by Ada, Geoff, Steve, and Darin. + + * WebPreferenceKeysPrivate.h: + * WebPreferences.cpp: + (WebPreferences::sharedStandardPreferences): Changed to call + setAutoSaves(TRUE) before calling load(). This ensures that the + preferences being migrated to CFPreferences are saved to disk. + (WebPreferences::valueForKey): Changed to return a RetainPtr to ensure + that the refcount is managed properly. Now attempts to retrieve a + value from CFPreferences before falling back to the default settings. + (WebPreferences::setValueForKey): Now saves the value in + CFPreferences if m_autoSaves is true. + (WebPreferences::stringValueForKey): Updated for valueForKey changes. + (WebPreferences::integerValueForKey): DItto. + (WebPreferences::boolValueForKey): Ditto. + (WebPreferences::floatValueForKey): Ditto. + (WebPreferences::save): Now simply calls CFPreferencesAppSynchronize. + (WebPreferences::load): Always initializes m_privatePrefs to an empty + CFMutableDictionary. + (WebPreferences::migrateWebKitPreferencesToCFPreferences): Migrates + preferences from our old custom plist to CFPreferences and then + deletes our custom plist, if the migration has never occurred before. + (WebPreferences::copyWebKitPreferencesToCFPreferences): Copies + preferences to CFPreferences. If we've never migrated the default + settings from Safari 3 Beta before, we omit them from this copying + procedure. + * WebPreferences.h: + +2008-02-28 Adam Roben <aroben@apple.com> + + Refactor value <-> CFNumber conversions into some helper functions + + Reviewed by Jon. + + * WebPreferences.cpp: + (preferencesPath): Changed to return a const String&. + (numberValueForPreferencesValue): Converts a value from preferences to + a native numeric type. + (cfNumber): Converts a native numeric value to a CFNumberRef. + (booleanValueForPreferencesValue): Converts a value from preferences + to a native boolean. + (WebPreferences::integerValueForKey): Changed to call + numberValueForPreferencesValue. + (WebPreferences::floatValueForKey): Ditto. + (WebPreferences::boolValueForKey): Changed to call + booleanValueForPreferencesValue. + (WebPreferences::setIntegerValue): Changed to call cfNumber. + (WebPreferences::setLongLongValue): Ditto. + +2008-02-27 Adam Roben <aroben@apple.com> + + Add WebPreferences::setValueForKey + + This is just a small refactoring of some duplicated logic into a + shared method. + + Reviewed by Sam. + + * WebPreferences.cpp: + (WebPreferences::setValueForKey): Added. + (WebPreferences::setStringValue): Call setValueForKey. + (WebPreferences::setIntegerValue): Ditto. + (WebPreferences::setBoolValue): Ditto. + (WebPreferences::setLongLongValue): Ditto. + * WebPreferences.h: + +2008-02-27 Adam Roben <aroben@apple.com> + + Remove WebPreferences' static members + + s_defaultSettings is now a file-level static, and + s_standardPreferences has been removed completely (it wasn't being + used). + + Reviewed by Sam. + + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): + (WebPreferences::valueForKey): + (WebPreferences::migrateDefaultSettingsFromSafari3Beta): + (WebPreferences::removeValuesMatchingDefaultSettings): + * WebPreferences.h: + +2008-02-29 Steve Falkenburg <sfalken@apple.com> + + Don't free the VARIANT passed into Write, since it is an input parameter owned by the caller. + Found via code inspection. + + Reviewed by Adam. + + * WebActionPropertyBag.cpp: + (WebActionPropertyBag::Write): + * WebElementPropertyBag.cpp: + (WebElementPropertyBag::Write): + +2008-02-27 Matt Lilek <webkit@mattlilek.com> + + Reviewed by Adam Roben. + + Bug 14348: Messing up the inspector by dragging an URL into it + http://bugs.webkit.org/show_bug.cgi?id=14348 + <rdar://problem/5283620> and <rdar://problem/5712808> + + Add a new class to handle the Inspector's delegate calls. + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::createPage): + * WebCoreSupport/WebInspectorDelegate.cpp: Added. + (:m_refCount): + (WebInspectorDelegate::createInstance): + (WebInspectorDelegate::AddRef): + (WebInspectorDelegate::Release): + (WebInspectorDelegate::dragDestinationActionMaskForDraggingInfo): + * WebCoreSupport/WebInspectorDelegate.h: Added. + (WebInspectorDelegate::QueryInterface): + (WebInspectorDelegate::createWebViewWithRequest): + (WebInspectorDelegate::webViewShow): + (WebInspectorDelegate::webViewClose): + (WebInspectorDelegate::webViewFocus): + (WebInspectorDelegate::webViewUnfocus): + (WebInspectorDelegate::webViewFirstResponder): + (WebInspectorDelegate::makeFirstResponder): + (WebInspectorDelegate::setStatusText): + (WebInspectorDelegate::webViewStatusText): + (WebInspectorDelegate::webViewAreToolbarsVisible): + (WebInspectorDelegate::setToolbarsVisible): + (WebInspectorDelegate::webViewIsStatusBarVisible): + (WebInspectorDelegate::setStatusBarVisible): + (WebInspectorDelegate::webViewIsResizable): + (WebInspectorDelegate::setResizable): + (WebInspectorDelegate::setFrame): + (WebInspectorDelegate::webViewFrame): + (WebInspectorDelegate::setContentRect): + (WebInspectorDelegate::webViewContentRect): + (WebInspectorDelegate::runJavaScriptAlertPanelWithMessage): + (WebInspectorDelegate::runJavaScriptConfirmPanelWithMessage): + (WebInspectorDelegate::runJavaScriptTextInputPanelWithPrompt): + (WebInspectorDelegate::runBeforeUnloadConfirmPanelWithMessage): + (WebInspectorDelegate::runOpenPanelForFileButtonWithResultListener): + (WebInspectorDelegate::mouseDidMoveOverElement): + (WebInspectorDelegate::contextMenuItemsForElement): + (WebInspectorDelegate::validateUserInterfaceItem): + (WebInspectorDelegate::shouldPerformAction): + (WebInspectorDelegate::willPerformDragDestinationAction): + (WebInspectorDelegate::dragSourceActionMaskForPoint): + (WebInspectorDelegate::willPerformDragSourceAction): + (WebInspectorDelegate::contextMenuItemSelected): + (WebInspectorDelegate::hasCustomMenuImplementation): + (WebInspectorDelegate::trackCustomPopupMenu): + (WebInspectorDelegate::measureCustomMenuItem): + (WebInspectorDelegate::drawCustomMenuItem): + (WebInspectorDelegate::addCustomMenuDrawingData): + (WebInspectorDelegate::cleanUpCustomMenuDrawingData): + (WebInspectorDelegate::canTakeFocus): + (WebInspectorDelegate::takeFocus): + (WebInspectorDelegate::registerUndoWithTarget): + (WebInspectorDelegate::removeAllActionsWithTarget): + (WebInspectorDelegate::setActionTitle): + (WebInspectorDelegate::undo): + (WebInspectorDelegate::redo): + (WebInspectorDelegate::canUndo): + (WebInspectorDelegate::canRedo): + * WebKit.vcproj/WebKit.vcproj: + +2008-02-26 Adam Roben <aroben@apple.com> + + Move ResourceLoadDelegate methods to WebFrameLoaderClient + + Changed all methods to use early returns where possible and COMPtr's + AdoptCOM/Query constructors. + + Reviewed by Anders. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::assignIdentifierToInitialRequest): + (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge): + (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge): + (WebFrameLoaderClient::dispatchWillSendRequest): + (WebFrameLoaderClient::dispatchDidReceiveResponse): + (WebFrameLoaderClient::dispatchDidReceiveContentLength): + (WebFrameLoaderClient::dispatchDidFinishLoading): + (WebFrameLoaderClient::dispatchDidFailLoading): + * WebCoreSupport/WebFrameLoaderClient.h: + * WebFrame.cpp: + * WebFrame.h: + +2008-02-26 Adam Roben <aroben@apple.com> + + Move two more methods to WebFrameLoaderClient + + Reviewed by Anders. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (kit): + (WebFrameLoaderClient::dispatchCreatePage): Changed nested ifs to + early returns, and changed to use the COMPtr Query constructor. + (WebFrameLoaderClient::dispatchDidLoadMainResource): Added an early + return, and changed to use getWebDataSource. + * WebCoreSupport/WebFrameLoaderClient.h: + * WebFrame.cpp: + * WebFrame.h: + +2008-02-26 Adam Roben <aroben@apple.com> + + Get rid of IID_WebFrame + + Reviewed by Anders. + + * WebFrame.cpp: Removed IID_WebFrame definition. + (WebFrame::QueryInterface): Use __uuidof(WebFrame) instead of + IID_WebFrame. + (WebFrame::isDescendantOfFrame): Use COMPtr's Query constructor + instead of a manual QueryInterface. + * WebFrame.h: Removed IID_WebFrame declaration, gave WebFrame a + DECLSPEC_UUID. + +2008-02-26 Adam Roben <aroben@apple.com> + + Move WebHistory-related methods to WebFrameLoaderClient + + Reviewed by Anders. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::updateGlobalHistory): + (WebFrameLoaderClient::shouldGoToHistoryItem): + (WebFrameLoaderClient::setTitle): Changed some nested ifs into early + returns. + (WebFrameLoaderClient::webHistory): Changed to return a COMPtr to + make the reference management foolproof. + * WebCoreSupport/WebFrameLoaderClient.h: + * WebFrame.cpp: + * WebFrame.h: + +2008-02-26 Adam Roben <aroben@apple.com> + + Move cache-related methods to WebFrameLoaderClient + + Reviewed by Anders. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (getWebDataSource): Moved to the top of the file. + (WebFrameLoaderClient::savePlatformDataToCachedPage): + (WebFrameLoaderClient::transitionToCommittedForNewPage): + (WebFrameLoaderClient::canCachePage): + * WebCoreSupport/WebFrameLoaderClient.h: + * WebFrame.cpp: + * WebFrame.h: + +2008-02-25 Adam Roben <aroben@apple.com> + + Move plugin-related methods to WebFrameLoaderClient + + Reviewed by Anders. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::WebFrameLoaderClient): + (WebFrameLoaderClient::setMainDocumentError): + (WebFrameLoaderClient::committedLoad): Added some early returns. + (WebFrameLoaderClient::receivedData): + (WebFrameLoaderClient::finishedLoading): Ditto. + (getWebDataSource): + (WebFrameLoaderClient::createPlugin): + * WebCoreSupport/WebFrameLoaderClient.h: + * WebFrame.cpp: + (WebFrame::WebFramePrivate::WebFramePrivate): + * WebFrame.h: + +2008-02-25 Adam Roben <aroben@apple.com> + + Move createFrame to WebFrameLoaderClient + + Reviewed by Anders. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::createFrame): + (WebFrameLoaderClient::loadURLIntoChild): + * WebCoreSupport/WebFrameLoaderClient.h: + * WebFrame.cpp: + * WebFrame.h: + +2008-02-25 Adam Roben <aroben@apple.com> + + Move progress-related methods to WebFrameLoaderClient + + Reviewed by Anders. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::postProgressStartedNotification): + (WebFrameLoaderClient::postProgressEstimateChangedNotification): + (WebFrameLoaderClient::postProgressFinishedNotification): + * WebCoreSupport/WebFrameLoaderClient.h: + * WebFrame.cpp: + * WebFrame.h: + +2008-02-25 Adam Roben <aroben@apple.com> + + Remove WebFrame::detachedFromParent1 + + This method was removed from FrameLoaderClient in r19042, but was + never removed from WebFrame. + + Reviewed by Anders. + + * WebFrame.cpp: + * WebFrame.h: + +2008-02-23 Adam Roben <aroben@apple.com> + + Move many dispatch methods to WebFrameLoaderClient + + Reviewed by Sam. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::dispatchDidHandleOnloadEvents): + (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): + (WebFrameLoaderClient::dispatchDidCancelClientRedirect): + (WebFrameLoaderClient::dispatchWillPerformClientRedirect): + (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): + (WebFrameLoaderClient::dispatchWillClose): + (WebFrameLoaderClient::dispatchDidReceiveIcon): + (WebFrameLoaderClient::dispatchDidStartProvisionalLoad): + (WebFrameLoaderClient::dispatchDidReceiveTitle): + (WebFrameLoaderClient::dispatchDidCommitLoad): + (WebFrameLoaderClient::dispatchDidFinishDocumentLoad): + (WebFrameLoaderClient::dispatchDidFinishLoad): + (WebFrameLoaderClient::dispatchDidFirstLayout): + (WebFrameLoaderClient::dispatchShow): + * WebCoreSupport/WebFrameLoaderClient.h: + * WebFrame.cpp: + * WebFrame.h: + +2008-02-23 Adam Roben <aroben@apple.com> + + Move two more methods to WebFrameLoaderClient + + Reviewed by Sam. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::hasFrameView): + (WebFrame::forceLayout): + * WebCoreSupport/WebFrameLoaderClient.h: + * WebFrame.cpp: + * WebFrame.h: + +2008-02-24 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + - remove separate client calls for "standard" and "reload' history + + * WebFrame.cpp: + (WebFrame::updateGlobalHistory): + * WebFrame.h: + +2008-02-23 Brent Fulgham <bfulgham@gmail.com> + + Not reviewed, build fix. + + * WebIconDatabase.cpp: + * WebIconDatabase.h: + +2008-02-22 Adam Roben <aroben@apple.com> + + Move hasWebView to WebFrameLoaderClient + + I added an m_webFrame member to WebFrameLoaderClient. This is slightly + strange because WebFrame inherits from WebFrameLoaderClient, but this + member will be needed once we remove the inheritance, so we might as + well prepare for that now. + + Reviewed by Anders. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::WebFrameLoaderClient): Changed to take a + WebFrame* parameter. + (WebFrameLoaderClient::hasWebView): Moved here from WebFrame.cpp. + * WebCoreSupport/WebFrameLoaderClient.h: Added an m_webFrame + parameter. + * WebFrame.cpp: Removed hasWebView. + (WebFrame::WebFrame): Updated for WebFrameLoaderClient constructor + change. + * WebFrame.h: + +2008-02-22 Adam Roben <aroben@apple.com> + + Start to move FrameLoaderClient methods off WebFrame onto a separate class + + WebFrame now inherits from a new WebFrameLoaderClient class, which + will gradually assume all FrameLoaderClient responsibilities. Once + that process is complete, WebFrame will no longer inherit from + WebFrameLoaderClient. + + In this first patch, I've only moved createDocumentLoader up to the + WebFrameLoaderClient class. + + Reviewed by Anders. + + * WebCoreSupport/WebFrameLoaderClient.cpp: Added. + (WebFrameLoaderClient::WebFrameLoaderClient): + (WebFrameLoaderClient::~WebFrameLoaderClient): + (WebFrameLoaderClient::createDocumentLoader): Moved here from + WebFrame.cpp. + * WebCoreSupport/WebFrameLoaderClient.h: Added. + * WebFrame.cpp: Removed createDocumentLoader implementation. + * WebFrame.h: Changed to inherit from WebFrameLoaderClient. + * WebKit.vcproj/WebKit.vcproj: Added new files to the project. + +2008-02-22 Adam Roben <aroben@apple.com> + + Move FormValuesPropertyBag into its own files + + Reviewed by Sam. + + * WebCoreSupport/FormValuesPropertyBag.cpp: Added. + (FormValuesPropertyBag::QueryInterface): + (FormValuesPropertyBag::AddRef): + (FormValuesPropertyBag::Release): + (FormValuesPropertyBag::Read): + (FormValuesPropertyBag::Write): + (FormValuesPropertyBag::CountProperties): + (FormValuesPropertyBag::GetPropertyInfo): + (FormValuesPropertyBag::LoadObject): + * WebCoreSupport/FormValuesPropertyBag.h: Added. + (FormValuesPropertyBag::FormValuesPropertyBag): + * WebFrame.cpp: Deleted FormValuesPropertyBag code. + * WebKit.vcproj/WebKit.vcproj: Added new files to the project. + +2008-02-22 Adam Roben <aroben@apple.com> + + Remove some unused WebFrame methods + + FrameWinClient was deleted back in r22965, but these methods were + never deleted. + + Reviewed by Sam. + + * WebFrame.cpp: + * WebFrame.h: Made one createFrame overload protected, since it's only + called internally by WebFrame. + +2008-02-21 Adam Roben <aroben@apple.com> + + Move Client implementations into a WebCoreSupport directory + + Reviewed by Anders. + + * WebKit.vcproj/WebKit.vcproj: Updated file paths, and added + WebCoreSupport directory to the include path. + * WebCoreSupport/WebChromeClient.cpp: Renamed from WebKit/win/WebChromeClient.cpp. + * WebCoreSupport/WebChromeClient.h: Renamed from WebKit/win/WebChromeClient.h. + * WebCoreSupport/WebContextMenuClient.cpp: Renamed from WebKit/win/WebContextMenuClient.cpp. + * WebCoreSupport/WebContextMenuClient.h: Renamed from WebKit/win/WebContextMenuClient.h. + * WebCoreSupport/WebDragClient.cpp: Renamed from WebKit/win/WebDragClient.cpp. + * WebCoreSupport/WebDragClient.h: Renamed from WebKit/win/WebDragClient.h. + * WebCoreSupport/WebEditorClient.cpp: Renamed from WebKit/win/WebEditorClient.cpp. + * WebCoreSupport/WebEditorClient.h: Renamed from WebKit/win/WebEditorClient.h. + * WebCoreSupport/WebInspectorClient.cpp: Renamed from WebKit/win/WebInspectorClient.cpp. + * WebCoreSupport/WebInspectorClient.h: Renamed from WebKit/win/WebInspectorClient.h. + +2008-02-20 Sam Weinig <sam@webkit.org> + + Reviewed by Darin and Geoff. + + - WebKit part of <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack + + * WebView.cpp: + (WebView::notifyPreferencesChanged): Added a call to Settings::setNeedsSiteSpecificQuirks. + (WebView::setAllowSiteSpecificHacks): Added a comment about the problem Darin noticed, where + after you disable the site-specific hacks they persist until you open a new window or tweak + some other preference. + +2008-02-19 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + * WebFrame.cpp: + (WebFrame::renderTreeAsExternalRepresentation): Changed to use String instead + of DeprecatedString. + +2008-02-18 Steve Falkenburg <sfalken@apple.com> + + Make Drosera work on Vista. + + Runtime type library registration on Vista requires use of two new call: + RegisterTypeLibraryForUser and UnRegisterTypeLibraryForUser, which write to + HKCU. LoadTypeLib[Ex] registers under HKLM, which fails under vista due to UAC. + + Reviewed by Adam. + + * WebKitDLL.cpp: + (DllUnregisterServer): Call UnRegisterTypeLibraryForUser if available. Fix version number. + (DllRegisterServer): Call RegisterTypeLibraryForUser if available. + +2008-02-18 Matt Lilek <webkit@mattlilek.com> + + Reviewed by Adam. + + Remove FindSafari's Release configuration. + + * WebKit.vcproj/WebKit.sln: + +2008-02-16 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + http://bugs.webkit.org/show_bug.cgi?id=17397 + <rdar://problem/5748245> REGRESSION (r30236-30336): Cannot backspace/enter in forms on Windows + + * WebKit.vcproj/WebKit.vcproj: Add ENABLE_CROSS_DOCUMENT_MESSAGING definitions. + +2008-02-15 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - quick fix for a problem causing an assertion on launch + + * WebFrame.cpp: + (WebFrame::loadData): Make an empty KURL even if the BSTR is null. + Later we might want to rethink this. + +2008-02-14 Darin Adler <darin@apple.com> + + - updated for WebCore KURL changes + + * MarshallingHelpers.cpp: + (MarshallingHelpers::BSTRToKURL): Removed deprecatedString call. + (MarshallingHelpers::KURLToBSTR): Tweaked for efficiency. + * WebContextMenuClient.cpp: + (WebContextMenuClient::searchWithGoogle): Updated for KURL changes. + * WebDataSource.cpp: + (WebDataSource::unreachableURL): Ditto. + * WebDownload.cpp: + (WebDownload::init): Ditto. + (WebDownload::initWithRequest): Ditto. + * WebFrame.cpp: + (WebFrame::loadData): Ditto. + (WebFrame::loadURLIntoChild): Ditto. + (WebFrame::objectContentType): Ditto. + * WebResource.cpp: + (WebResource::initWithData): Ditto. + * WebURLResponse.cpp: + (WebURLResponse::createInstance): Ditto. + (WebURLResponse::initWithURL): Ditto. + * WebView.cpp: + (WebView::userAgentForURL): Ditto. + (WebView::copyURL): Ditto. + (WebView::notifyPreferencesChanged): Ditto. + +2008-02-14 Alexey Proskuryakov <ap@webkit.org> + + * WebChromeClient.cpp: (WebChromeClient::exceededDatabaseQuota): Forgot to re-apply review comments to + the previous check-in, fixing. + +2008-02-14 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Adam Roben. + + http://bugs.webkit.org/show_bug.cgi?id=17207 + Database example doesn't work (requires not-yet-released Safari) + + * WebChromeClient.cpp: + (WebChromeClient::exceededDatabaseQuota): Check Safari version, and allow 5 megabytes of storage + if it's too old. + +2008-02-13 Ada Chan <adachan@apple.com> + + <rdar://problem/5740656> Leak in postDidAddIconNotification in WebIconDatabase + + Reviewed by Darin Adler. + + * WebIconDatabase.cpp: + (postDidAddIconNotification): Need to adopt the newly created instance of CFDictionaryPropertyBag, + which already has a ref count of 1. + +2008-02-13 Rodney Dawes <dobey@wayofthemonkey.com> + + Fix Bug 17220: Illogical dependency between PluginView and + PluginDatabase + + <http://bugs.webkit.org/show_bug.cgi?id=17220> + + Reviewed by Adam and Darin. + + Update for the rename of PluginDatabase::createPluginView + to PluginView::create + + * WebFrame.cpp: + +2008-02-13 Adam Roben <aroben@apple.com> + + Windows build fix + + * Interfaces/WebKit.idl: Create the typelib version symbol ourselves. + +2008-02-12 Steve Falkenburg <sfalken@apple.com> + + Use a precompiled header to build WebKit. + + Reviewed by Adam. + + * WebKit.vcproj/WebKit.vcproj: + * WebKitPrefix.cpp: Added. + * WebKitPrefix.h: Added. + +2008-02-12 Steve Falkenburg <sfalken@apple.com> + + Changes to support merged MIDL output. + + All COM interfaces are now generated to WebKit.h. + + Reviewed by Sam, Ada. + + * DOMCSSClasses.h: + * DOMCoreClasses.h: + * DOMEventsClasses.h: + * DOMHTMLClasses.h: + * DefaultDownloadDelegate.h: + * DefaultPolicyDelegate.cpp: + * DefaultPolicyDelegate.h: + * GEN_DOMObject.h: + * Interfaces/DOMCSS.idl: + * Interfaces/DOMCore.idl: + * Interfaces/DOMEvents.idl: + * Interfaces/DOMExtensions.idl: + * Interfaces/DOMHTML.idl: + * Interfaces/DOMPrivate.idl: + * Interfaces/DOMRange.idl: + * Interfaces/DOMWindow.idl: + * Interfaces/IGEN_DOMObject.idl: + * Interfaces/IWebArchive.idl: + * Interfaces/IWebBackForwardList.idl: + * Interfaces/IWebBackForwardListPrivate.idl: + * Interfaces/IWebCache.idl: + * Interfaces/IWebDataSource.idl: + * Interfaces/IWebDatabaseManager.idl: + * Interfaces/IWebDocument.idl: + * Interfaces/IWebDownload.idl: + * Interfaces/IWebEditingDelegate.idl: + * Interfaces/IWebError.idl: + * Interfaces/IWebErrorPrivate.idl: + * Interfaces/IWebFormDelegate.idl: + * Interfaces/IWebFrame.idl: + * Interfaces/IWebFrameLoadDelegate.idl: + * Interfaces/IWebFrameLoadDelegatePrivate.idl: + * Interfaces/IWebFramePrivate.idl: + * Interfaces/IWebFrameView.idl: + * Interfaces/IWebHTMLRepresentation.idl: + * Interfaces/IWebHTTPURLResponse.idl: + * Interfaces/IWebHistory.idl: + * Interfaces/IWebHistoryItem.idl: + * Interfaces/IWebHistoryItemPrivate.idl: + * Interfaces/IWebIconDatabase.idl: + * Interfaces/IWebInspector.idl: + * Interfaces/IWebJavaScriptCollector.idl: + * Interfaces/IWebKitStatistics.idl: + * Interfaces/IWebMutableURLRequest.idl: + * Interfaces/IWebMutableURLRequestPrivate.idl: + * Interfaces/IWebNotification.idl: + * Interfaces/IWebNotificationCenter.idl: + * Interfaces/IWebNotificationObserver.idl: + * Interfaces/IWebPolicyDelegate.idl: + * Interfaces/IWebPreferences.idl: + * Interfaces/IWebPreferencesPrivate.idl: + * Interfaces/IWebResource.idl: + * Interfaces/IWebResourceLoadDelegate.idl: + * Interfaces/IWebResourceLoadDelegatePrivate.idl: + * Interfaces/IWebScriptCallFrame.idl: + * Interfaces/IWebScriptDebugListener.idl: + * Interfaces/IWebScriptDebugServer.idl: + * Interfaces/IWebScriptObject.idl: + * Interfaces/IWebScriptScope.idl: + * Interfaces/IWebScrollBarDelegatePrivate.idl: + * Interfaces/IWebScrollBarPrivate.idl: + * Interfaces/IWebSecurityOrigin.idl: + * Interfaces/IWebTextRenderer.idl: + * Interfaces/IWebUIDelegate.idl: + * Interfaces/IWebUIDelegatePrivate.idl: + * Interfaces/IWebURLAuthenticationChallenge.idl: + * Interfaces/IWebURLRequest.idl: + * Interfaces/IWebURLResponse.idl: + * Interfaces/IWebURLResponsePrivate.idl: + * Interfaces/IWebUndoManager.idl: + * Interfaces/IWebUndoTarget.idl: + * Interfaces/IWebView.idl: + * Interfaces/IWebViewPrivate.idl: + * Interfaces/WebKit.idl: + * WebActionPropertyBag.cpp: + * WebBackForwardList.h: + * WebCache.h: + * WebDataSource.cpp: + * WebDataSource.h: + * WebDatabaseManager.h: + * WebDownload.h: + * WebEditorClient.cpp: + * WebEditorClient.h: + * WebError.h: + * WebFrame.cpp: + * WebFrame.h: + * WebFramePolicyListener.h: + * WebHTMLRepresentation.cpp: + * WebHTMLRepresentation.h: + * WebHistory.cpp: + * WebHistory.h: + * WebHistoryItem.h: + * WebIconDatabase.h: + * WebInspector.h: + * WebJavaScriptCollector.h: + * WebKit.vcproj/Interfaces.vcproj: + * WebKit.vcproj/WebKitGUID.vcproj: + * WebKitDLL.cpp: + * WebKitStatistics.h: + * WebMutableURLRequest.cpp: + * WebMutableURLRequest.h: + * WebNotification.h: + * WebNotificationCenter.h: + * WebPreferences.h: + * WebResource.h: + * WebScriptCallFrame.h: + * WebScriptDebugServer.cpp: + * WebScriptDebugServer.h: + * WebScriptDebugger.cpp: + * WebScriptDebugger.h: + * WebScriptObject.h: + * WebScrollBar.h: + * WebSecurityOrigin.h: + * WebTextRenderer.h: + * WebURLAuthenticationChallenge.h: + * WebURLAuthenticationChallengeSender.h: + * WebURLCredential.h: + * WebURLProtectionSpace.h: + * WebURLResponse.h: + * WebView.cpp: + * WebView.h: + +2008-02-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Implement imageTitle. + + * WebCoreLocalizedStrings.cpp: + (WebCore::imageTitle): + +2008-02-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Mitz. + + * WebCoreLocalizedStrings.cpp: + (WebCore::imageTitle): + Add stub. + + +2008-02-07 Ada Chan <adachan@apple.com> + + <rdar://problem/5292433> certificate authentication support broken in Safari 3.0 + Added mechanism to communicate client certificate info back to CFNetwork. + + Reviewed by Adam. + + * Interfaces/IWebError.idl: Added new WebURLErrorClientCertificateRequired error. + * Interfaces/IWebMutableURLRequestPrivate.idl: Added. Added method to set client + certificate info on the request. + * WebKit.vcproj/Interfaces.vcproj: Added new idl. + * WebKit.vcproj/WebKit.vcproj: Link crypt32.lib + * WebKit.vcproj/WebKitGUID.vcproj: + * WebMutableURLRequest.cpp: + (WebMutableURLRequest::QueryInterface): Implements IWebMutableURLRequestPrivate. + (deallocCertContext): Free certificate context. + (copyCert): Duplicate the certificate context and returns it in a CFDataRef. + (WebMutableURLRequest::setClientCertificate): + * WebMutableURLRequest.h: + 2008-02-05 Rodney Dawes <dobey@wayofthemonkey.com> Reviewed by Anders Carlsson. @@ -19,7 +4535,7 @@ 2008-02-05 Alexey Proskuryakov <ap@webkit.org> - Reviewed by Darin. + Reviewed by Darin Adler. http://bugs.webkit.org/show_bug.cgi?id=15248 <rdar://problem/5497032> Can not enter accented characters using alt-numeric keypad (take two) @@ -67,7 +4583,7 @@ Let WebCore take care of the highlight drawing entirely - Reviewed by Darin. + Reviewed by Darin Adler. * WebInspectorClient.cpp: (WebInspectorClient::highlight): We now just show our highlight @@ -88,7 +4604,7 @@ Move node highlight drawing code to WebCore - Reviewed by Darin. + Reviewed by Darin Adler. * WebNodeHighlight.cpp: (WebNodeHighlight::updateWindow): Call into WebCore to do the node @@ -134,7 +4650,7 @@ 2008-01-29 Alexey Proskuryakov <ap@webkit.org> - Reviewed by Darin. + Reviewed by Darin Adler. <rdar://problem/5710692> All storage tests fail/crash @@ -213,7 +4729,7 @@ <rdar://problem/5699509> Allow file upload dialog to be localized. - Reviewed by Darin. + Reviewed by Darin Adler. * English.lproj/Localizable.strings: Updated. * WebCoreLocalizedStrings.cpp: @@ -335,7 +4851,7 @@ When the top-level parent receives a WM_NCACTIVATE message, WebView recalculates whether it is contained within the current active window. - Reviewed by Darin. + Reviewed by Darin Adler. * Interfaces/IWebViewPrivate.idl: (IWebViewPrivate::windowAncestryDidChange): Added. WebKit clients @@ -372,7 +4888,7 @@ Updated for ScrollBarClient changes - Reviewed by Darin. + Reviewed by Darin Adler. * WebScrollBar.h: (WebScrollBar::isActive): Added. @@ -384,7 +4900,7 @@ Focus and active state are now handled (somewhat) separately. Future patches will further separate these concepts. - Reviewed by Darin. + Reviewed by Darin Adler. * WebView.cpp: (WebViewWndProc): Updated for method renames. @@ -406,7 +4922,7 @@ Allow nested timers from javascript prompts to allow for WebView-based edit fields. - Reviewed by Darin. + Reviewed by Darin Adler. * WebChromeClient.cpp: (WebChromeClient::runJavaScriptPrompt): @@ -415,7 +4931,7 @@ Use shared vsprops for most vcproj properties. - Reviewed by Darin. + Reviewed by Darin Adler. * WebKit.vcproj/Interfaces.vcproj: * WebKit.vcproj/WebKit.vcproj: @@ -539,7 +5055,7 @@ <http://bugs.webkit.org/show_bug.cgi?id=16818> <rdar://problem/5681463> - Reviewed by Darin. + Reviewed by Darin Adler. * WebKit.vcproj/WebKit.sln: Removed reference to dftables project. @@ -590,7 +5106,7 @@ Fix crash that could happen if the key we are passing to the HashMap is 0 in WebView::interpretKeyEvent(). - Reviewed by Darin. + Reviewed by Darin Adler. * WebView.cpp: (WebView::interpretKeyEvent): @@ -655,7 +5171,7 @@ 2008-01-04 Alexey Proskuryakov <ap@webkit.org> - Reviewed by Darin. + Reviewed by Darin Adler. <rdar://problem/5611712> xsl:sort does not use a case folding sort, and the 'case-order' attribute is ignored (16077) @@ -674,7 +5190,7 @@ 2008-01-03 Alexey Proskuryakov <ap@webkit.org> - Reviewed by Darin. + Reviewed by Darin Adler. <rdar://problem/5463489> A number of layout tests should be using execCommand instead of textInputController @@ -724,7 +5240,7 @@ 2007-12-30 Matt Lilek <webkit@mattlilek.com> - Reviewed by Darin. + Reviewed by Darin Adler. Bug 16578: Windows Web Inspector window needs minimum size http://bugs.webkit.org/show_bug.cgi?id=16578 @@ -747,7 +5263,7 @@ Implemented DOMDocument::getElementById(). - Reviewed by Darin. + Reviewed by Darin Adler. * DOMCoreClasses.cpp: (DOMDocument::getElementById): @@ -840,7 +5356,7 @@ 2007-12-16 Alexey Proskuryakov <ap@webkit.org> - Reviewed by Darin. + Reviewed by Darin Adler. http://bugs.webkit.org/show_bug.cgi?id=16462 REGRESSION: access keys broken on Windows @@ -1028,7 +5544,7 @@ 2007-12-10 Anders Carlsson <andersca@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. <rdar://problem/5636865> WebKit needs API to allow registering a protocol as local (RSS feeds appear unstyled) @@ -1063,7 +5579,7 @@ 2007-12-11 Alexey Proskuryakov <ap@webkit.org> - Reviewed by Darin. + Reviewed by Darin Adler. <rdar://problem/5535636> Have to press 4 times instead of 2 times to get the expected result of ^^ with german keyboard. @@ -1224,7 +5740,7 @@ <rdar://problem/5556378> Implemented database related UI delegate methods (prompts for new/enlarged databases) - Reviewed by Darin. + Reviewed by Darin Adler. * Interfaces/IWebUIDelegatePrivate.idl: * WebChromeClient.cpp: @@ -1235,7 +5751,7 @@ Fixed <rdar://5540000> onbeforeunload doesn't fire when closing window/tab - Reviewed by Darin. + Reviewed by Darin Adler. * Interfaces/IWebViewPrivate.idl: * WebView.cpp: @@ -1737,7 +6253,7 @@ 2007-11-27 Anders Carlsson <andersca@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Add COMEnumVariant, a templatized class with implements IEnumVARIANT and lets you enumerate over a C++ container, be it WTF or STL. @@ -1761,7 +6277,7 @@ This lets us handle grayscale colors (which only have 2 components). - Reviewed by Darin. + Reviewed by Darin Adler. * WebKitGraphics.cpp: (DrawTextAtPoint): @@ -2071,7 +6587,7 @@ Add IDOMElementPrivate::font() to get an element's font as a WebFontDescription. - Reviewed by Darin. + Reviewed by Darin Adler. * DOMCoreClasses.cpp: (DOMElement::font): @@ -2551,7 +7067,7 @@ 2007-10-30 Adele Peterson <adele@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. WebKitWin part of fix for http://bugs.webkit.org/show_bug.cgi?id=10577 <rdar://problem/5110427> REGRESSION: Caps lock icon should show in password fields @@ -2737,8 +7253,6 @@ Update WebKit.sln for the removal of Release dftables - Reviewed by NOBODY. - * WebKit.vcproj/WebKit.sln: 2007-10-25 Kevin McCullough <kmccullough@apple.com> @@ -2760,7 +7274,7 @@ 2007-10-24 Kevin McCullough <kmccullough@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. - Renamed WebDebugProgram to WebScriptDebugServer to match the naming scheme on the mac. @@ -3008,8 +7522,6 @@ Fix for clean builds needed after r26683 - Reviewed by NOBODY. - * WebView.cpp: Remove #include of non-existant file. 2007-10-17 Anders Carlsson <andersca@apple.com> @@ -3031,7 +7543,7 @@ Add FindSafari - Reviewed by Darin. + Reviewed by Darin Adler. * WebKit.vcproj/WebKit.sln: @@ -3165,7 +7677,7 @@ 2007-10-04 Adele Peterson <adele@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. WebKit/win part of fix for <rdar://problem/5369017> REGRESSION: Can't tab to webview that doesn't have editable content @@ -3252,7 +7764,7 @@ 2007-09-27 Kevin McCullough <kmccullough@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. - <rdar://5261371> Nothing downloaded when exporting bookmarks from iGoogle web history - Implemented IWebHTTPURLResponse::allHeaderFields so that if the content disposition is "attachment" we will download the file instead of display it. Also implemented some missing functionality. @@ -3381,7 +7893,7 @@ Fix <rdar://5499507> FrameView will always have size (0,0) if its parent WebView is never resized - Reviewed by Darin. + Reviewed by Darin Adler. * WebView.cpp: (WebView::initWithFrame): Set the main FrameView's size to the size of @@ -3685,7 +8197,7 @@ Prevent WebKit version numbers from containing "4" in Windows. - Reviewed by Darin. + Reviewed by Darin Adler. * WebKit.vcproj/VERSION: Bump version since our current version ends in 4. * WebKit.vcproj/auto-version.sh: Add version checking code. @@ -3759,7 +8271,7 @@ until it's detached from the WebFrame. When the WebDataSource is destroyed, it'll notify its WebDocumentLoader so the loader will clear any references to it. - Reviewed by Darin. + Reviewed by Darin Adler. * WebDataSource.cpp: (WebDataSource::~WebDataSource): call WebDocumentLoader::detachDataSource() so the loader @@ -3928,7 +8440,7 @@ 2007-08-24 Jon Honeycutt <jhoneycutt@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Part of <rdar://problem/5433236> Print preview of empty txt file crashes Safari @@ -5206,7 +9718,7 @@ Switch Windows to using FrameView::layoutIfNeededRecursive - Reviewed by Darin. + Reviewed by Darin Adler. * WebFrame.cpp: Removed layoutIfNeededRecursive. * WebFrame.h: Ditto. @@ -5301,7 +9813,7 @@ 2007-08-15 Peter Kasting <zerodpx@gmail.org> - Reviewed by Darin. + Reviewed by Darin Adler. http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit conversions of wtf::Vector<T> to T* by explicitly calling .data() @@ -5370,7 +9882,7 @@ Use RetainPtr to store WebPreferences::m_privatePrefs - Reviewed by Darin. + Reviewed by Darin Adler. * WebPreferences.cpp: (WebPreferences::setStringValue): @@ -5571,7 +10083,7 @@ 2007-07-20 Justin Garcia <justin.garcia@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it @@ -5779,7 +10291,7 @@ WebKit/win part of <rdar://problem/5336005> Calling window.print() on a subframe prints whole page, should only print that subframe - Reviewed by Darin. + Reviewed by Darin Adler. * Interfaces/IWebUIDelegate.idl: Rename print to printFrame to closer match the Mac method, and copy more of the Mac API comments. @@ -5790,7 +10302,7 @@ Updated WebChromeClient for ChromeClient changes. - Reviewed by Darin. + Reviewed by Darin Adler. * WebChromeClient.cpp: (WebChromeClient::print): Added a Frame* parameter. @@ -6022,7 +10534,7 @@ Remove SEH block from around history plist read, since the underlying bug has been fixed. - Reviewed by Darin. + Reviewed by Darin Adler. * WebHistory.cpp: (createHistoryListFromStream): @@ -6031,7 +10543,7 @@ Prefast: Fix misplaced parenthesis. - Reviewed by Darin. + Reviewed by Darin Adler. * WebView.cpp: (core): @@ -6040,7 +10552,7 @@ Prefast: Add null check prior to writing into allocated BSTR. - Reviewed by Darin. + Reviewed by Darin Adler. * MarshallingHelpers.cpp: (MarshallingHelpers::CFStringRefToBSTR): @@ -6364,7 +10876,7 @@ 2007-05-29 Steve Falkenburg <sfalken@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Removed setPageCacheSize/pageCacheSize from IWebBackForwardList. @@ -6646,7 +11158,7 @@ 2007-05-15 Steve Falkenburg <sfalken@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. <rdar://problem/4956541> Need to implement preference for how much History is maintained @@ -6655,7 +11167,7 @@ 2007-05-14 Anders Carlsson <andersca@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Pass an empty property bag when constructing the WebError, the code in Safari relies on having a user info bag. @@ -6966,7 +11478,7 @@ 2007-05-07 Steve Falkenburg <sfalken@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Fix typo in prefs code. @@ -6975,7 +11487,7 @@ 2007-05-04 Steve Falkenburg <sfalken@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Fix crash when using "check spelling while typing". @@ -7618,7 +12130,7 @@ 2007-04-02 Steve Falkenburg <sfalken@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Expose COM class counter @@ -7841,7 +12353,7 @@ 2007-03-23 Adam Roben <aroben@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. WebKit part of <rdar://problem/5084881> Add a "turn of site-specific hacks" menu item to the Debug menu @@ -8338,7 +12850,7 @@ 2007-03-14 Adele Peterson <adele@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. WebKit part of fix for <rdar://problem/5057371> REGRESSION: Shift-selection stopped working in text fields @@ -8489,7 +13001,7 @@ 2007-03-07 Adele Peterson <adele@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. WebKitWin part of fix for: http://bugs.webkit.org/show_bug.cgi?id=10871 @@ -8914,7 +13426,7 @@ 2007-02-19 Adam Roben <aroben@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Fix <rdar://problem/5007566> Crash in WebFrame::dataSource on dni.ru @@ -9694,7 +14206,7 @@ 2007-01-29 Adele Peterson <adele@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. * WebEditorClient.cpp: (WebEditorClient::handleKeyPress): Removed EventTargetNode paramenter. @@ -10168,7 +14680,7 @@ 2007-01-23 Anders Carlsson <acarlsson@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. <rdar://problem/4919754> Boomer freezes after attempt to play video. @@ -10195,7 +14707,7 @@ 2007-01-23 Adele Peterson <adele@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Reorganized some event handling code for keyPress events to prepare for another fix. @@ -10815,7 +15327,7 @@ 2007-01-12 Anders Carlsson <acarlsson@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Move WebKitWin over to the new WebCore loader. There are still some leftover functions from FrameWinClient that aren't used and should be removed. @@ -10981,8 +15493,6 @@ 2007-01-11 Brady Eidson <beidson@apple.com> - Reviewed by NOBODY. - Make it build again after my OpenSource http auth checkin * WebFrame.cpp: @@ -11021,7 +15531,7 @@ 2007-01-10 Anders Carlsson <acarlsson@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Add WebDocumentLoader. Implement some of the FrameLoaderClient methods. Add a resourceRequest() getter to WebMutableURLRequest. @@ -11145,7 +15655,7 @@ 2007-01-09 Anders Carlsson <acarlsson@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Add COMPtr. Make MemoryStream backed by a SharedBuffer. Use SharedBuffer in WebFrame. @@ -11666,7 +16176,7 @@ 2006-12-09 Adam Roben <aroben@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Build fix. @@ -11743,7 +16253,7 @@ 2006-12-04 Steve Falkenburg <sfalken@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Checkpoint of <rdar://4601521> Use CoreFoundation bundles w/ Localizable.strings for localization. @@ -12230,7 +16740,7 @@ 2006-11-15 Anders Carlsson <acarlsson@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Add an undo manager to the editor client. Make it possible for applications to invoke undo/redo. @@ -12914,7 +17424,7 @@ 2006-11-06 Geoffrey Garen <ggaren@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Stubbed out the Chrome and Screen clients. @@ -13185,7 +17695,7 @@ 2006-10-29 Maciej Stachowiak <mjs@apple.com> - Rubber stamped by Darin. + Rubber stamped by Darin Adler. - renamed ResourceLoader to ResourceHandle (and same for related classes) @@ -13213,7 +17723,7 @@ 2006-10-25 Steve Falkenburg <sfalken@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Checked in Luke's CG printing code @@ -13428,7 +17938,7 @@ 2006-10-20 Adam Roben <aroben@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Build fix. Stubbing out DOMWindow.idl, which was forgotten in the last checkin. @@ -13938,7 +18448,7 @@ 2006-10-03 Adam Roben <aroben@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Part of fix for <rdar://problem/4603342> Keyboard navigability @@ -14543,7 +19053,7 @@ 2006-09-06 Adam Roben <aroben@apple.com> - Reviewed by Darin. + Reviewed by Darin Adler. Fixed various Windows build problems caused by previous checkins. diff --git a/WebKit/win/DOMCSSClasses.h b/WebKit/win/DOMCSSClasses.h index fd9ea1b..5ddf592 100644 --- a/WebKit/win/DOMCSSClasses.h +++ b/WebKit/win/DOMCSSClasses.h @@ -26,7 +26,7 @@ #ifndef DOMCSSClasses_H #define DOMCSSClasses_H -#include "DOMCSS.h" +#include "WebKit.h" #include "DOMCoreClasses.h" #include <WebCore/CSSStyleDeclaration.h> diff --git a/WebKit/win/DOMCoreClasses.cpp b/WebKit/win/DOMCoreClasses.cpp index bd4ff16..713a369 100644 --- a/WebKit/win/DOMCoreClasses.cpp +++ b/WebKit/win/DOMCoreClasses.cpp @@ -50,8 +50,6 @@ #pragma warning(pop) #include <initguid.h> -// {79A193A5-D783-4c73-9AD9-D10678B943DE} -DEFINE_GUID(IID_DOMNode, 0x79a193a5, 0xd783, 0x4c73, 0x9a, 0xd9, 0xd1, 0x6, 0x78, 0xb9, 0x43, 0xde); // {3B0C0EFF-478B-4b0b-8290-D2321E08E23E} DEFINE_GUID(IID_DOMElement, 0x3b0c0eff, 0x478b, 0x4b0b, 0x82, 0x90, 0xd2, 0x32, 0x1e, 0x8, 0xe2, 0x3e); @@ -79,7 +77,7 @@ HRESULT STDMETHODCALLTYPE DOMNode::QueryInterface(REFIID riid, void** ppvObject) *ppvObject = 0; if (IsEqualGUID(riid, IID_IDOMNode)) *ppvObject = static_cast<IDOMNode*>(this); - else if (IsEqualGUID(riid, IID_DOMNode)) + else if (IsEqualGUID(riid, __uuidof(DOMNode))) *ppvObject = static_cast<DOMNode*>(this); else return DOMObject::QueryInterface(riid, ppvObject); @@ -301,7 +299,7 @@ HRESULT STDMETHODCALLTYPE DOMNode::isSameNode( return E_POINTER; COMPtr<DOMNode> domOther; - HRESULT hr = other->QueryInterface(IID_DOMNode, (void**)&domOther); + HRESULT hr = other->QueryInterface(__uuidof(DOMNode), (void**)&domOther); if (FAILED(hr)) return hr; @@ -1063,7 +1061,7 @@ HRESULT STDMETHODCALLTYPE DOMElement::font(WebFontDescription* webFontDescriptio webFontDescription->family = family.characters(); webFontDescription->familyLength = family.length(); webFontDescription->size = fontDescription.computedSize(); - webFontDescription->bold = fontDescription.bold(); + webFontDescription->bold = fontDescription.weight() >= FontWeight600; webFontDescription->italic = fontDescription.italic(); return S_OK; diff --git a/WebKit/win/DOMCoreClasses.h b/WebKit/win/DOMCoreClasses.h index 8e12cfb..1278c7c 100644 --- a/WebKit/win/DOMCoreClasses.h +++ b/WebKit/win/DOMCoreClasses.h @@ -26,16 +26,9 @@ #ifndef DOMCoreClasses_H #define DOMCoreClasses_H -#include "DOMCore.h" -#include "DOMCSS.h" -#include "DOMEvents.h" -#include "DOMExtensions.h" -#include "DOMPrivate.h" +#include "WebKit.h" #include "WebScriptObject.h" -// {79A193A5-D783-4c73-9AD9-D10678B943DE} -DEFINE_GUID(IID_DOMNode, 0x79a193a5, 0xd783, 0x4c73, 0x9a, 0xd9, 0xd1, 0x6, 0x78, 0xb9, 0x43, 0xde); - namespace WebCore { class Element; class Document; @@ -84,7 +77,7 @@ public: /* [in] */ BSTR description) { return WebScriptObject::setException(description); } }; -class DOMNode : public DOMObject, public IDOMNode, public IDOMEventTarget +class DECLSPEC_UUID("062AEEE3-9E42-44DC-A8A9-236B216FE011") DOMNode : public DOMObject, public IDOMNode, public IDOMEventTarget { protected: DOMNode(WebCore::Node* n); diff --git a/WebKit/win/DOMEventsClasses.h b/WebKit/win/DOMEventsClasses.h index 85f48f4..c55b26b 100644 --- a/WebKit/win/DOMEventsClasses.h +++ b/WebKit/win/DOMEventsClasses.h @@ -26,7 +26,7 @@ #ifndef DOMEventsClasses_H #define DOMEventsClasses_H -#include "DOMEvents.h" +#include "WebKit.h" #include "DOMCoreClasses.h" #include <wtf/PassRefPtr.h> diff --git a/WebKit/win/DOMHTMLClasses.cpp b/WebKit/win/DOMHTMLClasses.cpp index 47f8f2b..037aa88 100644 --- a/WebKit/win/DOMHTMLClasses.cpp +++ b/WebKit/win/DOMHTMLClasses.cpp @@ -352,10 +352,15 @@ HRESULT STDMETHODCALLTYPE DOMHTMLElement::QueryInterface(REFIID riid, void** ppv // DOMHTMLElement ------------------------------------------------------------- HRESULT STDMETHODCALLTYPE DOMHTMLElement::idName( - /* [retval][out] */ BSTR* /*result*/) + /* [retval][out] */ BSTR* result) { - ASSERT_NOT_REACHED(); - return E_NOTIMPL; + if (!result) + return E_POINTER; + + ASSERT(m_element && m_element->isHTMLElement()); + String idString = static_cast<HTMLElement*>(m_element)->id(); + *result = BString(idString).release(); + return S_OK; } HRESULT STDMETHODCALLTYPE DOMHTMLElement::setIdName( diff --git a/WebKit/win/DOMHTMLClasses.h b/WebKit/win/DOMHTMLClasses.h index 7adb7e2..ddc3dd1 100644 --- a/WebKit/win/DOMHTMLClasses.h +++ b/WebKit/win/DOMHTMLClasses.h @@ -26,8 +26,7 @@ #ifndef DOMHTMLClasses_H #define DOMHTMLClasses_H -#include "DOMHTML.h" -#include "DOMPrivate.h" +#include "WebKit.h" #include "DOMCoreClasses.h" #include "WebScriptObject.h" diff --git a/WebKit/win/DefaultDownloadDelegate.cpp b/WebKit/win/DefaultDownloadDelegate.cpp index e56d88e..a50d119 100644 --- a/WebKit/win/DefaultDownloadDelegate.cpp +++ b/WebKit/win/DefaultDownloadDelegate.cpp @@ -47,11 +47,13 @@ DefaultDownloadDelegate::DefaultDownloadDelegate() : m_refCount(0) { gClassCount++; + gClassNameCount.add("DefaultDownloadDelegate"); } DefaultDownloadDelegate::~DefaultDownloadDelegate() { gClassCount--; + gClassNameCount.remove("DefaultDownloadDelegate"); HashSet<IWebDownload*>::iterator i = m_downloads.begin(); for (;i != m_downloads.end(); ++i) (*i)->Release(); diff --git a/WebKit/win/DefaultDownloadDelegate.h b/WebKit/win/DefaultDownloadDelegate.h index eba2298..6175170 100644 --- a/WebKit/win/DefaultDownloadDelegate.h +++ b/WebKit/win/DefaultDownloadDelegate.h @@ -26,7 +26,7 @@ #define DefaultDownloadDelegate_h #include "COMPtr.h" -#include "IWebDownload.h" +#include "WebKit.h" #include <CFNetwork/CFURLDownloadPriv.h> #include <wtf/HashSet.h> diff --git a/WebKit/win/DefaultPolicyDelegate.cpp b/WebKit/win/DefaultPolicyDelegate.cpp index d11900c..67fc556 100644 --- a/WebKit/win/DefaultPolicyDelegate.cpp +++ b/WebKit/win/DefaultPolicyDelegate.cpp @@ -27,7 +27,7 @@ #include "WebKitDLL.h" #include "DefaultPolicyDelegate.h" -#include "IWebViewPrivate.h" +#include "WebKit.h" #pragma warning(push, 0) #include <WebCore/PlatformString.h> @@ -46,11 +46,13 @@ DefaultPolicyDelegate::DefaultPolicyDelegate() : m_refCount(0) { gClassCount++; + gClassNameCount.add("DefaultPolicyDelegate"); } DefaultPolicyDelegate::~DefaultPolicyDelegate() { gClassCount--; + gClassNameCount.remove("DefaultPolicyDelegate"); } DefaultPolicyDelegate* DefaultPolicyDelegate::sharedInstance() diff --git a/WebKit/win/DefaultPolicyDelegate.h b/WebKit/win/DefaultPolicyDelegate.h index 78fa9d3..443cf8a 100644 --- a/WebKit/win/DefaultPolicyDelegate.h +++ b/WebKit/win/DefaultPolicyDelegate.h @@ -27,7 +27,7 @@ #define DefaultPolicyDelegate_h #include "COMPtr.h" -#include "IWebPolicyDelegate.h" +#include "WebKit.h" class DefaultPolicyDelegate : public IWebPolicyDelegate { public: diff --git a/WebKit/win/English.lproj/Localizable.strings b/WebKit/win/English.lproj/Localizable.strings Binary files differdeleted file mode 100644 index c2612c2..0000000 --- a/WebKit/win/English.lproj/Localizable.strings +++ /dev/null diff --git a/WebKit/win/ForEachCoClass.cpp b/WebKit/win/ForEachCoClass.cpp index edc6a45..59715b3 100644 --- a/WebKit/win/ForEachCoClass.cpp +++ b/WebKit/win/ForEachCoClass.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,17 +30,14 @@ #include "WebKitDLL.h" #include "ForEachCoClass.h" -#include <JavaScriptCore/Assertions.h> - -void setUseOpenSourceWebKit(bool b) +// deprecated - do not use - remove once a registry-free version of Safari has shipped (first major version after 3.1.1) +void setUseOpenSourceWebKit(bool) { - s_progIDs = b ? openSourceProgIDs : productionProgIDs; } +// deprecated - do not use - remove once a registry-free version of Safari has shipped (first major version after 3.1.1) LPCOLESTR progIDForClass(WebKitClass cls) { ASSERT(cls < WebKitClassSentinel); return s_progIDs[cls]; } - - diff --git a/WebKit/win/ForEachCoClass.h b/WebKit/win/ForEachCoClass.h index e60a1ff..94976e6 100644 --- a/WebKit/win/ForEachCoClass.h +++ b/WebKit/win/ForEachCoClass.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,6 +31,7 @@ #include "ProgIDMacros.h" +// Items may only be added to the end of this macro. No items may be removed from it. #define FOR_EACH_COCLASS(macro) \ macro(CFDictionaryPropertyBag) \ macro(WebCache) \ @@ -53,8 +54,13 @@ macro(WebURLRequest) \ macro(WebURLResponse) \ macro(WebView) \ + macro(WebArchive) \ + macro(WebCoreStatistics) \ + macro(WebCookieManager) \ // end of macro +// Everything below this point is deprecated. Please do not use. + #define WEBKITCLASS_MEMBER(cls) cls##Class, enum WebKitClass { FOR_EACH_COCLASS(WEBKITCLASS_MEMBER) @@ -62,29 +68,17 @@ enum WebKitClass { }; #undef WEBKITCLASS_MEMBER -#define PRODUCTION_PROGID(cls) VERSION_INDEPENDENT_PRODUCTION_PROGID(cls), -static LPCOLESTR productionProgIDs[WebKitClassSentinel] = { - FOR_EACH_COCLASS(PRODUCTION_PROGID) -}; -#undef PRODUCTION_PROGID - #define OPENSOURCE_PROGID(cls) VERSION_INDEPENDENT_OPENSOURCE_PROGID(cls), static LPCOLESTR openSourceProgIDs[WebKitClassSentinel] = { FOR_EACH_COCLASS(OPENSOURCE_PROGID) }; #undef OPENSOURCE_PROGID -#if __PRODUCTION__ - static LPCOLESTR* s_progIDs = productionProgIDs; -#else - static LPCOLESTR* s_progIDs = openSourceProgIDs; -#endif +static LPCOLESTR* s_progIDs = openSourceProgIDs; #define PROGID(className) progIDForClass(className##Class) void setUseOpenSourceWebKit(bool); LPCOLESTR progIDForClass(WebKitClass); - - #endif // !defined(ForEachCoClass_h) diff --git a/WebKit/win/GEN_DOMObject.cpp b/WebKit/win/GEN_DOMObject.cpp index 1ba0875..bb108a4 100644 --- a/WebKit/win/GEN_DOMObject.cpp +++ b/WebKit/win/GEN_DOMObject.cpp @@ -38,11 +38,13 @@ GEN_DOMObject::GEN_DOMObject() : m_refCount(0) { gClassCount++; + gClassNameCount.add("GEN_DOMObject"); } GEN_DOMObject::~GEN_DOMObject() { gClassCount--; + gClassNameCount.remove("GEN_DOMObject"); } // IUnknown ------------------------------------------------------------------- diff --git a/WebKit/win/GEN_DOMObject.h b/WebKit/win/GEN_DOMObject.h index a19a9cb..bb654fb 100644 --- a/WebKit/win/GEN_DOMObject.h +++ b/WebKit/win/GEN_DOMObject.h @@ -29,7 +29,7 @@ #ifndef GEN_DOMObject_h #define GEN_DOMObject_h -#include "IGEN_DOMObject.h" +#include "WebKit.h" class GEN_DOMObject : public IGEN_DOMObject { public: diff --git a/WebKit/win/HTTPHeaderPropertyBag.cpp b/WebKit/win/HTTPHeaderPropertyBag.cpp deleted file mode 100644 index 4c451fd..0000000 --- a/WebKit/win/HTTPHeaderPropertyBag.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 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 - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "HTTPHeaderPropertyBag.h" - -#include "HTTPHeaderMap.h" - -#include <WebCore/BString.h> - -// HTTPHeaderPropertyBag ----------------------------------------------- - -HTTPHeaderPropertyBag::HTTPHeaderPropertyBag(WebURLResponse* response) - : m_refCount(1) - , m_response(response) -{ -} - -HTTPHeaderPropertyBag* HTTPHeaderPropertyBag::createInstance(WebURLResponse* response) -{ - return new HTTPHeaderPropertyBag(response); -} - -// IUnknown ------------------------------------------------------------------- - -HRESULT STDMETHODCALLTYPE HTTPHeaderPropertyBag::QueryInterface(REFIID riid, void** ppvObject) -{ - *ppvObject = 0; - if (IsEqualGUID(riid, IID_IUnknown)) - *ppvObject = static_cast<IPropertyBag*>(this); - else if (IsEqualGUID(riid, IID_IPropertyBag)) - *ppvObject = static_cast<IPropertyBag*>(this); - else if (IsEqualGUID(riid, __uuidof(HTTPHeaderPropertyBag))) - *ppvObject = this; - else - return E_NOINTERFACE; - - AddRef(); - return S_OK; -} - -ULONG STDMETHODCALLTYPE HTTPHeaderPropertyBag::AddRef(void) -{ - return ++m_refCount; -} - -ULONG STDMETHODCALLTYPE HTTPHeaderPropertyBag::Release(void) -{ - ULONG newRef = --m_refCount; - if (!newRef) - delete this; - - return newRef; -} - -static inline WebCore::String ConvertFromLPCOLESTRToString(LPCOLESTR pszPropName) -{ - return WebCore::String(pszPropName); -} - -static bool ConvertFromStringToVariant(VARIANT* pVar, const WebCore::String& stringVal) -{ - if (!pVar) - return false; - - if (V_VT(pVar) == VT_BSTR) { - V_BSTR(pVar) = WebCore::BString(stringVal); - return true; - } - - return false; -} - -// IPropertyBag ------------------------------------------------------------ - -HRESULT STDMETHODCALLTYPE HTTPHeaderPropertyBag::Read(LPCOLESTR pszPropName, VARIANT* pVar, IErrorLog* /*pErrorLog*/) -{ - if (!pszPropName) - return E_POINTER; - - if (!m_response) - return E_FAIL; - - const WebCore::HTTPHeaderMap& headerMap = m_response->resourceResponse().httpHeaderFields(); - WebCore::String key = ConvertFromLPCOLESTRToString(pszPropName); - WebCore::String value = headerMap.get(key); - - if (!ConvertFromStringToVariant(pVar, value)) - return E_INVALIDARG; - - return S_OK; -} - -HRESULT STDMETHODCALLTYPE HTTPHeaderPropertyBag::Write(LPCOLESTR /*pszPropName*/, VARIANT* /*pVar*/) -{ - // We cannot add to the Resource Response's header hash map - return E_FAIL; -} diff --git a/WebKit/win/Interfaces/DOMCSS.idl b/WebKit/win/Interfaces/DOMCSS.idl index 914f9ff..3727018 100644 --- a/WebKit/win/Interfaces/DOMCSS.idl +++ b/WebKit/win/Interfaces/DOMCSS.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,35 +23,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "DOMCore.idl"; import "IWebScriptObject.idl"; +#endif interface IDOMObject; interface IDOMCSSValue; diff --git a/WebKit/win/Interfaces/DOMCore.idl b/WebKit/win/Interfaces/DOMCore.idl index a00acd2..09f61fb 100644 --- a/WebKit/win/Interfaces/DOMCore.idl +++ b/WebKit/win/Interfaces/DOMCore.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebScriptObject.idl"; +#endif interface IWebScriptObject; interface IDOMNodeList; diff --git a/WebKit/win/Interfaces/DOMEvents.idl b/WebKit/win/Interfaces/DOMEvents.idl index 87bd0cd..3ff7fce 100644 --- a/WebKit/win/Interfaces/DOMEvents.idl +++ b/WebKit/win/Interfaces/DOMEvents.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,35 +23,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "DOMCore.idl"; import "DOMWindow.idl"; +#endif interface IDOMEvent; interface IDOMEventException; @@ -59,9 +36,11 @@ interface IDOMEventTarget; interface IDOMKeyboardEvent; interface IDOMMouseEvent; interface IDOMMutationEvent; +interface IDOMNode; interface IDOMOverflowEvent; interface IDOMUIEvent; interface IDOMWheelEvent; +interface IDOMWindow; typedef long long DOMTimeStamp; diff --git a/WebKit/win/Interfaces/DOMExtensions.idl b/WebKit/win/Interfaces/DOMExtensions.idl index b0f510a..83c26d7 100644 --- a/WebKit/win/Interfaces/DOMExtensions.idl +++ b/WebKit/win/Interfaces/DOMExtensions.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/DOMHTML.idl b/WebKit/win/Interfaces/DOMHTML.idl index 57fc947..6c276aa 100644 --- a/WebKit/win/Interfaces/DOMHTML.idl +++ b/WebKit/win/Interfaces/DOMHTML.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "DOMCore.idl"; +#endif interface IDOMHTMLElement; interface IDOMHTMLFormElement; @@ -58,6 +35,8 @@ interface IDOMHTMLTableCaptionElement; interface IDOMHTMLTableSectionElement; interface IDOMDocument; interface IDOMElement; +interface IDOMNode; +interface IDOMNodeList; /* @interface DOMHTMLCollection : DOMObject diff --git a/WebKit/win/Interfaces/DOMPrivate.idl b/WebKit/win/Interfaces/DOMPrivate.idl index f7da64b..dcacac2 100644 --- a/WebKit/win/Interfaces/DOMPrivate.idl +++ b/WebKit/win/Interfaces/DOMPrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,13 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "DOMCore.idl"; +#endif + +interface IDOMElement; typedef struct WebFontDescription WebFontDescription; diff --git a/WebKit/win/Interfaces/DOMRange.idl b/WebKit/win/Interfaces/DOMRange.idl index 6ae6f53..58dd54d 100644 --- a/WebKit/win/Interfaces/DOMRange.idl +++ b/WebKit/win/Interfaces/DOMRange.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "DOMCore.idl"; +#endif + +interface IDOMNode; +interface IDOMDocumentFragment; typedef enum _WebSelectionAffinity { WebSelectionAffinityUpstream = 0, diff --git a/WebKit/win/Interfaces/DOMWindow.idl b/WebKit/win/Interfaces/DOMWindow.idl index 1484d90..6c24811 100755 --- a/WebKit/win/Interfaces/DOMWindow.idl +++ b/WebKit/win/Interfaces/DOMWindow.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,37 +23,16 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "DOMCore.idl"; import "DOMCSS.idl"; +#endif interface IDOMCSSRuleList; +interface IDOMDocument; +interface IDOMElement; [ object, diff --git a/WebKit/win/Interfaces/IGEN_DOMObject.idl b/WebKit/win/Interfaces/IGEN_DOMObject.idl index f403458..a1efbf4 100644 --- a/WebKit/win/Interfaces/IGEN_DOMObject.idl +++ b/WebKit/win/Interfaces/IGEN_DOMObject.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,36 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" *") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED") -cpp_quote(" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE") -cpp_quote(" * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY") -cpp_quote(" * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES") -cpp_quote(" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;") -cpp_quote(" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND") -cpp_quote(" * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF") -cpp_quote(" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebArchive.idl b/WebKit/win/Interfaces/IWebArchive.idl index 7c47c4e..3168467 100644 --- a/WebKit/win/Interfaces/IWebArchive.idl +++ b/WebKit/win/Interfaces/IWebArchive.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +import "DOMCore.idl"; import "IWebResource.idl"; +#endif interface IWebResource; @@ -88,6 +66,15 @@ interface IWebArchive : IUnknown - (id)initWithData:(NSData *)data; */ HRESULT initWithData([in] IStream* data); + + /*! + @method initWithData: + @abstract The initializer for creating a WebArchive from data. + @param data The data representing the archive. This can be obtained using WebArchive's data method. + @result An initialized WebArchive. + - (id)initWithData:(NSData *)data; + */ + HRESULT initWithNode([in] IDOMNode* node); /*! @method mainResource diff --git a/WebKit/win/Interfaces/IWebBackForwardList.idl b/WebKit/win/Interfaces/IWebBackForwardList.idl index e5da2f6..83d4cfb 100644 --- a/WebKit/win/Interfaces/IWebBackForwardList.idl +++ b/WebKit/win/Interfaces/IWebBackForwardList.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebHistoryItem.idl"; +#endif interface IWebHistoryItem; diff --git a/WebKit/win/Interfaces/IWebBackForwardListPrivate.idl b/WebKit/win/Interfaces/IWebBackForwardListPrivate.idl index a765c4b..a9c14f3 100755 --- a/WebKit/win/Interfaces/IWebBackForwardListPrivate.idl +++ b/WebKit/win/Interfaces/IWebBackForwardListPrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple, Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebHistoryItem.idl"; +#endif interface IWebHistoryItem; diff --git a/WebKit/win/Interfaces/IWebCache.idl b/WebKit/win/Interfaces/IWebCache.idl index 4532711..3d2bf14 100644 --- a/WebKit/win/Interfaces/IWebCache.idl +++ b/WebKit/win/Interfaces/IWebCache.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebCookieManager.idl b/WebKit/win/Interfaces/IWebCookieManager.idl new file mode 100644 index 0000000..1c87ec0 --- /dev/null +++ b/WebKit/win/Interfaces/IWebCookieManager.idl @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +import "ocidl.idl"; +#endif + +cpp_quote("// this is done to get midl to treat the CFHTTPCookieStorageRef as pointer types") +cpp_quote("#if 0") +typedef void* CFHTTPCookieStorageRef; +cpp_quote("#else") +cpp_quote("typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;") +cpp_quote("#endif") + +interface IWebCookieStorageObserver; + +[ + object, + oleautomation, + hidden, + uuid(7053FE94-3623-444f-A298-209A90879A8C), + pointer_default(unique) +] +interface IWebCookieManager : IUnknown +{ + [local] HRESULT cookieStorage([out, retval] CFHTTPCookieStorageRef* storage); + + [local] HRESULT setCookieStorage([in] CFHTTPCookieStorageRef storage); +} diff --git a/WebKit/win/Interfaces/IWebCoreStatistics.idl b/WebKit/win/Interfaces/IWebCoreStatistics.idl new file mode 100644 index 0000000..0001a10 --- /dev/null +++ b/WebKit/win/Interfaces/IWebCoreStatistics.idl @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +import "ocidl.idl"; +#endif + +[ + object, + oleautomation, + hidden, + uuid(9607001D-6EEF-4c2c-AD22-94E9DA587973), + pointer_default(unique) +] +interface IWebCoreStatistics : IUnknown +{ + HRESULT javaScriptObjectsCount([out, retval] UINT* count); + HRESULT javaScriptGlobalObjectsCount([out, retval] UINT* count); + HRESULT javaScriptProtectedObjectsCount([out, retval] UINT* count); + HRESULT javaScriptProtectedGlobalObjectsCount([out, retval] UINT* count); + + HRESULT iconPageURLMappingCount([out, retval] UINT* count); + HRESULT iconRetainedPageURLCount([out, retval] UINT* count); + HRESULT iconRecordCount([out, retval] UINT* count); + HRESULT iconsWithDataCount([out, retval] UINT* count); + + HRESULT cachedFontDataCount([out, retval] UINT* count); + HRESULT cachedFontDataInactiveCount([out, retval] UINT* count); + HRESULT purgeInactiveFontData(); + HRESULT glyphPageCount([out, retval] UINT* count); + + HRESULT javaScriptProtectedObjectTypeCounts([out, retval] IPropertyBag2** typeNamesAndCounts); +} diff --git a/WebKit/win/Interfaces/IWebDataSource.idl b/WebKit/win/Interfaces/IWebDataSource.idl index 0e27153..15bea1a 100644 --- a/WebKit/win/Interfaces/IWebDataSource.idl +++ b/WebKit/win/Interfaces/IWebDataSource.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,31 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebMutableURLRequest.idl"; @@ -56,7 +32,7 @@ import "IWebResource.idl"; import "IWebArchive.idl"; import "IWebDocument.idl"; import "IWebFrame.idl"; - +#endif interface IWebMutableURLRequest; interface IWebURLConnection; @@ -64,6 +40,7 @@ interface IWebURLRequest; interface IWebURLResponse; interface IWebArchive; interface IWebDataSourcePrivate; +interface IWebError; interface IWebFrame; interface IWebResource; diff --git a/WebKit/win/Interfaces/IWebDatabaseManager.idl b/WebKit/win/Interfaces/IWebDatabaseManager.idl index e1ebc82..c877c03 100644 --- a/WebKit/win/Interfaces/IWebDatabaseManager.idl +++ b/WebKit/win/Interfaces/IWebDatabaseManager.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif + +interface IWebSecurityOrigin; cpp_quote("#define WebDatabaseDisplayNameKey TEXT(\"WebDatabaseDisplayNameKey\")") cpp_quote("#define WebDatabaseExpectedSizeKey TEXT(\"WebDatabaseExpectedSizeKey\")") @@ -59,7 +38,9 @@ cpp_quote("#define WebDatabaseDidModifyOriginNotification TEXT(\"WebDatabaseDidM cpp_quote("#define WebDatabaseDidModifyDatabaseNotification TEXT(\"WebDatabaseDidModifyDatabaseNotification\")") cpp_quote("#define WebDatabaseNameKey TEXT(\"WebDatabaseNameKey\")") +#ifndef DO_NO_IMPORTS import "IWebSecurityOrigin.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebDocument.idl b/WebKit/win/Interfaces/IWebDocument.idl index c9dd0fb..24097ce 100644 --- a/WebKit/win/Interfaces/IWebDocument.idl +++ b/WebKit/win/Interfaces/IWebDocument.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,36 +23,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebError.idl"; import "IWebDataSource.idl"; -import "IWebError.idl"; +#endif interface IWebError; interface IWebDataSource; diff --git a/WebKit/win/Interfaces/IWebDownload.idl b/WebKit/win/Interfaces/IWebDownload.idl index bdbcc66..eb644ef 100644 --- a/WebKit/win/Interfaces/IWebDownload.idl +++ b/WebKit/win/Interfaces/IWebDownload.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * 2007 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,32 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" * 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebError.idl"; @@ -57,8 +32,15 @@ import "IWebMutableURLRequest.idl"; import "IWebURLAuthenticationChallenge.idl"; import "IWebURLResponse.idl"; import "IWebURLRequest.idl"; +#endif interface IWebDownloadDelegate; +interface IWebError; +interface IWebMutableURLRequest; +interface IWebURLAuthenticationChallenge; +interface IWebURLRequest; +interface IWebURLResponse; + /*! @class WebDownload @discussion A WebDownload works just like an NSURLDownload, with diff --git a/WebKit/win/Interfaces/IWebEditingDelegate.idl b/WebKit/win/Interfaces/IWebEditingDelegate.idl index 6350178..b92aad2 100644 --- a/WebKit/win/Interfaces/IWebEditingDelegate.idl +++ b/WebKit/win/Interfaces/IWebEditingDelegate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,31 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebNotification.idl"; @@ -56,11 +32,14 @@ import "DOMCSS.idl"; import "DOMRange.idl"; import "IWebUndoManager.idl"; import "IWebView.idl"; +#endif interface IDOMCSSStyleDeclaration; +interface IDOMNode; interface IDOMRange; interface IWebView; interface IWebNotification; +interface IWebUndoManager; typedef enum _WebViewInsertAction { WebViewInsertActionTyped, diff --git a/WebKit/win/Interfaces/IWebEmbeddedView.idl b/WebKit/win/Interfaces/IWebEmbeddedView.idl new file mode 100644 index 0000000..0a65ff7 --- /dev/null +++ b/WebKit/win/Interfaces/IWebEmbeddedView.idl @@ -0,0 +1,41 @@ +/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#ifndef DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+#endif
+
+[
+ object,
+ oleautomation,
+ uuid(F2771780-84C2-4684-8D52-D4F923E67F71),
+ pointer_default(unique)
+]
+interface IWebEmbeddedView : IUnknown
+{
+ HRESULT createViewWindow([in] OLE_HANDLE parentWindow, [in] LPSIZE pluginSize, [out, retval] OLE_HANDLE* window);
+}
diff --git a/WebKit/win/Interfaces/IWebError.idl b/WebKit/win/Interfaces/IWebError.idl index f8dfe93..4353ac6 100644 --- a/WebKit/win/Interfaces/IWebError.idl +++ b/WebKit/win/Interfaces/IWebError.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,31 +23,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - cpp_quote("#define WebURLErrorDomain TEXT(\"CFURLErrorDomain\")") /*! @enum NSURL-related Error Codes @@ -82,6 +57,7 @@ enum WebURLErrorServerCertificateHasUnknownRoot = -1203, WebURLErrorServerCertificateNotYetValid = -1204, WebURLErrorClientCertificateRejected = -1205, + WebURLErrorClientCertificateRequired = -1206, WebURLErrorCannotLoadFromNetwork = -2000, // Download and file I/O errors @@ -130,8 +106,10 @@ cpp_quote("#define WebKitErrorPlugInPageURLStringKey TEXT(\"WebKitErrorPlugInPag cpp_quote("#define WebPOSIXErrorDomain TEXT(\"NSPOSIXErrorDomain\")") cpp_quote("#define WebPOSIXErrorECONNRESET 54") +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebErrorPrivate.idl b/WebKit/win/Interfaces/IWebErrorPrivate.idl index e314804..d450c88 100644 --- a/WebKit/win/Interfaces/IWebErrorPrivate.idl +++ b/WebKit/win/Interfaces/IWebErrorPrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,39 +23,16 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - cpp_quote("#define WebKitErrorPlugInCancelledConnection 203") cpp_quote("// FIXME: WebKitErrorPlugInWillHandleLoad is used for the cancel we do to prevent loading plugin content twice. See <rdar://problem/4258008>") cpp_quote("#define WebKitErrorPlugInWillHandleLoad 204") cpp_quote("#define WebErrorFailingURLKey TEXT(\"WebErrorFailingURLKey\")") +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebFormDelegate.idl b/WebKit/win/Interfaces/IWebFormDelegate.idl index 8ac79ca..bf103c4 100644 --- a/WebKit/win/Interfaces/IWebFormDelegate.idl +++ b/WebKit/win/Interfaces/IWebFormDelegate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,35 +23,17 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "DOMHTML.idl"; import "IWebFrame.idl"; +#endif + +interface IDOMElement; +interface IDOMHTMLInputElement; +interface IDOMHTMLTextAreaElement; +interface IWebFrame; /*! @protocol WebFormSubmissionListener diff --git a/WebKit/win/Interfaces/IWebFrame.idl b/WebKit/win/Interfaces/IWebFrame.idl index cc8e1bb..30af7b9 100644 --- a/WebKit/win/Interfaces/IWebFrame.idl +++ b/WebKit/win/Interfaces/IWebFrame.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,31 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "DOMHTML.idl"; @@ -56,6 +32,7 @@ import "IWebFrameView.idl"; import "IWebView.idl"; import "IWebURLRequest.idl"; import "DOMCore.idl"; +#endif cpp_quote("// this is done to get midl to treat the JavaScriptCore API types as pointer types") cpp_quote("#if 0") @@ -65,6 +42,7 @@ cpp_quote("typedef struct OpaqueJSContext* JSGlobalContextRef;") cpp_quote("#endif") interface IDOMDocument; +interface IDOMElement; interface IDOMHTMLElement; interface IWebURLRequest; interface IWebArchive; @@ -262,4 +240,18 @@ interface IWebFrame : IUnknown bridge between the WebKit and JavaScriptCore APIs. */ [local] JSGlobalContextRef globalContext(); + + /*! + @method setIsDisconnected + @abstract Set whether a frame is disconnected + @param flag YES to mark the frame as disconnected, NO keeps it a regular frame + */ + HRESULT setIsDisconnected([in] BOOL flag); + + /*! + @method setExcludeFromTextSearch + @abstract Set whether a frame should be excluded from text search + @param flag YES to mark the frame as not searchable + */ + HRESULT setExcludeFromTextSearch([in] BOOL flag); } diff --git a/WebKit/win/Interfaces/IWebFrameLoadDelegate.idl b/WebKit/win/Interfaces/IWebFrameLoadDelegate.idl index e191ca0..b46ca6d 100644 --- a/WebKit/win/Interfaces/IWebFrameLoadDelegate.idl +++ b/WebKit/win/Interfaces/IWebFrameLoadDelegate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,36 +23,13 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebScriptObject.idl"; import "IWebView.idl"; import "IWebFrame.idl"; +#endif cpp_quote("// this is done to get midl to treat the JavaScriptCore API types as pointer types") cpp_quote("#if 0") diff --git a/WebKit/win/Interfaces/IWebFrameLoadDelegatePrivate.idl b/WebKit/win/Interfaces/IWebFrameLoadDelegatePrivate.idl index 6b14eba..79707a3 100644 --- a/WebKit/win/Interfaces/IWebFrameLoadDelegatePrivate.idl +++ b/WebKit/win/Interfaces/IWebFrameLoadDelegatePrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,36 +23,15 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; - import "IWebFrame.idl"; import "IWebView.idl"; +#endif + +interface IWebFrame; +interface IWebView; [ object, diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl index c986665..bd7c0b6 100755 --- a/WebKit/win/Interfaces/IWebFramePrivate.idl +++ b/WebKit/win/Interfaces/IWebFramePrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,15 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebFrame.idl"; +#endif + +interface IWebFrame; +interface IWebIconFetcher; +interface IWebIconFetcherDelegate; typedef enum { WebFrameLoadTypeStandard, @@ -94,4 +75,12 @@ interface IWebFramePrivate : IUnknown HRESULT frameBounds([out, retval] RECT* result); HRESULT isDescendantOfFrame([in] IWebFrame* ancestor, [out, retval] BOOL* result); + + HRESULT pendingFrameUnloadEventCount([out, retval] UINT* result); + + HRESULT fetchApplicationIcon([in] IWebIconFetcherDelegate* delegate, [out, retval] IWebIconFetcher** result); + + HRESULT paintDocumentRectToContext([in] RECT rect, [in] OLE_HANDLE deviceContext); + + HRESULT elementDoesAutoComplete([in] IDOMElement* element, [out, retval] BOOL* result); } diff --git a/WebKit/win/Interfaces/IWebFrameView.idl b/WebKit/win/Interfaces/IWebFrameView.idl index 4aa2591..d5c82a1 100644 --- a/WebKit/win/Interfaces/IWebFrameView.idl +++ b/WebKit/win/Interfaces/IWebFrameView.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebDocument.idl"; +#endif /*! @class WebFrameView diff --git a/WebKit/win/Interfaces/IWebHTMLRepresentation.idl b/WebKit/win/Interfaces/IWebHTMLRepresentation.idl index 2caae04..7fbd451 100644 --- a/WebKit/win/Interfaces/IWebHTMLRepresentation.idl +++ b/WebKit/win/Interfaces/IWebHTMLRepresentation.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,35 +23,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; - import "DOMCore.idl"; +#endif + +interface IDOMElement; +interface IDOMNode; /*! @class WebHTMLRepresentation diff --git a/WebKit/win/Interfaces/IWebHTTPURLResponse.idl b/WebKit/win/Interfaces/IWebHTTPURLResponse.idl index ee717a6..dd4219e 100644 --- a/WebKit/win/Interfaces/IWebHTTPURLResponse.idl +++ b/WebKit/win/Interfaces/IWebHTTPURLResponse.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebURLResponse.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebHistory.idl b/WebKit/win/Interfaces/IWebHistory.idl index 7dc8cee..a8b55d6 100644 --- a/WebKit/win/Interfaces/IWebHistory.idl +++ b/WebKit/win/Interfaces/IWebHistory.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,31 +23,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - /* @discussion Notifications sent when history is modified. @constant WebHistoryItemsAddedNotification Posted from addItems:. This @@ -66,10 +41,15 @@ cpp_quote("#define WebHistoryLoadedNotification TEXT(\"WebHistoryLoadedNotificat cpp_quote("#define WebHistoryItemsDiscardedWhileLoadingNotification TEXT(\"WebHistoryItemsDiscardedWhileLoadingNotification\")") cpp_quote("#define WebHistorySavedNotification TEXT(\"WebHistorySavedNotification\")") +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebError.idl"; import "IWebHistoryItem.idl"; +#endif + +interface IWebError; +interface IWebHistoryItem; /*! @class WebHistory diff --git a/WebKit/win/Interfaces/IWebHistoryItem.idl b/WebKit/win/Interfaces/IWebHistoryItem.idl index 55410a5..21703d5 100644 --- a/WebKit/win/Interfaces/IWebHistoryItem.idl +++ b/WebKit/win/Interfaces/IWebHistoryItem.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif /*! @class WebHistoryItem diff --git a/WebKit/win/Interfaces/IWebHistoryItemPrivate.idl b/WebKit/win/Interfaces/IWebHistoryItemPrivate.idl index 46419b4..aa8c162 100644 --- a/WebKit/win/Interfaces/IWebHistoryItemPrivate.idl +++ b/WebKit/win/Interfaces/IWebHistoryItemPrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,13 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebHistoryItem.idl"; +#endif + +interface IWebHistoryItem; [ object, diff --git a/WebKit/win/Interfaces/IWebIconDatabase.idl b/WebKit/win/Interfaces/IWebIconDatabase.idl index d944abe..0dfbf1a 100644 --- a/WebKit/win/Interfaces/IWebIconDatabase.idl +++ b/WebKit/win/Interfaces/IWebIconDatabase.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,37 +23,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - cpp_quote("#define WebIconDatabaseDidAddIconNotification TEXT(\"WebIconDatabaseDidAddIconNotification\")") cpp_quote("#define WebIconNotificationUserInfoURLKey TEXT(\"WebIconNotificationUserInfoURLKey\")") cpp_quote("#define WebIconDatabaseDidRemoveAllIconsNotification TEXT(\"WebIconDatabaseDidRemoveAllIconsNotification\")") +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif /*! @class WebIconDatabase diff --git a/WebKit/win/Interfaces/IWebIconFetcher.idl b/WebKit/win/Interfaces/IWebIconFetcher.idl new file mode 100644 index 0000000..1486687 --- /dev/null +++ b/WebKit/win/Interfaces/IWebIconFetcher.idl @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +import "ocidl.idl"; +#endif + +interface IWebIconFetcher; + +[ + object, + oleautomation, + uuid(9d27e503-1e0e-458e-bc66-ffa9fa64600e), + pointer_default(unique) +] +interface IWebIconFetcherDelegate : IUnknown +{ + HRESULT finishedLoadingIcon([in] IWebIconFetcher* fetcher, [in] IStream* data); +} + +[ + object, + oleautomation, + uuid(54f50460-8ffa-442c-b5Ab-5422e1fcc973), + pointer_default(unique) +] +interface IWebIconFetcher : IUnknown +{ + HRESULT cancel(); +} diff --git a/WebKit/win/Interfaces/IWebInspector.idl b/WebKit/win/Interfaces/IWebInspector.idl index 6c1fc50..e31376c 100644 --- a/WebKit/win/Interfaces/IWebInspector.idl +++ b/WebKit/win/Interfaces/IWebInspector.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,36 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" *") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED") -cpp_quote(" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE") -cpp_quote(" * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY") -cpp_quote(" * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES") -cpp_quote(" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;") -cpp_quote(" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND") -cpp_quote(" * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF") -cpp_quote(" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, @@ -67,8 +41,17 @@ interface IWebInspector : IUnknown { HRESULT show(); HRESULT showConsole(); - HRESULT showTimeline(); + HRESULT unused1(); HRESULT close(); HRESULT attach(); HRESULT detach(); + + HRESULT isDebuggingJavaScript(BOOL* isDebugging); + HRESULT toggleDebuggingJavaScript(); + + HRESULT isProfilingJavaScript(BOOL* isProfiling); + HRESULT toggleProfilingJavaScript(); + + HRESULT isJavaScriptProfilingEnabled(BOOL* isProfilingEnabled); + HRESULT setJavaScriptProfilingEnabled(BOOL enabled); } diff --git a/WebKit/win/Interfaces/IWebJavaScriptCollector.idl b/WebKit/win/Interfaces/IWebJavaScriptCollector.idl index 19d5e0e..824cb0b 100644 --- a/WebKit/win/Interfaces/IWebJavaScriptCollector.idl +++ b/WebKit/win/Interfaces/IWebJavaScriptCollector.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebKitStatistics.idl b/WebKit/win/Interfaces/IWebKitStatistics.idl index 53c27ed..627267f 100644 --- a/WebKit/win/Interfaces/IWebKitStatistics.idl +++ b/WebKit/win/Interfaces/IWebKitStatistics.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, @@ -66,4 +43,5 @@ interface IWebKitStatistics : IUnknown HRESULT viewCount([out, retval] int* count); HRESULT HTMLRepresentationCount([out, retval] int* count); HRESULT comClassCount([out, retval] int* classCount); + HRESULT comClassNameCounts([out, retval] BSTR *output); } diff --git a/WebKit/win/Interfaces/IWebMutableURLRequest.idl b/WebKit/win/Interfaces/IWebMutableURLRequest.idl index c7724eb..c1b31be 100644 --- a/WebKit/win/Interfaces/IWebMutableURLRequest.idl +++ b/WebKit/win/Interfaces/IWebMutableURLRequest.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebURLRequest.idl"; +#endif interface IWebURLRequest; diff --git a/WebKit/win/Interfaces/IWebMutableURLRequestPrivate.idl b/WebKit/win/Interfaces/IWebMutableURLRequestPrivate.idl index 1215d05..2e5e0e2 100644 --- a/WebKit/win/Interfaces/IWebMutableURLRequestPrivate.idl +++ b/WebKit/win/Interfaces/IWebMutableURLRequestPrivate.idl @@ -26,36 +26,17 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2008 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" *") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED") -cpp_quote(" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE") -cpp_quote(" * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY") -cpp_quote(" * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES") -cpp_quote(" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;") -cpp_quote(" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND") -cpp_quote(" * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF") -cpp_quote(" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif + +cpp_quote("// this is done to get midl to treat the CFURLRequestRef as pointer types") +cpp_quote("#if 0") +typedef void* CFURLRequestRef; +cpp_quote("#else") +cpp_quote("typedef const struct _CFURLRequest* CFURLRequestRef;") +cpp_quote("#endif") [ object, @@ -67,4 +48,6 @@ import "ocidl.idl"; interface IWebMutableURLRequestPrivate : IUnknown { HRESULT setClientCertificate([in] OLE_HANDLE cert); + + [local] CFURLRequestRef cfRequest(); } diff --git a/WebKit/win/Interfaces/IWebNotification.idl b/WebKit/win/Interfaces/IWebNotification.idl index fcf17d2..0df4ff9 100644 --- a/WebKit/win/Interfaces/IWebNotification.idl +++ b/WebKit/win/Interfaces/IWebNotification.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebNotificationCenter.idl b/WebKit/win/Interfaces/IWebNotificationCenter.idl index ca3eae8..2f8b2aa 100644 --- a/WebKit/win/Interfaces/IWebNotificationCenter.idl +++ b/WebKit/win/Interfaces/IWebNotificationCenter.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,13 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif + +interface IWebNotification; +interface IWebNotificationObserver; [ object, @@ -60,8 +40,10 @@ import "ocidl.idl"; ] interface IWebNotificationCenter : IUnknown { +#ifndef DO_NO_IMPORTS import "IWebNotification.idl"; import "IWebNotificationObserver.idl"; +#endif //+ (NSNotificationCenter *)defaultCenter HRESULT defaultCenter([out, retval] IWebNotificationCenter** center); diff --git a/WebKit/win/Interfaces/IWebNotificationObserver.idl b/WebKit/win/Interfaces/IWebNotificationObserver.idl index aeb5660..ff41b1e 100644 --- a/WebKit/win/Interfaces/IWebNotificationObserver.idl +++ b/WebKit/win/Interfaces/IWebNotificationObserver.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif + +interface IWebNotification; [ object, @@ -59,7 +38,9 @@ import "ocidl.idl"; ] interface IWebNotificationObserver : IUnknown { +#ifndef DO_NO_IMPORTS import "IWebNotification.idl"; +#endif HRESULT onNotify([in] IWebNotification* notification); } diff --git a/WebKit/win/Interfaces/IWebPolicyDelegate.idl b/WebKit/win/Interfaces/IWebPolicyDelegate.idl index 036aa34..204b985 100644 --- a/WebKit/win/Interfaces/IWebPolicyDelegate.idl +++ b/WebKit/win/Interfaces/IWebPolicyDelegate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,35 +23,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebView.idl"; import "IWebURLRequest.idl"; +#endif interface IWebError; interface IWebURLResponse; @@ -80,20 +57,13 @@ typedef enum WebNavigationType { WebNavigationTypeOther } WebNavigationType; -cpp_quote("#define WebActionNavigationTypeKey TEXT(\"WebActionNavigationTypeKey\")") -cpp_quote("#define WebActionElementKey TEXT(\"WebActionElementKey\")") cpp_quote("#define WebActionButtonKey TEXT(\"WebActionButtonKey\")") +cpp_quote("#define WebActionElementKey TEXT(\"WebActionElementKey\")") +cpp_quote("#define WebActionFormKey TEXT(\"WebActionFormKey\")") cpp_quote("#define WebActionModifierFlagsKey TEXT(\"WebActionModifierFlagsKey\")") +cpp_quote("#define WebActionNavigationTypeKey TEXT(\"WebActionNavigationTypeKey\")") cpp_quote("#define WebActionOriginalURLKey TEXT(\"WebActionOriginalURLKey\")") -/* -extern NSString *WebActionNavigationTypeKey; // NSNumber (WebNavigationType) -extern NSString *WebActionElementKey; // NSDictionary of element info -extern NSString *WebActionButtonKey; // NSEventType -extern NSString *WebActionModifierFlagsKey; // NSNumber (unsigned) -extern NSString *WebActionOriginalURLKey; // NSURL -*/ - /*! @protocol WebPolicyDecisionListener @discussion This protocol is used to call back with the results of a diff --git a/WebKit/win/Interfaces/IWebPreferences.idl b/WebKit/win/Interfaces/IWebPreferences.idl index a93f3b8..16f0d9c 100644 --- a/WebKit/win/Interfaces/IWebPreferences.idl +++ b/WebKit/win/Interfaces/IWebPreferences.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,36 +23,13 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - cpp_quote("#define WebPreferencesChangedNotification TEXT(\"WebPreferencesChangedNotification\")") cpp_quote("#define WebPreferencesRemovedNotification TEXT(\"WebPreferencesRemovedNotification\")") +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif typedef enum FontSmoothingType { FontSmoothingTypeStandard=0, @@ -203,4 +180,7 @@ interface IWebPreferences : IUnknown HRESULT cacheModel([out, retval] WebCacheModel* cacheModel); HRESULT setCacheModel([in] WebCacheModel cacheModel); + + HRESULT setShouldPaintCustomScrollbars(BOOL shouldPaint); + HRESULT shouldPaintCustomScrollbars(BOOL *shouldPaint); } diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl index 5e986c7..4a71dbd 100644 --- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl +++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl @@ -26,36 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" *") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer. ") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution. ") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission. ") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED") -cpp_quote(" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE") -cpp_quote(" * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY") -cpp_quote(" * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES") -cpp_quote(" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;") -cpp_quote(" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND") -cpp_quote(" * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF") -cpp_quote(" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, @@ -74,4 +48,16 @@ interface IWebPreferencesPrivate : IUnknown HRESULT setAuthorAndUserStylesEnabled([in] BOOL enabled); HRESULT authorAndUserStylesEnabled([out, retval] BOOL* enabled); + + HRESULT inApplicationChromeMode([out, retval] BOOL *allowed); + HRESULT setApplicationChromeMode([in] BOOL allowed); + + HRESULT setOfflineWebApplicationCacheEnabled([in] BOOL enabled); + HRESULT offlineWebApplicationCacheEnabled([out, retval] BOOL *enabled); + + HRESULT localStorageDatabasePath([out, retval] BSTR* location); + HRESULT setLocalStorageDatabasePath([in] BSTR location); + + HRESULT setShouldPaintNativeControls([in] BOOL shouldPaint); + HRESULT shouldPaintNativeControls([out, retval] BOOL* enabled); } diff --git a/WebKit/win/Interfaces/IWebResource.idl b/WebKit/win/Interfaces/IWebResource.idl index 068bf74..e85f0dc 100644 --- a/WebKit/win/Interfaces/IWebResource.idl +++ b/WebKit/win/Interfaces/IWebResource.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif /*! @class WebResource diff --git a/WebKit/win/Interfaces/IWebResourceLoadDelegate.idl b/WebKit/win/Interfaces/IWebResourceLoadDelegate.idl index 8f1021b..87e6f91 100644 --- a/WebKit/win/Interfaces/IWebResourceLoadDelegate.idl +++ b/WebKit/win/Interfaces/IWebResourceLoadDelegate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,37 +23,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebURLAuthenticationChallenge.idl"; import "IWebDataSource.idl"; import "IWebURLResponse.idl"; import "IWebError.idl"; +#endif interface IWebView; interface IWebDataSource; diff --git a/WebKit/win/Interfaces/IWebResourceLoadDelegatePrivate.idl b/WebKit/win/Interfaces/IWebResourceLoadDelegatePrivate.idl index ea9d97c..de2bdc0 100644 --- a/WebKit/win/Interfaces/IWebResourceLoadDelegatePrivate.idl +++ b/WebKit/win/Interfaces/IWebResourceLoadDelegatePrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,35 +23,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebDataSource.idl"; import "IWebURLResponse.idl"; +#endif interface IWebView; interface IWebDataSource; diff --git a/WebKit/win/Interfaces/IWebScriptCallFrame.idl b/WebKit/win/Interfaces/IWebScriptCallFrame.idl index 6ec4512..d3a7f85 100644 --- a/WebKit/win/Interfaces/IWebScriptCallFrame.idl +++ b/WebKit/win/Interfaces/IWebScriptCallFrame.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,36 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif cpp_quote("// this is done to get midl to treat the WebScriptCallFrame type as a pointer type") cpp_quote("#if 0") diff --git a/WebKit/win/Interfaces/IWebScriptDebugListener.idl b/WebKit/win/Interfaces/IWebScriptDebugListener.idl index a37f4ca..ab6244d 100644 --- a/WebKit/win/Interfaces/IWebScriptDebugListener.idl +++ b/WebKit/win/Interfaces/IWebScriptDebugListener.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,39 +26,17 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; - import "IWebScriptCallFrame.idl"; import "IWebView.idl"; +#endif + +interface IWebDataSource; +interface IWebFrame; +interface IWebScriptCallFrame; +interface IWebView; [ object, diff --git a/WebKit/win/Interfaces/IWebScriptDebugServer.idl b/WebKit/win/Interfaces/IWebScriptDebugServer.idl index d7768d4..975ff68 100644 --- a/WebKit/win/Interfaces/IWebScriptDebugServer.idl +++ b/WebKit/win/Interfaces/IWebScriptDebugServer.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,38 +26,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; - import "IWebScriptDebugListener.idl"; +#endif interface IWebScriptDebugListener; diff --git a/WebKit/win/Interfaces/IWebScriptObject.idl b/WebKit/win/Interfaces/IWebScriptObject.idl index 8abb006..83b502e 100644 --- a/WebKit/win/Interfaces/IWebScriptObject.idl +++ b/WebKit/win/Interfaces/IWebScriptObject.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif /*! @class WebScriptObject diff --git a/WebKit/win/Interfaces/IWebScriptScope.idl b/WebKit/win/Interfaces/IWebScriptScope.idl deleted file mode 100644 index 1664af4..0000000 --- a/WebKit/win/Interfaces/IWebScriptScope.idl +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 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 - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - -import "oaidl.idl"; -import "ocidl.idl"; - -import "IWebScriptCallFrame.idl"; - -interface IWebScriptCallFrame; - -[ - object, - oleautomation, - uuid(FF347C48-1966-460c-8EEE-09FCA5F3C708), - pointer_default(unique) -] -interface IWebScriptScope : IUnknown -{ - HRESULT variableNames([in] IWebScriptCallFrame*, [out, retval] IEnumVARIANT**); - HRESULT valueForVariable([in] IWebScriptCallFrame*, [in] BSTR key, [out, retval] BSTR* value); -} diff --git a/WebKit/win/Interfaces/IWebScrollBarDelegatePrivate.idl b/WebKit/win/Interfaces/IWebScrollBarDelegatePrivate.idl index efadbf4..e054e05 100644 --- a/WebKit/win/Interfaces/IWebScrollBarDelegatePrivate.idl +++ b/WebKit/win/Interfaces/IWebScrollBarDelegatePrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebScrollBarPrivate.idl"; +#endif interface IWebScrollBarPrivate; diff --git a/WebKit/win/Interfaces/IWebScrollBarPrivate.idl b/WebKit/win/Interfaces/IWebScrollBarPrivate.idl index 39cfc86..2c820eb 100644 --- a/WebKit/win/Interfaces/IWebScrollBarPrivate.idl +++ b/WebKit/win/Interfaces/IWebScrollBarPrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,64 +23,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; - import "IWebScrollBarDelegatePrivate.idl"; +#endif interface IWebScrollBarDelegatePrivate; -// NOTE: these enums must be kept in sync with the WebCore versions -typedef enum WebScrollBarOrientation { - WebHorizontalScrollbar = 0, - WebVerticalScrollbar -} WebScrollBarOrientation; - -typedef enum WebScrollBarControlSize { - WebRegularScrollbar = 0, - WebSmallScrollbar, - WebMiniScrollbar -} WebScrollBarControlSize; - -typedef enum WebScrollDirection { - WebScrollUp = 0, - WebScrollDown, - WebScrollLeft, - WebScrollRight -} WebScrollDirection; - -typedef enum WebScrollGranularity { - WebScrollByLine = 0, - WebScrollByPage, - WebScrollByDocument, - WebScrollByWheel -} WebScrollGranularity; - [ object, oleautomation, @@ -106,7 +56,7 @@ interface IWebScrollBarPrivate : IUnknown HRESULT paint([in] HDC dc, [in] RECT damageRect); - HRESULT frameGeometry([out, retval] RECT* bounds); + HRESULT frameRect([out, retval] RECT* bounds); HRESULT width([out, retval] int* w); diff --git a/WebKit/win/Interfaces/IWebSecurityOrigin.idl b/WebKit/win/Interfaces/IWebSecurityOrigin.idl index ad05ea7..796d59c 100644 --- a/WebKit/win/Interfaces/IWebSecurityOrigin.idl +++ b/WebKit/win/Interfaces/IWebSecurityOrigin.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,36 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" *") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED") -cpp_quote(" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE") -cpp_quote(" * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY") -cpp_quote(" * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES") -cpp_quote(" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;") -cpp_quote(" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND") -cpp_quote(" * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF") -cpp_quote(" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, @@ -66,7 +40,7 @@ import "ocidl.idl"; interface IWebSecurityOrigin : IUnknown { HRESULT protocol([out, retval] BSTR* result); - HRESULT domain([out, retval] BSTR* result); + HRESULT host([out, retval] BSTR* result); HRESULT port([out, retval] unsigned short* result); HRESULT usage([out, retval] unsigned long long* result); diff --git a/WebKit/win/Interfaces/IWebTextRenderer.idl b/WebKit/win/Interfaces/IWebTextRenderer.idl index 5c88d98..bdfc54a 100644 --- a/WebKit/win/Interfaces/IWebTextRenderer.idl +++ b/WebKit/win/Interfaces/IWebTextRenderer.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,36 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" *") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED") -cpp_quote(" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE") -cpp_quote(" * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY") -cpp_quote(" * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES") -cpp_quote(" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;") -cpp_quote(" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND") -cpp_quote(" * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF") -cpp_quote(" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebUIDelegate.idl b/WebKit/win/Interfaces/IWebUIDelegate.idl index c1400b3..44869b7 100644 --- a/WebKit/win/Interfaces/IWebUIDelegate.idl +++ b/WebKit/win/Interfaces/IWebUIDelegate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,40 +23,18 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebUndoTarget.idl"; import "IWebURLRequest.idl"; import "IWebFrame.idl"; +#endif interface IWebFrame; interface IWebView; interface IWebURLRequest; +interface IWebUndoTarget; /*! @enum WebMenuItemTag @@ -801,3 +779,20 @@ interface IWebUIDelegate3 : IWebUIDelegate2 HRESULT setMenuBarVisible([in] IWebView* webView, [in] BOOL visible); HRESULT runDatabaseSizeLimitPrompt([in] IWebView* webView, [in] BSTR displayName, [in] IWebFrame* initiatedByFrame, [out, retval] BOOL* allowed); } + +/*! + @category WebUIDelegate4 + @discussion A class that supplements the IWebUIDelegate interface +*/ +[ + object, + oleautomation, + uuid(042B7EE3-A5A4-4a8f-8C33-775CD9E89C7C), + pointer_default(unique) +] +interface IWebUIDelegate4 : IWebUIDelegate3 +{ + HRESULT paintCustomScrollbar([in] IWebView* webView, [in] HDC hDC, [in] RECT rect, [in] WebScrollBarControlSize size, [in] WebScrollbarControlState state, + [in] WebScrollbarControlPart pressedPart, [in] BOOL vertical, [in] float value, [in] float proportion, [in] WebScrollbarControlPartMask parts); + HRESULT paintCustomScrollCorner([in] IWebView* webView, [in] HDC hDC, [in] RECT rect); +} diff --git a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl index fbfcc92..85a72e7 100755 --- a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl +++ b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl @@ -23,36 +23,17 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebSecurityOrigin.idl"; import "IWebView.idl"; +#endif + +cpp_quote("#define WebEmbeddedViewAttributesKey TEXT(\"WebEmbeddedViewAttributesKey\")") +interface IWebEmbeddedView; +interface IWebFrame; interface IWebSecurityOrigin; interface IWebView; @@ -96,3 +77,15 @@ interface IWebUIDelegatePrivate3 : IWebUIDelegatePrivate2 { HRESULT exceededDatabaseQuota([in] IWebView* sender, [in] IWebFrame* frame, [in] IWebSecurityOrigin* origin, [in] BSTR databaseIdentifier); } + +[ + object, + oleautomation, + uuid(88566775-C003-4EDF-8900-2872AC7EA44F), + pointer_default(unique) +] +interface IWebUIDelegatePrivate4 : IWebUIDelegatePrivate3 +{ + HRESULT embeddedViewWithArguments([in] IWebView* sender, [in] IWebFrame* frame, [in] IPropertyBag* arguments, [out, retval] IWebEmbeddedView** view); + HRESULT webViewSendResizeMessage([in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam); +} diff --git a/WebKit/win/Interfaces/IWebURLAuthenticationChallenge.idl b/WebKit/win/Interfaces/IWebURLAuthenticationChallenge.idl index 4908c9e..68881ab 100644 --- a/WebKit/win/Interfaces/IWebURLAuthenticationChallenge.idl +++ b/WebKit/win/Interfaces/IWebURLAuthenticationChallenge.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,39 +23,18 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebError.idl"; import "IWebURLResponse.idl"; +#endif +interface IWebError; interface IWebURLAuthenticationChallengeSender; -interface IWebURLProtectionSpace; interface IWebURLCredential; +interface IWebURLProtectionSpace; +interface IWebURLResponse; typedef enum { WebURLCredentialPersistenceNone, diff --git a/WebKit/win/Interfaces/IWebURLRequest.idl b/WebKit/win/Interfaces/IWebURLRequest.idl index 3875d1f..0f72fa8 100644 --- a/WebKit/win/Interfaces/IWebURLRequest.idl +++ b/WebKit/win/Interfaces/IWebURLRequest.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif typedef enum _WebURLRequestCachePolicy { @@ -131,4 +108,6 @@ interface IWebURLRequest : IUnknown HRESULT valueForHTTPHeaderField([in] BSTR field, [out, retval] BSTR* result); HRESULT isEmpty([out, retval] BOOL* result); + + HRESULT mutableCopy([out, retval] IWebMutableURLRequest** result); } diff --git a/WebKit/win/Interfaces/IWebURLResponse.idl b/WebKit/win/Interfaces/IWebURLResponse.idl index 49248fb..9407457 100644 --- a/WebKit/win/Interfaces/IWebURLResponse.idl +++ b/WebKit/win/Interfaces/IWebURLResponse.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,35 +23,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - cpp_quote("#define WebURLResponseUnknownLength -1") +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebURLResponsePrivate.idl b/WebKit/win/Interfaces/IWebURLResponsePrivate.idl index d52cb1e..00133a7 100644 --- a/WebKit/win/Interfaces/IWebURLResponsePrivate.idl +++ b/WebKit/win/Interfaces/IWebURLResponsePrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,36 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" *") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer. ") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution. ") -cpp_quote(" * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of") -cpp_quote(" * its contributors may be used to endorse or promote products derived") -cpp_quote(" * from this software without specific prior written permission. ") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED") -cpp_quote(" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE") -cpp_quote(" * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY") -cpp_quote(" * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES") -cpp_quote(" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;") -cpp_quote(" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND") -cpp_quote(" * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF") -cpp_quote(" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebUndoManager.idl b/WebKit/win/Interfaces/IWebUndoManager.idl index 6f9983a..4cea91a 100644 --- a/WebKit/win/Interfaces/IWebUndoManager.idl +++ b/WebKit/win/Interfaces/IWebUndoManager.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif interface IWebInvocation; interface IWebMethodSignature; diff --git a/WebKit/win/Interfaces/IWebUndoTarget.idl b/WebKit/win/Interfaces/IWebUndoTarget.idl index 1e15939..01e14d0 100755 --- a/WebKit/win/Interfaces/IWebUndoTarget.idl +++ b/WebKit/win/Interfaces/IWebUndoTarget.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,33 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +#endif [ object, diff --git a/WebKit/win/Interfaces/IWebView.idl b/WebKit/win/Interfaces/IWebView.idl index 66daed7..92fa2b5 100644 --- a/WebKit/win/Interfaces/IWebView.idl +++ b/WebKit/win/Interfaces/IWebView.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,31 +23,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - cpp_quote("/* identifiers for commands that can be called by the webview's frame */") cpp_quote("enum WebViewCmd { Cut = 100, Copy, Paste, ForwardDelete, SelectAll, Undo, Redo };") @@ -55,6 +30,7 @@ cpp_quote("#define WebViewProgressStartedNotification TEXT(\"WebProgressStartedN cpp_quote("#define WebViewProgressEstimateChangedNotification TEXT(\"WebProgressEstimateChangedNotification\")") cpp_quote("#define WebViewProgressFinishedNotification TEXT(\"WebProgressFinishedNotification\")") +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebUIDelegate.idl"; @@ -70,6 +46,7 @@ import "DOMCSS.idl"; import "IWebUndoManager.idl"; import "IWebEditingDelegate.idl"; import "DOMRange.idl"; +#endif interface IDOMCSSStyleDeclaration; interface IDOMDocument; @@ -838,6 +815,51 @@ interface IWebIBActions : IUnknown - (void)toggleGrammarChecking:(id)sender */ HRESULT toggleGrammarChecking([in] IUnknown* sender); + + /*! + @method setPageSizeMultiplier: + @abstract Set a zoom factor for all views managed by this webView. + @param multiplier A fractional percentage value, 1.0 is 100%. + - (void)setPageSizeMultiplier:(float)multiplier; + */ + HRESULT setPageSizeMultiplier([in] float multiplier); + + /*! + @method pageSizeMultiplier + @result The page size multipler. + - (float)pageSizeMultiplier; + */ + HRESULT pageSizeMultiplier([out, retval] float* multiplier); + + /* + - (BOOL)canZoomPageIn; + */ + HRESULT canZoomPageIn([in] IUnknown* sender, [out, retval] BOOL* result); + + /* + - (IBAction)zoomPageIn:(id)sender; + */ + HRESULT zoomPageIn([in] IUnknown* sender); + + /* + - (BOOL)canZoomPageOut; + */ + HRESULT canZoomPageOut([in] IUnknown* sender, [out, retval] BOOL* result); + + /* + - (IBAction)zoomPageOut:(id)sender; + */ + HRESULT zoomPageOut([in] IUnknown* sender); + + /* + - (BOOL)canResetPageZoom; + */ + HRESULT canResetPageZoom([in] IUnknown* sender, [out, retval] BOOL* result); + + /* + - (IBAction)resetPageZoom:(id)sender; + */ + HRESULT resetPageZoom([in] IUnknown* sender); } /* diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl index 8328608..b49addf 100644 --- a/WebKit/win/Interfaces/IWebViewPrivate.idl +++ b/WebKit/win/Interfaces/IWebViewPrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,36 +23,20 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") -cpp_quote(" *") -cpp_quote(" * Redistribution and use in source and binary forms, with or without") -cpp_quote(" * modification, are permitted provided that the following conditions") -cpp_quote(" * are met:") -cpp_quote(" * 1. Redistributions of source code must retain the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer.") -cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") -cpp_quote(" * notice, this list of conditions and the following disclaimer in the") -cpp_quote(" * documentation and/or other materials provided with the distribution.") -cpp_quote(" *") -cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") -cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") -cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") -cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") -cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") -cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") -cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") -cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") -cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") -cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") -cpp_quote(" */") - +#ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; import "IWebFormDelegate.idl"; import "IWebFrameLoadDelegatePrivate.idl"; import "IWebInspector.idl"; +#endif + +interface IEnumTextMatches; +interface IWebFormDelegate; +interface IWebFrameLoadDelegatePrivate; +interface IWebInspector; +interface IWebURLRequest; +interface IWebView; [ object, @@ -110,7 +94,7 @@ interface IWebViewPrivate : IUnknown HRESULT tabKeyCyclesThroughElements([out, retval] BOOL* result); HRESULT setAllowSiteSpecificHacks([in] BOOL allows); - HRESULT addAdditionalPluginPath([in] BSTR path); + HRESULT addAdditionalPluginDirectory([in] BSTR directory); HRESULT loadBackForwardListFromOtherView([in] IWebView* otherView); @@ -138,6 +122,28 @@ interface IWebViewPrivate : IUnknown // SPI for DumpRenderTree HRESULT executeCoreCommandByName([in] BSTR name, [in] BSTR value); + HRESULT clearMainFrameName(); HRESULT windowAncestryDidChange(); + + HRESULT paintDocumentRectToContext([in] RECT rect, [in] OLE_HANDLE dc); + + HRESULT setDefersCallbacks([in] BOOL defersCallbacks); + HRESULT defersCallbacks([out, retval] BOOL* defersCallbacks); + + HRESULT standardUserAgentWithApplicationName([in] BSTR applicationName, [retval][out] BSTR* groupName); + + HRESULT setCustomHTMLTokenizerTimeDelay([in] double timeDelay); + HRESULT setCustomHTMLTokenizerChunkSize([in] int chunkSize); + + HRESULT backingStore([out, retval] OLE_HANDLE* hBitmap); + + HRESULT setTransparent([in] BOOL transparent); + HRESULT transparent([out, retval] BOOL* transparent); + + HRESULT setAlwaysUsesComplexTextCodePath([in] BOOL complex); + HRESULT alwaysUsesComplexTextCodePath([out, retval] BOOL* complex); + + HRESULT setCookieEnabled([in] BOOL enable); + HRESULT cookieEnabled([out, retval] BOOL* enabled); } diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl index 5823013..fe08792 100644 --- a/WebKit/win/Interfaces/WebKit.idl +++ b/WebKit/win/Interfaces/WebKit.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -20,11 +20,11 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") +cpp_quote(" * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.") cpp_quote(" *") cpp_quote(" * Redistribution and use in source and binary forms, with or without") cpp_quote(" * modification, are permitted provided that the following conditions") @@ -48,68 +48,197 @@ cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") cpp_quote(" */") +#include "autoversion.h" + +#define DO_NO_IMPORTS + import "oaidl.idl"; import "ocidl.idl"; -import "IWebTextRenderer.idl"; -import "IWebView.idl"; -import "IWebViewPrivate.idl"; -import "IWebUIDelegate.idl"; -import "IWebResourceLoadDelegate.idl"; -import "IWebDatabaseManager.idl"; -import "IWebDownload.idl"; -import "IWebFrameLoadDelegate.idl"; -import "IWebPolicyDelegate.idl"; -import "IWebFrame.idl"; -import "IWebBackForwardList.idl"; -import "IWebHistoryItem.idl"; -import "IWebScriptObject.idl"; -import "IWebPreferences.idl"; -import "IWebDocument.idl"; -import "IWebURLRequest.idl"; -import "IWebDataSource.idl"; -import "IWebURLResponse.idl"; -import "IWebURLAuthenticationChallenge.idl"; -import "IWebError.idl"; -import "IWebMutableURLRequest.idl"; -import "IWebArchive.idl"; -import "IWebResource.idl"; -import "IWebFrameView.idl"; -import "DOMHTML.idl"; -import "IWebIconDatabase.idl"; -import "IWebNotificationCenter.idl"; -import "IWebNotificationObserver.idl"; -import "IWebHistory.idl"; -import "IWebCache.idl"; -import "IWebJavaScriptCollector.idl"; -import "IWebKitStatistics.idl"; -import "IWebScrollBarPrivate.idl"; -import "IWebScriptDebugServer.idl"; +#include "WebScrollbarTypes.idl" +#include "IWebScriptObject.idl" +#include "DOMCSS.idl" +#include "DOMCore.idl" +#include "DOMEvents.idl" +#include "DOMExtensions.idl" +#include "DOMHTML.idl" +#include "DOMPrivate.idl" +#include "DOMRange.idl" +#include "DOMWindow.idl" +#include "IWebArchive.idl" +#include "IWebBackForwardList.idl" +#include "IWebBackForwardListPrivate.idl" +#include "IWebCache.idl" +#include "IWebCookieManager.idl" +#include "IWebCoreStatistics.idl" +#include "IWebDataSource.idl" +#include "IWebDatabaseManager.idl" +#include "IWebDocument.idl" +#include "IWebDownload.idl" +#include "IWebEditingDelegate.idl" +#include "IWebEmbeddedView.idl" +#include "IWebError.idl" +#include "IWebErrorPrivate.idl" +#include "IWebFormDelegate.idl" +#include "IWebFrame.idl" +#include "IWebFrameLoadDelegate.idl" +#include "IWebFrameLoadDelegatePrivate.idl" +#include "IWebFramePrivate.idl" +#include "IWebFrameView.idl" +#include "IWebHTMLRepresentation.idl" +#include "IWebHTTPURLResponse.idl" +#include "IWebHistory.idl" +#include "IWebHistoryItem.idl" +#include "IWebHistoryItemPrivate.idl" +#include "IWebIconDatabase.idl" +#include "IWebIconFetcher.idl" +#include "IWebInspector.idl" +#include "IWebJavaScriptCollector.idl" +#include "IWebKitStatistics.idl" +#include "IWebMutableURLRequestPrivate.idl" +#include "IWebNotification.idl" +#include "IWebNotificationCenter.idl" +#include "IWebNotificationObserver.idl" +#include "IWebPolicyDelegate.idl" +#include "IWebPreferences.idl" +#include "IWebPreferencesPrivate.idl" +#include "IWebResource.idl" +#include "IWebResourceLoadDelegate.idl" +#include "IWebResourceLoadDelegatePrivate.idl" +#include "IWebScriptCallFrame.idl" +#include "IWebScriptDebugListener.idl" +#include "IWebScriptDebugServer.idl" +#include "IWebScrollBarDelegatePrivate.idl" +#include "IWebScrollBarPrivate.idl" +#include "IWebSecurityOrigin.idl" +#include "IWebTextRenderer.idl" +#include "IWebUIDelegate.idl" +#include "IWebUIDelegatePrivate.idl" +#include "IWebURLAuthenticationChallenge.idl" +#include "IWebURLRequest.idl" +#include "IWebMutableURLRequest.idl" +#include "IWebURLResponse.idl" +#include "IWebURLResponsePrivate.idl" +#include "IWebUndoManager.idl" +#include "IWebUndoTarget.idl" +#include "IWebView.idl" +#include "IWebViewPrivate.idl" + +#include "IGEN_DOMObject.idl" +#include "IGEN_DOMCharacterData.idl" +#include "IGEN_DOMText.idl" +#include "IGEN_DOMAttr.idl" +#include "IGEN_DOMCDATASection.idl" +#include "IGEN_DOMCSSCharsetRule.idl" +#include "IGEN_DOMCSSFontFaceRule.idl" +#include "IGEN_DOMCSSImportRule.idl" +#include "IGEN_DOMCSSMediaRule.idl" +#include "IGEN_DOMCSSPageRule.idl" +#include "IGEN_DOMCSSPrimitiveValue.idl" +#include "IGEN_DOMCSSRule.idl" +#include "IGEN_DOMCSSRuleList.idl" +#include "IGEN_DOMCSSStyleDeclaration.idl" +#include "IGEN_DOMCSSStyleRule.idl" +#include "IGEN_DOMCSSStyleSheet.idl" +#include "IGEN_DOMCSSUnknownRule.idl" +#include "IGEN_DOMCSSValue.idl" +#include "IGEN_DOMCSSValueList.idl" +#include "IGEN_DOMComment.idl" +#include "IGEN_DOMCounter.idl" +#include "IGEN_DOMDOMImplementation.idl" +#include "IGEN_DOMDocument.idl" +#include "IGEN_DOMDocumentFragment.idl" +#include "IGEN_DOMDocumentType.idl" +#include "IGEN_DOMElement.idl" +#include "IGEN_DOMEntity.idl" +#include "IGEN_DOMEntityReference.idl" +#include "IGEN_DOMEvent.idl" +#include "IGEN_DOMEventListener.idl" +#include "IGEN_DOMEventTarget.idl" +#include "IGEN_DOMHTMLAnchorElement.idl" +#include "IGEN_DOMHTMLAppletElement.idl" +#include "IGEN_DOMHTMLAreaElement.idl" +#include "IGEN_DOMHTMLBRElement.idl" +#include "IGEN_DOMHTMLBaseElement.idl" +#include "IGEN_DOMHTMLBaseFontElement.idl" +#include "IGEN_DOMHTMLBlockquoteElement.idl" +#include "IGEN_DOMHTMLBodyElement.idl" +#include "IGEN_DOMHTMLButtonElement.idl" +#include "IGEN_DOMHTMLCollection.idl" +#include "IGEN_DOMHTMLDListElement.idl" +#include "IGEN_DOMHTMLDirectoryElement.idl" +#include "IGEN_DOMHTMLDivElement.idl" +#include "IGEN_DOMHTMLDocument.idl" +#include "IGEN_DOMHTMLElement.idl" +#include "IGEN_DOMHTMLEmbedElement.idl" +#include "IGEN_DOMHTMLFieldSetElement.idl" +#include "IGEN_DOMHTMLFontElement.idl" +#include "IGEN_DOMHTMLFormElement.idl" +#include "IGEN_DOMHTMLFrameElement.idl" +#include "IGEN_DOMHTMLFrameSetElement.idl" +#include "IGEN_DOMHTMLHRElement.idl" +#include "IGEN_DOMHTMLHeadElement.idl" +#include "IGEN_DOMHTMLHeadingElement.idl" +#include "IGEN_DOMHTMLHtmlElement.idl" +#include "IGEN_DOMHTMLIFrameElement.idl" +#include "IGEN_DOMHTMLImageElement.idl" +#include "IGEN_DOMHTMLInputElement.idl" +#include "IGEN_DOMHTMLIsIndexElement.idl" +#include "IGEN_DOMHTMLLIElement.idl" +#include "IGEN_DOMHTMLLabelElement.idl" +#include "IGEN_DOMHTMLLegendElement.idl" +#include "IGEN_DOMHTMLLinkElement.idl" +#include "IGEN_DOMHTMLMapElement.idl" +#include "IGEN_DOMHTMLMarqueeElement.idl" +#include "IGEN_DOMHTMLMenuElement.idl" +#include "IGEN_DOMHTMLMetaElement.idl" +#include "IGEN_DOMHTMLModElement.idl" +#include "IGEN_DOMHTMLOListElement.idl" +#include "IGEN_DOMHTMLObjectElement.idl" +#include "IGEN_DOMHTMLOptGroupElement.idl" +#include "IGEN_DOMHTMLOptionElement.idl" +#include "IGEN_DOMHTMLOptionsCollection.idl" +#include "IGEN_DOMHTMLParagraphElement.idl" +#include "IGEN_DOMHTMLParamElement.idl" +#include "IGEN_DOMHTMLPreElement.idl" +#include "IGEN_DOMHTMLQuoteElement.idl" +#include "IGEN_DOMHTMLScriptElement.idl" +#include "IGEN_DOMHTMLSelectElement.idl" +#include "IGEN_DOMHTMLStyleElement.idl" +#include "IGEN_DOMHTMLTableCaptionElement.idl" +#include "IGEN_DOMHTMLTableCellElement.idl" +#include "IGEN_DOMHTMLTableColElement.idl" +#include "IGEN_DOMHTMLTableElement.idl" +#include "IGEN_DOMHTMLTableRowElement.idl" +#include "IGEN_DOMHTMLTableSectionElement.idl" +#include "IGEN_DOMHTMLTextAreaElement.idl" +#include "IGEN_DOMHTMLTitleElement.idl" +#include "IGEN_DOMHTMLUListElement.idl" +#include "IGEN_DOMMediaList.idl" +#include "IGEN_DOMNamedNodeMap.idl" +#include "IGEN_DOMNode.idl" +#include "IGEN_DOMNodeList.idl" +#include "IGEN_DOMNotation.idl" +#include "IGEN_DOMProcessingInstruction.idl" +#include "IGEN_DOMRect.idl" +#include "IGEN_DOMStyleSheet.idl" +#include "IGEN_DOMStyleSheetList.idl" + +#define __TYPELIB_VERSION__ __BUILD_NUMBER_MAJOR__##.##__BUILD_NUMBER_MINOR__ + +cpp_quote("void shutDownWebKit();") [ -#if __PRODUCTION__ uuid(2a748656-625d-4207-b29f-40c95bfeb3a9), - helpstring("WebKit 525.2 Type Library"), -#else - uuid(76E5F7F0-18FD-48a2-B549-1159435B513B), - helpstring("OpenSourceWebKit 525.2 Type Library"), -#endif - version(525.2) + helpstring("WebKit " __BUILD_NUMBER_SHORT__ " Type Library"), + version(__TYPELIB_VERSION__) ] -#if __PRODUCTION__ library WebKit -#else -library OpenSourceWebKit -#endif { // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046} importlib("STDOLE2.TLB"); -#if __PRODUCTION__ [uuid(d6bca079-f61c-4e1e-b453-32a0477d02e3)] -#else - [uuid(4FF47097-3FEA-4b47-AC0E-90725C546490)] -#endif coclass WebView { [default] interface IWebView; interface IWebIBActions; @@ -121,183 +250,119 @@ library OpenSourceWebKit interface IWebViewPrivate; } -#if __PRODUCTION__ [uuid(66827ec1-3aef-4241-bac5-f776b44f030f)] -#else - [uuid(BE8EE509-9894-44ba-9E2F-E29780BCB25C)] -#endif coclass WebIconDatabase { [default] interface IWebIconDatabase; } -#if __PRODUCTION__ [uuid(a062ecc3-bb1b-4694-a569-f59e0ad6be0c)] -#else - [uuid(97F3EB52-9EAC-4062-82E1-E5C1E7789DEE)] -#endif coclass WebMutableURLRequest { [default] interface IWebMutableURLRequest; } -#if __PRODUCTION__ [uuid(ba590766-0a6f-46c7-b96e-743490d94cb7)] -#else - [uuid(99B9D99A-060D-4695-8C8F-3AB53156054C)] -#endif coclass WebNotificationCenter { [default] interface IWebNotificationCenter; } -#if __PRODUCTION__ [uuid(a4b9b45d-949f-4c8c-9b92-6fbfcc1caaa2)] -#else - [uuid(4D043991-E844-48b0-8EF7-85FE1AB8829E)] -#endif coclass WebHistory { [default] interface IWebHistory; } -#if __PRODUCTION__ [uuid(dd653964-4d37-4fb2-9cb6-6a9a97719332)] -#else - [uuid(97795891-293D-4855-800E-E21987568537)] -#endif coclass CFDictionaryPropertyBag { [default] interface IPropertyBag; } -#if __PRODUCTION__ [uuid(6be190e9-1725-4e4a-88db-6a9fe242c9e5)] -#else - [uuid(82F6400A-3CD0-40a3-8EA1-7A23B26D6153)] -#endif coclass WebHistoryItem { [default] interface IWebHistoryItem; } -#if __PRODUCTION__ [uuid(f71071fd-a51b-4b69-9eb6-44374405e80c)] -#else - [uuid(CB0111F6-168B-467e-8613-23AB37D0493E)] -#endif coclass WebCache { [default] interface IWebCache; } -#if __PRODUCTION__ [uuid(1820D883-42FE-4b78-88C8-5456BB19D224)] -#else - [uuid(5D911A44-4316-4a02-A2B5-BAE7036357B9)] -#endif coclass WebJavaScriptCollector { [default] interface IWebJavaScriptCollector; } -#if __PRODUCTION__ [uuid(67B89F90-F778-438b-ABBF-34D1ACBF8651)] -#else - [uuid(CC914F49-2385-4943-9B3F-E17501383F5B)] -#endif coclass WebPreferences { [default] interface IWebPreferences; } -#if __PRODUCTION__ [uuid(E93AA8D7-F362-4a4a-A95D-325906BEB5F0)] -#else - [uuid(87689DC6-5F8C-4194-90D5-CE6083837AB5)] -#endif coclass WebKitStatistics { [default] interface IWebKitStatistics; } -#if __PRODUCTION__ [uuid(6C6AF3F9-36B4-4bf7-8BDE-74DCD4AD75A4)] -#else - [uuid(319B38AC-2794-47fa-AE18-A14A7576A6D8)] -#endif coclass WebError { [default] interface IWebError; } -#if __PRODUCTION__ [uuid(7433F53B-7FE9-484a-9432-72909457A646)] -#else - [uuid(BCF988AF-9A2F-403f-A1D8-BD815C46401D)] -#endif coclass WebURLCredential { [default] interface IWebURLCredential; } -#if __PRODUCTION__ [uuid(C0F98BD9-3B1C-413d-904A-E2D1453EAF1F)] -#else - [uuid(3FE547FC-4EC1-4062-9DE2-9FC3DA0A08FF)] -#endif coclass WebDownload { [default] interface IWebDownload; } -#if __PRODUCTION__ [uuid(2FB5499A-BB5D-4469-8517-789FEC8FD9BA)] -#else - [uuid(20B9702D-B41F-449b-84FE-3E32DB5D775F)] -#endif coclass WebURLRequest { [default] interface IWebURLRequest; } -#if __PRODUCTION__ [uuid(F366A6E8-E43C-4fd4-AAB0-8E6E79C73E6E)] -#else - [uuid(41EFBA9A-63E4-4c49-A012-CCC48694D7A5)] -#endif coclass WebURLProtectionSpace { [default] interface IWebURLProtectionSpace; } -#if __PRODUCTION__ [uuid(24A53AD5-AA9F-44e6-AA22-2C7C250B661A)] -#else - [uuid(0F34FB95-301F-4ea1-943E-B5E6E6D94121)] -#endif coclass WebScrollBar { [default] interface IWebScrollBarPrivate; } -#if __PRODUCTION__ [uuid(715636C4-59E7-4b85-BBC5-B555888787D7)] -#else - [uuid(5BE39DBA-5887-4a69-9157-EBEE96BA3309)] -#endif coclass WebScriptDebugServer { [default] interface IWebScriptDebugServer; } -#if __PRODUCTION__ [uuid(AB201196-8DD2-4d45-AEBD-029B6A37AA27)] -#else - [uuid(EA2FCB14-072B-48b5-B9B5-1BBEFBABC7BC)] -#endif coclass WebURLResponse { [default] interface IWebURLResponse; } -#if __PRODUCTION__ [uuid(24040cd6-aff4-4a51-9c8b-71539580ee76)] -#else - [uuid(1fbff564-5ff4-484f-b3d9-217483f9f5fc)] -#endif coclass WebTextRenderer { [default] interface IWebTextRenderer; } -#if __PRODUCTION__ [uuid(C2A1BFC2-1E7C-49fe-8592-D0C7FB440BC0)] -#else - [uuid(1F7B8CEE-5D74-4974-8A47-C5733B422644)] -#endif coclass WebDatabaseManager { [default] interface IWebDatabaseManager; } + + [uuid(1B63D781-9BC4-4a04-899F-C4B05BBD3BE5)] + coclass WebArchive{ + [default] interface IWebArchive; + } + + [uuid(96B93356-9D61-4b3f-A6CF-A78283AC9649)] + coclass WebCoreStatistics{ + [default] interface IWebCoreStatistics; + } + + [uuid(3F35F332-BB2B-49b3-AEDD-27B317687E07)] + coclass WebCookieManager{ + [default] interface IWebCookieManager; + } } + diff --git a/WebKit/win/Interfaces/WebScrollbarTypes.idl b/WebKit/win/Interfaces/WebScrollbarTypes.idl new file mode 100644 index 0000000..75f31be --- /dev/null +++ b/WebKit/win/Interfaces/WebScrollbarTypes.idl @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +import "ocidl.idl"; +#endif + +// NOTE: these enums must be kept in sync with the WebCore versions in ScrollTypes.h +typedef enum WebScrollBarOrientation { + WebHorizontalScrollbar = 0, + WebVerticalScrollbar +} WebScrollBarOrientation; + +typedef enum WebScrollBarControlSize { + WebRegularScrollbar = 0, + WebSmallScrollbar, + WebMiniScrollbar +} WebScrollBarControlSize; + +typedef enum WebScrollDirection { + WebScrollUp = 0, + WebScrollDown, + WebScrollLeft, + WebScrollRight +} WebScrollDirection; + +typedef enum WebScrollGranularity { + WebScrollByLine = 0, + WebScrollByPage, + WebScrollByDocument, + WebScrollByWheel +} WebScrollGranularity; + +typedef unsigned WebScrollbarControlState; + +typedef enum WebScrollbarControlStateMask { + WebActiveScrollbarState = 1, + WebEnabledScrollbarState = 1 << 1, + WebPressedScrollbarState = 1 << 2, +} WebScrollbarControlStateMask; + +typedef unsigned WebScrollbarControlPartMask; + +typedef enum WebScrollbarControlPart { + WebNoScrollPart = 0, + WebBackButtonPart = 1, + WebBackTrackPart = 1 << 1, + WebThumbPart = 1 << 2, + WebForwardTrackPart = 1 << 3, + WebForwardButtonPart = 1 << 4, + WebAllParts = 0xffffffff, +} WebScrollbarControlPart; + diff --git a/WebKit/win/MarshallingHelpers.cpp b/WebKit/win/MarshallingHelpers.cpp index d0196de..2a3935e 100644 --- a/WebKit/win/MarshallingHelpers.cpp +++ b/WebKit/win/MarshallingHelpers.cpp @@ -42,13 +42,12 @@ CFDictionaryValueCallBacks MarshallingHelpers::kIUnknownDictionaryValueCallBacks KURL MarshallingHelpers::BSTRToKURL(BSTR urlStr) { - return KURL(String(urlStr, SysStringLen(urlStr)).deprecatedString()); + return KURL(String(urlStr, SysStringLen(urlStr))); } BSTR MarshallingHelpers::KURLToBSTR(const KURL& url) { - String urlString(url.string()); - return SysAllocStringLen(urlString.characters(), urlString.length()); + return SysAllocStringLen(url.string().characters(), url.string().length()); } CFURLRef MarshallingHelpers::PathStringToFileCFURLRef(const String& string) diff --git a/WebKit/win/MemoryStream.cpp b/WebKit/win/MemoryStream.cpp index 9279a72..ac95e0f 100644 --- a/WebKit/win/MemoryStream.cpp +++ b/WebKit/win/MemoryStream.cpp @@ -38,11 +38,13 @@ MemoryStream::MemoryStream(PassRefPtr<SharedBuffer> buffer) , m_pos(0) { gClassCount++; + gClassNameCount.add("MemoryStream"); } MemoryStream::~MemoryStream() { gClassCount--; + gClassNameCount.remove("MemoryStream"); } MemoryStream* MemoryStream::createInstance(PassRefPtr<SharedBuffer> buffer) diff --git a/WebKit/win/ProgIDMacros.h b/WebKit/win/ProgIDMacros.h index e29a895..ef9e26f 100644 --- a/WebKit/win/ProgIDMacros.h +++ b/WebKit/win/ProgIDMacros.h @@ -29,7 +29,7 @@ #define STRINGIFIED_VERSION(version) STRINGIFY(version) #define STRINGIFY(s) L###s -#define CURRENT_PROGID_VERSION 525 +#define CURRENT_PROGID_VERSION 526 #define VERSION_INDEPENDENT_PRODUCTION_PROGID(className) L##"WebKit." L###className #define VERSION_INDEPENDENT_OPENSOURCE_PROGID(className) L##"OpenSource" VERSION_INDEPENDENT_PRODUCTION_PROGID(className) #define VERSIONED_PROGID(versionIndependentProgID, version) versionIndependentProgID L##"." STRINGIFIED_VERSION(version) diff --git a/WebKit/win/WebActionPropertyBag.cpp b/WebKit/win/WebActionPropertyBag.cpp index 41f9ccc..5ebe4c1 100644 --- a/WebKit/win/WebActionPropertyBag.cpp +++ b/WebKit/win/WebActionPropertyBag.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,12 +25,12 @@ #include "config.h" #include "WebKitDLL.h" - -#include "IWebView.h" -#include "IWebPolicyDelegate.h" #include "WebActionPropertyBag.h" -#include "WebElementPropertyBag.h" + #include "COMPtr.h" +#include "DOMCoreClasses.h" +#include "WebElementPropertyBag.h" +#include "WebKit.h" #pragma warning(push, 0) #include <WebCore/BString.h> @@ -42,22 +42,27 @@ using namespace WebCore; // WebActionPropertyBag ------------------------------------------------ -WebActionPropertyBag::WebActionPropertyBag(const NavigationAction& action, Frame* frame) + +WebActionPropertyBag::WebActionPropertyBag(const NavigationAction& action, PassRefPtr<HTMLFormElement> form, PassRefPtr<Frame> frame) : m_refCount(0) - , m_action(action) + , m_action(action) + , m_form(form) , m_frame(frame) { + gClassCount++; + gClassNameCount.add("WebActionPropertyBag"); } WebActionPropertyBag::~WebActionPropertyBag() { + gClassCount--; + gClassNameCount.remove("WebActionPropertyBag"); } -WebActionPropertyBag* WebActionPropertyBag::createInstance(const NavigationAction& action, Frame* frame) +WebActionPropertyBag* WebActionPropertyBag::createInstance(const NavigationAction& action, PassRefPtr<HTMLFormElement> form, PassRefPtr<Frame> frame) { - WebActionPropertyBag* instance = new WebActionPropertyBag(action, frame); + WebActionPropertyBag* instance = new WebActionPropertyBag(action, form, frame); instance->AddRef(); - return instance; } @@ -77,12 +82,12 @@ HRESULT STDMETHODCALLTYPE WebActionPropertyBag::QueryInterface(REFIID riid, void return S_OK; } -ULONG STDMETHODCALLTYPE WebActionPropertyBag::AddRef(void) +ULONG STDMETHODCALLTYPE WebActionPropertyBag::AddRef() { return ++m_refCount; } -ULONG STDMETHODCALLTYPE WebActionPropertyBag::Release(void) +ULONG STDMETHODCALLTYPE WebActionPropertyBag::Release() { ULONG newRef = --m_refCount; if (!newRef) @@ -115,24 +120,28 @@ HRESULT STDMETHODCALLTYPE WebActionPropertyBag::Read(LPCOLESTR pszPropName, VARI V_VT(pVar) = VT_I4; V_I4(pVar) = m_action.type(); return S_OK; - } else if (isEqual(pszPropName, WebActionElementKey)) { + } + if (isEqual(pszPropName, WebActionElementKey)) { if (const MouseEvent* mouseEvent = findMouseEvent(m_action.event())) { IntPoint point(mouseEvent->clientX(), mouseEvent->clientY()); V_VT(pVar) = VT_UNKNOWN; V_UNKNOWN(pVar) = WebElementPropertyBag::createInstance(m_frame->eventHandler()->hitTestResultAtPoint(point, false)); return S_OK; } - } else if (isEqual(pszPropName, WebActionButtonKey)) { + } + if (isEqual(pszPropName, WebActionButtonKey)) { if (const MouseEvent* mouseEvent = findMouseEvent(m_action.event())) { V_VT(pVar) = VT_I4; V_I4(pVar) = mouseEvent->button(); return S_OK; } - } else if (isEqual(pszPropName, WebActionOriginalURLKey)) { + } + if (isEqual(pszPropName, WebActionOriginalURLKey)) { V_VT(pVar) = VT_BSTR; V_BSTR(pVar) = BString(m_action.url().string()).release(); return S_OK; - } else if (isEqual(pszPropName, WebActionModifierFlagsKey)) { + } + if (isEqual(pszPropName, WebActionModifierFlagsKey)) { if (const UIEventWithKeyState* keyEvent = findEventWithKeyState(const_cast<Event*>(m_action.event()))) { int modifiers = 0; @@ -148,6 +157,12 @@ HRESULT STDMETHODCALLTYPE WebActionPropertyBag::Read(LPCOLESTR pszPropName, VARI return S_OK; } } + if (isEqual(pszPropName, WebActionFormKey)) { + IDOMNode* form = DOMNode::createInstance(m_form.get()); + V_VT(pVar) = VT_UNKNOWN; + V_UNKNOWN(pVar) = form; + return S_OK; + } return E_INVALIDARG; } @@ -155,6 +170,6 @@ HRESULT STDMETHODCALLTYPE WebActionPropertyBag::Write(LPCOLESTR pszPropName, VAR { if (!pszPropName || !pVar) return E_POINTER; - VariantClear(pVar); + return E_FAIL; } diff --git a/WebKit/win/WebActionPropertyBag.h b/WebKit/win/WebActionPropertyBag.h index 3c2f19e..56f8f52 100644 --- a/WebKit/win/WebActionPropertyBag.h +++ b/WebKit/win/WebActionPropertyBag.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,27 +27,26 @@ #define WebActionPropertyBag_h #include "ocidl.h" -#include <WTF/OwnPtr.h> #pragma warning(push, 0) #include <WebCore/Frame.h> +#include <WebCore/HTMLFormElement.h> #include <WebCore/NavigationAction.h> #pragma warning(pop) -class WebActionPropertyBag : public IPropertyBag -{ +class WebActionPropertyBag : public IPropertyBag { public: - static WebActionPropertyBag* createInstance(const WebCore::NavigationAction&, WebCore::Frame*); + static WebActionPropertyBag* createInstance(const WebCore::NavigationAction&, PassRefPtr<WebCore::HTMLFormElement>, PassRefPtr<WebCore::Frame>); -protected: - WebActionPropertyBag(const WebCore::NavigationAction&, WebCore::Frame*); +private: + WebActionPropertyBag(const WebCore::NavigationAction&, PassRefPtr<WebCore::HTMLFormElement>, PassRefPtr<WebCore::Frame>); ~WebActionPropertyBag(); public: // IUnknown - virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); - virtual ULONG STDMETHODCALLTYPE AddRef(void); - virtual ULONG STDMETHODCALLTYPE Release(void); + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void** ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE Release(); // IPropertyBag virtual /* [local] */ HRESULT STDMETHODCALLTYPE Read( @@ -62,7 +61,8 @@ public: private: ULONG m_refCount; WebCore::NavigationAction m_action; + RefPtr<WebCore::HTMLFormElement> m_form; RefPtr<WebCore::Frame> m_frame; }; -#endif
\ No newline at end of file +#endif diff --git a/WebKit/win/WebArchive.cpp b/WebKit/win/WebArchive.cpp new file mode 100644 index 0000000..21b860c --- /dev/null +++ b/WebKit/win/WebArchive.cpp @@ -0,0 +1,156 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebKitDLL.h" +#include "WebArchive.h" + +#include "DOMCoreClasses.h" +#include "MemoryStream.h" +#include <WebCore/LegacyWebArchive.h> + +using namespace WebCore; + +// WebArchive ---------------------------------------------------------------- + +WebArchive* WebArchive::createInstance() +{ + WebArchive* instance = new WebArchive(0); + instance->AddRef(); + return instance; +} + +WebArchive* WebArchive::createInstance(PassRefPtr<LegacyWebArchive> coreArchive) +{ + WebArchive* instance = new WebArchive(coreArchive); + + instance->AddRef(); + return instance; +} + +WebArchive::WebArchive(PassRefPtr<LegacyWebArchive> coreArchive) + : m_refCount(0) + , m_archive(coreArchive) +{ + gClassCount++; + gClassNameCount.add("WebArchive"); +} + +WebArchive::~WebArchive() +{ + gClassCount--; + gClassNameCount.remove("WebArchive"); +} + +HRESULT STDMETHODCALLTYPE WebArchive::QueryInterface(REFIID riid, void** ppvObject) +{ + *ppvObject = 0; + if (IsEqualGUID(riid, IID_IUnknown)) + *ppvObject = static_cast<IWebArchive*>(this); + else if (IsEqualGUID(riid, __uuidof(IWebArchive))) + *ppvObject = static_cast<IWebArchive*>(this); + else + return E_NOINTERFACE; + + AddRef(); + return S_OK; +} + +ULONG STDMETHODCALLTYPE WebArchive::AddRef() +{ + return ++m_refCount; +} + +ULONG STDMETHODCALLTYPE WebArchive::Release() +{ + ULONG newRef = --m_refCount; + if (!newRef) + delete(this); + + return newRef; +} + +HRESULT STDMETHODCALLTYPE WebArchive::initWithMainResource( + /* [in] */ IWebResource*, + /* [in, size_is(cSubResources)] */ IWebResource**, + /* [in] */ int, + /* in, size_is(cSubFrameArchives)] */ IWebArchive**, + /* [in] */ int) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE WebArchive::initWithData( + /* [in] */ IStream*) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE WebArchive::initWithNode( + /* [in] */ IDOMNode* node) +{ + if (!node) + return E_POINTER; + + COMPtr<DOMNode> domNode(Query, node); + if (!domNode) + return E_NOINTERFACE; + + m_archive = LegacyWebArchive::create(domNode->node()); + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebArchive::mainResource( + /* [out, retval] */ IWebResource**) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE WebArchive::subResources( + /* [out, retval] */ IEnumVARIANT**) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE WebArchive::subframeArchives( + /* [out, retval] */ IEnumVARIANT**) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE WebArchive::data( + /* [out, retval] */ IStream** stream) +{ + RetainPtr<CFDataRef> cfData = m_archive->rawDataRepresentation(); + if (!cfData) + return E_FAIL; + + RefPtr<SharedBuffer> buffer = SharedBuffer::create(CFDataGetBytePtr(cfData.get()), CFDataGetLength(cfData.get())); + + *stream = MemoryStream::createInstance(buffer); + + return S_OK; +} diff --git a/WebKit/win/WebArchive.h b/WebKit/win/WebArchive.h new file mode 100644 index 0000000..8e60761 --- /dev/null +++ b/WebKit/win/WebArchive.h @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebArchive_h +#define WebArchive_h + +#include "WebKit.h" + +#include <wtf/PassRefPtr.h> +#include <wtf/RefPtr.h> + +namespace WebCore { + class LegacyWebArchive; +} + +class WebArchive : public IWebArchive +{ +public: + static WebArchive* createInstance(); + static WebArchive* createInstance(PassRefPtr<WebCore::LegacyWebArchive>); +protected: + WebArchive(PassRefPtr<WebCore::LegacyWebArchive>); + ~WebArchive(); + +public: + // IUnknown + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE Release(); + + // IWebArchive + virtual HRESULT STDMETHODCALLTYPE initWithMainResource( + /* [in] */ IWebResource* mainResource, + /* [in, size_is(cSubResources)] */ IWebResource** subResources, + /* [in] */ int cSubResources, + /* in, size_is(cSubFrameArchives)] */ IWebArchive** subFrameArchives, + /* [in] */ int cSubFrameArchives); + + virtual HRESULT STDMETHODCALLTYPE initWithData( + /* [in] */ IStream*); + + virtual HRESULT STDMETHODCALLTYPE initWithNode( + /* [in] */ IDOMNode*); + + virtual HRESULT STDMETHODCALLTYPE mainResource( + /* [out, retval] */ IWebResource**); + + virtual HRESULT STDMETHODCALLTYPE subResources( + /* [out, retval] */ IEnumVARIANT**); + + virtual HRESULT STDMETHODCALLTYPE subframeArchives( + /* [out, retval] */ IEnumVARIANT**); + + virtual HRESULT STDMETHODCALLTYPE data( + /* [out, retval] */ IStream**); + +protected: + ULONG m_refCount; + RefPtr<WebCore::LegacyWebArchive> m_archive; +}; + +#endif // WebArchive_h diff --git a/WebKit/win/WebBackForwardList.cpp b/WebKit/win/WebBackForwardList.cpp index 3c08b9a..e8c2930 100644 --- a/WebKit/win/WebBackForwardList.cpp +++ b/WebKit/win/WebBackForwardList.cpp @@ -54,6 +54,7 @@ WebBackForwardList::WebBackForwardList(PassRefPtr<BackForwardList> backForwardLi backForwardListWrappers().set(m_backForwardList.get(), this); gClassCount++; + gClassNameCount.add("WebBackForwardList"); } WebBackForwardList::~WebBackForwardList() @@ -64,6 +65,7 @@ WebBackForwardList::~WebBackForwardList() backForwardListWrappers().remove(m_backForwardList.get()); gClassCount--; + gClassNameCount.remove("WebBackForwardList"); } WebBackForwardList* WebBackForwardList::createInstance(PassRefPtr<BackForwardList> backForwardList) diff --git a/WebKit/win/WebBackForwardList.h b/WebKit/win/WebBackForwardList.h index 0ac24c8..9375193 100644 --- a/WebKit/win/WebBackForwardList.h +++ b/WebKit/win/WebBackForwardList.h @@ -26,8 +26,7 @@ #ifndef WebBackForwardList_H #define WebBackForwardList_H -#include "IWebBackForwardList.h" -#include "IWebBackForwardListPrivate.h" +#include "WebKit.h" #include "WebHistoryItem.h" diff --git a/WebKit/win/WebCache.cpp b/WebKit/win/WebCache.cpp index f974e23..2e5c2e9 100644 --- a/WebKit/win/WebCache.cpp +++ b/WebKit/win/WebCache.cpp @@ -39,11 +39,13 @@ WebCache::WebCache() : m_refCount(0) { gClassCount++; + gClassNameCount.add("WebCache"); } WebCache::~WebCache() { gClassCount--; + gClassNameCount.remove("WebCache"); } WebCache* WebCache::createInstance() @@ -89,10 +91,10 @@ HRESULT STDMETHODCALLTYPE WebCache::statistics( /* [in][out] */ int* count, /* [retval][out] */ IPropertyBag ** s) { - if (!count || (s && *count < 2)) + if (!count || (s && *count < 4)) return E_FAIL; - *count = 2; + *count = 4; if (!s) return S_OK; @@ -100,10 +102,14 @@ HRESULT STDMETHODCALLTYPE WebCache::statistics( static CFStringRef imagesKey = CFSTR("images"); static CFStringRef stylesheetsKey = CFSTR("style sheets"); + static CFStringRef xslKey = CFSTR("xsl"); static CFStringRef scriptsKey = CFSTR("scripts"); +#if !ENABLE(XSLT) + const int zero = 0; +#endif RetainPtr<CFMutableDictionaryRef> dictionary(AdoptCF, - CFDictionaryCreateMutable(0, 0, 0, &kCFTypeDictionaryValueCallBacks)); + CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); RetainPtr<CFNumberRef> value(AdoptCF, CFNumberCreate(0, kCFNumberIntType, &stat.images.count)); CFDictionaryAddValue(dictionary.get(), imagesKey, value.get()); @@ -111,6 +117,13 @@ HRESULT STDMETHODCALLTYPE WebCache::statistics( value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.cssStyleSheets.count)); CFDictionaryAddValue(dictionary.get(), stylesheetsKey, value.get()); +#if ENABLE(XSLT) + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.xslStyleSheets.count)); +#else + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &zero)); +#endif + CFDictionaryAddValue(dictionary.get(), xslKey, value.get()); + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.scripts.count)); CFDictionaryAddValue(dictionary.get(), scriptsKey, value.get()); @@ -118,7 +131,7 @@ HRESULT STDMETHODCALLTYPE WebCache::statistics( propBag->setDictionary(dictionary.get()); s[0] = propBag; - dictionary.adoptCF(CFDictionaryCreateMutable(0, 0, 0, &kCFTypeDictionaryValueCallBacks)); + dictionary.adoptCF(CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.images.size)); CFDictionaryAddValue(dictionary.get(), imagesKey, value.get()); @@ -126,6 +139,13 @@ HRESULT STDMETHODCALLTYPE WebCache::statistics( value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.cssStyleSheets.size)); CFDictionaryAddValue(dictionary.get(), stylesheetsKey, value.get()); +#if ENABLE(XSLT) + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.xslStyleSheets.size)); +#else + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &zero)); +#endif + CFDictionaryAddValue(dictionary.get(), xslKey, value.get()); + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.scripts.size)); CFDictionaryAddValue(dictionary.get(), scriptsKey, value.get()); @@ -133,6 +153,50 @@ HRESULT STDMETHODCALLTYPE WebCache::statistics( propBag->setDictionary(dictionary.get()); s[1] = propBag; + dictionary.adoptCF(CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); + + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.images.liveSize)); + CFDictionaryAddValue(dictionary.get(), imagesKey, value.get()); + + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.cssStyleSheets.liveSize)); + CFDictionaryAddValue(dictionary.get(), stylesheetsKey, value.get()); + +#if ENABLE(XSLT) + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.xslStyleSheets.liveSize)); +#else + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &zero)); +#endif + CFDictionaryAddValue(dictionary.get(), xslKey, value.get()); + + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.scripts.liveSize)); + CFDictionaryAddValue(dictionary.get(), scriptsKey, value.get()); + + propBag = CFDictionaryPropertyBag::createInstance(); + propBag->setDictionary(dictionary.get()); + s[2] = propBag; + + dictionary.adoptCF(CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); + + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.images.decodedSize)); + CFDictionaryAddValue(dictionary.get(), imagesKey, value.get()); + + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.cssStyleSheets.decodedSize)); + CFDictionaryAddValue(dictionary.get(), stylesheetsKey, value.get()); + +#if ENABLE(XSLT) + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.xslStyleSheets.decodedSize)); +#else + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &zero)); +#endif + CFDictionaryAddValue(dictionary.get(), xslKey, value.get()); + + value.adoptCF(CFNumberCreate(0, kCFNumberIntType, &stat.scripts.decodedSize)); + CFDictionaryAddValue(dictionary.get(), scriptsKey, value.get()); + + propBag = CFDictionaryPropertyBag::createInstance(); + propBag->setDictionary(dictionary.get()); + s[3] = propBag; + return S_OK; } diff --git a/WebKit/win/WebCache.h b/WebKit/win/WebCache.h index d8be7e6..89575cf 100644 --- a/WebKit/win/WebCache.h +++ b/WebKit/win/WebCache.h @@ -26,7 +26,7 @@ #ifndef WebCache_H #define WebCache_H -#include "IWebCache.h" +#include "WebKit.h" class WebCache : public IWebCache { diff --git a/WebKit/win/WebCookieManager.cpp b/WebKit/win/WebCookieManager.cpp new file mode 100644 index 0000000..db51fd1 --- /dev/null +++ b/WebKit/win/WebCookieManager.cpp @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebKitDLL.h" +#include "WebCookieManager.h" + +#include <CFNetwork/CFHTTPCookiesPriv.h> +#include <WebCore/CookieStorageWin.h> + +using namespace WebCore; + +// WebCookieManager ------------------------------------------------------- + +WebCookieManager* WebCookieManager::createInstance() +{ + WebCookieManager* manager = new WebCookieManager; + manager->AddRef(); + return manager; +} + +WebCookieManager::WebCookieManager() + : m_refCount(0) +{ + gClassCount++; + gClassNameCount.add("WebCookieManager"); +} + +WebCookieManager::~WebCookieManager() +{ + gClassCount--; + gClassNameCount.remove("WebCookieManager"); +} + +// IUnknown --------------------------------------------------------------- + +HRESULT STDMETHODCALLTYPE WebCookieManager::QueryInterface(REFIID riid, void** ppvObject) +{ + *ppvObject = 0; + if (IsEqualGUID(riid, IID_IUnknown)) + *ppvObject = static_cast<WebCookieManager*>(this); + else if (IsEqualGUID(riid, __uuidof(IWebCookieManager))) + *ppvObject = static_cast<IWebCookieManager*>(this); + else + return E_NOINTERFACE; + + AddRef(); + return S_OK; +} + +ULONG STDMETHODCALLTYPE WebCookieManager::AddRef() +{ + return ++m_refCount; +} + +ULONG STDMETHODCALLTYPE WebCookieManager::Release() +{ + ULONG newRef = --m_refCount; + if (!newRef) + delete this; + + return newRef; +} + +// IWebCookieManager ------------------------------------------------------- + +HRESULT STDMETHODCALLTYPE WebCookieManager::cookieStorage( + /* [retval][out] */ CFHTTPCookieStorageRef* storage) +{ + if (!storage) + return E_POINTER; + + *storage = currentCookieStorage(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCookieManager::setCookieStorage( + /* [in] */ CFHTTPCookieStorageRef storage) +{ + setCurrentCookieStorage(storage); + return S_OK; +} diff --git a/WebKit/win/WebCookieManager.h b/WebKit/win/WebCookieManager.h new file mode 100644 index 0000000..0dc66e4 --- /dev/null +++ b/WebKit/win/WebCookieManager.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebCookieManager_h +#define WebCookieManager_h + +#include "WebKit.h" + +typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef; + +class WebCookieManager : public IWebCookieManager { +public: + static WebCookieManager* createInstance(); + + // IUnknown + virtual HRESULT STDMETHODCALLTYPE QueryInterface( + /* [in] */ REFIID riid, + /* [iid_is][out] */ void** ppvObject); + + virtual ULONG STDMETHODCALLTYPE AddRef(); + + virtual ULONG STDMETHODCALLTYPE Release(); + + // IWebCookieManager + virtual /* [local] */ HRESULT STDMETHODCALLTYPE cookieStorage( + /* [retval][out] */ CFHTTPCookieStorageRef* storage); + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE setCookieStorage( + /* [in] */ CFHTTPCookieStorageRef storage); + +private: + WebCookieManager(); + ~WebCookieManager(); + + ULONG m_refCount; +}; + +#endif diff --git a/WebKit/win/WebCoreLocalizedStrings.cpp b/WebKit/win/WebCoreLocalizedStrings.cpp index 0447e5b..f754a47 100644 --- a/WebKit/win/WebCoreLocalizedStrings.cpp +++ b/WebKit/win/WebCoreLocalizedStrings.cpp @@ -25,8 +25,10 @@ #include "config.h" #include "WebLocalizableStrings.h" +#include <WebCore/IntSize.h> #include <WebCore/LocalizedStrings.h> #include <WebCore/PlatformString.h> +#include <wtf/RetainPtr.h> using namespace WebCore; @@ -80,6 +82,32 @@ String WebCore::AXLinkText() { return String(LPCTSTR_UI_STRING("link", "accessib String WebCore::AXListMarkerText() { return String(LPCTSTR_UI_STRING("list marker", "accessibility role description for list marker")); } String WebCore::AXImageMapText() { return String(LPCTSTR_UI_STRING("image map", "accessibility role description for image map")); } String WebCore::AXHeadingText() { return String(LPCTSTR_UI_STRING("heading", "accessibility role description for headings")); } +String WebCore::AXDefinitionListTermText() { return String(LPCTSTR_UI_STRING("term", "term word of a definition")); } +String WebCore::AXDefinitionListDefinitionText() { return String(LPCTSTR_UI_STRING("definition", "definition phrase")); } +String WebCore::AXButtonActionVerb() { return String(LPCTSTR_UI_STRING("press", "Verb stating the action that will occur when a button is pressed, as used by accessibility")); } +String WebCore::AXRadioButtonActionVerb() { return String(LPCTSTR_UI_STRING("select", "Verb stating the action that will occur when a radio button is clicked, as used by accessibility")); } +String WebCore::AXTextFieldActionVerb() { return String(LPCTSTR_UI_STRING("activate", "Verb stating the action that will occur when a text field is selected, as used by accessibility")); } +String WebCore::AXCheckedCheckBoxActionVerb() { return String(LPCTSTR_UI_STRING("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility")); } +String WebCore::AXUncheckedCheckBoxActionVerb() { return String(LPCTSTR_UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility")); } +String WebCore::AXLinkActionVerb() { return String(LPCTSTR_UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility")); } String WebCore::unknownFileSizeText() { return String(LPCTSTR_UI_STRING("Unknown", "Unknown filesize FTP directory listing item")); } String WebCore::uploadFileText() { return String(LPCTSTR_UI_STRING("Upload file", "(Windows) Form submit file upload dialog title")); } String WebCore::allFilesText() { return String(LPCTSTR_UI_STRING("All Files", "(Windows) Form submit file upload all files pop-up")); } + +String WebCore::imageTitle(const String& filename, const IntSize& size) +{ + static RetainPtr<CFStringRef> format(AdoptCF, UI_STRING("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)")); + + RetainPtr<CFStringRef> filenameCF(AdoptCF, filename.createCFString()); + RetainPtr<CFStringRef> result(AdoptCF, CFStringCreateWithFormat(0, 0, format.get(), filenameCF.get(), size.width(), size.height())); + + return result.get(); +} + +String multipleFileUploadText(unsigned numberOfFiles) +{ + static RetainPtr<CFStringRef> format(AdoptCF, UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files")); + RetainPtr<CFStringRef> result(AdoptCF, CFStringCreateWithFormat(0, 0, format.get(), numberOfFiles)); + + return result.get(); +} diff --git a/WebKit/win/WebCoreStatistics.cpp b/WebKit/win/WebCoreStatistics.cpp new file mode 100644 index 0000000..ad5af7d --- /dev/null +++ b/WebKit/win/WebCoreStatistics.cpp @@ -0,0 +1,221 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebKitDLL.h" +#include "WebCoreStatistics.h" + +#include "COMPropertyBag.h" +#include <JavaScriptCore/JSLock.h> +#include <WebCore/FontCache.h> +#include <WebCore/GlyphPageTreeNode.h> +#include <WebCore/IconDatabase.h> +#include <WebCore/JSDOMWindow.h> + +using namespace JSC; +using namespace WebCore; + +// WebCoreStatistics --------------------------------------------------------------------------- + +WebCoreStatistics::WebCoreStatistics() +: m_refCount(0) +{ + gClassCount++; + gClassNameCount.add("WebCoreStatistics"); +} + +WebCoreStatistics::~WebCoreStatistics() +{ + gClassCount--; + gClassNameCount.remove("WebCoreStatistics"); +} + +WebCoreStatistics* WebCoreStatistics::createInstance() +{ + WebCoreStatistics* instance = new WebCoreStatistics(); + instance->AddRef(); + return instance; +} + +// IUnknown ------------------------------------------------------------------- + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::QueryInterface(REFIID riid, void** ppvObject) +{ + *ppvObject = 0; + if (IsEqualGUID(riid, IID_IUnknown)) + *ppvObject = static_cast<WebCoreStatistics*>(this); + else if (IsEqualGUID(riid, IID_IWebCoreStatistics)) + *ppvObject = static_cast<WebCoreStatistics*>(this); + else + return E_NOINTERFACE; + + AddRef(); + return S_OK; +} + +ULONG STDMETHODCALLTYPE WebCoreStatistics::AddRef(void) +{ + return ++m_refCount; +} + +ULONG STDMETHODCALLTYPE WebCoreStatistics::Release(void) +{ + ULONG newRef = --m_refCount; + if (!newRef) + delete(this); + + return newRef; +} + +// IWebCoreStatistics ------------------------------------------------------------------------------ + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptObjectsCount( + /* [retval][out] */ UINT* count) +{ + if (!count) + return E_POINTER; + + JSLock lock(false); + *count = (UINT)JSDOMWindow::commonJSGlobalData()->heap.size(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptGlobalObjectsCount( + /* [retval][out] */ UINT* count) +{ + if (!count) + return E_POINTER; + + JSLock lock(false); + *count = (UINT)JSDOMWindow::commonJSGlobalData()->heap.globalObjectCount(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptProtectedObjectsCount( + /* [retval][out] */ UINT* count) +{ + if (!count) + return E_POINTER; + + JSLock lock(false); + *count = (UINT)JSDOMWindow::commonJSGlobalData()->heap.protectedObjectCount(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptProtectedGlobalObjectsCount( + /* [retval][out] */ UINT* count) +{ + if (!count) + return E_POINTER; + + JSLock lock(false); + *count = (UINT)JSDOMWindow::commonJSGlobalData()->heap.protectedGlobalObjectCount(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptProtectedObjectTypeCounts( + /* [retval][out] */ IPropertyBag2** typeNamesAndCounts) +{ + JSLock lock(false); + OwnPtr<HashCountedSet<const char*> > jsObjectTypeNames(JSDOMWindow::commonJSGlobalData()->heap.protectedObjectTypeCounts()); + typedef HashCountedSet<const char*>::const_iterator Iterator; + Iterator end = jsObjectTypeNames->end(); + HashMap<String, int> typeCountMap; + for (Iterator current = jsObjectTypeNames->begin(); current != end; ++current) + typeCountMap.set(current->first, current->second); + + COMPtr<IPropertyBag2> results(AdoptCOM, COMPropertyBag<int>::createInstance(typeCountMap)); + results.copyRefTo(typeNamesAndCounts); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::iconPageURLMappingCount( + /* [retval][out] */ UINT* count) +{ + if (!count) + return E_POINTER; + *count = (UINT) iconDatabase()->pageURLMappingCount(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::iconRetainedPageURLCount( + /* [retval][out] */ UINT *count) +{ + if (!count) + return E_POINTER; + *count = (UINT) iconDatabase()->retainedPageURLCount(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::iconRecordCount( + /* [retval][out] */ UINT *count) +{ + if (!count) + return E_POINTER; + *count = (UINT) iconDatabase()->iconRecordCount(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::iconsWithDataCount( + /* [retval][out] */ UINT *count) +{ + if (!count) + return E_POINTER; + *count = (UINT) iconDatabase()->iconRecordCountWithData(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::cachedFontDataCount( + /* [retval][out] */ UINT *count) +{ + if (!count) + return E_POINTER; + *count = (UINT) FontCache::fontDataCount(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::cachedFontDataInactiveCount( + /* [retval][out] */ UINT *count) +{ + if (!count) + return E_POINTER; + *count = (UINT) FontCache::inactiveFontDataCount(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::purgeInactiveFontData(void) +{ + FontCache::purgeInactiveFontData(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebCoreStatistics::glyphPageCount( + /* [retval][out] */ UINT *count) +{ + if (!count) + return E_POINTER; + *count = (UINT) GlyphPageTreeNode::treeGlyphPageCount(); + return S_OK; +} diff --git a/WebKit/win/WebCoreStatistics.h b/WebKit/win/WebCoreStatistics.h new file mode 100644 index 0000000..1d9d96a --- /dev/null +++ b/WebKit/win/WebCoreStatistics.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebCoreStatistics_h +#define WebCoreStatistics_h + +#include "WebKit.h" + +class WebCoreStatistics : public IWebCoreStatistics { +public: + static WebCoreStatistics* createInstance(); +protected: + WebCoreStatistics(); + ~WebCoreStatistics(); + +public: + // IUnknown + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(void); + virtual ULONG STDMETHODCALLTYPE Release(void); + + // IWebCoreStatistics + virtual HRESULT STDMETHODCALLTYPE javaScriptObjectsCount( + /* [retval][out] */ UINT *count); + virtual HRESULT STDMETHODCALLTYPE javaScriptGlobalObjectsCount( + /* [retval][out] */ UINT *count); + virtual HRESULT STDMETHODCALLTYPE javaScriptProtectedObjectsCount( + /* [retval][out] */ UINT *count); + virtual HRESULT STDMETHODCALLTYPE javaScriptProtectedGlobalObjectsCount( + /* [retval][out] */ UINT *count); + virtual HRESULT STDMETHODCALLTYPE javaScriptProtectedObjectTypeCounts( + /* [retval][out] */ IPropertyBag2** typeNamesAndCounts); + virtual HRESULT STDMETHODCALLTYPE iconPageURLMappingCount( + /* [retval][out] */ UINT *count); + virtual HRESULT STDMETHODCALLTYPE iconRetainedPageURLCount( + /* [retval][out] */ UINT *count); + virtual HRESULT STDMETHODCALLTYPE iconRecordCount( + /* [retval][out] */ UINT *count); + virtual HRESULT STDMETHODCALLTYPE iconsWithDataCount( + /* [retval][out] */ UINT *count); + virtual HRESULT STDMETHODCALLTYPE cachedFontDataCount( + /* [retval][out] */ UINT *count); + virtual HRESULT STDMETHODCALLTYPE cachedFontDataInactiveCount( + /* [retval][out] */ UINT *count); + virtual HRESULT STDMETHODCALLTYPE purgeInactiveFontData(void); + virtual HRESULT STDMETHODCALLTYPE glyphPageCount( + /* [retval][out] */ UINT *count); + +protected: + ULONG m_refCount; +}; + +#endif diff --git a/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp b/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp new file mode 100644 index 0000000..b18022b --- /dev/null +++ b/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp @@ -0,0 +1,209 @@ +/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EmbeddedWidget.h"
+
+#include <WebCore/Document.h>
+#include <WebCore/Element.h>
+#include <WebCore/FrameView.h>
+#include <WebCore/RenderObject.h>
+
+using namespace WebCore;
+
+EmbeddedWidget* EmbeddedWidget::create(IWebEmbeddedView* view, Element* element, HWND parentWindow, const IntSize& size)
+{
+ EmbeddedWidget* widget = new EmbeddedWidget(view, element);
+
+ widget->createWindow(parentWindow, size);
+ return widget;
+}
+
+EmbeddedWidget::~EmbeddedWidget()
+{
+ if (m_window)
+ DestroyWindow(m_window);
+}
+
+bool EmbeddedWidget::createWindow(HWND parentWindow, const IntSize& size)
+{
+ ASSERT(!m_window);
+
+ HWND window;
+
+ SIZE pluginSize(size);
+
+ HRESULT hr = m_view->createViewWindow((OLE_HANDLE)parentWindow, &pluginSize, (OLE_HANDLE*)&window);
+
+ if (FAILED(hr) || !window)
+ return false;
+
+ m_window = window;
+ return true;
+}
+
+void EmbeddedWidget::invalidateRect(const IntRect& rect)
+{
+ if (!m_window)
+ return;
+
+ RECT r = rect;
+ ::InvalidateRect(m_window, &r, false);
+}
+
+void EmbeddedWidget::setFrameRect(const IntRect& rect)
+{
+ if (m_element->document()->printing())
+ return;
+
+ if (rect != frameRect())
+ Widget::setFrameRect(rect);
+
+ frameRectsChanged();
+}
+
+void EmbeddedWidget::frameRectsChanged() const
+{
+ if (!parent())
+ return;
+
+ ASSERT(parent()->isFrameView());
+ FrameView* frameView = static_cast<FrameView*>(parent());
+
+ IntRect oldWindowRect = m_windowRect;
+ IntRect oldClipRect = m_clipRect;
+
+ m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size());
+ m_clipRect = windowClipRect();
+ m_clipRect.move(-m_windowRect.x(), -m_windowRect.y());
+
+ if (!m_window)
+ return;
+
+ if (m_windowRect == oldWindowRect && m_clipRect == oldClipRect)
+ return;
+
+ HRGN rgn;
+
+ // To prevent flashes while scrolling, we disable drawing during the window
+ // update process by clipping the window to the zero rect.
+
+ bool clipToZeroRect = true;
+
+ if (clipToZeroRect) {
+ rgn = ::CreateRectRgn(0, 0, 0, 0);
+ ::SetWindowRgn(m_window, rgn, FALSE);
+ } else {
+ rgn = ::CreateRectRgn(m_clipRect.x(), m_clipRect.y(), m_clipRect.right(), m_clipRect.bottom());
+ ::SetWindowRgn(m_window, rgn, TRUE);
+ }
+
+ if (m_windowRect != oldWindowRect)
+ ::MoveWindow(m_window, m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height(), TRUE);
+
+ if (clipToZeroRect) {
+ rgn = ::CreateRectRgn(m_clipRect.x(), m_clipRect.y(), m_clipRect.right(), m_clipRect.bottom());
+ ::SetWindowRgn(m_window, rgn, TRUE);
+ }
+}
+
+void EmbeddedWidget::setFocus()
+{
+ if (m_window)
+ SetFocus(m_window);
+
+ Widget::setFocus();
+}
+
+void EmbeddedWidget::show()
+{
+ m_isVisible = true;
+
+ if (m_attachedToWindow && m_window)
+ ShowWindow(m_window, SW_SHOWNA);
+
+ Widget::show();
+}
+
+void EmbeddedWidget::hide()
+{
+ m_isVisible = false;
+
+ if (m_attachedToWindow && m_window)
+ ShowWindow(m_window, SW_HIDE);
+
+ Widget::hide();
+}
+
+IntRect EmbeddedWidget::windowClipRect() const
+{
+ // Start by clipping to our bounds.
+ IntRect clipRect(m_windowRect);
+
+ // Take our element and get the clip rect from the enclosing layer and frame view.
+ RenderLayer* layer = m_element->renderer()->enclosingLayer();
+ FrameView* parentView = m_element->document()->view();
+ clipRect.intersect(parentView->windowClipRectForLayer(layer, true));
+
+ return clipRect;
+}
+
+void EmbeddedWidget::setParent(ScrollView* parent)
+{
+ Widget::setParent(parent);
+
+ if (!m_window)
+ return;
+
+ if (parent)
+ return;
+
+ // If the embedded window or one of its children have the focus, we need to
+ // clear it to prevent the web view window from being focused because that can
+ // trigger a layout while the plugin element is being detached.
+ HWND focusedWindow = ::GetFocus();
+ if (m_window == focusedWindow || ::IsChild(m_window, focusedWindow))
+ ::SetFocus(0);
+}
+
+void EmbeddedWidget::attachToWindow()
+{
+ if (m_attachedToWindow)
+ return;
+
+ m_attachedToWindow = true;
+ if (m_isVisible && m_window)
+ ShowWindow(m_window, SW_SHOWNA);
+}
+
+void EmbeddedWidget::detachFromWindow()
+{
+ if (!m_attachedToWindow)
+ return;
+
+ if (m_isVisible && m_window)
+ ShowWindow(m_window, SW_HIDE);
+ m_attachedToWindow = false;
+}
diff --git a/WebKit/win/WebCoreSupport/EmbeddedWidget.h b/WebKit/win/WebCoreSupport/EmbeddedWidget.h new file mode 100644 index 0000000..ed7c025 --- /dev/null +++ b/WebKit/win/WebCoreSupport/EmbeddedWidget.h @@ -0,0 +1,80 @@ +/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EmbeddedWidget_h
+#define EmbeddedWidget_h
+
+#include <WebCore/COMPtr.h>
+#include <WebCore/IntRect.h>
+#include <WebCore/Widget.h>
+
+namespace WebCore {
+ class Element;
+ class IntSize;
+}
+
+interface IWebEmbeddedView;
+
+class EmbeddedWidget : public WebCore::Widget {
+public:
+ static EmbeddedWidget* create(IWebEmbeddedView*, WebCore::Element* element, HWND parentWindow, const WebCore::IntSize&);
+ ~EmbeddedWidget();
+
+private:
+ EmbeddedWidget(IWebEmbeddedView* view, WebCore::Element* element)
+ : m_view(view)
+ , m_element(element)
+ , m_window(0)
+ , m_isVisible(false)
+ , m_attachedToWindow(false)
+ {
+ }
+
+ bool createWindow(HWND parentWindow, const WebCore::IntSize& size);
+
+ virtual void invalidateRect(const WebCore::IntRect&);
+ virtual void setFrameRect(const WebCore::IntRect&);
+ virtual void frameRectsChanged() const;
+ virtual void setFocus();
+ virtual void show();
+ virtual void hide();
+ virtual WebCore::IntRect windowClipRect() const;
+ virtual void setParent(WebCore::ScrollView*);
+
+ virtual void attachToWindow();
+ virtual void detachFromWindow();
+
+ COMPtr<IWebEmbeddedView> m_view;
+ WebCore::Element* m_element;
+ HWND m_window;
+
+ bool m_isVisible;
+ bool m_attachedToWindow;
+
+ mutable WebCore::IntRect m_clipRect; // The clip rect to apply to an embedded view.
+ mutable WebCore::IntRect m_windowRect; // Our window rect.
+};
+
+#endif // EmbeddedWidget_h
diff --git a/WebKit/win/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp index 1df5716..dba87e5 100644 --- a/WebKit/win/WebChromeClient.cpp +++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,20 +28,31 @@ #include "WebElementPropertyBag.h" #include "WebFrame.h" +#include "WebHistory.h" #include "WebMutableURLRequest.h" #include "WebSecurityOrigin.h" #include "WebView.h" #pragma warning(push, 0) #include <WebCore/BString.h> #include <WebCore/ContextMenu.h> +#include <WebCore/FileChooser.h> #include <WebCore/FloatRect.h> #include <WebCore/FrameLoadRequest.h> #include <WebCore/FrameView.h> +#include <WebCore/LocalizedStrings.h> +#include <WebCore/Page.h> #include <WebCore/WindowFeatures.h> #pragma warning(pop) +#include <tchar.h> + using namespace WebCore; +// When you call GetOpenFileName, if the size of the buffer is too small, +// MSDN says that the first two bytes of the buffer contain the required size for the file selection, in bytes or characters +// So we can assume the required size can't be more than the maximum value for a short. +static const size_t maxFilePathsListSize = USHRT_MAX; + WebChromeClient::WebChromeClient(WebView* webView) : m_webView(webView) { @@ -98,6 +109,8 @@ void WebChromeClient::focus() uiDelegate->webViewFocus(m_webView); uiDelegate->Release(); } + // Normally this would happen on a timer, but JS might need to know this earlier, so we'll update here. + m_webView->updateActiveState(); } void WebChromeClient::unfocus() @@ -107,6 +120,8 @@ void WebChromeClient::unfocus() uiDelegate->webViewUnfocus(m_webView); uiDelegate->Release(); } + // Normally this would happen on a timer, but JS might need to know this earlier, so we'll update here. + m_webView->updateActiveState(); } bool WebChromeClient::canTakeFocus(FocusDirection direction) @@ -229,13 +244,8 @@ bool WebChromeClient::statusbarVisible() void WebChromeClient::setScrollbarsVisible(bool b) { WebFrame* webFrame = m_webView->topLevelFrame(); - if (webFrame) { + if (webFrame) webFrame->setAllowsScrolling(b); - FrameView* frameView = core(webFrame)->view(); - frameView->setHScrollbarMode(frameView->hScrollbarMode()); // I know this looks weird but the call to v/hScrollbarMode goes to ScrollView - frameView->setVScrollbarMode(frameView->vScrollbarMode()); // and the call to setV/hScrollbarMode goes to FrameView. - // This oddity is a result of matching a design in the mac code. - } } bool WebChromeClient::scrollbarsVisible() @@ -414,23 +424,54 @@ IntRect WebChromeClient::windowResizerRect() const return intRect; } -void WebChromeClient::addToDirtyRegion(const IntRect& dirtyRect) +void WebChromeClient::repaint(const IntRect& windowRect, bool contentChanged, bool immediate, bool repaintContentOnly) { - m_webView->addToDirtyRegion(dirtyRect); + ASSERT(core(m_webView->topLevelFrame())); + m_webView->repaint(windowRect, contentChanged, immediate, repaintContentOnly); } -void WebChromeClient::scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect) +void WebChromeClient::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect& clipRect) { ASSERT(core(m_webView->topLevelFrame())); - m_webView->scrollBackingStore(core(m_webView->topLevelFrame())->view(), dx, dy, scrollViewRect, clipRect); + m_webView->scrollBackingStore(core(m_webView->topLevelFrame())->view(), delta.width(), delta.height(), scrollViewRect, clipRect); } -void WebChromeClient::updateBackingStore() +IntRect WebChromeClient::windowToScreen(const IntRect& rect) const { - ASSERT(core(m_webView->topLevelFrame())); + HWND viewWindow; + if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow)))) + return rect; + + // Find the top left corner of the Widget's containing window in screen coords, + // and adjust the result rect's position by this amount. + POINT topLeft = {0, 0}; + IntRect result = rect; + ::ClientToScreen(viewWindow, &topLeft); + result.move(topLeft.x, topLeft.y); - m_webView->updateBackingStore(core(m_webView->topLevelFrame())->view(), 0, false); + return result; +} + +IntPoint WebChromeClient::screenToWindow(const IntPoint& point) const +{ + POINT result = point; + + HWND viewWindow; + if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow)))) + return point; + + ::ScreenToClient(viewWindow, &result); + + return result; +} + +PlatformWidget WebChromeClient::platformWindow() const +{ + HWND viewWindow; + if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow)))) + return 0; + return viewWindow; } void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& result, unsigned modifierFlags) @@ -467,9 +508,184 @@ void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& database COMPtr<IWebUIDelegatePrivate3> uiDelegatePrivate3(Query, uiDelegate); if (uiDelegatePrivate3) uiDelegatePrivate3->exceededDatabaseQuota(m_webView, kit(frame), origin.get(), BString(databaseIdentifier)); + else { + // FIXME: remove this workaround once shipping Safari has the necessary delegate implemented. + TCHAR path[MAX_PATH]; + HMODULE safariHandle = GetModuleHandle(TEXT("Safari.exe")); + if (!safariHandle) + return; + GetModuleFileName(safariHandle, path, ARRAYSIZE(path)); + DWORD handle; + DWORD versionSize = GetFileVersionInfoSize(path, &handle); + if (!versionSize) + return; + Vector<char> data(versionSize); + if (!GetFileVersionInfo(path, 0, versionSize, data.data())) + return; + + LPCTSTR productVersion; + UINT productVersionLength; + if (!VerQueryValue(data.data(), TEXT("\\StringFileInfo\\040904b0\\ProductVersion"), (void**)&productVersion, &productVersionLength)) + return; + if (_tcsncmp(TEXT("3.1"), productVersion, productVersionLength) > 0) { + const unsigned long long defaultQuota = 5 * 1024 * 1024; // 5 megabytes should hopefully be enough to test storage support. + origin->setQuota(defaultQuota); + } + } } } +void WebChromeClient::populateVisitedLinks() +{ + WebHistory* history = WebHistory::sharedHistory(); + if (!history) + return; + history->addVisitedLinksToPageGroup(m_webView->page()->group()); +} + +bool WebChromeClient::paintCustomScrollbar(GraphicsContext* context, const FloatRect& rect, ScrollbarControlSize size, + ScrollbarControlState state, ScrollbarPart pressedPart, bool vertical, + float value, float proportion, ScrollbarControlPartMask parts) +{ + if (context->paintingDisabled()) + return false; + + COMPtr<IWebUIDelegate4> delegate = uiDelegate4(); + if (!delegate) + return false; + + WebScrollbarControlPartMask webParts = WebNoScrollPart; + if (parts & BackButtonStartPart) // FIXME: Hyatt, what about BackButtonEndPart? + webParts |= WebBackButtonPart; + if (parts & BackTrackPart) + webParts |= WebBackTrackPart; + if (parts & ThumbPart) + webParts |= WebThumbPart; + if (parts & ForwardTrackPart) + webParts |= WebForwardTrackPart; + if (parts & ForwardButtonStartPart) // FIXME: Hyatt, what about ForwardButtonEndPart? + webParts |= WebForwardButtonPart; + + WebScrollbarControlPart webPressedPart = WebNoScrollPart; + switch (pressedPart) { + case BackButtonStartPart: // FIXME: Hyatt, what about BackButtonEndPart? + webPressedPart = WebBackButtonPart; + break; + case BackTrackPart: + webPressedPart = WebBackTrackPart; + break; + case ThumbPart: + webPressedPart = WebThumbPart; + break; + case ForwardTrackPart: + webPressedPart = WebForwardTrackPart; + break; + case ForwardButtonStartPart: // FIXME: Hyatt, what about ForwardButtonEndPart? + webPressedPart = WebForwardButtonPart; + break; + default: + break; + } + + WebScrollBarControlSize webSize; + switch (size) { + case SmallScrollbar: + webSize = WebSmallScrollbar; + break; + case RegularScrollbar: + default: + webSize = WebRegularScrollbar; + } + WebScrollbarControlState webState = 0; + if (state & ActiveScrollbarState) + webState |= WebActiveScrollbarState; + if (state & EnabledScrollbarState) + webState |= WebEnabledScrollbarState; + if (state & PressedScrollbarState) + webState |= WebPressedScrollbarState; + + RECT webRect = enclosingIntRect(rect); + HDC hDC = context->getWindowsContext(webRect); + HRESULT hr = delegate->paintCustomScrollbar(m_webView, hDC, webRect, webSize, webState, webPressedPart, + vertical, value, proportion, webParts); + context->releaseWindowsContext(hDC, webRect); + return SUCCEEDED(hr); +} + +bool WebChromeClient::paintCustomScrollCorner(GraphicsContext* context, const FloatRect& rect) +{ + if (context->paintingDisabled()) + return false; + + COMPtr<IWebUIDelegate4> delegate = uiDelegate4(); + if (!delegate) + return false; + + RECT webRect = enclosingIntRect(rect); + HDC hDC = context->getWindowsContext(webRect); + HRESULT hr = delegate->paintCustomScrollCorner(m_webView, hDC, webRect); + context->releaseWindowsContext(hDC, webRect); + return SUCCEEDED(hr); +} + +void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser) +{ + RefPtr<FileChooser> fileChooser = prpFileChooser; + + HWND viewWindow; + if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow)))) + return; + + bool multiFile = fileChooser->allowsMultipleFiles(); + Vector<TCHAR> fileBuf(multiFile ? maxFilePathsListSize : MAX_PATH); + + OPENFILENAME ofn; + + memset(&ofn, 0, sizeof(ofn)); + + // Need to zero out the first char of fileBuf so GetOpenFileName doesn't think it's an initialization string + fileBuf[0] = '\0'; + + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = viewWindow; + String allFiles = allFilesText(); + allFiles.append(TEXT("\0*.*\0\0"), 6); + ofn.lpstrFilter = allFiles.charactersWithNullTermination(); + ofn.lpstrFile = fileBuf.data(); + ofn.nMaxFile = fileBuf.size(); + String dialogTitle = uploadFileText(); + ofn.lpstrTitle = dialogTitle.charactersWithNullTermination(); + ofn.Flags = OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_EXPLORER; + if (multiFile) + ofn.Flags = ofn.Flags | OFN_ALLOWMULTISELECT; + + if (GetOpenFileName(&ofn)) { + TCHAR* files = fileBuf.data(); + Vector<String> fileList; + String file(files); + if (multiFile) { + while (!file.isEmpty()) { + // When using the OFN_EXPLORER flag, the file list is null delimited. + // When you create a String from a ptr to this list, it will use strlen to look for the null character. + // Then we find the next file path string by using the length of the string we just created. + TCHAR* nextFilePtr = files + file.length() + 1; + String nextFile(nextFilePtr); + // If multiple files are selected, there will be a directory name first, which we don't want to add to the vector. + // We know a single file was selected if there is only one filename in the list. + // In that case, we don't want to skip adding the first (and only) name. + if (files != fileBuf.data() || nextFile.isEmpty()) + fileList.append(file); + files = nextFilePtr; + file = nextFile; + } + } else + fileList.append(file); + ASSERT(fileList.size()); + fileChooser->chooseFiles(fileList); + } + // FIXME: Show some sort of error if too many files are selected and the buffer is too small. For now, this will fail silently. +} + COMPtr<IWebUIDelegate> WebChromeClient::uiDelegate() { COMPtr<IWebUIDelegate> delegate; @@ -486,3 +702,8 @@ COMPtr<IWebUIDelegate3> WebChromeClient::uiDelegate3() { return COMPtr<IWebUIDelegate3>(Query, uiDelegate()); } + +COMPtr<IWebUIDelegate4> WebChromeClient::uiDelegate4() +{ + return COMPtr<IWebUIDelegate4>(Query, uiDelegate()); +} diff --git a/WebKit/win/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h index 6132475..83c5a70 100644 --- a/WebKit/win/WebChromeClient.h +++ b/WebKit/win/WebCoreSupport/WebChromeClient.h @@ -25,7 +25,9 @@ #include <WebCore/ChromeClient.h> #include <WebCore/COMPtr.h> +#include <WebCore/GraphicsContext.h> #include <WebCore/FocusDirection.h> +#include <WebCore/ScrollTypes.h> #include <wtf/Forward.h> class WebView; @@ -33,6 +35,7 @@ class WebView; interface IWebUIDelegate; interface IWebUIDelegate2; interface IWebUIDelegate3; +interface IWebUIDelegate4; class WebChromeClient : public WebCore::ChromeClient { public: @@ -88,9 +91,12 @@ public: virtual bool tabsToLinks() const; virtual WebCore::IntRect windowResizerRect() const; - virtual void addToDirtyRegion(const WebCore::IntRect&); - virtual void scrollBackingStore(int dx, int dy, const WebCore::IntRect& scrollViewRect, const WebCore::IntRect& clipRect); - virtual void updateBackingStore(); + + virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false); + virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect); + virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint& p) const; + virtual WebCore::IntRect windowToScreen(const WebCore::IntRect& r) const; + virtual PlatformWidget platformWindow() const; virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags); @@ -100,12 +106,22 @@ public: virtual void exceededDatabaseQuota(WebCore::Frame*, const WebCore::String&); - virtual WebView* webView() const { return m_webView; } + virtual void populateVisitedLinks(); + + virtual bool paintCustomScrollbar(WebCore::GraphicsContext*, const WebCore::FloatRect&, WebCore::ScrollbarControlSize, + WebCore::ScrollbarControlState, WebCore::ScrollbarPart pressedPart, bool vertical, + float value, float proportion, WebCore::ScrollbarControlPartMask); + virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::FloatRect&); + + virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); + + WebView* webView() const { return m_webView; } private: COMPtr<IWebUIDelegate> uiDelegate(); COMPtr<IWebUIDelegate2> uiDelegate2(); COMPtr<IWebUIDelegate3> uiDelegate3(); + COMPtr<IWebUIDelegate4> uiDelegate4(); WebView* m_webView; }; diff --git a/WebKit/win/WebContextMenuClient.cpp b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp index ec1b0af..be7b483 100644 --- a/WebKit/win/WebContextMenuClient.cpp +++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp @@ -151,16 +151,16 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame) { String searchString = frame->selectedText(); searchString.stripWhiteSpace(); - DeprecatedString encoded = KURL::encode_string(searchString.deprecatedString()); - encoded.replace(DeprecatedString("%20"), DeprecatedString("+")); + String encoded = encodeWithURLEscapeSequences(searchString); + encoded.replace("%20", "+"); String url("http://www.google.com/search?q="); - url.append(String(encoded)); + url.append(encoded); url.append("&ie=UTF-8&oe=UTF-8"); ResourceRequest request = ResourceRequest(url); if (Page* page = frame->page()) - page->mainFrame()->loader()->urlSelected(FrameLoadRequest(request), 0, false, true); + page->mainFrame()->loader()->urlSelected(FrameLoadRequest(request), 0, false); } void WebContextMenuClient::lookUpInDictionary(Frame*) diff --git a/WebKit/win/WebContextMenuClient.h b/WebKit/win/WebCoreSupport/WebContextMenuClient.h index a981f4e..a981f4e 100644 --- a/WebKit/win/WebContextMenuClient.h +++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.h diff --git a/WebKit/win/WebDragClient.cpp b/WebKit/win/WebCoreSupport/WebDragClient.cpp index 5a09529..c35991f 100644 --- a/WebKit/win/WebDragClient.cpp +++ b/WebKit/win/WebCoreSupport/WebDragClient.cpp @@ -160,7 +160,7 @@ void WebDragClient::startDrag(DragImageRef image, const IntPoint& imageOrigin, c static Font dragLabelFont(int size, bool bold) { FontDescription desc; - desc.setBold(bold); + desc.setWeight(bold ? FontWeightBold : FontWeightNormal); FontFamily family; family.setFamily("Lucida Grande"); desc.setFamily(family); diff --git a/WebKit/win/WebDragClient.h b/WebKit/win/WebCoreSupport/WebDragClient.h index f7ca139..f7ca139 100644 --- a/WebKit/win/WebDragClient.h +++ b/WebKit/win/WebCoreSupport/WebDragClient.h diff --git a/WebKit/win/WebEditorClient.cpp b/WebKit/win/WebCoreSupport/WebEditorClient.cpp index ba037f5..e38cd0d 100644 --- a/WebKit/win/WebEditorClient.cpp +++ b/WebKit/win/WebCoreSupport/WebEditorClient.cpp @@ -27,9 +27,7 @@ #include "WebKitDLL.h" #include "WebEditorClient.h" -#include "IWebEditingDelegate.h" -#include "IWebUndoTarget.h" -#include "IWebURLResponse.h" +#include "WebKit.h" #include "WebLocalizableStrings.h" #include "WebView.h" #include "DOMCoreClasses.h" @@ -251,7 +249,7 @@ bool WebEditorClient::shouldInsertNode(Node* /*node*/, Range* /*replacingRange*/ return true; } -bool WebEditorClient::shouldInsertText(String /*str*/, Range* /* replacingRange */, EditorInsertAction /*givenAction*/) +bool WebEditorClient::shouldInsertText(const String& /*str*/, Range* /* replacingRange */, EditorInsertAction /*givenAction*/) { notImplemented(); return true; diff --git a/WebKit/win/WebEditorClient.h b/WebKit/win/WebCoreSupport/WebEditorClient.h index e01707e..8c603f2 100644 --- a/WebKit/win/WebEditorClient.h +++ b/WebKit/win/WebCoreSupport/WebEditorClient.h @@ -26,7 +26,7 @@ #ifndef WebEditorClient_H #define WebEditorClient_H -#include "IWebEditingDelegate.h" +#include "WebKit.h" #pragma warning(push, 0) #include <WebCore/EditorClient.h> #include <wtf/OwnPtr.h> @@ -53,7 +53,7 @@ public: virtual bool shouldBeginEditing(WebCore::Range*); virtual bool shouldEndEditing(WebCore::Range*); - virtual bool shouldInsertText(WebCore::String, WebCore::Range*, WebCore::EditorInsertAction); + virtual bool shouldInsertText(const WebCore::String&, WebCore::Range*, WebCore::EditorInsertAction); virtual void didBeginEditing(); virtual void didEndEditing(); diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp new file mode 100644 index 0000000..17bee47 --- /dev/null +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp @@ -0,0 +1,706 @@ +/* + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebFrameLoaderClient.h" + +#include "CFDictionaryPropertyBag.h" +#include "COMPropertyBag.h" +#include "EmbeddedWidget.h" +#include "MarshallingHelpers.h" +#include "WebCachedPagePlatformData.h" +#include "WebChromeClient.h" +#include "WebDocumentLoader.h" +#include "WebError.h" +#include "WebFrame.h" +#include "WebHistory.h" +#include "WebMutableURLRequest.h" +#include "WebNotificationCenter.h" +#include "WebScriptDebugServer.h" +#include "WebURLAuthenticationChallenge.h" +#include "WebURLResponse.h" +#include "WebView.h" +#pragma warning(push, 0) +#include <WebCore/DocumentLoader.h> +#include <WebCore/FrameLoader.h> +#include <WebCore/FrameTree.h> +#include <WebCore/FrameView.h> +#include <WebCore/HTMLFrameElement.h> +#include <WebCore/HTMLFrameOwnerElement.h> +#include <WebCore/HTMLNames.h> +#include <WebCore/HistoryItem.h> +#include <WebCore/Page.h> +#include <WebCore/PluginPackage.h> +#include <WebCore/PluginView.h> +#include <WebCore/RenderPart.h> +#include <WebCore/ResourceHandle.h> +#pragma warning(pop) + +using namespace WebCore; +using namespace HTMLNames; + +static WebDataSource* getWebDataSource(DocumentLoader* loader) +{ + return loader ? static_cast<WebDocumentLoader*>(loader)->dataSource() : 0; +} + +WebFrameLoaderClient::WebFrameLoaderClient(WebFrame* webFrame) + : m_webFrame(webFrame) + , m_pluginView(0) + , m_hasSentResponseToPlugin(false) +{ + ASSERT_ARG(webFrame, webFrame); +} + +WebFrameLoaderClient::~WebFrameLoaderClient() +{ +} + +bool WebFrameLoaderClient::hasWebView() const +{ + return m_webFrame->webView(); +} + +void WebFrameLoaderClient::forceLayout() +{ + core(m_webFrame)->forceLayout(true); +} + +void WebFrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request) +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; + if (FAILED(webView->resourceLoadDelegate(&resourceLoadDelegate))) + return; + + COMPtr<WebMutableURLRequest> webURLRequest(AdoptCOM, WebMutableURLRequest::createInstance(request)); + resourceLoadDelegate->identifierForInitialRequest(webView, webURLRequest.get(), getWebDataSource(loader), identifier); +} + +void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge& challenge) +{ + ASSERT(challenge.sourceHandle()); + + WebView* webView = m_webFrame->webView(); + COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; + if (SUCCEEDED(webView->resourceLoadDelegate(&resourceLoadDelegate))) { + COMPtr<WebURLAuthenticationChallenge> webChallenge(AdoptCOM, WebURLAuthenticationChallenge::createInstance(challenge)); + if (SUCCEEDED(resourceLoadDelegate->didReceiveAuthenticationChallenge(webView, identifier, webChallenge.get(), getWebDataSource(loader)))) + return; + } + + // If the ResourceLoadDelegate doesn't exist or fails to handle the call, we tell the ResourceHandle + // to continue without credential - this is the best approximation of Mac behavior + challenge.sourceHandle()->receivedRequestToContinueWithoutCredential(challenge); +} + +void WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge& challenge) +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; + if (FAILED(webView->resourceLoadDelegate(&resourceLoadDelegate))) + return; + + COMPtr<WebURLAuthenticationChallenge> webChallenge(AdoptCOM, WebURLAuthenticationChallenge::createInstance(challenge)); + resourceLoadDelegate->didCancelAuthenticationChallenge(webView, identifier, webChallenge.get(), getWebDataSource(loader)); +} + +void WebFrameLoaderClient::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse) +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; + if (FAILED(webView->resourceLoadDelegate(&resourceLoadDelegate))) + return; + + COMPtr<WebMutableURLRequest> webURLRequest(AdoptCOM, WebMutableURLRequest::createInstance(request)); + COMPtr<WebURLResponse> webURLRedirectResponse(AdoptCOM, WebURLResponse::createInstance(redirectResponse)); + + COMPtr<IWebURLRequest> newWebURLRequest; + if (FAILED(resourceLoadDelegate->willSendRequest(webView, identifier, webURLRequest.get(), webURLRedirectResponse.get(), getWebDataSource(loader), &newWebURLRequest))) + return; + + if (webURLRequest == newWebURLRequest) + return; + + COMPtr<WebMutableURLRequest> newWebURLRequestImpl(Query, newWebURLRequest); + if (!newWebURLRequestImpl) + return; + + request = newWebURLRequestImpl->resourceRequest(); +} + +void WebFrameLoaderClient::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response) +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; + if (FAILED(webView->resourceLoadDelegate(&resourceLoadDelegate))) + return; + + COMPtr<WebURLResponse> webURLResponse(AdoptCOM, WebURLResponse::createInstance(response)); + resourceLoadDelegate->didReceiveResponse(webView, identifier, webURLResponse.get(), getWebDataSource(loader)); +} + +void WebFrameLoaderClient::dispatchDidReceiveContentLength(DocumentLoader* loader, unsigned long identifier, int length) +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; + if (FAILED(webView->resourceLoadDelegate(&resourceLoadDelegate))) + return; + + resourceLoadDelegate->didReceiveContentLength(webView, identifier, length, getWebDataSource(loader)); +} + +void WebFrameLoaderClient::dispatchDidFinishLoading(DocumentLoader* loader, unsigned long identifier) +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; + if (FAILED(webView->resourceLoadDelegate(&resourceLoadDelegate))) + return; + + resourceLoadDelegate->didFinishLoadingFromDataSource(webView, identifier, getWebDataSource(loader)); +} + +void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError& error) +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; + if (FAILED(webView->resourceLoadDelegate(&resourceLoadDelegate))) + return; + + COMPtr<WebError> webError(AdoptCOM, WebError::createInstance(error)); + resourceLoadDelegate->didFailLoadingWithError(webView, identifier, webError.get(), getWebDataSource(loader)); +} + +void WebFrameLoaderClient::dispatchDidHandleOnloadEvents() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegatePrivate> frameLoadDelegatePriv; + if (SUCCEEDED(webView->frameLoadDelegatePrivate(&frameLoadDelegatePriv)) && frameLoadDelegatePriv) + frameLoadDelegatePriv->didHandleOnloadEventsForFrame(webView, m_webFrame); +} + +void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; + if (SUCCEEDED(webView->frameLoadDelegate(&frameLoadDelegate))) + frameLoadDelegate->didReceiveServerRedirectForProvisionalLoadForFrame(webView, m_webFrame); +} + +void WebFrameLoaderClient::dispatchDidCancelClientRedirect() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; + if (SUCCEEDED(webView->frameLoadDelegate(&frameLoadDelegate))) + frameLoadDelegate->didCancelClientRedirectForFrame(webView, m_webFrame); +} + +void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url, double delay, double fireDate) +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; + if (SUCCEEDED(webView->frameLoadDelegate(&frameLoadDelegate))) + frameLoadDelegate->willPerformClientRedirectToURL(webView, BString(url.string()), delay, MarshallingHelpers::CFAbsoluteTimeToDATE(fireDate), m_webFrame); +} + +void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; + if (SUCCEEDED(webView->frameLoadDelegate(&frameLoadDelegate))) + frameLoadDelegate->didChangeLocationWithinPageForFrame(webView, m_webFrame); +} + +void WebFrameLoaderClient::dispatchWillClose() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; + if (SUCCEEDED(webView->frameLoadDelegate(&frameLoadDelegate))) + frameLoadDelegate->willCloseFrame(webView, m_webFrame); +} + +void WebFrameLoaderClient::dispatchDidReceiveIcon() +{ + m_webFrame->webView()->dispatchDidReceiveIconFromWebFrame(m_webFrame); +} + +void WebFrameLoaderClient::dispatchDidStartProvisionalLoad() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; + if (SUCCEEDED(webView->frameLoadDelegate(&frameLoadDelegate))) + frameLoadDelegate->didStartProvisionalLoadForFrame(webView, m_webFrame); +} + +void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title) +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; + if (SUCCEEDED(webView->frameLoadDelegate(&frameLoadDelegate))) + frameLoadDelegate->didReceiveTitle(webView, BString(title), m_webFrame); +} + +void WebFrameLoaderClient::dispatchDidCommitLoad() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; + if (SUCCEEDED(webView->frameLoadDelegate(&frameLoadDelegate))) + frameLoadDelegate->didCommitLoadForFrame(webView, m_webFrame); +} + +void WebFrameLoaderClient::dispatchDidFinishDocumentLoad() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegatePrivate> frameLoadDelegatePriv; + if (SUCCEEDED(webView->frameLoadDelegatePrivate(&frameLoadDelegatePriv)) && frameLoadDelegatePriv) + frameLoadDelegatePriv->didFinishDocumentLoadForFrame(webView, m_webFrame); +} + +void WebFrameLoaderClient::dispatchDidFinishLoad() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; + if (SUCCEEDED(webView->frameLoadDelegate(&frameLoadDelegate))) + frameLoadDelegate->didFinishLoadForFrame(webView, m_webFrame); +} + +void WebFrameLoaderClient::dispatchDidFirstLayout() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebFrameLoadDelegatePrivate> frameLoadDelegatePriv; + if (SUCCEEDED(webView->frameLoadDelegatePrivate(&frameLoadDelegatePriv)) && frameLoadDelegatePriv) + frameLoadDelegatePriv->didFirstLayoutInFrame(webView, m_webFrame); +} + +Frame* WebFrameLoaderClient::dispatchCreatePage() +{ + WebView* webView = m_webFrame->webView(); + + COMPtr<IWebUIDelegate> ui; + if (FAILED(webView->uiDelegate(&ui))) + return 0; + + COMPtr<IWebView> newWebView; + if (FAILED(ui->createWebViewWithRequest(webView, 0, &newWebView))) + return 0; + + COMPtr<IWebFrame> mainFrame; + if (FAILED(newWebView->mainFrame(&mainFrame))) + return 0; + + COMPtr<WebFrame> mainFrameImpl(Query, mainFrame); + return core(mainFrameImpl.get()); +} + +void WebFrameLoaderClient::dispatchShow() +{ + WebView* webView = m_webFrame->webView(); + COMPtr<IWebUIDelegate> ui; + if (SUCCEEDED(webView->uiDelegate(&ui))) + ui->webViewShow(webView); +} + +void WebFrameLoaderClient::dispatchDidLoadMainResource(DocumentLoader*) +{ +} + +void WebFrameLoaderClient::setMainDocumentError(DocumentLoader*, const ResourceError& error) +{ + if (!m_pluginView) + return; + + if (m_pluginView->status() == PluginStatusLoadedSuccessfully) + m_pluginView->didFail(error); + m_pluginView = 0; + m_hasSentResponseToPlugin = false; +} + +void WebFrameLoaderClient::postProgressStartedNotification() +{ + static BSTR progressStartedName = SysAllocString(WebViewProgressStartedNotification); + IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal(); + notifyCenter->postNotificationName(progressStartedName, static_cast<IWebView*>(m_webFrame->webView()), 0); +} + +void WebFrameLoaderClient::postProgressEstimateChangedNotification() +{ + static BSTR progressEstimateChangedName = SysAllocString(WebViewProgressEstimateChangedNotification); + IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal(); + notifyCenter->postNotificationName(progressEstimateChangedName, static_cast<IWebView*>(m_webFrame->webView()), 0); +} + +void WebFrameLoaderClient::postProgressFinishedNotification() +{ + static BSTR progressFinishedName = SysAllocString(WebViewProgressFinishedNotification); + IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal(); + notifyCenter->postNotificationName(progressFinishedName, static_cast<IWebView*>(m_webFrame->webView()), 0); +} + +void WebFrameLoaderClient::committedLoad(DocumentLoader* loader, const char* data, int length) +{ + // FIXME: This should probably go through the data source. + const String& textEncoding = loader->response().textEncodingName(); + + if (!m_pluginView) + receivedData(data, length, textEncoding); + + if (!m_pluginView || m_pluginView->status() != PluginStatusLoadedSuccessfully) + return; + + if (!m_hasSentResponseToPlugin) { + m_pluginView->didReceiveResponse(core(m_webFrame)->loader()->documentLoader()->response()); + // didReceiveResponse sets up a new stream to the plug-in. on a full-page plug-in, a failure in + // setting up this stream can cause the main document load to be cancelled, setting m_pluginView + // to null + if (!m_pluginView) + return; + m_hasSentResponseToPlugin = true; + } + m_pluginView->didReceiveData(data, length); +} + +void WebFrameLoaderClient::receivedData(const char* data, int length, const String& textEncoding) +{ + Frame* coreFrame = core(m_webFrame); + if (!coreFrame) + return; + + // Set the encoding. This only needs to be done once, but it's harmless to do it again later. + String encoding = coreFrame->loader()->documentLoader()->overrideEncoding(); + bool userChosen = !encoding.isNull(); + if (encoding.isNull()) + encoding = textEncoding; + coreFrame->loader()->setEncoding(encoding, userChosen); + + coreFrame->loader()->addData(data, length); +} + +void WebFrameLoaderClient::finishedLoading(DocumentLoader* loader) +{ + // Telling the frame we received some data and passing 0 as the data is our + // way to get work done that is normally done when the first bit of data is + // received, even for the case of a document with no data (like about:blank) + if (!m_pluginView) { + committedLoad(loader, 0, 0); + return; + } + + if (m_pluginView->status() == PluginStatusLoadedSuccessfully) + m_pluginView->didFinishLoading(); + m_pluginView = 0; + m_hasSentResponseToPlugin = false; +} + +void WebFrameLoaderClient::updateGlobalHistory(const KURL& url) +{ + WebHistory* history = WebHistory::sharedHistory(); + if (!history) + return; + history->addItem(url, core(m_webFrame)->loader()->documentLoader()->title()); +} + +bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem*) const +{ + return true; +} + +PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData) +{ + RefPtr<WebDocumentLoader> loader = WebDocumentLoader::create(request, substituteData); + + COMPtr<WebDataSource> dataSource(AdoptCOM, WebDataSource::createInstance(loader.get())); + + loader->setDataSource(dataSource.get()); + return loader.release(); +} + +void WebFrameLoaderClient::setTitle(const String& title, const KURL& url) +{ + BOOL privateBrowsingEnabled = FALSE; + COMPtr<IWebPreferences> preferences; + if (SUCCEEDED(m_webFrame->webView()->preferences(&preferences))) + preferences->privateBrowsingEnabled(&privateBrowsingEnabled); + if (privateBrowsingEnabled) + return; + + // update title in global history + COMPtr<WebHistory> history = webHistory(); + if (!history) + return; + + COMPtr<IWebHistoryItem> item; + if (FAILED(history->itemForURL(BString(url.string()), &item))) + return; + + COMPtr<IWebHistoryItemPrivate> itemPrivate(Query, item); + if (!itemPrivate) + return; + + itemPrivate->setTitle(BString(title)); +} + +void WebFrameLoaderClient::savePlatformDataToCachedPage(CachedPage* cachedPage) +{ + Frame* coreFrame = core(m_webFrame); + if (!coreFrame) + return; + + ASSERT(coreFrame->loader()->documentLoader() == cachedPage->documentLoader()); + + WebCachedPagePlatformData* webPlatformData = new WebCachedPagePlatformData(static_cast<IWebDataSource*>(getWebDataSource(coreFrame->loader()->documentLoader()))); + cachedPage->setCachedPagePlatformData(webPlatformData); +} + +void WebFrameLoaderClient::transitionToCommittedForNewPage() +{ + Frame* frame = core(m_webFrame); + ASSERT(frame); + + Page* page = frame->page(); + ASSERT(page); + + bool isMainFrame = frame == page->mainFrame(); + + if (isMainFrame && frame->view()) + frame->view()->setParentVisible(false); + + frame->setView(0); + + WebView* webView = m_webFrame->webView(); + + FrameView* frameView; + if (isMainFrame) { + RECT rect; + webView->frameRect(&rect); + frameView = new FrameView(frame, IntRect(rect).size()); + } else + frameView = new FrameView(frame); + + frame->setView(frameView); + frameView->deref(); // FrameViews are created with a ref count of 1. Release this ref since we've assigned it to frame. + + m_webFrame->updateBackground(); + + if (isMainFrame) + frameView->setParentVisible(true); + + if (frame->ownerRenderer()) + frame->ownerRenderer()->setWidget(frameView); + + if (HTMLFrameOwnerElement* owner = frame->ownerElement()) + frame->view()->setCanHaveScrollbars(owner->scrollingMode() != ScrollbarAlwaysOff); +} + +bool WebFrameLoaderClient::canCachePage() const +{ + return true; +} + +PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, + const String& referrer, bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/) +{ + RefPtr<Frame> result = createFrame(url, name, ownerElement, referrer); + if (!result) + return 0; + return result.release(); +} + +PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& URL, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer) +{ + Frame* coreFrame = core(m_webFrame); + ASSERT(coreFrame); + + COMPtr<WebFrame> webFrame(AdoptCOM, WebFrame::createInstance()); + + RefPtr<Frame> childFrame = webFrame->init(m_webFrame->webView(), coreFrame->page(), ownerElement); + + coreFrame->tree()->appendChild(childFrame); + childFrame->tree()->setName(name); + childFrame->init(); + + loadURLIntoChild(URL, referrer, webFrame.get()); + + // The frame's onload handler may have removed it from the document. + if (!childFrame->tree()->parent()) + return 0; + + return childFrame.release(); +} + +void WebFrameLoaderClient::loadURLIntoChild(const KURL& originalURL, const String& referrer, WebFrame* childFrame) +{ + ASSERT(childFrame); + ASSERT(core(childFrame)); + + Frame* coreFrame = core(m_webFrame); + ASSERT(coreFrame); + + HistoryItem* parentItem = coreFrame->loader()->currentHistoryItem(); + FrameLoadType loadType = coreFrame->loader()->loadType(); + FrameLoadType childLoadType = FrameLoadTypeRedirectWithLockedHistory; + + KURL url = originalURL; + + // If we're moving in the backforward list, we might want to replace the content + // of this child frame with whatever was there at that point. + // Reload will maintain the frame contents, LoadSame will not. + if (parentItem && parentItem->children().size() && + (isBackForwardLoadType(loadType) + || loadType == FrameLoadTypeReload + || loadType == FrameLoadTypeReloadAllowingStaleData)) + { + if (HistoryItem* childItem = parentItem->childItemWithName(core(childFrame)->tree()->name())) { + // Use the original URL to ensure we get all the side-effects, such as + // onLoad handlers, of any redirects that happened. An example of where + // this is needed is Radar 3213556. + url = childItem->originalURL(); + // These behaviors implied by these loadTypes should apply to the child frames + childLoadType = loadType; + + if (isBackForwardLoadType(loadType)) + // For back/forward, remember this item so we can traverse any child items as child frames load + core(childFrame)->loader()->setProvisionalHistoryItem(childItem); + else + // For reload, just reinstall the current item, since a new child frame was created but we won't be creating a new BF item + core(childFrame)->loader()->setCurrentHistoryItem(childItem); + } + } + + // FIXME: Handle loading WebArchives here + String frameName = core(childFrame)->tree()->name(); + core(childFrame)->loader()->loadURL(url, referrer, frameName, childLoadType, 0, 0); +} + +Widget* WebFrameLoaderClient::createPlugin(const IntSize& pluginSize, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) +{ + WebView* webView = m_webFrame->webView(); + + COMPtr<IWebUIDelegate> ui; + if (SUCCEEDED(webView->uiDelegate(&ui)) && ui) { + COMPtr<IWebUIDelegatePrivate4> uiPrivate(Query, ui); + + if (uiPrivate) { + // Assemble the view arguments in a property bag. + HashMap<String, String> viewArguments; + for (unsigned i = 0; i < paramNames.size(); i++) + viewArguments.set(paramNames[i], paramValues[i]); + COMPtr<IPropertyBag> viewArgumentsBag(AdoptCOM, COMPropertyBag<String>::adopt(viewArguments)); + + // Now create a new property bag where the view arguments is the only property. + HashMap<String, COMPtr<IUnknown> > arguments; + arguments.set(WebEmbeddedViewAttributesKey, COMPtr<IUnknown>(AdoptCOM, viewArgumentsBag.releaseRef())); + COMPtr<IPropertyBag> argumentsBag(AdoptCOM, COMPropertyBag<COMPtr<IUnknown> >::adopt(arguments)); + + COMPtr<IWebEmbeddedView> view; + HRESULT result = uiPrivate->embeddedViewWithArguments(webView, m_webFrame, argumentsBag.get(), &view); + if (SUCCEEDED(result)) { + HWND parentWindow; + HRESULT hr = webView->viewWindow((OLE_HANDLE*)&parentWindow); + ASSERT(SUCCEEDED(hr)); + + return EmbeddedWidget::create(view.get(), element, parentWindow, pluginSize); + } + } + } + + Frame* frame = core(m_webFrame); + PluginView* pluginView = PluginView::create(frame, pluginSize, element, url, paramNames, paramValues, mimeType, loadManually); + + if (pluginView->status() == PluginStatusLoadedSuccessfully) + return pluginView; + + COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; + + if (FAILED(webView->resourceLoadDelegate(&resourceLoadDelegate))) + return pluginView; + + RetainPtr<CFMutableDictionaryRef> userInfo(AdoptCF, CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); + + unsigned count = (unsigned)paramNames.size(); + for (unsigned i = 0; i < count; i++) { + if (paramNames[i] == "pluginspage") { + static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInPageURLStringKey); + RetainPtr<CFStringRef> str(AdoptCF, paramValues[i].createCFString()); + CFDictionarySetValue(userInfo.get(), key, str.get()); + break; + } + } + + if (!mimeType.isNull()) { + static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorMIMETypeKey); + + RetainPtr<CFStringRef> str(AdoptCF, mimeType.createCFString()); + CFDictionarySetValue(userInfo.get(), key, str.get()); + } + + String pluginName; + if (pluginView->plugin()) + pluginName = pluginView->plugin()->name(); + if (!pluginName.isNull()) { + static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInNameKey); + RetainPtr<CFStringRef> str(AdoptCF, pluginName.createCFString()); + CFDictionarySetValue(userInfo.get(), key, str.get()); + } + + COMPtr<CFDictionaryPropertyBag> userInfoBag(AdoptCOM, CFDictionaryPropertyBag::createInstance()); + userInfoBag->setDictionary(userInfo.get()); + + int errorCode = 0; + switch (pluginView->status()) { + case PluginStatusCanNotFindPlugin: + errorCode = WebKitErrorCannotFindPlugIn; + break; + case PluginStatusCanNotLoadPlugin: + errorCode = WebKitErrorCannotLoadPlugIn; + break; + default: + ASSERT_NOT_REACHED(); + } + + ResourceError resourceError(String(WebKitErrorDomain), errorCode, url.string(), String()); + COMPtr<IWebError> error(AdoptCOM, WebError::createInstance(resourceError, userInfoBag.get())); + + resourceLoadDelegate->plugInFailedWithError(webView, error.get(), getWebDataSource(frame->loader()->documentLoader())); + + return pluginView; +} + +void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) +{ + // Ideally, this function shouldn't be necessary, see <rdar://problem/4852889> + + m_pluginView = static_cast<PluginView*>(pluginWidget); +} + +WebHistory* WebFrameLoaderClient::webHistory() const +{ + if (m_webFrame != m_webFrame->webView()->topLevelFrame()) + return 0; + + return WebHistory::sharedHistory(); +} diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h new file mode 100644 index 0000000..b9fd027 --- /dev/null +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebFrameLoaderClient_h +#define WebFrameLoaderClient_h + +#pragma warning(push, 0) +#include <WebCore/FrameLoaderClient.h> +#pragma warning(pop) + +namespace WebCore { + class PluginView; +} + +template <typename T> class COMPtr; +class WebFrame; + +class WebFrameLoaderClient : public WebCore::FrameLoaderClient { +public: + virtual bool hasWebView() const; + + virtual void forceLayout(); + + virtual void assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&); + + virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse); + virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); + virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); + virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&); + virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived); + virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier); + virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&); + + virtual void dispatchDidHandleOnloadEvents(); + virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); + virtual void dispatchDidCancelClientRedirect(); + virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate); + virtual void dispatchDidChangeLocationWithinPage(); + virtual void dispatchWillClose(); + virtual void dispatchDidReceiveIcon(); + virtual void dispatchDidStartProvisionalLoad(); + virtual void dispatchDidReceiveTitle(const WebCore::String&); + virtual void dispatchDidCommitLoad(); + virtual void dispatchDidFinishDocumentLoad(); + virtual void dispatchDidFinishLoad(); + virtual void dispatchDidFirstLayout(); + + virtual WebCore::Frame* dispatchCreatePage(); + virtual void dispatchShow(); + + virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*); + virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&); + + virtual void postProgressStartedNotification(); + virtual void postProgressEstimateChangedNotification(); + virtual void postProgressFinishedNotification(); + + virtual void committedLoad(WebCore::DocumentLoader*, const char*, int); + virtual void finishedLoading(WebCore::DocumentLoader*); + + virtual void updateGlobalHistory(const WebCore::KURL&); + virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; + + virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&); + virtual void setTitle(const WebCore::String& title, const WebCore::KURL&); + + virtual void savePlatformDataToCachedPage(WebCore::CachedPage*); + virtual void transitionToCommittedForNewPage(); + + virtual bool canCachePage() const; + + virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WebCore::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, + const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); + virtual WebCore::Widget* createPlugin(const WebCore::IntSize&, WebCore::Element*, const WebCore::KURL&, const Vector<WebCore::String>&, const Vector<WebCore::String>&, const WebCore::String&, bool loadManually); + virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); + +protected: + WebFrameLoaderClient(WebFrame*); + ~WebFrameLoaderClient(); + +private: + PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL&, const WebCore::String& name, WebCore::HTMLFrameOwnerElement*, const WebCore::String& referrer); + void loadURLIntoChild(const WebCore::KURL&, const WebCore::String& referrer, WebFrame* childFrame); + void receivedData(const char*, int, const WebCore::String&); + WebHistory* webHistory() const; + + WebFrame* m_webFrame; + + // Points to the plugin view that data should be redirected to. + WebCore::PluginView* m_pluginView; + + bool m_hasSentResponseToPlugin; +}; + +#endif // WebFrameLoaderClient_h diff --git a/WebKit/win/WebInspectorClient.cpp b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp index bed702f..bfbf858 100644 --- a/WebKit/win/WebInspectorClient.cpp +++ b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp @@ -29,7 +29,7 @@ #include "config.h" #include "WebInspectorClient.h" -#include "WebInspectorClient.h" +#include "WebInspectorDelegate.h" #include "WebKit.h" #include "WebMutableURLRequest.h" #include "WebNodeHighlight.h" @@ -43,6 +43,7 @@ #include <WebCore/InspectorController.h> #include <WebCore/Page.h> #include <WebCore/RenderObject.h> +#include <WebCore/WindowMessageBroadcaster.h> #pragma warning(pop) #include <tchar.h> @@ -71,7 +72,6 @@ WebInspectorClient::WebInspectorClient(WebView* webView) : m_inspectedWebView(webView) , m_hwnd(0) , m_webViewHwnd(0) - , m_originalWebViewWndProc(0) , m_attached(false) { ASSERT(m_inspectedWebView); @@ -123,6 +123,10 @@ Page* WebInspectorClient::createPage() if (FAILED(m_webView->initWithFrame(rect, 0, 0))) return 0; + COMPtr<WebInspectorDelegate> delegate(AdoptCOM, WebInspectorDelegate::createInstance()); + if (FAILED(m_webView->setUIDelegate(delegate.get()))) + return 0; + // Keep preferences separate from the rest of the client, making sure we are using expected preference values. // One reason this is good is that it keeps the inspector out of history via "private browsing". // FIXME: It's crazy that we have to do this song and dance to end up with @@ -189,7 +193,7 @@ Page* WebInspectorClient::createPage() String WebInspectorClient::localizedStringsURL() { - RetainPtr<CFURLRef> url(AdoptCF, CFBundleCopyResourceURL(getWebKitBundle(), CFSTR("InspectorLocalizedStrings"), CFSTR("js"), 0)); + RetainPtr<CFURLRef> url(AdoptCF, CFBundleCopyResourceURL(getWebKitBundle(), CFSTR("localizedStrings"), CFSTR("js"), 0)); if (!url) return String(); @@ -224,14 +228,12 @@ void WebInspectorClient::attachWindow() { ASSERT(m_hwnd); ASSERT(m_webView); - ASSERT(!m_attached); ASSERT(m_inspectedWebViewHwnd); - if (!m_originalWebViewWndProc) { - ::SetProp(m_inspectedWebViewHwnd, kWebInspectorPointerProp, reinterpret_cast<HANDLE>(this)); -#pragma warning(disable: 4244 4312) - m_originalWebViewWndProc = (WNDPROC)::SetWindowLongPtr(m_inspectedWebViewHwnd, GWLP_WNDPROC, (LONG_PTR)SubclassedWebViewWndProc); - } + if (m_attached) + return; + + WindowMessageBroadcaster::addListener(m_inspectedWebViewHwnd, this); HWND hostWindow; if (FAILED(m_inspectedWebView->hostWindow((OLE_HANDLE*)&hostWindow))) @@ -243,18 +245,16 @@ void WebInspectorClient::attachWindow() ::SendMessage(hostWindow, WM_SIZE, 0, 0); - if (m_highlight && m_highlight->visible()) - m_highlight->updateWindow(); + if (m_highlight && m_highlight->isShowing()) + m_highlight->update(); } void WebInspectorClient::detachWindow() { - ASSERT(m_attached); - ASSERT(m_originalWebViewWndProc); + if (!m_attached) + return; - ::SetWindowLongPtr(m_inspectedWebViewHwnd, GWLP_WNDPROC, (LONG_PTR)m_originalWebViewWndProc); - ::RemoveProp(m_inspectedWebViewHwnd, kWebInspectorPointerProp); - m_originalWebViewWndProc = 0; + WindowMessageBroadcaster::removeListener(m_inspectedWebViewHwnd, this); m_attached = false; @@ -266,22 +266,35 @@ void WebInspectorClient::detachWindow() if (SUCCEEDED(m_inspectedWebView->hostWindow((OLE_HANDLE*)&hostWindow))) ::SendMessage(hostWindow, WM_SIZE, 0, 0); - if (m_highlight && m_highlight->visible()) - m_highlight->updateWindow(); + if (m_highlight && m_highlight->isShowing()) + m_highlight->update(); +} + +void WebInspectorClient::setAttachedWindowHeight(unsigned height) +{ + // FIXME: implement this. } void WebInspectorClient::highlight(Node*) { - if (!m_highlight) + bool creatingHighlight = !m_highlight; + + if (creatingHighlight) m_highlight.set(new WebNodeHighlight(m_inspectedWebView)); - m_highlight->show(); + if (m_highlight->isShowing()) + m_highlight->update(); + else + m_highlight->setShowsWhileWebViewIsVisible(true); + + if (creatingHighlight && IsWindowVisible(m_hwnd)) + m_highlight->placeBehindWindow(m_hwnd); } void WebInspectorClient::hideHighlight() { if (m_highlight) - m_highlight->hide(); + m_highlight->setShowsWhileWebViewIsVisible(false); } void WebInspectorClient::inspectedURLChanged(const String& newURL) @@ -330,6 +343,12 @@ LRESULT WebInspectorClient::onClose(WPARAM, LPARAM) return 0; } +LRESULT WebInspectorClient::onSetFocus() +{ + SetFocus(m_webViewHwnd); + return 0; +} + void WebInspectorClient::onWebViewWindowPosChanging(WPARAM, LPARAM lParam) { ASSERT(m_attached); @@ -358,6 +377,8 @@ static LRESULT CALLBACK WebInspectorWndProc(HWND hwnd, UINT msg, WPARAM wParam, return client->onSize(wParam, lParam); case WM_CLOSE: return client->onClose(wParam, lParam); + case WM_SETFOCUS: + return client->onSetFocus(); default: break; } @@ -365,19 +386,15 @@ static LRESULT CALLBACK WebInspectorWndProc(HWND hwnd, UINT msg, WPARAM wParam, return ::DefWindowProc(hwnd, msg, wParam, lParam); } -static LRESULT CALLBACK SubclassedWebViewWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +void WebInspectorClient::windowReceivedMessage(HWND, UINT msg, WPARAM wParam, LPARAM lParam) { - WebInspectorClient* client = reinterpret_cast<WebInspectorClient*>(::GetProp(hwnd, kWebInspectorPointerProp)); - ASSERT(client); - switch (msg) { case WM_WINDOWPOSCHANGING: - client->onWebViewWindowPosChanging(wParam, lParam); + onWebViewWindowPosChanging(wParam, lParam); + break; default: break; } - - return ::CallWindowProc(client->m_originalWebViewWndProc, hwnd, msg, wParam, lParam); } static ATOM registerWindowClass() diff --git a/WebKit/win/WebInspectorClient.h b/WebKit/win/WebCoreSupport/WebInspectorClient.h index 335f29d..a28507a 100644 --- a/WebKit/win/WebInspectorClient.h +++ b/WebKit/win/WebCoreSupport/WebInspectorClient.h @@ -32,13 +32,14 @@ #include <WebCore/COMPtr.h> #include <WebCore/InspectorClient.h> #include <WebCore/PlatformString.h> +#include <WebCore/WindowMessageListener.h> #include <wtf/OwnPtr.h> #include <windows.h> class WebNodeHighlight; class WebView; -class WebInspectorClient : public WebCore::InspectorClient { +class WebInspectorClient : public WebCore::InspectorClient, WebCore::WindowMessageListener { public: WebInspectorClient(WebView*); @@ -56,11 +57,17 @@ public: virtual void attachWindow(); virtual void detachWindow(); + virtual void setAttachedWindowHeight(unsigned height); + virtual void highlight(WebCore::Node*); virtual void hideHighlight(); virtual void inspectedURLChanged(const WebCore::String& newURL); + virtual void populateSetting(const WebCore::String& key, WebCore::InspectorController::Setting&); + virtual void storeSetting(const WebCore::String& key, const WebCore::InspectorController::Setting&); + virtual void removeSetting(const WebCore::String& key); + private: ~WebInspectorClient(); @@ -69,6 +76,9 @@ private: LRESULT onGetMinMaxInfo(WPARAM, LPARAM); LRESULT onSize(WPARAM, LPARAM); LRESULT onClose(WPARAM, LPARAM); + LRESULT onSetFocus(); + + virtual void windowReceivedMessage(HWND, UINT message, WPARAM, LPARAM); void onWebViewWindowPosChanging(WPARAM, LPARAM); @@ -77,7 +87,6 @@ private: HWND m_hwnd; COMPtr<WebView> m_webView; HWND m_webViewHwnd; - WNDPROC m_originalWebViewWndProc; bool m_attached; @@ -86,7 +95,6 @@ private: WebCore::String m_inspectedURL; static friend LRESULT CALLBACK WebInspectorWndProc(HWND, UINT, WPARAM, LPARAM); - static friend LRESULT CALLBACK SubclassedWebViewWndProc(HWND, UINT, WPARAM, LPARAM); }; #endif // !defined(WebInspectorClient_h) diff --git a/WebKit/win/WebCoreSupport/WebInspectorDelegate.cpp b/WebKit/win/WebCoreSupport/WebInspectorDelegate.cpp new file mode 100644 index 0000000..3ed8c9d --- /dev/null +++ b/WebKit/win/WebCoreSupport/WebInspectorDelegate.cpp @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebInspectorDelegate.h" + +WebInspectorDelegate::WebInspectorDelegate() + :m_refCount(0) +{ +} + +WebInspectorDelegate* WebInspectorDelegate::createInstance() +{ + WebInspectorDelegate* instance = new WebInspectorDelegate; + instance->AddRef(); + return instance; +} + +ULONG STDMETHODCALLTYPE WebInspectorDelegate::AddRef() +{ + return ++m_refCount; +} + +ULONG STDMETHODCALLTYPE WebInspectorDelegate::Release() +{ + ULONG newRef = --m_refCount; + if (!newRef) + delete(this); + + return newRef; +} + +HRESULT STDMETHODCALLTYPE WebInspectorDelegate::dragDestinationActionMaskForDraggingInfo( + /* [in] */ IWebView*, + /* [in] */ IDataObject*, + /* [retval][out] */ WebDragDestinationAction* action) +{ + *action = WebDragDestinationActionNone; + + return S_OK; +} diff --git a/WebKit/win/WebCoreSupport/WebInspectorDelegate.h b/WebKit/win/WebCoreSupport/WebInspectorDelegate.h new file mode 100644 index 0000000..a14c5fc --- /dev/null +++ b/WebKit/win/WebCoreSupport/WebInspectorDelegate.h @@ -0,0 +1,257 @@ +/* + * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebInspectorDelegate_h +#define WebInspectorDelegate_h + +struct IDataObject; +struct IPropertyBag; +struct IWebView; +struct IWebFrame; +struct IWebError; +struct IWebURLRequest; +struct IWebOpenPanelResultListener; + +class WebInspectorDelegate : public IWebUIDelegate { +public: + static WebInspectorDelegate* createInstance(); + + // IUnknown + virtual ULONG STDMETHODCALLTYPE AddRef();
+ virtual ULONG STDMETHODCALLTYPE Release(); + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void**) { return E_NOTIMPL; }; + + // IWebUIDelegate + virtual HRESULT STDMETHODCALLTYPE dragDestinationActionMaskForDraggingInfo( + /* [in] */ IWebView*, + /* [in] */ IDataObject*, + /* [retval][out] */ WebDragDestinationAction* action); + + // Not implemented + virtual HRESULT STDMETHODCALLTYPE createWebViewWithRequest( + /* [in] */ IWebView*, + /* [in] */ IWebURLRequest*, + /* [retval][out] */ IWebView**) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewShow( + /* [in] */ IWebView*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewClose( + /* [in] */ IWebView*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewFocus( + /* [in] */ IWebView*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewUnfocus( + /* [in] */ IWebView*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder( + /* [in] */ IWebView*, + /* [retval][out] */ OLE_HANDLE*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE makeFirstResponder( + /* [in] */ IWebView*, + /* [in] */ OLE_HANDLE) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE setStatusText( + /* [in] */ IWebView*, + /* [in] */ BSTR) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewStatusText( + /* [in] */ IWebView*, + /* [retval][out] */ BSTR*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewAreToolbarsVisible( + /* [in] */ IWebView*, + /* [retval][out] */ BOOL*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE setToolbarsVisible( + /* [in] */ IWebView*, + /* [in] */ BOOL) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewIsStatusBarVisible( + /* [in] */ IWebView*, + /* [retval][out] */ BOOL*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE setStatusBarVisible( + /* [in] */ IWebView*, + /* [in] */ BOOL) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewIsResizable( + /* [in] */ IWebView*, + /* [retval][out] */ BOOL*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE setResizable( + /* [in] */ IWebView*, + /* [in] */ BOOL) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE setFrame( + /* [in] */ IWebView*, + /* [in] */ RECT*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewFrame( + /* [in] */ IWebView*, + /* [retval][out] */ RECT*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE setContentRect( + /* [in] */ IWebView*, + /* [in] */ RECT*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewContentRect( + /* [in] */ IWebView*, + /* [retval][out] */ RECT*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE runJavaScriptAlertPanelWithMessage( + /* [in] */ IWebView*, + /* [in] */ BSTR) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE runJavaScriptConfirmPanelWithMessage( + /* [in] */ IWebView*, + /* [in] */ BSTR, + /* [retval][out] */ BOOL*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE runJavaScriptTextInputPanelWithPrompt( + /* [in] */ IWebView*, + /* [in] */ BSTR /*message*/, + /* [in] */ BSTR /*defaultText*/, + /* [retval][out] */ BSTR*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE runBeforeUnloadConfirmPanelWithMessage( + /* [in] */ IWebView*, + /* [in] */ BSTR /*message*/, + /* [in] */ IWebFrame* /*initiatedByFrame*/, + /* [retval][out] */ BOOL*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE runOpenPanelForFileButtonWithResultListener( + /* [in] */ IWebView*, + /* [in] */ IWebOpenPanelResultListener*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE mouseDidMoveOverElement( + /* [in] */ IWebView*, + /* [in] */ IPropertyBag*, + /* [in] */ UINT /*modifierFlags*/) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement( + /* [in] */ IWebView*, + /* [in] */ IPropertyBag*, + /* [in] */ OLE_HANDLE, + /* [retval][out] */ OLE_HANDLE*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE validateUserInterfaceItem( + /* [in] */ IWebView*, + /* [in] */ UINT, + /* [in] */ BOOL, + /* [retval][out] */ BOOL*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE shouldPerformAction( + /* [in] */ IWebView*, + /* [in] */ UINT /*itemCommandID*/, + /* [in] */ UINT /*sender*/) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE willPerformDragDestinationAction( + /* [in] */ IWebView*, + /* [in] */ WebDragDestinationAction, + /* [in] */ IDataObject*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE dragSourceActionMaskForPoint( + /* [in] */ IWebView*, + /* [in] */ LPPOINT, + /* [retval][out] */ WebDragSourceAction*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE willPerformDragSourceAction( + /* [in] */ IWebView*, + /* [in] */ WebDragSourceAction, + /* [in] */ LPPOINT, + /* [in] */ IDataObject*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE contextMenuItemSelected( + /* [in] */ IWebView*, + /* [in] */ void* /*item*/, + /* [in] */ IPropertyBag*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE hasCustomMenuImplementation( + /* [retval][out] */ BOOL*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu( + /* [in] */ IWebView*, + /* [in] */ OLE_HANDLE, + /* [in] */ LPPOINT) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE measureCustomMenuItem( + /* [in] */ IWebView*, + /* [in] */ void* /*measureItem*/) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE drawCustomMenuItem( + /* [in] */ IWebView*, + /* [in] */ void* /*drawItem*/) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData( + /* [in] */ IWebView*, + /* [in] */ OLE_HANDLE) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData( + /* [in] */ IWebView*, + /* [in] */ OLE_HANDLE) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE canTakeFocus( + /* [in] */ IWebView*, + /* [in] */ BOOL /*forward*/, + /* [out] */ BOOL*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE takeFocus( + /* [in] */ IWebView*, + /* [in] */ BOOL /*forward*/) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE registerUndoWithTarget( + /* [in] */ IWebUndoTarget*, + /* [in] */ BSTR /*actionName*/, + /* [in] */ IUnknown* /*actionArg*/) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE removeAllActionsWithTarget( + /* [in] */ IWebUndoTarget*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE setActionTitle( + /* [in] */ BSTR) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE undo() { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE redo() { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE canUndo( + /* [retval][out] */ BOOL*) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE canRedo( + /* [retval][out] */ BOOL*) { return E_NOTIMPL; } + +private: + WebInspectorDelegate(); + + ULONG m_refCount; +}; + +#endif // WebInspectorDelegate_h diff --git a/WebKit/win/WebDataSource.cpp b/WebKit/win/WebDataSource.cpp index 430c6a2..25270cc 100644 --- a/WebKit/win/WebDataSource.cpp +++ b/WebKit/win/WebDataSource.cpp @@ -27,7 +27,7 @@ #include "WebKitDLL.h" #include "WebDataSource.h" -#include "IWebMutableURLRequest.h" +#include "WebKit.h" #include "MemoryStream.h" #include "WebDocumentLoader.h" #include "WebError.h" @@ -61,6 +61,7 @@ WebDataSource::WebDataSource(WebDocumentLoader* loader) { WebDataSourceCount++; gClassCount++; + gClassNameCount.add("WebDataSource"); } WebDataSource::~WebDataSource() @@ -69,6 +70,7 @@ WebDataSource::~WebDataSource() m_loader->detachDataSource(); WebDataSourceCount--; gClassCount--; + gClassNameCount.remove("WebDataSource"); } WebDataSource* WebDataSource::createInstance(WebDocumentLoader* loader) @@ -197,7 +199,7 @@ HRESULT STDMETHODCALLTYPE WebDataSource::webFrame( HRESULT STDMETHODCALLTYPE WebDataSource::initialRequest( /* [retval][out] */ IWebURLRequest** request) { - *request = WebMutableURLRequest::createInstance(m_loader->initialRequest()); + *request = WebMutableURLRequest::createInstance(m_loader->originalRequest()); return S_OK; } @@ -245,7 +247,7 @@ HRESULT STDMETHODCALLTYPE WebDataSource::unreachableURL( /* [retval][out] */ BSTR* url) { KURL unreachableURL = m_loader->unreachableURL(); - BString urlString((LPOLESTR)unreachableURL.deprecatedString().unicode(), unreachableURL.deprecatedString().length()); + BString urlString((LPOLESTR)unreachableURL.string().characters(), unreachableURL.string().length()); *url = urlString.release(); return S_OK; diff --git a/WebKit/win/WebDataSource.h b/WebKit/win/WebDataSource.h index 50eee9b..70998ae 100644 --- a/WebKit/win/WebDataSource.h +++ b/WebKit/win/WebDataSource.h @@ -26,7 +26,7 @@ #ifndef WebDataSource_H #define WebDataSource_H -#include "IWebDataSource.h" +#include "WebKit.h" #include "COMPtr.h" #include <WTF/RefPtr.h> diff --git a/WebKit/win/WebDatabaseManager.cpp b/WebKit/win/WebDatabaseManager.cpp index 5b83d6e..d4974ed 100644 --- a/WebKit/win/WebDatabaseManager.cpp +++ b/WebKit/win/WebDatabaseManager.cpp @@ -152,11 +152,13 @@ WebDatabaseManager::WebDatabaseManager() : m_refCount(0) { gClassCount++; + gClassNameCount.add("WebDatabaseManager"); } WebDatabaseManager::~WebDatabaseManager() { gClassCount--; + gClassNameCount.remove("WebDatabaseManager"); } // IUnknown ------------------------------------------------------------------------ diff --git a/WebKit/win/WebDatabaseManager.h b/WebKit/win/WebDatabaseManager.h index f395f97..303f1e8 100644 --- a/WebKit/win/WebDatabaseManager.h +++ b/WebKit/win/WebDatabaseManager.h @@ -31,7 +31,7 @@ #include <WebCore/DatabaseTrackerClient.h> -#include "IWebDatabaseManager.h" +#include "WebKit.h" class WebDatabaseManager : public IWebDatabaseManager, private WebCore::DatabaseTrackerClient { public: diff --git a/WebKit/win/WebDocumentLoader.cpp b/WebKit/win/WebDocumentLoader.cpp index f333c67..9b9e11d 100644 --- a/WebKit/win/WebDocumentLoader.cpp +++ b/WebKit/win/WebDocumentLoader.cpp @@ -24,9 +24,10 @@ */ #include "config.h" - #include "WebDocumentLoader.h" +#include "WebKitDLL.h" + using namespace WebCore; WebDocumentLoader::WebDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData) @@ -34,10 +35,19 @@ WebDocumentLoader::WebDocumentLoader(const ResourceRequest& request, const Subst , m_dataSource(0) , m_detachedDataSource(0) { + gClassCount++; + gClassNameCount.add("WebDocumentLoader"); +} + +PassRefPtr<WebDocumentLoader> WebDocumentLoader::create(const ResourceRequest& req, const SubstituteData& data) +{ + return adoptRef(new WebDocumentLoader(req, data)); } WebDocumentLoader::~WebDocumentLoader() { + gClassCount--; + gClassNameCount.remove("WebDocumentLoader"); if (m_dataSource) { ASSERT(!m_detachedDataSource); m_dataSource->Release(); diff --git a/WebKit/win/WebDocumentLoader.h b/WebKit/win/WebDocumentLoader.h index e6e628a..ad0544e 100644 --- a/WebKit/win/WebDocumentLoader.h +++ b/WebKit/win/WebDocumentLoader.h @@ -29,10 +29,13 @@ #include <WebCore/DocumentLoader.h> #pragma warning(pop) -class WebDocumentLoader : public WebCore::DocumentLoader +using namespace WebCore; + +class WebDocumentLoader : public DocumentLoader { public: - WebDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&); + static PassRefPtr<WebDocumentLoader> create(const ResourceRequest&, const SubstituteData&); + ~WebDocumentLoader(); void setDataSource(WebDataSource*); @@ -43,6 +46,7 @@ public: virtual void detachFromFrame(); private: + WebDocumentLoader(const ResourceRequest&, const SubstituteData&); WebDataSource* m_dataSource; WebDataSource* m_detachedDataSource; // not retained }; diff --git a/WebKit/win/WebDownload.cpp b/WebKit/win/WebDownload.cpp index 64ff835..8a2fe8e 100644 --- a/WebKit/win/WebDownload.cpp +++ b/WebKit/win/WebDownload.cpp @@ -27,6 +27,7 @@ #include "WebKitDLL.h" #include "WebDownload.h" +#include "CString.h" #include "DefaultDownloadDelegate.h" #include "MarshallingHelpers.h" #include "WebError.h" @@ -80,6 +81,7 @@ WebDownload::WebDownload() : m_refCount(0) { gClassCount++; + gClassNameCount.add("WebDownload"); } void WebDownload::init(ResourceHandle* handle, const ResourceRequest& request, const ResourceResponse& response, IWebDownloadDelegate* delegate) @@ -102,9 +104,9 @@ void WebDownload::init(ResourceHandle* handle, const ResourceRequest& request, c // However, we should never hit that case if (!m_download) { ASSERT_NOT_REACHED(); - LOG_ERROR("WebDownload - Failed to create WebDownload from existing connection (%s)", request.url().deprecatedString().ascii()); + LOG_ERROR("WebDownload - Failed to create WebDownload from existing connection (%s)", request.url().string().utf8().data()); } else - LOG(Download, "WebDownload - Created WebDownload %p from existing connection (%s)", this, request.url().deprecatedString().ascii()); + LOG(Download, "WebDownload - Created WebDownload %p from existing connection (%s)", this, request.url().string().utf8().data()); // The CFURLDownload either starts successfully and retains the CFURLConnection, // or it fails to creating and we have a now-useless connection with a dangling ref. @@ -130,7 +132,7 @@ void WebDownload::init(const KURL& url, IWebDownloadDelegate* delegate) CFURLDownloadScheduleWithCurrentMessageQueue(m_download.get()); CFURLDownloadScheduleDownloadWithRunLoop(m_download.get(), ResourceHandle::loaderRunLoop(), kCFRunLoopDefaultMode); - LOG(Download, "WebDownload - Initialized download of url %s in WebDownload %p", url.deprecatedString().ascii(), this); + LOG(Download, "WebDownload - Initialized download of url %s in WebDownload %p", url.string().utf8().data(), this); } WebDownload::~WebDownload() @@ -138,6 +140,7 @@ WebDownload::~WebDownload() LOG(Download, "WebDownload - Destroying download (%p)", this); cancel(); gClassCount--; + gClassNameCount.remove("WebDownload"); } WebDownload* WebDownload::createInstance() @@ -232,7 +235,7 @@ HRESULT STDMETHODCALLTYPE WebDownload::initWithRequest( CFURLDownloadScheduleWithCurrentMessageQueue(m_download.get()); CFURLDownloadScheduleDownloadWithRunLoop(m_download.get(), ResourceHandle::loaderRunLoop(), kCFRunLoopDefaultMode); - LOG(Download, "WebDownload - initWithRequest complete, started download of url %s", webRequest->resourceRequest().url().deprecatedString().ascii()); + LOG(Download, "WebDownload - initWithRequest complete, started download of url %s", webRequest->resourceRequest().url().string().utf8().data()); return S_OK; } @@ -324,8 +327,10 @@ HRESULT STDMETHODCALLTYPE WebDownload::cancelForResume() HRESULT hr = S_OK; RetainPtr<CFDataRef> resumeData; - if (m_destination.isEmpty()) + if (m_destination.isEmpty()) { + CFURLDownloadCancel(m_download.get()); goto exit; + } CFURLDownloadSetDeletesUponFailure(m_download.get(), false); CFURLDownloadCancel(m_download.get()); diff --git a/WebKit/win/WebDownload.h b/WebKit/win/WebDownload.h index c0ccbc2..6e8e3ee 100644 --- a/WebKit/win/WebDownload.h +++ b/WebKit/win/WebDownload.h @@ -27,8 +27,7 @@ #define WebDownload_h #include "COMPtr.h" -#include "IWebDownload.h" -#include "IWebURLAuthenticationChallenge.h" +#include "WebKit.h" #include <CFNetwork/CFURLDownloadPriv.h> #include <WebCore/PlatformString.h> diff --git a/WebKit/win/WebDropSource.cpp b/WebKit/win/WebDropSource.cpp index b69aefb..bc68c6c 100644 --- a/WebKit/win/WebDropSource.cpp +++ b/WebKit/win/WebDropSource.cpp @@ -25,6 +25,8 @@ #include "config.h" #include "WebDropSource.h" + +#include "WebKitDLL.h" #include "WebView.h" #include <WebCore/DragActions.h> @@ -52,7 +54,14 @@ WebDropSource::WebDropSource(WebView* webView) , m_dropped(false) , m_webView(webView) { + gClassCount++; + gClassNameCount.add("WebDropSource"); +} +WebDropSource::~WebDropSource() +{ + gClassCount--; + gClassNameCount.remove("WebDropSource"); } STDMETHODIMP WebDropSource::QueryInterface(REFIID riid, void** ppvObject) diff --git a/WebKit/win/WebDropSource.h b/WebKit/win/WebDropSource.h index 4bed7f4..4a969ef 100644 --- a/WebKit/win/WebDropSource.h +++ b/WebKit/win/WebDropSource.h @@ -44,6 +44,7 @@ public: static HRESULT createInstance(WebView* webView, IDropSource** result); private: WebDropSource(WebView* webView); + ~WebDropSource(); long m_ref; bool m_dropped; COMPtr<WebView> m_webView; diff --git a/WebKit/win/WebElementPropertyBag.cpp b/WebKit/win/WebElementPropertyBag.cpp index c1aaedb..9113f4d 100644 --- a/WebKit/win/WebElementPropertyBag.cpp +++ b/WebKit/win/WebElementPropertyBag.cpp @@ -46,10 +46,14 @@ WebElementPropertyBag::WebElementPropertyBag(const HitTestResult& result) : m_result(new HitTestResult(result)) , m_refCount(0) { + gClassCount++; + gClassNameCount.add("WebElementPropertyBag"); } WebElementPropertyBag::~WebElementPropertyBag() { + gClassCount--; + gClassNameCount.remove("WebElementPropertyBag"); } WebElementPropertyBag* WebElementPropertyBag::createInstance(const HitTestResult& result) @@ -188,6 +192,6 @@ HRESULT STDMETHODCALLTYPE WebElementPropertyBag::Write(LPCOLESTR pszPropName, VA { if (!pszPropName || !pVar) return E_POINTER; - VariantClear(pVar); + return E_FAIL; } diff --git a/WebKit/win/WebError.cpp b/WebKit/win/WebError.cpp index 9c080f6..f0e0a70 100644 --- a/WebKit/win/WebError.cpp +++ b/WebKit/win/WebError.cpp @@ -28,11 +28,14 @@ #include "WebError.h" #include "WebKit.h" -#include <WebKitSystemInterface/WebKitSystemInterface.h> #pragma warning(push, 0) #include <WebCore/BString.h> #pragma warning(pop) +#if USE(CFNETWORK) +#include <WebKitSystemInterface/WebKitSystemInterface.h> +#endif + using namespace WebCore; // WebError --------------------------------------------------------------------- @@ -43,11 +46,13 @@ WebError::WebError(const ResourceError& error, IPropertyBag* userInfo) , m_userInfo(userInfo) { gClassCount++; + gClassNameCount.add("WebError"); } WebError::~WebError() { gClassCount--; + gClassNameCount.remove("WebError"); } WebError* WebError::createInstance(const ResourceError& error, IPropertyBag* userInfo) @@ -204,6 +209,7 @@ HRESULT STDMETHODCALLTYPE WebError::sslPeerCertificate( return E_POINTER; *result = 0; +#if USE(CFNETWORK) if (!m_cfErrorUserInfoDict) { // copy userinfo from CFErrorRef CFErrorRef cfError = m_error; @@ -217,6 +223,7 @@ HRESULT STDMETHODCALLTYPE WebError::sslPeerCertificate( if (!data) return E_FAIL; *result = (OLE_HANDLE)(ULONG64)data; +#endif return *result ? S_OK : E_FAIL; } diff --git a/WebKit/win/WebError.h b/WebKit/win/WebError.h index 65c0f2e..ff0625d 100644 --- a/WebKit/win/WebError.h +++ b/WebKit/win/WebError.h @@ -26,14 +26,15 @@ #ifndef WebError_h #define WebError_h -#include "IWebError.h" -#include "IWebErrorPrivate.h" +#include "WebKit.h" #pragma warning(push, 0) #include <WebCore/COMPtr.h> #include <WebCore/ResourceError.h> #pragma warning(pop) +#include <wtf/RetainPtr.h> + class WebError : public IWebError, IWebErrorPrivate { public: static WebError* createInstance(const WebCore::ResourceError&, IPropertyBag* userInfo = 0); diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp index ebaa7b3..701d1ab 100644 --- a/WebKit/win/WebFrame.cpp +++ b/WebKit/win/WebFrame.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,18 +29,12 @@ #include "CFDictionaryPropertyBag.h" #include "COMPtr.h" +#include "COMPropertyBag.h" #include "DefaultPolicyDelegate.h" #include "DOMCoreClasses.h" -#include "IWebError.h" -#include "IWebErrorPrivate.h" -#include "IWebHistory.h" -#include "IWebHistoryItemPrivate.h" -#include "IWebFrameLoadDelegatePrivate.h" -#include "IWebFormDelegate.h" -#include "IWebUIDelegatePrivate.h" +#include "HTMLFrameOwnerElement.h" #include "MarshallingHelpers.h" #include "WebActionPropertyBag.h" -#include "WebCachedPagePlatformData.h" #include "WebChromeClient.h" #include "WebDocumentLoader.h" #include "WebDownload.h" @@ -49,18 +43,15 @@ #include "WebEditorClient.h" #include "WebFramePolicyListener.h" #include "WebHistory.h" +#include "WebIconFetcher.h" #include "WebKit.h" #include "WebKitStatisticsPrivate.h" #include "WebNotificationCenter.h" #include "WebView.h" #include "WebDataSource.h" #include "WebHistoryItem.h" -#include "WebScriptDebugger.h" -#include "WebScriptDebugServer.h" -#include "WebURLAuthenticationChallenge.h" #include "WebURLResponse.h" #pragma warning( push, 0 ) -#include <WebCore/AuthenticationChallenge.h> #include <WebCore/BString.h> #include <WebCore/Cache.h> #include <WebCore/Document.h> @@ -68,6 +59,7 @@ #include <WebCore/DOMImplementation.h> #include <WebCore/DOMWindow.h> #include <WebCore/Event.h> +#include <WebCore/EventHandler.h> #include <WebCore/FormState.h> #include <WebCore/FrameLoader.h> #include <WebCore/FrameLoadRequest.h> @@ -78,9 +70,10 @@ #include <WebCore/GraphicsContext.h> #include <WebCore/HistoryItem.h> #include <WebCore/HTMLFormElement.h> -#include <WebCore/HTMLGenericFormElement.h> +#include <WebCore/HTMLFormControlElement.h> #include <WebCore/HTMLInputElement.h> #include <WebCore/HTMLNames.h> +#include <WebCore/JSDOMWindow.h> #include <WebCore/KeyboardEvent.h> #include <WebCore/MIMETypeRegistry.h> #include <WebCore/MouseRelatedEvent.h> @@ -93,13 +86,12 @@ #include <WebCore/ResourceHandle.h> #include <WebCore/ResourceHandleWin.h> #include <WebCore/ResourceRequest.h> -#include <WebCore/RenderFrame.h> +#include <WebCore/RenderView.h> #include <WebCore/RenderTreeAsText.h> #include <WebCore/Settings.h> #include <WebCore/TextIterator.h> -#include <WebCore/kjs_binding.h> -#include <WebCore/kjs_proxy.h> -#include <WebCore/kjs_window.h> +#include <WebCore/JSDOMBinding.h> +#include <WebCore/ScriptController.h> #include <JavaScriptCore/APICast.h> #include <wtf/MathExtras.h> #pragma warning(pop) @@ -131,12 +123,6 @@ const float PrintingMinimumShrinkFactor = 1.25f; // behavior matches MacIE and Mozilla, at least) const float PrintingMaximumShrinkFactor = 2.0f; - -// {A3676398-4485-4a9d-87DC-CB5A40E6351D} -const GUID IID_WebFrame = -{ 0xa3676398, 0x4485, 0x4a9d, { 0x87, 0xdc, 0xcb, 0x5a, 0x40, 0xe6, 0x35, 0x1d } }; - - //----------------------------------------------------------------------------- // Helpers to convert from WebCore to WebKit type WebFrame* kit(Frame* frame) @@ -165,202 +151,6 @@ Frame* core(const WebFrame* webFrame) return const_cast<WebFrame*>(webFrame)->impl(); } -WebView* kit(Page* page) -{ - return page ? static_cast<WebChromeClient*>(page->chrome()->client())->webView() : 0; -} - -//----------------------------------------------------------------------------- - -class FormValuesPropertyBag : public IPropertyBag, public IPropertyBag2 -{ -public: - FormValuesPropertyBag(HashMap<String, String>* formValues) : m_formValues(formValues) {} - - // IUnknown - virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); - virtual ULONG STDMETHODCALLTYPE AddRef(void); - virtual ULONG STDMETHODCALLTYPE Release(void); - - // IPropertyBag - virtual /* [local] */ HRESULT STDMETHODCALLTYPE Read( - /* [in] */ LPCOLESTR pszPropName, - /* [out][in] */ VARIANT* pVar, - /* [in] */ IErrorLog* pErrorLog); - - virtual HRESULT STDMETHODCALLTYPE Write( - /* [in] */ LPCOLESTR pszPropName, - /* [in] */ VARIANT* pVar); - - // IPropertyBag2 - virtual HRESULT STDMETHODCALLTYPE Read( - /* [in] */ ULONG cProperties, - /* [in] */ PROPBAG2 *pPropBag, - /* [in] */ IErrorLog *pErrLog, - /* [out] */ VARIANT *pvarValue, - /* [out] */ HRESULT *phrError); - - virtual HRESULT STDMETHODCALLTYPE Write( - /* [in] */ ULONG cProperties, - /* [in] */ PROPBAG2 *pPropBag, - /* [in] */ VARIANT *pvarValue); - - virtual HRESULT STDMETHODCALLTYPE CountProperties( - /* [out] */ ULONG *pcProperties); - - virtual HRESULT STDMETHODCALLTYPE GetPropertyInfo( - /* [in] */ ULONG iProperty, - /* [in] */ ULONG cProperties, - /* [out] */ PROPBAG2 *pPropBag, - /* [out] */ ULONG *pcProperties); - - virtual HRESULT STDMETHODCALLTYPE LoadObject( - /* [in] */ LPCOLESTR pstrName, - /* [in] */ DWORD dwHint, - /* [in] */ IUnknown *pUnkObject, - /* [in] */ IErrorLog *pErrLog); - -protected: - HashMap<String, String>* m_formValues; -}; - -HRESULT STDMETHODCALLTYPE FormValuesPropertyBag::QueryInterface(REFIID riid, void** ppvObject) -{ - *ppvObject = 0; - if (IsEqualGUID(riid, IID_IUnknown)) - *ppvObject = this; - else if (IsEqualGUID(riid, IID_IPropertyBag)) - *ppvObject = static_cast<IPropertyBag*>(this); - else if (IsEqualGUID(riid, IID_IPropertyBag2)) - *ppvObject = static_cast<IPropertyBag2*>(this); - else - return E_NOINTERFACE; - - AddRef(); - return S_OK; -} - -ULONG STDMETHODCALLTYPE FormValuesPropertyBag::AddRef(void) -{ - return 1; -} - -ULONG STDMETHODCALLTYPE FormValuesPropertyBag::Release(void) -{ - return 0; -} - -HRESULT STDMETHODCALLTYPE FormValuesPropertyBag::Read(LPCOLESTR pszPropName, VARIANT* pVar, IErrorLog* /*pErrorLog*/) -{ - HRESULT hr = S_OK; - - if (!pszPropName || !pVar) - return E_POINTER; - - String key(pszPropName); - if (!m_formValues->contains(key)) - return E_INVALIDARG; - - String value = m_formValues->get(key); - - VARTYPE requestedType = V_VT(pVar); - VariantClear(pVar); - V_VT(pVar) = VT_BSTR; - V_BSTR(pVar) = SysAllocStringLen(value.characters(), value.length()); - if (value.length() && !V_BSTR(pVar)) - return E_OUTOFMEMORY; - - if (requestedType != VT_BSTR && requestedType != VT_EMPTY) - hr = VariantChangeType(pVar, pVar, VARIANT_NOUSEROVERRIDE | VARIANT_ALPHABOOL, requestedType); - - return hr; -} - -HRESULT STDMETHODCALLTYPE FormValuesPropertyBag::Write(LPCOLESTR pszPropName, VARIANT* pVar) -{ - if (!pszPropName || !pVar) - return E_POINTER; - VariantClear(pVar); - return E_FAIL; -} - -HRESULT STDMETHODCALLTYPE FormValuesPropertyBag::Read( - /* [in] */ ULONG cProperties, - /* [in] */ PROPBAG2* pPropBag, - /* [in] */ IErrorLog* pErrLog, - /* [out] */ VARIANT* pvarValue, - /* [out] */ HRESULT* phrError) -{ - if (cProperties > (size_t)m_formValues->size()) - return E_INVALIDARG; - if (!pPropBag || !pvarValue || !phrError) - return E_POINTER; - - for (ULONG i=0; i<cProperties; i++) { - VariantInit(&pvarValue[i]); - phrError[i] = Read(pPropBag->pstrName, &pvarValue[i], pErrLog); - } - - return S_OK; -} - -HRESULT STDMETHODCALLTYPE FormValuesPropertyBag::Write( - /* [in] */ ULONG /*cProperties*/, - /* [in] */ PROPBAG2* pPropBag, - /* [in] */ VARIANT* pvarValue) -{ - if (!pPropBag || !pvarValue) - return E_POINTER; - return E_FAIL; -} - -HRESULT STDMETHODCALLTYPE FormValuesPropertyBag::CountProperties( - /* [out] */ ULONG* pcProperties) -{ - *pcProperties = m_formValues->size(); - return S_OK; -} - -HRESULT STDMETHODCALLTYPE FormValuesPropertyBag::GetPropertyInfo( - /* [in] */ ULONG iProperty, - /* [in] */ ULONG cProperties, - /* [out] */ PROPBAG2* pPropBag, - /* [out] */ ULONG* pcProperties) -{ - if (iProperty > (size_t)m_formValues->size() || iProperty+cProperties > (size_t)m_formValues->size()) - return E_INVALIDARG; - if (!pPropBag || !pcProperties) - return E_POINTER; - - *pcProperties = 0; - ULONG i = 0; - ULONG endProperty = iProperty + cProperties; - for (HashMap<String, String>::iterator it = m_formValues->begin(); i<endProperty; i++) { - if (i >= iProperty) { - int storeIndex = (*pcProperties)++; - pPropBag[storeIndex].dwType = PROPBAG2_TYPE_DATA; - pPropBag[storeIndex].vt = VT_BSTR; - pPropBag[storeIndex].cfType = CF_TEXT; - pPropBag[storeIndex].dwHint = 0; - pPropBag[storeIndex].pstrName = const_cast<LPOLESTR>(it->first.charactersWithNullTermination()); - } - ++it; - } - - return S_OK; -} - -HRESULT STDMETHODCALLTYPE FormValuesPropertyBag::LoadObject( - /* [in] */ LPCOLESTR pstrName, - /* [in] */ DWORD /*dwHint*/, - /* [in] */ IUnknown* pUnkObject, - /* [in] */ IErrorLog* /*pErrLog*/) -{ - if (!pstrName || !pUnkObject) - return E_POINTER; - return E_FAIL; -} - //----------------------------------------------------------------------------- static Element *elementFromDOMElement(IDOMElement *element) @@ -421,8 +211,6 @@ public: : frame(0) , webView(0) , m_policyFunction(0) - , m_pluginView(0) - , m_hasSentResponseToPlugin(false) { } @@ -433,24 +221,21 @@ public: WebView* webView; FramePolicyFunction m_policyFunction; COMPtr<WebFramePolicyListener> m_policyListener; - - // Points to the plugin view that data should be redirected to. - PluginView* m_pluginView; - bool m_hasSentResponseToPlugin; }; // WebFrame ---------------------------------------------------------------- WebFrame::WebFrame() - : m_refCount(0) + : WebFrameLoaderClient(this) + , m_refCount(0) , d(new WebFrame::WebFramePrivate) , m_quickRedirectComing(false) , m_inPrintingMode(false) , m_pageHeight(0) - , m_scriptDebugger(0) { WebFrameCount++; gClassCount++; + gClassNameCount.add("WebFrame"); } WebFrame::~WebFrame() @@ -458,6 +243,7 @@ WebFrame::~WebFrame() delete d; WebFrameCount--; gClassCount--; + gClassNameCount.remove("WebFrame"); } WebFrame* WebFrame::createInstance() @@ -472,7 +258,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::setAllowsScrolling( { if (Frame* frame = core(this)) if (FrameView* view = frame->view()) - view->setAllowsScrolling(!!flag); + view->setCanHaveScrollbars(!!flag); return S_OK; } @@ -483,18 +269,70 @@ HRESULT STDMETHODCALLTYPE WebFrame::allowsScrolling( if (flag) if (Frame* frame = core(this)) if (FrameView* view = frame->view()) - *flag = view->allowsScrolling(); + *flag = view->canHaveScrollbars(); return S_OK; } +HRESULT STDMETHODCALLTYPE WebFrame::setIsDisconnected( + /* [in] */ BOOL flag) +{ + if (Frame* frame = core(this)) { + frame->setIsDisconnected(flag); + return S_OK; + } + + return E_FAIL; +} + +HRESULT STDMETHODCALLTYPE WebFrame::setExcludeFromTextSearch( + /* [in] */ BOOL flag) +{ + if (Frame* frame = core(this)) { + frame->setExcludeFromTextSearch(flag); + return S_OK; + } + + return E_FAIL; +} + +HRESULT STDMETHODCALLTYPE WebFrame::paintDocumentRectToContext( + /* [in] */ RECT rect, + /* [in] */ OLE_HANDLE deviceContext) +{ + Frame* coreFrame = core(this); + if (!coreFrame) + return E_FAIL; + + FrameView* view = coreFrame->view(); + if (!view) + return E_FAIL; + + // We can't paint with a layout still pending. + view->layoutIfNeededRecursive(); + + HDC dc = (HDC)(ULONG64)deviceContext; + GraphicsContext gc(dc); + gc.save(); + LONG width = rect.right - rect.left; + LONG height = rect.bottom - rect.top; + FloatRect dirtyRect; + dirtyRect.setWidth(width); + dirtyRect.setHeight(height); + gc.clip(dirtyRect); + gc.translate(-rect.left, -rect.top); + view->paintContents(&gc, rect); + gc.restore(); + + return S_OK; +} // IUnknown ------------------------------------------------------------------- HRESULT STDMETHODCALLTYPE WebFrame::QueryInterface(REFIID riid, void** ppvObject) { *ppvObject = 0; - if (IsEqualGUID(riid, IID_WebFrame)) + if (IsEqualGUID(riid, __uuidof(WebFrame))) *ppvObject = this; else if (IsEqualGUID(riid, IID_IUnknown)) *ppvObject = static_cast<IWebFrame*>(this); @@ -581,10 +419,21 @@ HRESULT STDMETHODCALLTYPE WebFrame::DOMDocument( } HRESULT STDMETHODCALLTYPE WebFrame::frameElement( - /* [retval][out] */ IDOMHTMLElement** /*frameElement*/) + /* [retval][out] */ IDOMHTMLElement** frameElement) { - ASSERT_NOT_REACHED(); - return E_NOTIMPL; + if (!frameElement) + return E_POINTER; + + *frameElement = 0; + Frame* coreFrame = core(this); + if (!coreFrame) + return E_FAIL; + + COMPtr<IDOMElement> domElement(AdoptCOM, DOMElement::createInstance(coreFrame->ownerElement())); + COMPtr<IDOMHTMLElement> htmlElement(Query, domElement); + if (!htmlElement) + return E_FAIL; + return htmlElement.copyRefTo(frameElement); } HRESULT STDMETHODCALLTYPE WebFrame::currentForm( @@ -610,7 +459,7 @@ JSGlobalContextRef STDMETHODCALLTYPE WebFrame::globalContext() if (!coreFrame) return 0; - return toGlobalRef(coreFrame->scriptProxy()->globalObject()->globalExec()); + return toGlobalRef(coreFrame->script()->globalObject()->globalExec()); } HRESULT STDMETHODCALLTYPE WebFrame::loadRequest( @@ -637,8 +486,8 @@ void WebFrame::loadData(PassRefPtr<WebCore::SharedBuffer> data, BSTR mimeType, B mimeTypeString = "text/html"; String encodingString(textEncodingName, SysStringLen(textEncodingName)); - KURL baseKURL = DeprecatedString((DeprecatedChar*)baseURL, SysStringLen(baseURL)); - KURL failingKURL = DeprecatedString((DeprecatedChar*)failingURL, SysStringLen(failingURL)); + KURL baseKURL(String(baseURL ? baseURL : L"", SysStringLen(baseURL))); + KURL failingKURL(String(failingURL, SysStringLen(failingURL))); ResourceRequest request(baseKURL); SubstituteData substituteData(data, mimeTypeString, encodingString, failingKURL); @@ -655,7 +504,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::loadData( /* [in] */ BSTR textEncodingName, /* [in] */ BSTR url) { - RefPtr<SharedBuffer> sharedBuffer = new SharedBuffer(); + RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(); STATSTG stat; if (SUCCEEDED(data->Stat(&stat, STATFLAG_NONAME))) { @@ -675,7 +524,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::loadData( void WebFrame::loadHTMLString(BSTR string, BSTR baseURL, BSTR unreachableURL) { - RefPtr<SharedBuffer> sharedBuffer = new SharedBuffer(reinterpret_cast<char*>(string), sizeof(UChar) * SysStringLen(string)); + RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<char*>(string), sizeof(UChar) * SysStringLen(string)); BString utf16Encoding(TEXT("utf-16"), 6); loadData(sharedBuffer.release(), 0, utf16Encoding, baseURL, unreachableURL); } @@ -766,17 +615,6 @@ KURL WebFrame::url() const return coreFrame->loader()->url(); } -void WebFrame::attachScriptDebugger() -{ - if (!m_scriptDebugger && core(this)->scriptProxy()->haveGlobalObject()) - m_scriptDebugger.set(new WebScriptDebugger(this)); -} - -void WebFrame::detachScriptDebugger() -{ - m_scriptDebugger.clear(); -} - HRESULT STDMETHODCALLTYPE WebFrame::stopLoading( void) { if (Frame* coreFrame = core(this)) @@ -932,21 +770,14 @@ HRESULT STDMETHODCALLTYPE WebFrame::childFrames( HRESULT STDMETHODCALLTYPE WebFrame::renderTreeAsExternalRepresentation( /* [retval][out] */ BSTR *result) { - if (!result) { - ASSERT_NOT_REACHED(); + if (!result) return E_POINTER; - } - - *result = 0; Frame* coreFrame = core(this); if (!coreFrame) return E_FAIL; - DeprecatedString representation = externalRepresentation(coreFrame->renderer()); - - *result = SysAllocStringLen((LPCOLESTR)representation.unicode(), representation.length()); - + *result = BString(externalRepresentation(coreFrame->contentRenderer())).release(); return S_OK; } @@ -1020,6 +851,47 @@ HRESULT STDMETHODCALLTYPE WebFrame::loadType( return S_OK; } +HRESULT STDMETHODCALLTYPE WebFrame::pendingFrameUnloadEventCount( + /* [retval][out] */ UINT* result) +{ + if (!result) { + ASSERT_NOT_REACHED(); + return E_POINTER; + } + + *result = 0; + + Frame* coreFrame = core(this); + if (!coreFrame) + return E_FAIL; + + *result = coreFrame->eventHandler()->pendingFrameUnloadEventCount(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebFrame::fetchApplicationIcon( + /* [in] */ IWebIconFetcherDelegate *delegate, + /* [retval][out] */ IWebIconFetcher **result) +{ + if (!result) + return E_POINTER; + + *result = 0; + + if (!delegate) + return E_FAIL; + + Frame* coreFrame = core(this); + if (!coreFrame) + return E_FAIL; + + *result = WebIconFetcher::fetchApplicationIcon(coreFrame, delegate); + if (!*result) + return E_FAIL; + + return S_OK; +} + // IWebDocumentText ----------------------------------------------------------- HRESULT STDMETHODCALLTYPE WebFrame::supportsTextEncoding( @@ -1057,18 +929,18 @@ HRESULT STDMETHODCALLTYPE WebFrame::deselectAll() // WebFrame --------------------------------------------------------------- -void WebFrame::initWithWebFrameView(IWebFrameView* /*view*/, IWebView* webView, Page* page, HTMLFrameOwnerElement* ownerElement) +PassRefPtr<Frame> WebFrame::init(IWebView* webView, Page* page, HTMLFrameOwnerElement* ownerElement) { - if (FAILED(webView->QueryInterface(&d->webView))) - return; + webView->QueryInterface(&d->webView); d->webView->Release(); // don't hold the extra ref HWND viewWindow; d->webView->viewWindow((OLE_HANDLE*)&viewWindow); this->AddRef(); // We release this ref in frameLoaderDestroyed() - Frame* frame = new Frame(page, ownerElement, this); - d->frame = frame; + RefPtr<Frame> frame = Frame::create(page, ownerElement, this); + d->frame = frame.get(); + return frame.release(); } Frame* WebFrame::impl() @@ -1087,14 +959,9 @@ void WebFrame::invalidate() void WebFrame::setTextSizeMultiplier(float multiplier) { - int newZoomFactor = (int)round(multiplier * 100); Frame* coreFrame = core(this); ASSERT(coreFrame); - - if (coreFrame->zoomFactor() == newZoomFactor) - return; - - coreFrame->setZoomFactor(newZoomFactor); + coreFrame->setZoomFactor(multiplier, true); } HRESULT WebFrame::inViewSourceMode(BOOL* flag) @@ -1131,10 +998,10 @@ HRESULT WebFrame::elementWithName(BSTR name, IDOMElement* form, IDOMElement** el HTMLFormElement *formElement = formElementFromDOMElement(form); if (formElement) { - Vector<HTMLGenericFormElement*>& elements = formElement->formElements; + Vector<HTMLFormControlElement*>& elements = formElement->formElements; AtomicString targetName((UChar*)name, SysStringLen(name)); for (unsigned int i = 0; i < elements.size(); i++) { - HTMLGenericFormElement *elt = elements[i]; + HTMLFormControlElement *elt = elements[i]; // Skip option elements, other duds if (elt->name() == targetName) { *element = DOMElement::createInstance(elt); @@ -1162,7 +1029,7 @@ HRESULT WebFrame::formForElement(IDOMElement* element, IDOMElement** form) return S_OK; } -HRESULT WebFrame::elementDoesAutoComplete(IDOMElement *element, bool *result) +HRESULT WebFrame::elementDoesAutoComplete(IDOMElement *element, BOOL *result) { *result = false; if (!element) @@ -1195,7 +1062,7 @@ HRESULT WebFrame::controlsInForm(IDOMElement* form, IDOMElement** controls, int* return E_FAIL; *cControls = 0; - Vector<HTMLGenericFormElement*>& elements = formElement->formElements; + Vector<HTMLFormControlElement*>& elements = formElement->formElements; for (int i = 0; i < count; i++) { if (elements.at(i)->isEnumeratable()) { // Skip option elements, other duds controls[*cControls] = DOMElement::createInstance(elements.at(i)); @@ -1302,18 +1169,6 @@ HRESULT WebFrame::canProvideDocumentSource(bool* result) return hr; } -// FrameWinClient - -void WebFrame::ref() -{ - this->AddRef(); -} - -void WebFrame::deref() -{ - this->Release(); -} - void WebFrame::frameLoaderDestroyed() { // The FrameLoader going away is equivalent to the Frame going away, @@ -1323,180 +1178,11 @@ void WebFrame::frameLoaderDestroyed() this->Release(); } -PassRefPtr<Frame> WebFrame::createFrame(const KURL& URL, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer) -{ - Frame* coreFrame = core(this); - ASSERT(coreFrame); - - COMPtr<WebFrame> webFrame; - webFrame.adoptRef(WebFrame::createInstance()); - - webFrame->initWithWebFrameView(0, d->webView, coreFrame->page(), ownerElement); - - RefPtr<Frame> childFrame(adoptRef(core(webFrame.get()))); // We have to adopt, because Frames start out with a refcount of 1. - ASSERT(childFrame); - - coreFrame->tree()->appendChild(childFrame); - childFrame->tree()->setName(name); - childFrame->init(); - - loadURLIntoChild(URL, referrer, webFrame.get()); - - // The frame's onload handler may have removed it from the document. - if (!childFrame->tree()->parent()) - return 0; - - return childFrame.release(); -} - -void WebFrame::loadURLIntoChild(const KURL& originalURL, const String& referrer, WebFrame* childFrame) -{ - ASSERT(childFrame); - ASSERT(core(childFrame)); - - Frame* coreFrame = core(this); - ASSERT(coreFrame); - - HistoryItem* parentItem = coreFrame->loader()->currentHistoryItem(); - FrameLoadType loadType = coreFrame->loader()->loadType(); - FrameLoadType childLoadType = FrameLoadTypeRedirectWithLockedHistory; - - KURL url = originalURL; - - // If we're moving in the backforward list, we might want to replace the content - // of this child frame with whatever was there at that point. - // Reload will maintain the frame contents, LoadSame will not. - if (parentItem && parentItem->children().size() && - (isBackForwardLoadType(loadType) - || loadType == FrameLoadTypeReload - || loadType == FrameLoadTypeReloadAllowingStaleData)) - { - if (HistoryItem* childItem = parentItem->childItemWithName(core(childFrame)->tree()->name())) { - // Use the original URL to ensure we get all the side-effects, such as - // onLoad handlers, of any redirects that happened. An example of where - // this is needed is Radar 3213556. - url = childItem->originalURLString().deprecatedString(); - // These behaviors implied by these loadTypes should apply to the child frames - childLoadType = loadType; - - if (isBackForwardLoadType(loadType)) - // For back/forward, remember this item so we can traverse any child items as child frames load - core(childFrame)->loader()->setProvisionalHistoryItem(childItem); - else - // For reload, just reinstall the current item, since a new child frame was created but we won't be creating a new BF item - core(childFrame)->loader()->setCurrentHistoryItem(childItem); - } - } - - // FIXME: Handle loading WebArchives here - - core(childFrame)->loader()->load(url, referrer, childLoadType, String(), 0, 0); -} - -void WebFrame::openURL(const String& URL, const Event* triggeringEvent, bool newWindow, bool lockHistory) -{ - bool ctrlPressed = false; - bool shiftPressed = false; - if (triggeringEvent) { - if (triggeringEvent->isMouseEvent()) { - const MouseRelatedEvent* mouseEvent = static_cast<const MouseRelatedEvent*>(triggeringEvent); - ctrlPressed = mouseEvent->ctrlKey(); - shiftPressed = mouseEvent->shiftKey(); - } else if (triggeringEvent->isKeyboardEvent()) { - const KeyboardEvent* keyEvent = static_cast<const KeyboardEvent*>(triggeringEvent); - ctrlPressed = keyEvent->ctrlKey(); - shiftPressed = keyEvent->shiftKey(); - } - } - - if (ctrlPressed) - newWindow = true; - - BString urlBStr = URL; - - IWebMutableURLRequest* request = WebMutableURLRequest::createInstance(); - if (FAILED(request->initWithURL(urlBStr, WebURLRequestUseProtocolCachePolicy, 0))) - goto exit; - - if (newWindow) { - // new tab/window - IWebUIDelegate* ui; - IWebView* newWebView; - if (SUCCEEDED(d->webView->uiDelegate(&ui)) && ui) { - if (SUCCEEDED(ui->createWebViewWithRequest(d->webView, request, &newWebView))) { - if (shiftPressed) { - // Ctrl-Option-Shift-click: Opens a link in a new window and selects it. - // Ctrl-Shift-click: Opens a link in a new tab and selects it. - ui->webViewShow(d->webView); - } - newWebView->Release(); - newWebView = 0; - } - ui->Release(); - } - } else { - m_quickRedirectComing = lockHistory; - loadRequest(request); - } - -exit: - request->Release(); -} - -void WebFrame::dispatchDidHandleOnloadEvents() -{ - IWebFrameLoadDelegatePrivate* frameLoadDelegatePriv; - if (SUCCEEDED(d->webView->frameLoadDelegatePrivate(&frameLoadDelegatePriv)) && frameLoadDelegatePriv) { - frameLoadDelegatePriv->didHandleOnloadEventsForFrame(d->webView, this); - frameLoadDelegatePriv->Release(); - } -} - -void WebFrame::windowScriptObjectAvailable(JSContextRef context, JSObjectRef windowObject) -{ - IWebFrameLoadDelegate* frameLoadDelegate; - if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate)) && frameLoadDelegate) { - frameLoadDelegate->windowScriptObjectAvailable(d->webView, context, windowObject); - frameLoadDelegate->Release(); - } -} - -WebHistory* WebFrame::webHistory() -{ - if (this != d->webView->topLevelFrame()) - return 0; - - IWebHistoryPrivate* historyInternal = WebHistory::optionalSharedHistoryInternal(); // does not add a ref - if (!historyInternal) - return 0; - - WebHistory* webHistory; - if (FAILED(historyInternal->QueryInterface(&webHistory))) - return 0; - - return webHistory; -} - -bool WebFrame::hasWebView() const -{ - return !!d->webView; -} - -bool WebFrame::hasFrameView() const -{ - return !!d->frameView(); -} - void WebFrame::makeRepresentation(DocumentLoader*) { notImplemented(); } -void WebFrame::forceLayout() -{ - core(this)->forceLayout(true); -} - void WebFrame::forceLayoutForNonHTML() { notImplemented(); @@ -1507,11 +1193,6 @@ void WebFrame::setCopiesOnScroll() notImplemented(); } -void WebFrame::detachedFromParent1() -{ - notImplemented(); -} - void WebFrame::detachedFromParent2() { notImplemented(); @@ -1522,101 +1203,6 @@ void WebFrame::detachedFromParent3() notImplemented(); } -void WebFrame::detachedFromParent4() -{ - notImplemented(); -} - -void WebFrame::dispatchDidReceiveServerRedirectForProvisionalLoad() -{ - COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; - if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) - frameLoadDelegate->didReceiveServerRedirectForProvisionalLoadForFrame(d->webView, this); -} - -void WebFrame::dispatchDidCancelClientRedirect() -{ - COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; - if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) - frameLoadDelegate->didCancelClientRedirectForFrame(d->webView, this); -} - -void WebFrame::dispatchWillPerformClientRedirect(const KURL& url, double delay, double fireDate) -{ - COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; - if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) - frameLoadDelegate->willPerformClientRedirectToURL(d->webView, BString(url.string()), delay, MarshallingHelpers::CFAbsoluteTimeToDATE(fireDate), this); -} - -void WebFrame::dispatchDidChangeLocationWithinPage() -{ - COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; - if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) - frameLoadDelegate->didChangeLocationWithinPageForFrame(d->webView, this); -} - -void WebFrame::dispatchWillClose() -{ - COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; - if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) - frameLoadDelegate->willCloseFrame(d->webView, this); -} - -void WebFrame::dispatchDidReceiveIcon() -{ - d->webView->dispatchDidReceiveIconFromWebFrame(this); -} - -void WebFrame::dispatchDidStartProvisionalLoad() -{ - COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; - if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) - frameLoadDelegate->didStartProvisionalLoadForFrame(d->webView, this); -} - -void WebFrame::dispatchDidReceiveTitle(const String& title) -{ - COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; - if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) - frameLoadDelegate->didReceiveTitle(d->webView, BString(title), this); -} - -void WebFrame::dispatchDidCommitLoad() -{ - COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; - if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) - frameLoadDelegate->didCommitLoadForFrame(d->webView, this); -} - -void WebFrame::dispatchDidFinishDocumentLoad() -{ - COMPtr<IWebFrameLoadDelegatePrivate> frameLoadDelegatePriv; - if (SUCCEEDED(d->webView->frameLoadDelegatePrivate(&frameLoadDelegatePriv)) && frameLoadDelegatePriv) - frameLoadDelegatePriv->didFinishDocumentLoadForFrame(d->webView, this); -} - -void WebFrame::dispatchDidFinishLoad() -{ - COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; - if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) - frameLoadDelegate->didFinishLoadForFrame(d->webView, this); -} - -void WebFrame::dispatchDidFirstLayout() -{ - COMPtr<IWebFrameLoadDelegatePrivate> frameLoadDelegatePriv; - if (SUCCEEDED(d->webView->frameLoadDelegatePrivate(&frameLoadDelegatePriv)) && frameLoadDelegatePriv) - frameLoadDelegatePriv->didFirstLayoutInFrame(d->webView, this); -} - -void WebFrame::dispatchShow() -{ - COMPtr<IWebUIDelegate> ui; - - if (SUCCEEDED(d->webView->uiDelegate(&ui))) - ui->webViewShow(d->webView); -} - void WebFrame::cancelPolicyCheck() { if (d->m_policyListener) { @@ -1641,40 +1227,21 @@ void WebFrame::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<F 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())); + COMPtr<IPropertyBag> formValuesPropertyBag(AdoptCOM, COMPropertyBag<String>::createInstance(formState->values())); COMPtr<WebFrame> sourceFrame(kit(formState->sourceFrame())); - if (SUCCEEDED(formDelegate->willSubmitForm(this, sourceFrame.get(), formElement.get(), &formValuesPropBag, setUpPolicyListener(function).get()))) + if (SUCCEEDED(formDelegate->willSubmitForm(this, sourceFrame.get(), formElement.get(), formValuesPropertyBag.get(), setUpPolicyListener(function).get()))) return; // FIXME: Add a sane default implementation (coreFrame->loader()->*function)(PolicyUse); } -void WebFrame::dispatchDidLoadMainResource(DocumentLoader* loader) -{ - if (WebScriptDebugServer::listenerCount() > 0) { - Frame* coreFrame = core(this); - if (!coreFrame) - return; - - WebScriptDebugServer::sharedWebScriptDebugServer()->didLoadMainResourceForDataSource( - kit(coreFrame->page()), - loader ? static_cast<WebDocumentLoader*>(loader)->dataSource() : 0); - } -} - void WebFrame::revertToProvisionalState(DocumentLoader*) { notImplemented(); } -void WebFrame::clearUnarchivingState(DocumentLoader*) -{ - notImplemented(); -} - void WebFrame::setMainFrameDocumentReady(bool) { notImplemented(); @@ -1690,47 +1257,6 @@ void WebFrame::didChangeTitle(DocumentLoader*) notImplemented(); } -void WebFrame::finishedLoading(DocumentLoader* loader) -{ - // Telling the frame we received some data and passing 0 as the data is our - // way to get work done that is normally done when the first bit of data is - // received, even for the case of a document with no data (like about:blank) - if (!d->m_pluginView) - committedLoad(loader, 0, 0); - else { - if (d->m_pluginView->status() == PluginStatusLoadedSuccessfully) - d->m_pluginView->didFinishLoading(); - d->m_pluginView = 0; - d->m_hasSentResponseToPlugin = false; - } -} - -void WebFrame::finalSetupForReplace(DocumentLoader*) -{ - notImplemented(); -} - -void WebFrame::setDefersLoading(bool) -{ - notImplemented(); -} - -bool WebFrame::isArchiveLoadPending(ResourceLoader*) const -{ - notImplemented(); - return false; -} - -void WebFrame::cancelPendingArchiveLoad(ResourceLoader*) -{ - notImplemented(); -} - -void WebFrame::clearArchivedResources() -{ - notImplemented(); -} - bool WebFrame::canHandleRequest(const ResourceRequest& request) const { return WebView::canHandleRequest(request); @@ -1791,159 +1317,19 @@ void WebFrame::prepareForDataSourceReplacement() notImplemented(); } -void WebFrame::setTitle(const String& title, const KURL& url) -{ - BOOL privateBrowsingEnabled = FALSE; - COMPtr<IWebPreferences> preferences; - if (SUCCEEDED(d->webView->preferences(&preferences))) - preferences->privateBrowsingEnabled(&privateBrowsingEnabled); - if (!privateBrowsingEnabled) { - // update title in global history - COMPtr<WebHistory> history; - history.adoptRef(webHistory()); - if (history) { - COMPtr<IWebHistoryItem> item; - if (SUCCEEDED(history->itemForURL(BString(url.string()), &item))) { - COMPtr<IWebHistoryItemPrivate> itemPrivate; - if (SUCCEEDED(item->QueryInterface(IID_IWebHistoryItemPrivate, (void**)&itemPrivate))) - itemPrivate->setTitle(BString(title)); - } - } - } -} - String WebFrame::userAgent(const KURL& url) { return d->webView->userAgentForKURL(url); } -void WebFrame::savePlatformDataToCachedPage(CachedPage* cachedPage) -{ - Frame* coreFrame = core(this); - if (!coreFrame) - return; - - ASSERT(coreFrame->loader()->documentLoader() == cachedPage->documentLoader()); - - WebCachedPagePlatformData* webPlatformData = new WebCachedPagePlatformData(static_cast<IWebDataSource*>(getWebDataSource(coreFrame->loader()->documentLoader()))); - cachedPage->setCachedPagePlatformData(webPlatformData); -} - void WebFrame::transitionToCommittedFromCachedPage(CachedPage*) { } -void WebFrame::transitionToCommittedForNewPage() -{ - Frame* frame = core(this); - ASSERT(frame); - - Page* page = frame->page(); - ASSERT(page); - - bool isMainFrame = frame == page->mainFrame(); - - if (isMainFrame && frame->view()) - frame->view()->detachFromWindow(); - - frame->setView(0); - - FrameView* frameView; - if (isMainFrame) { - RECT rect; - d->webView->frameRect(&rect); - frameView = new FrameView(frame, IntRect(rect).size()); - } else - frameView = new FrameView(frame); - - frame->setView(frameView); - frameView->deref(); // FrameViews are created with a ref count of 1. Release this ref since we've assigned it to frame. - - HWND viewWindow; - if (SUCCEEDED(d->webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow)))) - frameView->setContainingWindow(viewWindow); - - if (isMainFrame) - frameView->attachToWindow(); - - if (frame->ownerRenderer()) - frame->ownerRenderer()->setWidget(frameView); - - if (HTMLFrameOwnerElement* owner = frame->ownerElement()) - frame->view()->setScrollbarsMode(owner->scrollingMode()); -} - -void WebFrame::updateGlobalHistoryForStandardLoad(const KURL& url) -{ - COMPtr<WebHistory> history; - history.adoptRef(webHistory()); - - if (!history) - return; - - history->addItemForURL(BString(url.string()), 0); -} - -void WebFrame::updateGlobalHistoryForReload(const KURL& url) -{ - BString urlBStr(url.string()); - - COMPtr<WebHistory> history; - history.adoptRef(webHistory()); - - if (!history) - return; - - COMPtr<IWebHistoryItem> item; - if (SUCCEEDED(history->itemForURL(urlBStr, &item))) { - COMPtr<IWebHistoryItemPrivate> itemPrivate; - if (SUCCEEDED(item->QueryInterface(IID_IWebHistoryItemPrivate, (void**)&itemPrivate))) { - SYSTEMTIME currentTime; - GetSystemTime(¤tTime); - DATE visitedTime = 0; - SystemTimeToVariantTime(¤tTime, &visitedTime); - - // FIXME - bumping the last visited time doesn't mark the history as changed - itemPrivate->setLastVisitedTimeInterval(visitedTime); - } - } -} - -bool WebFrame::shouldGoToHistoryItem(HistoryItem*) const -{ - return true; -} - void WebFrame::saveViewStateToItem(HistoryItem*) { } -bool WebFrame::canCachePage() const -{ - return true; -} - -PassRefPtr<DocumentLoader> WebFrame::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData) -{ - RefPtr<WebDocumentLoader> loader = new WebDocumentLoader(request, substituteData); - - COMPtr<WebDataSource> dataSource; - dataSource.adoptRef(WebDataSource::createInstance(loader.get())); - - loader->setDataSource(dataSource.get()); - return loader.release(); -} - -void WebFrame::setMainDocumentError(DocumentLoader*, const ResourceError& error) -{ - if (d->m_pluginView) { - if (d->m_pluginView->status() == PluginStatusLoadedSuccessfully) - d->m_pluginView->didFail(error); - d->m_pluginView = 0; - d->m_hasSentResponseToPlugin = false; - } -} - ResourceError WebFrame::cancelledError(const ResourceRequest& request) { // FIXME: Need ChickenCat to include CFNetwork/CFURLError.h to get these values @@ -1981,25 +1367,14 @@ ResourceError WebFrame::fileDoesNotExistError(const ResourceResponse&) return ResourceError(); } -bool WebFrame::shouldFallBack(const ResourceError& error) +ResourceError WebFrame::pluginWillHandleLoadError(const ResourceResponse& response) { - return error.errorCode() != WebURLErrorCancelled; + return ResourceError(String(WebKitErrorDomain), WebKitErrorPlugInWillHandleLoad, response.url().string(), String()); } -void WebFrame::receivedData(const char* data, int length, const String& textEncoding) +bool WebFrame::shouldFallBack(const ResourceError& error) { - Frame* coreFrame = core(this); - if (!coreFrame) - return; - - // Set the encoding. This only needs to be done once, but it's harmless to do it again later. - String encoding = coreFrame->loader()->documentLoader()->overrideEncoding(); - bool userChosen = !encoding.isNull(); - if (encoding.isNull()) - encoding = textEncoding; - coreFrame->loader()->setEncoding(encoding, userChosen); - - coreFrame->loader()->addData(data, length); + return error.errorCode() != WebURLErrorCancelled; } COMPtr<WebFramePolicyListener> WebFrame::setUpPolicyListener(WebCore::FramePolicyFunction function) @@ -2034,28 +1409,6 @@ void WebFrame::receivedPolicyDecision(PolicyAction action) (coreFrame->loader()->*function)(action); } -void WebFrame::committedLoad(DocumentLoader* loader, const char* data, int length) -{ - // FIXME: This should probably go through the data source. - const String& textEncoding = loader->response().textEncodingName(); - - if (!d->m_pluginView) - receivedData(data, length, textEncoding); - - if (d->m_pluginView && d->m_pluginView->status() == PluginStatusLoadedSuccessfully) { - if (!d->m_hasSentResponseToPlugin) { - d->m_pluginView->didReceiveResponse(d->frame->loader()->documentLoader()->response()); - // didReceiveResponse sets up a new stream to the plug-in. on a full-page plug-in, a failure in - // setting up this stream can cause the main document load to be cancelled, setting m_pluginView - // to null - if (!d->m_pluginView) - return; - d->m_hasSentResponseToPlugin = true; - } - d->m_pluginView->didReceiveData(data, length); - } -} - void WebFrame::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const String& mimeType, const ResourceRequest& request) { Frame* coreFrame = core(this); @@ -2073,7 +1426,7 @@ void WebFrame::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, con (coreFrame->loader()->*function)(PolicyUse); } -void WebFrame::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& request, const String& frameName) +void WebFrame::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& request, PassRefPtr<FormState> formState, const String& frameName) { Frame* coreFrame = core(this); ASSERT(coreFrame); @@ -2083,7 +1436,7 @@ void WebFrame::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction functi policyDelegate = DefaultPolicyDelegate::sharedInstance(); COMPtr<IWebURLRequest> urlRequest(AdoptCOM, WebMutableURLRequest::createInstance(request)); - COMPtr<WebActionPropertyBag> actionInformation(AdoptCOM, WebActionPropertyBag::createInstance(action, coreFrame)); + COMPtr<WebActionPropertyBag> actionInformation(AdoptCOM, WebActionPropertyBag::createInstance(action, formState ? formState->form() : 0, coreFrame)); if (SUCCEEDED(policyDelegate->decidePolicyForNewWindowAction(d->webView, actionInformation.get(), urlRequest.get(), BString(frameName), setUpPolicyListener(function).get()))) return; @@ -2091,7 +1444,7 @@ void WebFrame::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction functi (coreFrame->loader()->*function)(PolicyUse); } -void WebFrame::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& request) +void WebFrame::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& request, PassRefPtr<FormState> formState) { Frame* coreFrame = core(this); ASSERT(coreFrame); @@ -2101,7 +1454,7 @@ void WebFrame::dispatchDecidePolicyForNavigationAction(FramePolicyFunction funct policyDelegate = DefaultPolicyDelegate::sharedInstance(); COMPtr<IWebURLRequest> urlRequest(AdoptCOM, WebMutableURLRequest::createInstance(request)); - COMPtr<WebActionPropertyBag> actionInformation(AdoptCOM, WebActionPropertyBag::createInstance(action, coreFrame)); + COMPtr<WebActionPropertyBag> actionInformation(AdoptCOM, WebActionPropertyBag::createInstance(action, formState ? formState->form() : 0, coreFrame)); if (SUCCEEDED(policyDelegate->decidePolicyForNavigationAction(d->webView, actionInformation.get(), urlRequest.get(), this, setUpPolicyListener(function).get()))) return; @@ -2138,82 +1491,6 @@ void WebFrame::download(ResourceHandle* handle, const ResourceRequest& request, download.adoptRef(WebDownload::createInstance(handle, request, response, downloadDelegate.get())); } -bool WebFrame::willUseArchive(ResourceLoader*, const ResourceRequest&, const KURL&) const -{ - notImplemented(); - return false; -} - -void WebFrame::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request) -{ - COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; - if (SUCCEEDED(d->webView->resourceLoadDelegate(&resourceLoadDelegate))) { - COMPtr<IWebURLRequest> webURLRequest; - webURLRequest.adoptRef(WebMutableURLRequest::createInstance(request)); - - resourceLoadDelegate->identifierForInitialRequest(d->webView, webURLRequest.get(), getWebDataSource(loader), identifier); - } -} - -void WebFrame::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse) -{ - COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; - if (SUCCEEDED(d->webView->resourceLoadDelegate(&resourceLoadDelegate))) { - COMPtr<IWebURLRequest> webURLRequest; - webURLRequest.adoptRef(WebMutableURLRequest::createInstance(request)); - COMPtr<IWebURLResponse> webURLRedirectResponse; - webURLRedirectResponse.adoptRef(WebURLResponse::createInstance(redirectResponse)); - COMPtr<IWebURLRequest> newWebURLRequest; - - if (FAILED(resourceLoadDelegate->willSendRequest(d->webView, identifier, webURLRequest.get(), webURLRedirectResponse.get(), getWebDataSource(loader), &newWebURLRequest))) - return; - - if (webURLRequest == newWebURLRequest) - return; - - COMPtr<WebMutableURLRequest> newWebURLRequestImpl; - if (FAILED(newWebURLRequest->QueryInterface(&newWebURLRequestImpl))) - return; - - request = newWebURLRequestImpl->resourceRequest(); - } -} - -void WebFrame::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response) -{ - COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; - if (SUCCEEDED(d->webView->resourceLoadDelegate(&resourceLoadDelegate))) { - COMPtr<IWebURLResponse> webURLResponse; - webURLResponse.adoptRef(WebURLResponse::createInstance(response)); - - resourceLoadDelegate->didReceiveResponse(d->webView, identifier, webURLResponse.get(), getWebDataSource(loader)); - } -} - -void WebFrame::dispatchDidReceiveContentLength(DocumentLoader* loader, unsigned long identifier, int length) -{ - COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; - if (SUCCEEDED(d->webView->resourceLoadDelegate(&resourceLoadDelegate))) - resourceLoadDelegate->didReceiveContentLength(d->webView, identifier, length, getWebDataSource(loader)); -} - -void WebFrame::dispatchDidFinishLoading(DocumentLoader* loader, unsigned long identifier) -{ - COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; - if (SUCCEEDED(d->webView->resourceLoadDelegate(&resourceLoadDelegate))) - resourceLoadDelegate->didFinishLoadingFromDataSource(d->webView, identifier, getWebDataSource(loader)); -} - -void WebFrame::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError& error) -{ - COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; - if (SUCCEEDED(d->webView->resourceLoadDelegate(&resourceLoadDelegate))) { - COMPtr<IWebError> webError; - webError.adoptRef(WebError::createInstance(error)); - resourceLoadDelegate->didFailLoadingWithError(d->webView, identifier, webError.get(), getWebDataSource(loader)); - } -} - bool WebFrame::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int /*length*/) { notImplemented(); @@ -2240,178 +1517,14 @@ void WebFrame::dispatchDidFailLoad(const ResourceError& error) } } -Frame* WebFrame::dispatchCreatePage() -{ - COMPtr<IWebUIDelegate> ui; - - if (SUCCEEDED(d->webView->uiDelegate(&ui))) { - COMPtr<IWebView> newWebView; - - if (SUCCEEDED(ui->createWebViewWithRequest(d->webView, 0, &newWebView))) { - COMPtr<IWebFrame> mainFrame; - - if (SUCCEEDED(newWebView->mainFrame(&mainFrame))) { - COMPtr<WebFrame> mainFrameImpl; - - if (SUCCEEDED(mainFrame->QueryInterface(IID_WebFrame, (void**)&mainFrameImpl))) - return core(mainFrameImpl.get()); - } - } - } - return 0; -} - -void WebFrame::postProgressStartedNotification() -{ - static BSTR progressStartedName = SysAllocString(WebViewProgressStartedNotification); - IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal(); - notifyCenter->postNotificationName(progressStartedName, static_cast<IWebView*>(d->webView), 0); -} - -void WebFrame::postProgressEstimateChangedNotification() -{ - static BSTR progressEstimateChangedName = SysAllocString(WebViewProgressEstimateChangedNotification); - IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal(); - notifyCenter->postNotificationName(progressEstimateChangedName, static_cast<IWebView*>(d->webView), 0); -} - -void WebFrame::postProgressFinishedNotification() -{ - static BSTR progressFinishedName = SysAllocString(WebViewProgressFinishedNotification); - IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal(); - notifyCenter->postNotificationName(progressFinishedName, static_cast<IWebView*>(d->webView), 0); -} - void WebFrame::startDownload(const ResourceRequest&) { notImplemented(); } -void WebFrame::dispatchDidReceiveAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge& challenge) -{ - ASSERT(challenge.sourceHandle()); - - COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; - if (SUCCEEDED(d->webView->resourceLoadDelegate(&resourceLoadDelegate))) { - COMPtr<IWebURLAuthenticationChallenge> webChallenge(AdoptCOM, WebURLAuthenticationChallenge::createInstance(challenge)); - - if (SUCCEEDED(resourceLoadDelegate->didReceiveAuthenticationChallenge(d->webView, identifier, webChallenge.get(), getWebDataSource(loader)))) - return; - } - - // If the ResourceLoadDelegate doesn't exist or fails to handle the call, we tell the ResourceHandle - // to continue without credential - this is the best approximation of Mac behavior - challenge.sourceHandle()->receivedRequestToContinueWithoutCredential(challenge); -} - -void WebFrame::dispatchDidCancelAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge& challenge) -{ - COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; - if (SUCCEEDED(d->webView->resourceLoadDelegate(&resourceLoadDelegate))) { - COMPtr<IWebURLAuthenticationChallenge> webChallenge(AdoptCOM, WebURLAuthenticationChallenge::createInstance(challenge)); - - if (SUCCEEDED(resourceLoadDelegate->didCancelAuthenticationChallenge(d->webView, identifier, webChallenge.get(), getWebDataSource(loader)))) - return; - } -} - -PassRefPtr<Frame> WebFrame::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, - const String& referrer, bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/) -{ - RefPtr<Frame> result = createFrame(url, name, ownerElement, referrer); - if (!result) - return 0; - - // Propagate the marginwidth/height and scrolling modes to the view. - if (ownerElement->hasTagName(frameTag) || ownerElement->hasTagName(iframeTag)) { - HTMLFrameElement* frameElt = static_cast<HTMLFrameElement*>(ownerElement); - if (frameElt->scrollingMode() == ScrollbarAlwaysOff) - result->view()->setScrollbarsMode(ScrollbarAlwaysOff); - int marginWidth = frameElt->getMarginWidth(); - int marginHeight = frameElt->getMarginHeight(); - if (marginWidth != -1) - result->view()->setMarginWidth(marginWidth); - if (marginHeight != -1) - result->view()->setMarginHeight(marginHeight); - } - - return result.release(); -} - -Widget* WebFrame::createPlugin(const IntSize& pluginSize, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) -{ - PluginView* pluginView = PluginDatabase::installedPlugins()->createPluginView(core(this), pluginSize, element, url, paramNames, paramValues, mimeType, loadManually); - - if (pluginView->status() == PluginStatusLoadedSuccessfully) - return pluginView; - - COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate; - - if (FAILED(d->webView->resourceLoadDelegate(&resourceLoadDelegate))) - return pluginView; - - RetainPtr<CFMutableDictionaryRef> userInfo(AdoptCF, CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); - - unsigned count = (unsigned)paramNames.size(); - for (unsigned i = 0; i < count; i++) { - if (paramNames[i] == "pluginspage") { - static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInPageURLStringKey); - RetainPtr<CFStringRef> str(AdoptCF, paramValues[i].createCFString()); - CFDictionarySetValue(userInfo.get(), key, str.get()); - break; - } - } - - if (!mimeType.isNull()) { - static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorMIMETypeKey); - - RetainPtr<CFStringRef> str(AdoptCF, mimeType.createCFString()); - CFDictionarySetValue(userInfo.get(), key, str.get()); - } - - String pluginName; - if (pluginView->plugin()) - pluginName = pluginView->plugin()->name(); - if (!pluginName.isNull()) { - static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInNameKey); - RetainPtr<CFStringRef> str(AdoptCF, pluginName.createCFString()); - CFDictionarySetValue(userInfo.get(), key, str.get()); - } - - COMPtr<CFDictionaryPropertyBag> userInfoBag(AdoptCOM, CFDictionaryPropertyBag::createInstance()); - userInfoBag->setDictionary(userInfo.get()); - - int errorCode = 0; - switch (pluginView->status()) { - case PluginStatusCanNotFindPlugin: - errorCode = WebKitErrorCannotFindPlugIn; - break; - case PluginStatusCanNotLoadPlugin: - errorCode = WebKitErrorCannotLoadPlugIn; - break; - default: - ASSERT_NOT_REACHED(); - } - - ResourceError resourceError(String(WebKitErrorDomain), errorCode, url.string(), String()); - COMPtr<IWebError> error(AdoptCOM, WebError::createInstance(resourceError, userInfoBag.get())); - - resourceLoadDelegate->plugInFailedWithError(d->webView, error.get(), getWebDataSource(d->frame->loader()->documentLoader())); - - return pluginView; -} - -void WebFrame::redirectDataToPlugin(Widget* pluginWidget) -{ - // Ideally, this function shouldn't be necessary, see <rdar://problem/4852889> - - d->m_pluginView = static_cast<PluginView*>(pluginWidget); -} - Widget* WebFrame::createJavaAppletWidget(const IntSize& pluginSize, Element* element, const KURL& /*baseURL*/, const Vector<String>& paramNames, const Vector<String>& paramValues) { - PluginView* pluginView = PluginDatabase::installedPlugins()-> - createPluginView(core(this), pluginSize, element, KURL(), paramNames, paramValues, "application/x-java-applet", false); + PluginView* pluginView = PluginView::create(core(this), pluginSize, element, KURL(), paramNames, paramValues, "application/x-java-applet", false); // Check if the plugin can be loaded successfully if (pluginView->plugin() && pluginView->plugin()->load()) @@ -2435,7 +1548,7 @@ ObjectContentType WebFrame::objectContentType(const KURL& url, const String& mim { String mimeType = mimeTypeIn; if (mimeType.isEmpty()) - mimeType = MIMETypeRegistry::getMIMETypeForExtension(url.path().mid(url.path().findRev('.')+1)); + mimeType = MIMETypeRegistry::getMIMETypeForExtension(url.path().substring(url.path().reverseFind('.') + 1)); if (mimeType.isEmpty()) return ObjectContentFrame; // Go ahead and hope that we can display the content. @@ -2471,19 +1584,14 @@ void WebFrame::windowObjectCleared() if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) { COMPtr<IWebFrameLoadDelegate2> frameLoadDelegate2(Query, frameLoadDelegate); - JSContextRef context = toRef(coreFrame->scriptProxy()->globalObject()->globalExec()); - JSObjectRef windowObject = toRef(KJS::Window::retrieve(coreFrame)->getObject()); + JSContextRef context = toRef(coreFrame->script()->globalObject()->globalExec()); + JSObjectRef windowObject = toRef(coreFrame->script()->globalObject()); ASSERT(windowObject); if (!frameLoadDelegate2 || FAILED(frameLoadDelegate2->didClearWindowObject(d->webView, context, windowObject, this))) frameLoadDelegate->windowScriptObjectAvailable(d->webView, context, windowObject); } - - if (WebScriptDebugServer::listenerCount() > 0) { - detachScriptDebugger(); - attachScriptDebugger(); - } } void WebFrame::didPerformFirstNavigation() const @@ -2726,7 +1834,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::spoolPages( CGContextTranslateCTM(pctx, CGFloat(-pageRect.x()), CGFloat(-pageRect.y()+headerHeight)); // reserves space for header CGContextSetBaseCTM(pctx, ctm); - coreFrame->paint(&spoolCtx, pageRect); + coreFrame->view()->paintContents(&spoolCtx, pageRect); if (ui2) { CGContextTranslateCTM(pctx, CGFloat(pageRect.x()), CGFloat(pageRect.y())-headerHeight); @@ -2813,8 +1921,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::hasScrollBars( if (!view) return E_FAIL; - if (view->vScrollbarMode() == ScrollbarAlwaysOn || view->visibleHeight() < view->contentsHeight() || - view->hScrollbarMode() == ScrollbarAlwaysOn || view->visibleWidth() < view->contentsWidth()) + if (view->horizontalScrollbar() || view->verticalScrollbar()) *result = TRUE; return S_OK; @@ -2855,7 +1962,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::frameBounds( if (!view) return E_FAIL; - FloatRect bounds = view->visibleContentRectConsideringExternalScrollers(); + FloatRect bounds = view->visibleContentRect(true); result->bottom = (LONG) bounds.height(); result->right = (LONG) bounds.width(); return S_OK; @@ -2870,8 +1977,8 @@ HRESULT STDMETHODCALLTYPE WebFrame::isDescendantOfFrame( *result = FALSE; Frame* coreFrame = core(this); - COMPtr<WebFrame> ancestorWebFrame; - if (!ancestor || FAILED(ancestor->QueryInterface(IID_WebFrame, (void**)&ancestorWebFrame))) + COMPtr<WebFrame> ancestorWebFrame(Query, ancestor); + if (!ancestorWebFrame) return S_OK; *result = (coreFrame && coreFrame->tree()->isDescendantOf(core(ancestorWebFrame.get()))) ? TRUE : FALSE; @@ -2901,3 +2008,41 @@ void WebFrame::unmarkAllBadGrammar() doc->removeMarkers(DocumentMarker::Grammar); } } + +WebView* WebFrame::webView() const +{ + return d->webView; +} + +COMPtr<IAccessible> WebFrame::accessible() const +{ + Frame* coreFrame = core(this); + ASSERT(coreFrame); + + Document* currentDocument = coreFrame->document(); + if (!currentDocument) + m_accessible = 0; + else if (!m_accessible || m_accessible->document() != currentDocument) { + // Either we've never had a wrapper for this frame's top-level Document, + // the Document renderer was destroyed and its wrapper was detached, or + // the previous Document is in the page cache, and the current document + // needs to be wrapped. + m_accessible = new AccessibleDocument(currentDocument); + } + return m_accessible.get(); +} + +void WebFrame::updateBackground() +{ + Color backgroundColor = webView()->transparent() ? Color::transparent : Color::white; + Frame* coreFrame = core(this); + for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { + FrameView* view = frame->view(); + if (!view) + continue; + + view->setTransparent(webView()->transparent()); + view->setBaseBackgroundColor(backgroundColor); + } +} + diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h index 0729a6a..1bd7478 100644 --- a/WebKit/win/WebFrame.h +++ b/WebKit/win/WebFrame.h @@ -26,14 +26,14 @@ #ifndef WebFrame_H #define WebFrame_H -#include "DOMCore.h" -#include "IWebFormDelegate.h" -#include "IWebFrame.h" -#include "IWebFramePrivate.h" +#include "WebFrameLoaderClient.h" + +#include "WebKit.h" #include "WebDataSource.h" +#include "AccessibleDocument.h" + #pragma warning(push, 0) -#include <WebCore/FrameLoaderClient.h> #include <WebCore/FrameWin.h> #include <WebCore/KURL.h> #include <WebCore/PlatformString.h> @@ -62,7 +62,6 @@ typedef struct OpaqueJSValue* JSObjectRef; class WebFrame; class WebFramePolicyListener; class WebHistory; -class WebScriptDebugger; class WebView; interface IWebHistoryItemPrivate; @@ -70,10 +69,8 @@ interface IWebHistoryItemPrivate; WebFrame* kit(WebCore::Frame*); WebCore::Frame* core(WebFrame*); -extern const GUID IID_WebFrame; - -class WebFrame : public IWebFrame, IWebFramePrivate, IWebDocumentText - , public WebCore::FrameLoaderClient +class DECLSPEC_UUID("{A3676398-4485-4a9d-87DC-CB5A40E6351D}") WebFrame : public IWebFrame, IWebFramePrivate, IWebDocumentText + , public WebFrameLoaderClient { public: static WebFrame* createInstance(); @@ -164,6 +161,13 @@ public: virtual HRESULT STDMETHODCALLTYPE loadType( /* [retval][out] */ WebFrameLoadType* type); + virtual HRESULT STDMETHODCALLTYPE pendingFrameUnloadEventCount( + /* [retval][out] */ UINT* result); + + virtual HRESULT STDMETHODCALLTYPE fetchApplicationIcon( + /* [in] */ IWebIconFetcherDelegate *delegate, + /* [retval][out] */ IWebIconFetcher **result); + virtual HRESULT STDMETHODCALLTYPE setInPrintingMode( /* [in] */ BOOL value, /* [in] */ HDC printDC); @@ -206,6 +210,20 @@ public: virtual HRESULT STDMETHODCALLTYPE allowsScrolling( /* [retval][out] */ BOOL *flag); + virtual HRESULT STDMETHODCALLTYPE setIsDisconnected( + /* [in] */ BOOL flag); + + virtual HRESULT STDMETHODCALLTYPE setExcludeFromTextSearch( + /* [in] */ BOOL flag); + + virtual HRESULT STDMETHODCALLTYPE paintDocumentRectToContext( + /* [in] */ RECT rect, + /* [in] */ OLE_HANDLE deviceContext); + + virtual HRESULT STDMETHODCALLTYPE elementDoesAutoComplete( + /* [in] */ IDOMElement* element, + /* [retval][out] */ BOOL* result); + // IWebDocumentText virtual HRESULT STDMETHODCALLTYPE supportsTextEncoding( /* [retval][out] */ BOOL* result); @@ -216,55 +234,20 @@ public: virtual HRESULT STDMETHODCALLTYPE selectAll(); virtual HRESULT STDMETHODCALLTYPE deselectAll(); - - // FrameWinClient - virtual void ref(); - virtual void deref(); - - virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL&, const WebCore::String& name, WebCore::HTMLFrameOwnerElement*, const WebCore::String& referrer); - virtual void openURL(const WebCore::String& URL, const WebCore::Event* triggeringEvent, bool newWindow, bool lockHistory); - virtual void windowScriptObjectAvailable(JSContextRef context, JSObjectRef windowObject); // FrameLoaderClient virtual void frameLoaderDestroyed(); - virtual bool hasWebView() const; - virtual bool hasFrameView() const; virtual void makeRepresentation(WebCore::DocumentLoader*); - virtual void forceLayout(); virtual void forceLayoutForNonHTML(); virtual void setCopiesOnScroll(); - virtual void detachedFromParent1(); virtual void detachedFromParent2(); virtual void detachedFromParent3(); - virtual void detachedFromParent4(); - virtual void dispatchDidHandleOnloadEvents(); - virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); - virtual void dispatchDidCancelClientRedirect(); - virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate); - virtual void dispatchDidChangeLocationWithinPage(); - virtual void dispatchWillClose(); - virtual void dispatchDidReceiveIcon(); - virtual void dispatchDidStartProvisionalLoad(); - virtual void dispatchDidReceiveTitle(const WebCore::String& title); - virtual void dispatchDidCommitLoad(); - virtual void dispatchDidFinishDocumentLoad(); - virtual void dispatchDidFinishLoad(); - virtual void dispatchDidFirstLayout(); - virtual void dispatchShow(); virtual void cancelPolicyCheck(); virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>); - virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*); virtual void revertToProvisionalState(WebCore::DocumentLoader*); - virtual void clearUnarchivingState(WebCore::DocumentLoader*); virtual void setMainFrameDocumentReady(bool); virtual void willChangeTitle(WebCore::DocumentLoader*); virtual void didChangeTitle(WebCore::DocumentLoader*); - virtual void finishedLoading(WebCore::DocumentLoader*); - virtual void finalSetupForReplace(WebCore::DocumentLoader*); - virtual void setDefersLoading(bool); - virtual bool isArchiveLoadPending(WebCore::ResourceLoader*) const; - virtual void cancelPendingArchiveLoad(WebCore::ResourceLoader*); - virtual void clearArchivedResources(); virtual bool canHandleRequest(const WebCore::ResourceRequest&) const; virtual bool canShowMIMEType(const WebCore::String& MIMEType) const; virtual bool representationExistsForURLScheme(const WebCore::String& URLScheme) const; @@ -276,55 +259,27 @@ public: virtual void addHistoryItemForFragmentScroll(); virtual void didFinishLoad(); virtual void prepareForDataSourceReplacement(); - virtual void setTitle(const WebCore::String& title, const WebCore::KURL&); virtual WebCore::String userAgent(const WebCore::KURL&); - virtual void savePlatformDataToCachedPage(WebCore::CachedPage*); virtual void transitionToCommittedFromCachedPage(WebCore::CachedPage*); - virtual void transitionToCommittedForNewPage(); - virtual void updateGlobalHistoryForStandardLoad(const WebCore::KURL &); - virtual void updateGlobalHistoryForReload(const WebCore::KURL &); - virtual bool shouldGoToHistoryItem(WebCore::HistoryItem *) const; virtual void saveViewStateToItem(WebCore::HistoryItem *); - virtual bool canCachePage(void) const; - virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&); - virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&); virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&); virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&); virtual WebCore::ResourceError cannotShowURLError(const WebCore::ResourceRequest&); virtual WebCore::ResourceError interruptForPolicyChangeError(const WebCore::ResourceRequest&); virtual WebCore::ResourceError cannotShowMIMETypeError(const WebCore::ResourceResponse&); virtual WebCore::ResourceError fileDoesNotExistError(const WebCore::ResourceResponse&); + virtual WebCore::ResourceError pluginWillHandleLoadError(const WebCore::ResourceResponse&); virtual bool shouldFallBack(const WebCore::ResourceError&); - virtual void committedLoad(WebCore::DocumentLoader*, const char*, int); virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction, const WebCore::String& MIMEType, const WebCore::ResourceRequest&); - virtual void dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::String& frameName); - virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction, const WebCore::NavigationAction&, const WebCore::ResourceRequest&); + virtual void dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr<WebCore::FormState>, const WebCore::String& frameName); + virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr<WebCore::FormState>); virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&); - virtual bool willUseArchive(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, const WebCore::KURL& originalURL) const; virtual void download(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&); - virtual void assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&); - virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse); - virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&); - virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived); - virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier); - virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&); virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length); virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&); virtual void dispatchDidFailLoad(const WebCore::ResourceError&); - virtual WebCore::Frame* dispatchCreatePage(); virtual void startDownload(const WebCore::ResourceRequest&); - virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); - virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); - - virtual void postProgressStartedNotification(); - virtual void postProgressEstimateChangedNotification(); - virtual void postProgressFinishedNotification(); - - virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WebCore::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, - const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual WebCore::Widget* createPlugin(const WebCore::IntSize&, WebCore::Element*, const WebCore::KURL&, const Vector<WebCore::String>&, const Vector<WebCore::String>&, const WebCore::String&, bool loadManually); - virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); virtual WebCore::Widget* createJavaAppletWidget(const WebCore::IntSize&, WebCore::Element*, const WebCore::KURL& baseURL, const Vector<WebCore::String>& paramNames, const Vector<WebCore::String>& paramValues); @@ -337,39 +292,38 @@ public: virtual void registerForIconNotification(bool listen); // WebFrame - void initWithWebFrameView(IWebFrameView*, IWebView*, WebCore::Page*, WebCore::HTMLFrameOwnerElement*); + PassRefPtr<WebCore::Frame> init(IWebView*, WebCore::Page*, WebCore::HTMLFrameOwnerElement*); WebCore::Frame* impl(); void invalidate(); - void receivedData(const char*, int, const WebCore::String&); void unmarkAllMisspellings(); void unmarkAllBadGrammar(); + void updateBackground(); + // WebFrame (matching WebCoreFrameBridge) void setTextSizeMultiplier(float multiplier); HRESULT inViewSourceMode(BOOL *flag); HRESULT setInViewSourceMode(BOOL flag); HRESULT elementWithName(BSTR name, IDOMElement* form, IDOMElement** element); HRESULT formForElement(IDOMElement* element, IDOMElement** form); - HRESULT elementDoesAutoComplete(IDOMElement* element, bool* result); HRESULT controlsInForm(IDOMElement* form, IDOMElement** controls, int* cControls); HRESULT elementIsPassword(IDOMElement* element, bool* result); HRESULT searchForLabelsBeforeElement(const BSTR* labels, int cLabels, IDOMElement* beforeElement, BSTR* result); HRESULT matchLabelsAgainstElement(const BSTR* labels, int cLabels, IDOMElement* againstElement, BSTR* result); HRESULT canProvideDocumentSource(bool* result); - WebHistory* webHistory(); COMPtr<WebFramePolicyListener> setUpPolicyListener(WebCore::FramePolicyFunction function); void receivedPolicyDecision(WebCore::PolicyAction); WebCore::KURL url() const; - virtual void attachScriptDebugger(); - virtual void detachScriptDebugger(); + WebView* webView() const; + + COMPtr<IAccessible> accessible() const; protected: void loadHTMLString(BSTR string, BSTR baseURL, BSTR unreachableURL); void loadData(PassRefPtr<WebCore::SharedBuffer>, BSTR mimeType, BSTR textEncodingName, BSTR baseURL, BSTR failingURL); - void loadURLIntoChild(const WebCore::KURL&, const WebCore::String& referrer, WebFrame* childFrame); const Vector<WebCore::IntRect>& computePageRects(HDC printDC); void setPrinting(bool printing, float minPageWidth, float maxPageWidth, bool adjustViewSize); void headerAndFooterHeights(float*, float*); @@ -384,9 +338,7 @@ protected: bool m_inPrintingMode; Vector<WebCore::IntRect> m_pageRects; int m_pageHeight; // height of the page adjusted by margins - -private: - OwnPtr<WebScriptDebugger> m_scriptDebugger; + mutable COMPtr<AccessibleDocument> m_accessible; }; #endif diff --git a/WebKit/win/WebFramePolicyListener.cpp b/WebKit/win/WebFramePolicyListener.cpp index 40cb1f9..e82043d 100644 --- a/WebKit/win/WebFramePolicyListener.cpp +++ b/WebKit/win/WebFramePolicyListener.cpp @@ -44,11 +44,13 @@ WebFramePolicyListener::WebFramePolicyListener(PassRefPtr<Frame> frame) , m_frame(frame) { gClassCount++; + gClassNameCount.add("WebFramePolicyListener"); } WebFramePolicyListener::~WebFramePolicyListener() { gClassCount--; + gClassNameCount.remove("WebFramePolicyListener"); } WebFramePolicyListener* WebFramePolicyListener::createInstance(PassRefPtr<Frame> frame) diff --git a/WebKit/win/WebFramePolicyListener.h b/WebKit/win/WebFramePolicyListener.h index de78318..42f6d94 100644 --- a/WebKit/win/WebFramePolicyListener.h +++ b/WebKit/win/WebFramePolicyListener.h @@ -26,9 +26,7 @@ #ifndef WebFramePolicyListener_h #define WebFramePolicyListener_h -#include "IWebView.h" -#include "IWebFormDelegate.h" -#include "IWebPolicyDelegate.h" +#include "WebKit.h" #include <WTF/PassRefPtr.h> #include <WTF/RefPtr.h> diff --git a/WebKit/win/WebHTMLRepresentation.cpp b/WebKit/win/WebHTMLRepresentation.cpp index 106afd3..5e5d56b 100644 --- a/WebKit/win/WebHTMLRepresentation.cpp +++ b/WebKit/win/WebHTMLRepresentation.cpp @@ -27,7 +27,7 @@ #include "WebKitDLL.h" #include "WebHTMLRepresentation.h" -#include "DOMCore.h" +#include "WebKit.h" #include "WebFrame.h" #include "WebKitStatisticsPrivate.h" #pragma warning(push, 0) @@ -46,6 +46,7 @@ WebHTMLRepresentation::WebHTMLRepresentation() { WebHTMLRepresentationCount++; gClassCount++; + gClassNameCount.add("WebHTMLRepresentation"); } WebHTMLRepresentation::~WebHTMLRepresentation() @@ -57,6 +58,7 @@ WebHTMLRepresentation::~WebHTMLRepresentation() WebHTMLRepresentationCount--; gClassCount--; + gClassNameCount.remove("WebHTMLRepresentation"); } WebHTMLRepresentation* WebHTMLRepresentation::createInstance(WebFrame* frame) @@ -152,7 +154,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementDoesAutoComplete( /* [in] */ IDOMElement* element, /* [retval][out] */ BOOL* result) { - bool doesAutoComplete; + BOOL doesAutoComplete; HRESULT hr = m_frame->elementDoesAutoComplete(element, &doesAutoComplete); *result = doesAutoComplete ? TRUE : FALSE; return hr; diff --git a/WebKit/win/WebHTMLRepresentation.h b/WebKit/win/WebHTMLRepresentation.h index f03c42f..01b8988 100644 --- a/WebKit/win/WebHTMLRepresentation.h +++ b/WebKit/win/WebHTMLRepresentation.h @@ -26,8 +26,7 @@ #ifndef WebHTMLRepresentation_H #define WebHTMLRepresentation_H -#include "IWebHTMLRepresentation.h" -#include "IWebDocument.h" +#include "WebKit.h" class WebFrame; diff --git a/WebKit/win/WebHistory.cpp b/WebKit/win/WebHistory.cpp index 47e6424..d0bc07a 100644 --- a/WebKit/win/WebHistory.cpp +++ b/WebKit/win/WebHistory.cpp @@ -28,37 +28,26 @@ #include "WebHistory.h" #include "CFDictionaryPropertyBag.h" -#include "IWebURLResponse.h" +#include "WebKit.h" #include "MarshallingHelpers.h" #include "WebHistoryItem.h" #include "WebKit.h" #include "WebNotificationCenter.h" #include "WebPreferences.h" #include <CoreFoundation/CoreFoundation.h> -#include <WebCore/WebCoreHistory.h> #pragma warning( push, 0 ) #include <wtf/Vector.h> +#include <WebCore/KURL.h> +#include <WebCore/PageGroup.h> #pragma warning( pop ) +using namespace WebCore; + CFStringRef DatesArrayKey = CFSTR("WebHistoryDates"); CFStringRef FileVersionKey = CFSTR("WebHistoryFileVersion"); -const IID IID_IWebHistoryPrivate = { 0x3de04e59, 0x93f9, 0x4369, { 0x8b, 0x43, 0x97, 0x64, 0x58, 0xd7, 0xe3, 0x19 } }; - #define currentFileVersion 1 -class _WebCoreHistoryProvider : public WebCore::WebCoreHistoryProvider { -public: - _WebCoreHistoryProvider(IWebHistory* history); - ~_WebCoreHistoryProvider(); - - virtual bool containsURL(const UChar* unicode, unsigned length); - -private: - IWebHistory* m_history; - IWebHistoryPrivate* m_historyPrivate; -}; - static bool areEqualOrClose(double d1, double d2) { double diff = d1-d2; @@ -97,13 +86,12 @@ static void releaseUserInfo(CFDictionaryPropertyBag* userInfo) // WebHistory ----------------------------------------------------------------- -IWebHistory* WebHistory::m_optionalSharedHistory = 0; - WebHistory::WebHistory() : m_refCount(0) , m_preferences(0) { gClassCount++; + gClassNameCount.add("WebHistory"); m_entriesByURL.adoptCF(CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &MarshallingHelpers::kIUnknownDictionaryValueCallBacks)); m_datesWithEntries.adoptCF(CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks)); @@ -115,6 +103,7 @@ WebHistory::WebHistory() WebHistory::~WebHistory() { gClassCount--; + gClassNameCount.remove("WebHistory"); } WebHistory* WebHistory::createInstance() @@ -159,8 +148,6 @@ HRESULT STDMETHODCALLTYPE WebHistory::QueryInterface(REFIID riid, void** ppvObje *ppvObject = static_cast<IWebHistory*>(this); else if (IsEqualGUID(riid, IID_IWebHistory)) *ppvObject = static_cast<IWebHistory*>(this); - else if (IsEqualGUID(riid, IID_IWebHistoryPrivate)) - *ppvObject = static_cast<IWebHistoryPrivate*>(this); else return E_NOINTERFACE; @@ -184,32 +171,34 @@ ULONG STDMETHODCALLTYPE WebHistory::Release(void) // IWebHistory ---------------------------------------------------------------- +static inline COMPtr<WebHistory>& sharedHistoryStorage() +{ + static COMPtr<WebHistory> sharedHistory; + return sharedHistory; +} + +WebHistory* WebHistory::sharedHistory() +{ + return sharedHistoryStorage().get(); +} + HRESULT STDMETHODCALLTYPE WebHistory::optionalSharedHistory( /* [retval][out] */ IWebHistory** history) { - *history = m_optionalSharedHistory; - if (m_optionalSharedHistory) - m_optionalSharedHistory->AddRef(); - + *history = sharedHistory(); + if (*history) + (*history)->AddRef(); return S_OK; } HRESULT STDMETHODCALLTYPE WebHistory::setOptionalSharedHistory( /* [in] */ IWebHistory* history) { - if (m_optionalSharedHistory) { - m_optionalSharedHistory->Release(); - m_optionalSharedHistory = 0; - } - - _WebCoreHistoryProvider* coreHistory = 0; - m_optionalSharedHistory = history; - if (history) { - history->AddRef(); - coreHistory = new _WebCoreHistoryProvider(history); - } - WebCore::WebCoreHistory::setHistoryProvider(coreHistory); - + if (sharedHistoryStorage() == history) + return S_OK; + sharedHistoryStorage().query(history); + PageGroup::setShouldTrackVisitedLinks(sharedHistoryStorage()); + PageGroup::removeAllVisitedLinks(); return S_OK; } @@ -467,6 +456,8 @@ HRESULT STDMETHODCALLTYPE WebHistory::removeAllItems( void) CFArrayRemoveAllValues(m_datesWithEntries.get()); CFDictionaryRemoveAllValues(m_entriesByURL.get()); + PageGroup::removeAllVisitedLinks(); + return postNotification(kWebHistoryAllItemsRemovedNotification); } @@ -646,27 +637,27 @@ HRESULT WebHistory::addItem(IWebHistoryItem* entry) return hr; } -HRESULT WebHistory::addItemForURL(BSTR url, BSTR title) +void WebHistory::addItem(const KURL& url, const String& title) { COMPtr<WebHistoryItem> item(AdoptCOM, WebHistoryItem::createInstance()); if (!item) - return E_FAIL; + return; SYSTEMTIME currentTime; GetSystemTime(¤tTime); DATE lastVisited; if (!SystemTimeToVariantTime(¤tTime, &lastVisited)) - return E_FAIL; + return; - HRESULT hr = item->initWithURLString(url, title, 0); + HRESULT hr = item->initWithURLString(BString(url.string()), BString(title), 0); if (FAILED(hr)) - return hr; + return; hr = item->setLastVisitedTimeInterval(lastVisited); // also increments visitedCount if (FAILED(hr)) - return hr; + return; - return addItem(item.get()); + addItem(item.get()); } HRESULT WebHistory::itemForURLString( @@ -694,22 +685,6 @@ HRESULT STDMETHODCALLTYPE WebHistory::itemForURL( return itemForURLString(urlString.get(), item); } -HRESULT WebHistory::containsItemForURLString( - /* [in] */ void* urlCFString, - /* [retval][out] */ BOOL* contains) -{ - IWebHistoryItem* item = 0; - HRESULT hr; - if (SUCCEEDED(hr = itemForURLString((CFStringRef)urlCFString, &item))) { - *contains = TRUE; - // itemForURLString refs the returned item, so we need to balance that - item->Release(); - } else - *contains = FALSE; - - return hr; -} - HRESULT WebHistory::removeItemForURLString(CFStringRef urlString) { IWebHistoryItem* entry = (IWebHistoryItem*) CFDictionaryGetValue(m_entriesByURL.get(), urlString); @@ -719,6 +694,9 @@ HRESULT WebHistory::removeItemForURLString(CFStringRef urlString) HRESULT hr = removeItemFromDateCaches(entry); CFDictionaryRemoveValue(m_entriesByURL.get(), urlString); + if (!CFDictionaryGetCount(m_entriesByURL.get())) + PageGroup::removeAllVisitedLinks(); + return hr; } @@ -856,101 +834,23 @@ HRESULT WebHistory::ageLimitDate(CFAbsoluteTime* time) return S_OK; } -IWebHistoryPrivate* WebHistory::optionalSharedHistoryInternal() -{ - if (!m_optionalSharedHistory) - return 0; - - IWebHistoryPrivate* historyPrivate; - if (FAILED(m_optionalSharedHistory->QueryInterface(IID_IWebHistoryPrivate, (void**)&historyPrivate))) - return 0; - - historyPrivate->Release(); // don't add an additional ref for this internal call - return historyPrivate; -} - -// _WebCoreHistoryProvider ---------------------------------------------------------------- - -_WebCoreHistoryProvider::_WebCoreHistoryProvider(IWebHistory* history) - : m_history(history) - , m_historyPrivate(0) -{ -} - -_WebCoreHistoryProvider::~_WebCoreHistoryProvider() -{ -} - -static inline bool matchLetter(char c, char lowercaseLetter) +static void addVisitedLinkToPageGroup(const void* key, const void*, void* context) { - return (c | 0x20) == lowercaseLetter; -} + CFStringRef url = static_cast<CFStringRef>(key); + PageGroup* group = static_cast<PageGroup*>(context); -static inline bool matchUnicodeLetter(UniChar c, UniChar lowercaseLetter) -{ - return (c | 0x20) == lowercaseLetter; + CFIndex length = CFStringGetLength(url); + const UChar* characters = reinterpret_cast<const UChar*>(CFStringGetCharactersPtr(url)); + if (characters) + group->addVisitedLink(characters, length); + else { + Vector<UChar, 512> buffer(length); + CFStringGetCharacters(url, CFRangeMake(0, length), reinterpret_cast<UniChar*>(buffer.data())); + group->addVisitedLink(buffer.data(), length); + } } -bool _WebCoreHistoryProvider::containsURL(const UChar* unicode, unsigned length) +void WebHistory::addVisitedLinksToPageGroup(PageGroup& group) { - const int bufferSize = 1024; - const UChar *unicodeStr = unicode; - UChar staticStrBuffer[bufferSize]; - UChar *strBuffer = 0; - bool needToAddSlash = false; - - if (length >= 6 && - matchUnicodeLetter(unicode[0], 'h') && - matchUnicodeLetter(unicode[1], 't') && - matchUnicodeLetter(unicode[2], 't') && - matchUnicodeLetter(unicode[3], 'p') && - (unicode[4] == ':' - || (matchUnicodeLetter(unicode[4], 's') && unicode[5] == ':'))) { - - unsigned pos = unicode[4] == ':' ? 5 : 6; - - // skip possible initial two slashes - if (pos + 1 < length && unicode[pos] == '/' && unicode[pos + 1] == '/') - pos += 2; - - while (pos < length && unicode[pos] != '/') - pos++; - - if (pos == length) - needToAddSlash = true; - } - - if (needToAddSlash) { - if (length + 1 <= bufferSize) - strBuffer = staticStrBuffer; - else - strBuffer = (UChar*)malloc(sizeof(UChar) * (length + 1)); - memcpy(strBuffer, unicode, 2 * length); - strBuffer[length] = '/'; - length++; - - unicodeStr = strBuffer; - } - - if (!m_historyPrivate) { - if (SUCCEEDED(m_history->QueryInterface(IID_IWebHistoryPrivate, (void**)&m_historyPrivate))) { - // don't hold a ref - we're owned by IWebHistory/IWebHistoryPrivate - m_historyPrivate->Release(); - } else { - if (strBuffer != staticStrBuffer) - free(strBuffer); - m_historyPrivate = 0; - return false; - } - } - - CFStringRef str = CFStringCreateWithCharactersNoCopy(NULL, (const UniChar*)unicodeStr, length, kCFAllocatorNull); - BOOL result = FALSE; - m_historyPrivate->containsItemForURLString((void*)str, &result); - CFRelease(str); - - if (strBuffer != staticStrBuffer) - free(strBuffer); - - return !!result; + CFDictionaryApplyFunction(m_entriesByURL.get(), addVisitedLinkToPageGroup, &group); } diff --git a/WebKit/win/WebHistory.h b/WebKit/win/WebHistory.h index 5eadfce..a49f320 100644 --- a/WebKit/win/WebHistory.h +++ b/WebKit/win/WebHistory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,37 +26,26 @@ #ifndef WebHistory_H #define WebHistory_H -#include "IWebHistory.h" +#include "WebKit.h" #include "COMPtr.h" #include <CoreFoundation/CoreFoundation.h> #include <wtf/RetainPtr.h> -//----------------------------------------------------------------------------- - -// {3DE04E59-93F9-4369-8B43-976458D7E319} -DEFINE_GUID(IID_IWebHistoryPrivate, 0x3de04e59, 0x93f9, 0x4369, 0x8b, 0x43, 0x97, 0x64, 0x58, 0xd7, 0xe3, 0x19); - -interface IWebHistoryPrivate : public IUnknown -{ -public: - virtual HRESULT STDMETHODCALLTYPE addItemForURL( - /* [in] */ BSTR url, - /* [in] */ BSTR title) = 0; - virtual HRESULT STDMETHODCALLTYPE containsItemForURLString( - /* [in] */ void* urlCFString, - /* [retval][out] */ BOOL* contains) = 0; -}; +namespace WebCore { + class KURL; + class PageGroup; + class String; +} //----------------------------------------------------------------------------- class WebPreferences; -class WebHistory : public IWebHistory, IWebHistoryPrivate -{ +class WebHistory : public IWebHistory { public: static WebHistory* createInstance(); -protected: +private: WebHistory(); ~WebHistory(); @@ -119,11 +108,11 @@ public: /* [retval][out] */ int* limit); // WebHistory - static IWebHistoryPrivate* optionalSharedHistoryInternal(); - virtual HRESULT STDMETHODCALLTYPE addItemForURL(BSTR url, BSTR title); - virtual HRESULT STDMETHODCALLTYPE containsItemForURLString(void* urlCFString, BOOL* contains); + static WebHistory* sharedHistory(); + void addItem(const WebCore::KURL&, const WebCore::String&); + void addVisitedLinksToPageGroup(WebCore::PageGroup&); -protected: +private: enum NotificationType { kWebHistoryItemsAddedNotification = 0, @@ -150,13 +139,11 @@ protected: BSTR getNotificationString(NotificationType notifyType); HRESULT itemForURLString(CFStringRef urlString, IWebHistoryItem** item); -protected: ULONG m_refCount; RetainPtr<CFMutableDictionaryRef> m_entriesByURL; RetainPtr<CFMutableArrayRef> m_datesWithEntries; RetainPtr<CFMutableArrayRef> m_entriesByDate; COMPtr<WebPreferences> m_preferences; - static IWebHistory* m_optionalSharedHistory; }; #endif diff --git a/WebKit/win/WebHistoryItem.cpp b/WebKit/win/WebHistoryItem.cpp index a4993bf..594309e 100644 --- a/WebKit/win/WebHistoryItem.cpp +++ b/WebKit/win/WebHistoryItem.cpp @@ -56,6 +56,7 @@ WebHistoryItem::WebHistoryItem(PassRefPtr<HistoryItem> historyItem) historyItemWrappers().set(m_historyItem.get(), this); gClassCount++; + gClassNameCount.add("WebHistoryItem"); } WebHistoryItem::~WebHistoryItem() @@ -64,11 +65,12 @@ WebHistoryItem::~WebHistoryItem() historyItemWrappers().remove(m_historyItem.get()); gClassCount--; + gClassNameCount.remove("WebHistoryItem"); } WebHistoryItem* WebHistoryItem::createInstance() { - WebHistoryItem* instance = new WebHistoryItem(new HistoryItem); + WebHistoryItem* instance = new WebHistoryItem(HistoryItem::create()); instance->AddRef(); return instance; } @@ -126,7 +128,7 @@ HRESULT STDMETHODCALLTYPE WebHistoryItem::initFromDictionaryRepresentation(void* } historyItemWrappers().remove(m_historyItem.get()); - m_historyItem = new HistoryItem(urlStringRef, titleRef, lastVisitedTime); + m_historyItem = HistoryItem::create(urlStringRef, titleRef, lastVisitedTime); historyItemWrappers().set(m_historyItem.get(), this); if (!CFNumberGetValue(visitCountRef, kCFNumberIntType, &visitedCount)) { @@ -199,21 +201,11 @@ HRESULT STDMETHODCALLTYPE WebHistoryItem::mergeAutoCompleteHints(IWebHistoryItem if (!otherItem) return E_FAIL; - if (otherItem == this) - return S_OK; - - IWebHistoryItemPrivate* otherItemPriv; - HRESULT hr = otherItem->QueryInterface(IID_IWebHistoryItemPrivate, (void**)&otherItemPriv); - if (FAILED(hr)) - return hr; - - int otherVisitCount; - hr = otherItemPriv->visitCount(&otherVisitCount); - otherItemPriv->Release(); - if (FAILED(hr)) - return hr; + COMPtr<WebHistoryItem> otherWebHistoryItem(Query, otherItem); + if (!otherWebHistoryItem) + return E_FAIL; - m_historyItem->setVisitCount(otherVisitCount); + m_historyItem->mergeAutoCompleteHints(otherWebHistoryItem->historyItem()); return S_OK; } @@ -333,7 +325,7 @@ HRESULT STDMETHODCALLTYPE WebHistoryItem::children(unsigned* outChildCount, SAFE HRESULT STDMETHODCALLTYPE WebHistoryItem::QueryInterface(REFIID riid, void** ppvObject) { *ppvObject = 0; - if (IsEqualGUID(riid, CLSID_WebHistoryItem)) + if (IsEqualGUID(riid, __uuidof(WebHistoryItem))) *ppvObject = this; else if (IsEqualGUID(riid, IID_IUnknown)) *ppvObject = static_cast<IWebHistoryItem*>(this); @@ -370,7 +362,7 @@ HRESULT STDMETHODCALLTYPE WebHistoryItem::initWithURLString( /* [in] */ DATE lastVisited) { historyItemWrappers().remove(m_historyItem.get()); - m_historyItem = new HistoryItem(String(urlString, SysStringLen(urlString)), String(title, SysStringLen(title)), MarshallingHelpers::DATEToCFAbsoluteTime(lastVisited)); + m_historyItem = HistoryItem::create(String(urlString, SysStringLen(urlString)), String(title, SysStringLen(title)), MarshallingHelpers::DATEToCFAbsoluteTime(lastVisited)); historyItemWrappers().set(m_historyItem.get(), this); return S_OK; diff --git a/WebKit/win/WebHistoryItem.h b/WebKit/win/WebHistoryItem.h index 659f5b2..6734ff0 100644 --- a/WebKit/win/WebHistoryItem.h +++ b/WebKit/win/WebHistoryItem.h @@ -26,9 +26,7 @@ #ifndef WebHistoryItem_H #define WebHistoryItem_H -#include "IWebHistoryItem.h" -#include "IWebHistoryItemPrivate.h" -#include "IWebIconDatabase.h" +#include "WebKit.h" #include <CoreFoundation/CoreFoundation.h> #include <WebCore/PlatformString.h> diff --git a/WebKit/win/WebIconDatabase.cpp b/WebKit/win/WebIconDatabase.cpp index c778993..5f9121f 100644 --- a/WebKit/win/WebIconDatabase.cpp +++ b/WebKit/win/WebIconDatabase.cpp @@ -38,6 +38,7 @@ #include <WebCore/Image.h> #include <WebCore/PlatformString.h> #pragma warning(pop) +#include <wtf/MainThread.h> #include "shlobj.h" using namespace WebCore; @@ -52,11 +53,13 @@ WebIconDatabase::WebIconDatabase() , m_deliveryRequested(false) { gClassCount++; + gClassNameCount.add("WebIconDatabase"); } WebIconDatabase::~WebIconDatabase() { gClassCount--; + gClassNameCount.remove("WebIconDatabase"); } void WebIconDatabase::init() @@ -258,12 +261,9 @@ HBITMAP WebIconDatabase::getOrCreateDefaultIconBitmap(LPSIZE size) return result; result = createDIB(size); - static Image* defaultIconImage = 0; - if (!defaultIconImage) { - defaultIconImage = Image::loadPlatformResource("urlIcon"); - } + m_defaultIconMap.set(*size, result); - if (!defaultIconImage->getHBITMAPOfSize(result, size)) { + if (!iconDatabase()->defaultIcon(*size)->getHBITMAPOfSize(result, size)) { LOG_ERROR("Failed to draw Image to HBITMAP"); return 0; } @@ -330,7 +330,7 @@ static void postDidAddIconNotification(const String& pageURL, WebIconDatabase* i RetainPtr<CFStringRef> url(AdoptCF, pageURL.createCFString()); CFDictionaryAddValue(dictionary.get(), WebIconDatabase::iconDatabaseNotificationUserInfoURLKey(), url.get()); - COMPtr<CFDictionaryPropertyBag> userInfo = CFDictionaryPropertyBag::createInstance(); + COMPtr<CFDictionaryPropertyBag> userInfo(AdoptCOM, CFDictionaryPropertyBag::createInstance()); userInfo->setDictionary(dictionary.get()); IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal(); diff --git a/WebKit/win/WebIconDatabase.h b/WebKit/win/WebIconDatabase.h index c722efc..85f57b7 100644 --- a/WebKit/win/WebIconDatabase.h +++ b/WebKit/win/WebIconDatabase.h @@ -26,16 +26,16 @@ #ifndef WebIconDatabase_H #define WebIconDatabase_H -#include "IWebIconDatabase.h" +#include "WebKit.h" #pragma warning(push, 0) #include <WebCore/IconDatabaseClient.h> #include <WebCore/IntSize.h> #include <WebCore/IntSizeHash.h> -#include <WebCore/Threading.h> #pragma warning(pop) -#include <WTF/Vector.h> +#include <wtf/Vector.h> +#include <wtf/Threading.h> #include <windows.h> diff --git a/WebKit/win/WebIconFetcher.cpp b/WebKit/win/WebIconFetcher.cpp new file mode 100644 index 0000000..99d1e24 --- /dev/null +++ b/WebKit/win/WebIconFetcher.cpp @@ -0,0 +1,129 @@ +/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebKitDLL.h"
+#include "WebIconFetcher.h"
+
+#include "MemoryStream.h"
+#include <WebCore/COMPtr.h>
+#include <WebCore/SharedBuffer.h>
+#include <wtf/PassRefPtr.h>
+
+using namespace WebCore;
+
+class WebIconFetcherClient : public IconFetcherClient {
+public:
+ WebIconFetcherClient(IWebIconFetcherDelegate* delegate)
+ : m_fetcher(0)
+ , m_delegate(delegate)
+ {
+ }
+
+ virtual void finishedFetchingIcon(PassRefPtr<SharedBuffer> iconData)
+ {
+ COMPtr<MemoryStream> memoryStream;
+ if (iconData)
+ memoryStream.adoptRef(MemoryStream::createInstance(iconData));
+
+ m_delegate->finishedLoadingIcon(m_fetcher, memoryStream.get());
+
+ delete this;
+ }
+
+ void setFetcher(WebIconFetcher *fetcher) { m_fetcher = fetcher; }
+
+private:
+ WebIconFetcher* m_fetcher;
+ COMPtr<IWebIconFetcherDelegate> m_delegate;
+};
+
+// WebIconFetcher -------------------------------------------------------------------
+
+WebIconFetcher* WebIconFetcher::fetchApplicationIcon(Frame* frame, IWebIconFetcherDelegate* delegate)
+{
+ WebIconFetcherClient* client = new WebIconFetcherClient(delegate);
+
+ RefPtr<IconFetcher> fetcher = IconFetcher::create(frame, client);
+
+ if (!fetcher)
+ return 0;
+
+ COMPtr<WebIconFetcher> iconFetcher = new WebIconFetcher(fetcher.release());
+ client->setFetcher(iconFetcher.get());
+
+ return iconFetcher.releaseRef();
+}
+
+WebIconFetcher::WebIconFetcher(PassRefPtr<IconFetcher> iconFetcher)
+ : m_refCount(0)
+ , m_iconFetcher(iconFetcher)
+{
+ gClassCount++;
+}
+
+WebIconFetcher::~WebIconFetcher()
+{
+ gClassCount--;
+}
+
+// IUnknown -------------------------------------------------------------------
+
+HRESULT STDMETHODCALLTYPE WebIconFetcher::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualGUID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IUnknown*>(this);
+ else if (IsEqualGUID(riid, IID_IWebIconFetcher))
+ *ppvObject = static_cast<IWebIconFetcher*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG STDMETHODCALLTYPE WebIconFetcher::AddRef()
+{
+ return ++m_refCount;
+}
+
+ULONG STDMETHODCALLTYPE WebIconFetcher::Release()
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete this;
+
+ return newRef;
+}
+
+// IUnknown -------------------------------------------------------------------
+
+HRESULT STDMETHODCALLTYPE WebIconFetcher::cancel()
+{
+ m_iconFetcher->cancel();
+
+ return S_OK;
+}
diff --git a/WebKit/win/HTTPHeaderPropertyBag.h b/WebKit/win/WebIconFetcher.h index ddcfc15..694aebf 100644 --- a/WebKit/win/HTTPHeaderPropertyBag.h +++ b/WebKit/win/WebIconFetcher.h @@ -1,62 +1,52 @@ -/* - * Copyright (C) 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 - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef HTTPHeaderPropertyBag_H -#define HTTPHeaderPropertyBag_H - -#include "WebURLResponse.h" -#include <wtf/RetainPtr.h> - -class __declspec(uuid("3DBD89EB-CEFB-4ddb-8D1A-5BE47ED4E929")) HTTPHeaderPropertyBag : public IPropertyBag { - -public: - static HTTPHeaderPropertyBag* createInstance(WebURLResponse*); - - // IUnknown - virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); - virtual ULONG STDMETHODCALLTYPE AddRef(void); - virtual ULONG STDMETHODCALLTYPE Release(void); - - // IPropertyBag - virtual /* [local] */ HRESULT STDMETHODCALLTYPE Read( - /* [in] */ LPCOLESTR pszPropName, - /* [out][in] */ VARIANT *pVar, - /* [in] */ IErrorLog *pErrorLog); - - virtual HRESULT STDMETHODCALLTYPE Write( - /* [in] */ LPCOLESTR pszPropName, - /* [in] */ VARIANT *pVar); - -protected: - virtual ~HTTPHeaderPropertyBag() {} - -private: - HTTPHeaderPropertyBag(WebURLResponse*); - - RetainPtr<WebURLResponse> m_response; - ULONG m_refCount; -}; - -#endif //HTTPHeaderPropertyBag_H +/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebIconFetcher_h
+#define WebIconFetcher_h
+
+#include "WebKit.h"
+#include <WebCore/IconFetcher.h>
+
+class WebIconFetcher : public IWebIconFetcher {
+public:
+ static WebIconFetcher* fetchApplicationIcon(WebCore::Frame*, IWebIconFetcherDelegate*);
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef();
+ virtual ULONG STDMETHODCALLTYPE Release();
+
+ // IWebIconFetcher
+ virtual HRESULT STDMETHODCALLTYPE cancel();
+
+private:
+ WebIconFetcher(PassRefPtr<WebCore::IconFetcher>);
+ ~WebIconFetcher();
+
+ ULONG m_refCount;
+ RefPtr<WebCore::IconFetcher> m_iconFetcher;
+};
+
+#endif // WebIconFetcher_h
diff --git a/WebKit/win/WebInspector.cpp b/WebKit/win/WebInspector.cpp index d188e4f..1ddbdd8 100644 --- a/WebKit/win/WebInspector.cpp +++ b/WebKit/win/WebInspector.cpp @@ -53,11 +53,13 @@ WebInspector::WebInspector(WebView* webView) ASSERT_ARG(webView, webView); gClassCount++; + gClassNameCount.add("WebInspector"); } WebInspector::~WebInspector() { gClassCount--; + gClassNameCount.remove("WebInspector"); } void WebInspector::webViewClosed() @@ -106,17 +108,13 @@ HRESULT STDMETHODCALLTYPE WebInspector::showConsole() { if (m_webView) if (Page* page = m_webView->page()) - page->inspectorController()->showConsole(); + page->inspectorController()->showPanel(InspectorController::ConsolePanel); return S_OK; } -HRESULT STDMETHODCALLTYPE WebInspector::showTimeline() +HRESULT STDMETHODCALLTYPE WebInspector::unused1() { - if (m_webView) - if (Page* page = m_webView->page()) - page->inspectorController()->showTimeline(); - return S_OK; } @@ -146,3 +144,115 @@ HRESULT STDMETHODCALLTYPE WebInspector::detach() return S_OK; } + +HRESULT STDMETHODCALLTYPE WebInspector::isDebuggingJavaScript(BOOL* isDebugging) +{ + if (!isDebugging) + return E_POINTER; + + *isDebugging = FALSE; + + if (!m_webView) + return S_OK; + + Page* page = m_webView->page(); + if (!page) + return S_OK; + + *isDebugging = page->inspectorController()->debuggerEnabled(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebInspector::toggleDebuggingJavaScript() +{ + if (!m_webView) + return S_OK; + + Page* page = m_webView->page(); + if (!page) + return S_OK; + + InspectorController* inspector = page->inspectorController(); + + if (inspector->debuggerEnabled()) + inspector->disableDebugger(); + else { + inspector->showPanel(InspectorController::ScriptsPanel); + inspector->enableDebugger(); + } + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebInspector::isProfilingJavaScript(BOOL* isProfiling) +{ + if (!isProfiling) + return E_POINTER; + + *isProfiling = FALSE; + + if (!m_webView) + return S_OK; + + Page* page = m_webView->page(); + if (!page) + return S_OK; + + *isProfiling = page->inspectorController()->isRecordingUserInitiatedProfile(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebInspector::toggleProfilingJavaScript() +{ + if (!m_webView) + return S_OK; + + Page* page = m_webView->page(); + if (!page) + return S_OK; + + InspectorController* inspector = page->inspectorController(); + + if (inspector->isRecordingUserInitiatedProfile()) { + inspector->stopUserInitiatedProfiling(); + inspector->showPanel(InspectorController::ProfilesPanel); + } else + inspector->startUserInitiatedProfiling(); + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebInspector::isJavaScriptProfilingEnabled(BOOL* isProfilingEnabled) +{ + if (!isProfilingEnabled) + return E_POINTER; + + *isProfilingEnabled = FALSE; + + if (!m_webView) + return S_OK; + + Page* page = m_webView->page(); + if (!page) + return S_OK; + + *isProfilingEnabled = page->inspectorController()->profilerEnabled(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebInspector::setJavaScriptProfilingEnabled(BOOL enabled) +{ + if (!m_webView) + return S_OK; + + Page* page = m_webView->page(); + if (!page) + return S_OK; + + if (enabled) + page->inspectorController()->enableProfiler(); + else + page->inspectorController()->disableProfiler(); + + return S_OK; +} diff --git a/WebKit/win/WebInspector.h b/WebKit/win/WebInspector.h index 6b22e52..b300098 100644 --- a/WebKit/win/WebInspector.h +++ b/WebKit/win/WebInspector.h @@ -29,7 +29,7 @@ #ifndef WebInspector_h #define WebInspector_h -#include "IWebInspector.h" +#include "WebKit.h" #include <wtf/Noncopyable.h> class WebView; @@ -46,11 +46,20 @@ public: virtual HRESULT STDMETHODCALLTYPE show(); virtual HRESULT STDMETHODCALLTYPE showConsole(); - virtual HRESULT STDMETHODCALLTYPE showTimeline(); + virtual HRESULT STDMETHODCALLTYPE unused1(); virtual HRESULT STDMETHODCALLTYPE close(); virtual HRESULT STDMETHODCALLTYPE attach(); virtual HRESULT STDMETHODCALLTYPE detach(); + virtual HRESULT STDMETHODCALLTYPE isDebuggingJavaScript(BOOL* isDebugging); + virtual HRESULT STDMETHODCALLTYPE toggleDebuggingJavaScript(); + + virtual HRESULT STDMETHODCALLTYPE isProfilingJavaScript(BOOL* isProfiling); + virtual HRESULT STDMETHODCALLTYPE toggleProfilingJavaScript(); + + virtual HRESULT STDMETHODCALLTYPE isJavaScriptProfilingEnabled(BOOL* isProfilingEnabled); + virtual HRESULT STDMETHODCALLTYPE setJavaScriptProfilingEnabled(BOOL); + private: WebInspector(WebView*); ~WebInspector(); diff --git a/WebKit/win/WebJavaScriptCollector.cpp b/WebKit/win/WebJavaScriptCollector.cpp index 60e3821..818fb4e 100644 --- a/WebKit/win/WebJavaScriptCollector.cpp +++ b/WebKit/win/WebJavaScriptCollector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,11 +28,14 @@ #include "WebJavaScriptCollector.h" #pragma warning(push, 0) +#include <JavaScriptCore/JSGlobalData.h> #include <JavaScriptCore/collector.h> #include <WebCore/GCController.h> +#include <WebCore/JSDOMWindow.h> +#include <runtime/JSLock.h> #pragma warning(pop) -using namespace KJS; +using namespace JSC; using namespace WebCore; // WebJavaScriptCollector --------------------------------------------------------------------------- @@ -41,11 +44,13 @@ WebJavaScriptCollector::WebJavaScriptCollector() : m_refCount(0) { gClassCount++; + gClassNameCount.add("WebJavaScriptCollector"); } WebJavaScriptCollector::~WebJavaScriptCollector() { gClassCount--; + gClassNameCount.remove("WebJavaScriptCollector"); } WebJavaScriptCollector* WebJavaScriptCollector::createInstance() @@ -108,6 +113,7 @@ HRESULT STDMETHODCALLTYPE WebJavaScriptCollector::objectCount( return E_POINTER; } - *count = (UINT)Collector::size(); + JSLock lock(false); + *count = (UINT)JSDOMWindow::commonJSGlobalData()->heap.size(); return S_OK; } diff --git a/WebKit/win/WebJavaScriptCollector.h b/WebKit/win/WebJavaScriptCollector.h index 5ce027d..0ac696c 100644 --- a/WebKit/win/WebJavaScriptCollector.h +++ b/WebKit/win/WebJavaScriptCollector.h @@ -26,7 +26,7 @@ #ifndef WebJavaScriptCollector_H #define WebJavaScriptCollector_H -#include "IWebJavaScriptCollector.h" +#include "WebKit.h" class WebJavaScriptCollector : public IWebJavaScriptCollector { diff --git a/WebKit/win/WebKit.vcproj/DerivedSources.make b/WebKit/win/WebKit.vcproj/DerivedSources.make index ce2d670..73648a0 100644 --- a/WebKit/win/WebKit.vcproj/DerivedSources.make +++ b/WebKit/win/WebKit.vcproj/DerivedSources.make @@ -26,8 +26,11 @@ PREFIX = IGEN_DOM -.PHONY : all -all : \ +WEBKIT_IDL = $(WEBKIT)/Interfaces/WebKit.idl + +HAND_WRITTEN_INTERFACES = $(filter-out $(WEBKIT_IDL), $(wildcard $(WEBKIT)/Interfaces/*.idl)) + +GENERATED_INTERFACES = \ $(PREFIX)Node.idl \ $(PREFIX)Attr.idl \ $(PREFIX)NodeList.idl \ @@ -131,6 +134,12 @@ all : \ $(PREFIX)EventListener.idl \ # +.PHONY : all +all : \ + $(GENERATED_INTERFACES) \ + $(WEBKIT_IDL) \ +# + # $(PREFIX)CanvasGradient.idl \ # $(PREFIX)CanvasPattern.idl \ # $(PREFIX)CanvasRenderingContext2D.idl \ @@ -147,3 +156,6 @@ COM_BINDINGS_SCRIPTS = \ $(PREFIX)%.idl : $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/%.idl $(COM_BINDINGS_SCRIPTS) perl -I $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/ $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_COM" --generator COM --include $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/ --outputdir . $< + +$(WEBKIT_IDL) : $(HAND_WRITTEN_INTERFACES) $(GENERATED_INTERFACES) + touch $@ diff --git a/WebKit/win/WebKit.vcproj/Interfaces.vcproj b/WebKit/win/WebKit.vcproj/Interfaces.vcproj index 0aec4f5..7d041dd 100644 --- a/WebKit/win/WebKit.vcproj/Interfaces.vcproj +++ b/WebKit/win/WebKit.vcproj/Interfaces.vcproj @@ -24,7 +24,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\obj\WebKit\$(ProjectName)"
exit /b
"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

mkdir 2>NUL "$(WebKitOutputDir)\obj\WebKit\$(ProjectName)"
bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -37,9 +37,8 @@ />
<Tool
Name="VCMIDLTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\obj\WebKit\DerivedSources";..\Interfaces"
- GenerateTypeLibrary="false"
- TypeLibraryName="$(ProjectDir)\WebKit.tlb"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\obj\WebKit\DerivedSources";..\Interfaces;"$(IntDir)\include""
+ TypeLibraryName="$(WebKitOutputDir)\lib\WebKit.tlb"
OutputDirectory="$(WebKitOutputDir)\obj\WebKit\$(ProjectName)"
/>
<Tool
@@ -80,7 +79,7 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%

perl FixMIDLHeaders.pl "$(WebkitOutputDir)/include/webkit/"
"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%

perl FixMIDLHeaders.pl "$(WebkitOutputDir)/include/webkit/"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
<Configuration
@@ -93,7 +92,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\obj\WebKit\$(ProjectName)"
exit /b
"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

mkdir 2>NUL "$(WebKitOutputDir)\obj\WebKit\$(ProjectName)"
bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -106,9 +105,8 @@ />
<Tool
Name="VCMIDLTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\obj\WebKit\DerivedSources";..\Interfaces"
- GenerateTypeLibrary="false"
- TypeLibraryName="$(ProjectDir)\WebKit.tlb"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\obj\WebKit\DerivedSources";..\Interfaces;"$(IntDir)\include""
+ TypeLibraryName="$(WebKitOutputDir)\lib\WebKit.tlb"
OutputDirectory="$(WebKitOutputDir)\obj\WebKit\$(ProjectName)"
/>
<Tool
@@ -146,677 +144,13 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%

perl FixMIDLHeaders.pl "$(WebkitOutputDir)/include/webkit/"
"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%

perl FixMIDLHeaders.pl "$(WebkitOutputDir)/include/webkit/"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
- <Filter
- Name="DOM"
- >
- <Filter
- Name="core"
- >
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMAttr.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCDATASection.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCharacterData.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMComment.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMDocument.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMDocumentFragment.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMDocumentType.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMDOMImplementation.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMEntity.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMEntityReference.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMNamedNodeMap.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMNode.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMNodeList.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMNotation.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IGEN_DOMObject.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMProcessingInstruction.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMText.idl"
- >
- </File>
- </Filter>
- <Filter
- Name="html"
- >
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLAnchorElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLAppletElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLAreaElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLBaseElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLBaseFontElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLBlockquoteElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLBodyElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLBRElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLButtonElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLCollection.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLDirectoryElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLDivElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLDListElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLDocument.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLEmbedElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLFieldSetElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLFontElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLFormElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLFrameElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLFrameSetElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLHeadElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLHeadingElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLHRElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLHtmlElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLIFrameElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLImageElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLInputElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLIsIndexElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLLabelElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLLegendElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLLIElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLLinkElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLMapElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLMarqueeElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLMenuElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLMetaElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLModElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLObjectElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLOListElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLOptGroupElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLOptionElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLOptionsCollection.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLParagraphElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLParamElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLPreElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLQuoteElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLScriptElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLSelectElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLStyleElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLTableCaptionElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLTableCellElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLTableColElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLTableElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLTableRowElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLTableSectionElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLTextAreaElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLTitleElement.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMHTMLUListElement.idl"
- >
- </File>
- </Filter>
- <Filter
- Name="css"
- >
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCounter.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSCharsetRule.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSFontFaceRule.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSImportRule.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSMediaRule.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSPageRule.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSPrimitiveValue.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSRule.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSRuleList.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSStyleDeclaration.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSStyleRule.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSStyleSheet.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSUnknownRule.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSValue.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMCSSValueList.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMMediaList.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMRect.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMStyleSheet.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMStyleSheetList.idl"
- >
- </File>
- </Filter>
- <Filter
- Name="events"
- >
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMEvent.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMEventListener.idl"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\IGEN_DOMEventTarget.idl"
- >
- </File>
- </Filter>
- </Filter>
- <File
- RelativePath="..\Interfaces\DOMCore.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\DOMCSS.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\DOMEvents.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\DOMExtensions.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\DOMHTML.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\DOMPrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\DOMRange.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\DOMWindow.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebArchive.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebBackForwardList.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebBackForwardListPrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebCache.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebDatabaseManager.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebDataSource.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebDocument.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebDownload.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebEditingDelegate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebError.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebErrorPrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebFormDelegate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebFrame.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebFrameLoadDelegate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebFrameLoadDelegatePrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebFramePrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebFrameView.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebHistory.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebHistoryItem.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebHistoryItemPrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebHTMLRepresentation.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebHTTPURLResponse.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebIconDatabase.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebInspector.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebJavaScriptCollector.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebKitStatistics.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebMutableURLRequest.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebNotification.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebNotificationCenter.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebNotificationObserver.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebPolicyDelegate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebPreferences.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebPreferencesPrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebResource.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebResourceLoadDelegate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebResourceLoadDelegatePrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebScriptCallFrame.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebScriptDebugListener.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebScriptDebugServer.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebScriptObject.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebScrollBarDelegatePrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebScrollBarPrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebSecurityOrigin.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebTextRenderer.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebUIDelegate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebUIDelegatePrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebUndoManager.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebUndoTarget.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebURLAuthenticationChallenge.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebURLRequest.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebURLResponse.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebURLResponsePrivate.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebView.idl"
- >
- </File>
- <File
- RelativePath="..\Interfaces\IWebViewPrivate.idl"
- >
- </File>
<File
RelativePath="..\Interfaces\WebKit.idl"
>
diff --git a/WebKit/win/WebKit.vcproj/InterfacesGenerated.vcproj b/WebKit/win/WebKit.vcproj/InterfacesGenerated.vcproj index 65950b5..607e621 100644 --- a/WebKit/win/WebKit.vcproj/InterfacesGenerated.vcproj +++ b/WebKit/win/WebKit.vcproj/InterfacesGenerated.vcproj @@ -22,9 +22,9 @@ >
<Tool
Name="VCNMakeTool"
- BuildCommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
bash build-generated-files.sh "$(WebKitOutputDir)"
"
- ReBuildCommandLine="del /s /q "$(WebKitOutputDir)\obj\WebKit\DerivedSources"
set PATH=%SystemDrive%\cygwin\bin;%PATH%
bash build-generated-files.sh "$(WebKitOutputDir)"
"
- CleanCommandLine="del /s /q "$(WebKitOutputDir)\obj\WebKit\DerivedSources"
"
+ BuildCommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

bash build-generated-files.sh "$(WebKitOutputDir)"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ ReBuildCommandLine="echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

del /s /q "$(WebKitOutputDir)\obj\WebKit\DerivedSources"
set PATH=%SystemDrive%\cygwin\bin;%PATH%
bash build-generated-files.sh "$(WebKitOutputDir)"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ CleanCommandLine="del /s /q "$(WebKitOutputDir)\obj\WebKit\DerivedSources"
if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
Output=""
PreprocessorDefinitions=""
IncludeSearchPath=""
diff --git a/WebKit/win/WebKit.vcproj/WebKit.def b/WebKit/win/WebKit.vcproj/WebKit.def index 539a018..a436558 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.def +++ b/WebKit/win/WebKit.vcproj/WebKit.def @@ -89,21 +89,44 @@ EXPORTS ; KJS_JSObject_JSObjectSetSlot ; KJS_JSObject_JSObjectToString setUseOpenSourceWebKit + shutDownWebKit progIDForClass WebLocalizedStringUTF8 WebLocalizedLPCTSTRUTF8 - DrawTextAtPoint WebDrawText FontMetrics TextFloatWidth CenterTruncateStringToWidth RightTruncateStringToWidth + WebKitSetShouldUseFontSmoothing + WebKitShouldUseFontSmoothing ?fastMalloc@WTF@@YAPAXI@Z ?fastZeroedMalloc@WTF@@YAPAXI@Z ?fastFree@WTF@@YAXPAX@Z ?fastCalloc@WTF@@YAPAXII@Z + ??0Mutex@WTF@@QAE@XZ + ??0ThreadCondition@WTF@@QAE@XZ + ??1Mutex@WTF@@QAE@XZ + ??1ThreadCondition@WTF@@QAE@XZ + ?broadcast@ThreadCondition@WTF@@QAEXXZ + ?callOnMainThread@WTF@@YAXP6AXPAX@Z0@Z + ?createThread@WTF@@YAIP6APAXPAX@Z0PBD@Z + ?currentThread@WTF@@YAIXZ + ?detachThread@WTF@@YAXI@Z + ?initializeMainThread@WTF@@YAXXZ + ?initializeThreading@WTF@@YAXXZ + ?isMainThread@WTF@@YA_NXZ + ?lock@Mutex@WTF@@QAEXXZ + ?lockAtomicallyInitializedStaticMutex@WTF@@YAXXZ + ?signal@ThreadCondition@WTF@@QAEXXZ + ?tryLock@Mutex@WTF@@QAE_NXZ + ?unlock@Mutex@WTF@@QAEXXZ + ?unlockAtomicallyInitializedStaticMutex@WTF@@YAXXZ + ?wait@ThreadCondition@WTF@@QAEXAAVMutex@2@@Z + ?waitForThreadCompletion@WTF@@YAHIPAPAX@Z ; These functions are deprecated WebLocalizedString WebLocalizedLPCTSTR SetWebLocalizedStringMainBundle + ?createThread@WTF@@YAIP6APAXPAX@Z0@Z diff --git a/WebKit/win/WebKit.vcproj/WebKit.rc b/WebKit/win/WebKit.vcproj/WebKit.rc index 5d0a957..bfab23a 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.rc +++ b/WebKit/win/WebKit.vcproj/WebKit.rc @@ -62,11 +62,19 @@ END IDR_RESIZE_CORNER PNG "textAreaResizeCorner.png" IDR_MISSING_IMAGE PNG "missingImage.png" -IDR_URL_ICON PNG "urlIcon.png" IDR_NULL_PLUGIN PNG "nullplugin.png" IDR_DELETE_BUTTON PNG "deleteButton.png" IDR_DELETE_BUTTON_PRESSED PNG "deleteButtonPressed.png" IDR_ZOOM_IN_CURSOR PNG "zoomInCursor.png" IDR_ZOOM_OUT_CURSOR PNG "zoomOutCursor.png" IDR_VERTICAL_TEXT_CURSOR PNG "verticalTextCursor.png" +IDR_PAN_SCROLL_ICON PNG "panIcon.png" +IDR_PAN_SOUTH_CURSOR PNG "panSouthCursor.png" +IDR_PAN_NORTH_CURSOR PNG "panNorthCursor.png" +IDR_PAN_EAST_CURSOR PNG "panEastCursor.png" +IDR_PAN_WEST_CURSOR PNG "panWestCursor.png" +IDR_PAN_SOUTH_EAST_CURSOR PNG "panSouthEastCursor.png" +IDR_PAN_SOUTH_WEST_CURSOR PNG "panSouthWestCursor.png" +IDR_PAN_NORTH_EAST_CURSOR PNG "panNorthEastCursor.png" +IDR_PAN_NORTH_WEST_CURSOR PNG "panNorthWestCursor.png" diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln index 989cbd5..beca071 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.sln +++ b/WebKit/win/WebKit.vcproj/WebKit.sln @@ -3,11 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKit", "WebKit.vcproj", "{0662A8A9-82A3-4638-97D8-EC425D8D87C9}"
ProjectSection(ProjectDependencies) = postProject
- {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}
- {91762BE2-87EF-4F5A-A480-48B90EB3F406} = {91762BE2-87EF-4F5A-A480-48B90EB3F406}
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}
{B8437A41-67BC-4769-9452-45203827F821} = {B8437A41-67BC-4769-9452-45203827F821}
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitGUID", "WebKitGUID.vcproj", "{B8437A41-67BC-4769-9452-45203827F821}"
@@ -18,51 +14,46 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interfaces", "Interfaces.vcproj", "{91762BE2-87EF-4F5A-A480-48B90EB3F406}"
ProjectSection(ProjectDependencies) = postProject
{62C897BE-E207-4BC4-B37D-6F9F9116F166} = {62C897BE-E207-4BC4-B37D-6F9F9116F166}
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\..\..\WebCore\WebCore.vcproj\WebCore.vcproj", "{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}"
ProjectSection(ProjectDependencies) = postProject
- {0A324352-B3B6-496C-9E5B-4C7E923E628B} = {0A324352-B3B6-496C-9E5B-4C7E923E628B}
{E498CA9D-3BD2-4D52-8E37-C8DC76526325} = {E498CA9D-3BD2-4D52-8E37-C8DC76526325}
- {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DumpRenderTree", "..\..\..\WebKitTools\DumpRenderTree\win\DumpRenderTree.vcproj", "{6567DFD4-D6DE-4CD5-825D-17E353D160E1}"
ProjectSection(ProjectDependencies) = postProject
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9} = {0662A8A9-82A3-4638-97D8-EC425D8D87C9}
+ {59CC0547-70AC-499C-9B19-EC01C6F61137} = {59CC0547-70AC-499C-9B19-EC01C6F61137}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestNetscapePlugin", "..\..\..\WebKitTools\DumpRenderTree\win\TestNetscapePlugin\TestNetscapePlugin.vcproj", "{C0737398-3565-439E-A2B8-AB2BE4D5430C}"
ProjectSection(ProjectDependencies) = postProject
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9} = {0662A8A9-82A3-4638-97D8-EC425D8D87C9}
+ {114FCA11-216B-4C8C-957E-30A75AE80443} = {114FCA11-216B-4C8C-957E-30A75AE80443}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCore.vcproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C5}"
ProjectSection(ProjectDependencies) = postProject
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testkjs", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\testkjs\testkjs.vcproj", "{C59E5129-B453-49B7-A52B-1E104715F76E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsc", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\jsc\jsc.vcproj", "{C59E5129-B453-49B7-A52B-1E104715F76E}"
ProjectSection(ProjectDependencies) = postProject
- {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2} = {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\WTF\WTF.vcproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}"
+ ProjectSection(ProjectDependencies) = postProject
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindSafari", "..\..\..\WebKitTools\FindSafari\FindSafari.vcproj", "{DA31DA52-6675-48D4-89E0-333A7144397C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "..\..\..\WebKitTools\DumpRenderTree\win\ImageDiff.vcproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"
ProjectSection(ProjectDependencies) = postProject
- {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9} = {0662A8A9-82A3-4638-97D8-EC425D8D87C9}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Drosera", "..\..\..\WebKitTools\Drosera\win\Drosera.vcproj\Drosera.vcproj", "{91671475-2114-4D8F-A051-9A1B270F6467}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "..\..\..\WebKitTools\DumpRenderTree\win\ImageDiff.vcproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"
ProjectSection(ProjectDependencies) = postProject
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9} = {0662A8A9-82A3-4638-97D8-EC425D8D87C9}
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C} = {C0737398-3565-439E-A2B8-AB2BE4D5430C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCoreGenerated.vcproj", "{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}"
@@ -79,113 +70,210 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCoreGenerated", "..\..\. EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QTMovieWin", "..\..\..\WebCore\WebCore.vcproj\QTMovieWin.vcproj", "{E498CA9D-3BD2-4D52-8E37-C8DC76526325}"
ProjectSection(ProjectDependencies) = postProject
- {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B} = {0A324352-B3B6-496C-9E5B-4C7E923E628B}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinLauncher", "..\..\..\WebKitTools\WinLauncher\WinLauncher.vcproj", "{114FCA11-216B-4C8C-957E-30A75AE80443}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C59E5129-B453-49B7-A52B-1E104715F76E} = {C59E5129-B453-49B7-A52B-1E104715F76E}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testapi", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\testapi\testapi.vcproj", "{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DA31DA52-6675-48D4-89E0-333A7144397C} = {DA31DA52-6675-48D4-89E0-333A7144397C}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "record-memory-win", "..\..\..\WebKitTools\record-memory-win\record-memory-win.vcproj", "{44B9C152-1870-4035-B94D-7B3285AA0C12}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug_Cairo|Win32 = Debug_Cairo|Win32
Debug_Internal|Win32 = Debug_Internal|Win32
Debug|Win32 = Debug|Win32
+ Release_Cairo|Win32 = Release_Cairo|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.ActiveCfg = Debug|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.Build.0 = Debug|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.ActiveCfg = Release|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.Build.0 = Release|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.ActiveCfg = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.Build.0 = Debug|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.Build.0 = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.ActiveCfg = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.Build.0 = Release|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.ActiveCfg = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.Build.0 = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.Build.0 = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.ActiveCfg = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.Build.0 = Release|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.ActiveCfg = Debug|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.Build.0 = Debug|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.ActiveCfg = Release|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.Build.0 = Release|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.ActiveCfg = Debug|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.Build.0 = Debug|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.Build.0 = Release|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.ActiveCfg = Debug|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.Build.0 = Debug|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.Build.0 = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.ActiveCfg = Debug|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.Build.0 = Debug|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.Build.0 = Release|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.ActiveCfg = Release|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.Build.0 = Release|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.ActiveCfg = Debug|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.Build.0 = Debug|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.Build.0 = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.ActiveCfg = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.Build.0 = Release|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.ActiveCfg = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.Build.0 = Debug|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo|Win32.Build.0 = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.ActiveCfg = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.Build.0 = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = Debug|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = Debug|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = Debug|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.Build.0 = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.Build.0 = Release|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = Release|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.Build.0 = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.Build.0 = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
- {91671475-2114-4D8F-A051-9A1B270F6467}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {91671475-2114-4D8F-A051-9A1B270F6467}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
- {91671475-2114-4D8F-A051-9A1B270F6467}.Debug|Win32.ActiveCfg = Debug|Win32
- {91671475-2114-4D8F-A051-9A1B270F6467}.Debug|Win32.Build.0 = Debug|Win32
- {91671475-2114-4D8F-A051-9A1B270F6467}.Release|Win32.ActiveCfg = Release|Win32
- {91671475-2114-4D8F-A051-9A1B270F6467}.Release|Win32.Build.0 = Release|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.Build.0 = Release|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.ActiveCfg = Release|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.Build.0 = Release|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.ActiveCfg = Release|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.Build.0 = Release|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.Build.0 = Release|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = Release|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = Release|Win32
+ {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
+ {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Cairo|Win32.Build.0 = Release|Win32
{62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Internal|Win32.ActiveCfg = Release|Win32
{62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Internal|Win32.Build.0 = Release|Win32
{62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug|Win32.ActiveCfg = Release|Win32
{62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug|Win32.Build.0 = Release|Win32
+ {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release_Cairo|Win32.Build.0 = Release|Win32
{62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release|Win32.ActiveCfg = Release|Win32
{62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release|Win32.Build.0 = Release|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.Build.0 = Release|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.ActiveCfg = Release|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.Build.0 = Release|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.ActiveCfg = Release|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.Build.0 = Release|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = Release|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.ActiveCfg = Release|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.Build.0 = Release|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.ActiveCfg = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.Build.0 = Debug|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release_Cairo|Win32.Build.0 = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.ActiveCfg = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.Build.0 = Release|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.Build.0 = Debug|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.ActiveCfg = Debug|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.Build.0 = Debug|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.ActiveCfg = Release|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.Build.0 = Release|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug|Win32.Build.0 = Debug|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.ActiveCfg = Release|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.Build.0 = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.Build.0 = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Internal|Win32.ActiveCfg = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Internal|Win32.Build.0 = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug|Win32.ActiveCfg = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug|Win32.Build.0 = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Release|Win32.ActiveCfg = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/WebKit/win/WebKit.vcproj/WebKit.submit.sln b/WebKit/win/WebKit.vcproj/WebKit.submit.sln index b6c785c..c3c2bb9 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.submit.sln +++ b/WebKit/win/WebKit.vcproj/WebKit.submit.sln @@ -1,14 +1,16 @@ 
Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
+# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKit", "WebKit.vcproj", "{0662A8A9-82A3-4638-97D8-EC425D8D87C9}"
ProjectSection(ProjectDependencies) = postProject
- {91762BE2-87EF-4F5A-A480-48B90EB3F406} = {91762BE2-87EF-4F5A-A480-48B90EB3F406}
+ {62C897BE-E207-4BC4-B37D-6F9F9116F166} = {62C897BE-E207-4BC4-B37D-6F9F9116F166}
{B8437A41-67BC-4769-9452-45203827F821} = {B8437A41-67BC-4769-9452-45203827F821}
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406} = {91762BE2-87EF-4F5A-A480-48B90EB3F406}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitGUID", "WebKitGUID.vcproj", "{B8437A41-67BC-4769-9452-45203827F821}"
ProjectSection(ProjectDependencies) = postProject
+ {62C897BE-E207-4BC4-B37D-6F9F9116F166} = {62C897BE-E207-4BC4-B37D-6F9F9116F166}
{91762BE2-87EF-4F5A-A480-48B90EB3F406} = {91762BE2-87EF-4F5A-A480-48B90EB3F406}
EndProjectSection
EndProject
diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj index 8e5c3f0..d4d21d1 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.vcproj +++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj @@ -23,7 +23,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
touch "$(WebKitOutputDir)\tmp.cpp"
cl /analyze /nologo /c "$(WebKitOutputDir)\tmp.cpp" 2>&1 | findstr D9040
if ERRORLEVEL 0 set EnablePREfast="false" else set EnablePREfast="true"
if ERRORLEVEL 0 set AnalyzeWithLargeStack="" AnalyzeWithLargeStack="/analyze:65536"

mkdir 2>NUL "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"
xcopy /y /d "$(WebKitLibrariesDir)\include\JavaScriptCore\JavaScriptCore\*" "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"

bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

touch "$(WebKitOutputDir)\tmp.cpp"
cl /analyze /nologo /c "$(WebKitOutputDir)\tmp.cpp" 2>&1 | findstr D9040
if ERRORLEVEL 0 set EnablePREfast="false" else set EnablePREfast="true"
if ERRORLEVEL 0 set AnalyzeWithLargeStack="" AnalyzeWithLargeStack="/analyze:65536"

mkdir 2>NUL "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"
xcopy /y /d "$(WebKitLibrariesDir)\include\JavaScriptCore\JavaScriptCore\*" "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"

bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -39,16 +39,18 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;ENABLE_XSLT;ENABLE_XPATH;ENABLE_SVG;FRAMEWORK_NAME=WebKit"
- ForcedIncludeFiles=""
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;ENABLE_DOM_STORAGE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SVG;ENABLE_XSLT;ENABLE_XPATH;FRAMEWORK_NAME=WebKit"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""
+ AdditionalIncludeDirectories="$(WebKitOutputDir)\obj\WebKit\"
/>
<Tool
Name="VCPreLinkEventTool"
@@ -56,11 +58,11 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib"
+ AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
AdditionalLibraryDirectories=""
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll"
/>
<Tool
Name="VCALinkTool"
@@ -85,7 +87,7 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
<Configuration
@@ -97,7 +99,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
touch "$(WebKitOutputDir)\tmp.cpp"
cl /analyze /nologo /c "$(WebKitOutputDir)\tmp.cpp" 2>&1 | findstr D9040
if ERRORLEVEL 0 set EnablePREfast="false" else set EnablePREfast="true"
if ERRORLEVEL 0 set AnalyzeWithLargeStack="" AnalyzeWithLargeStack="/analyze:65536"

mkdir 2>NUL "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"
xcopy /y /d "$(WebKitLibrariesDir)\include\JavaScriptCore\JavaScriptCore\*" "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"

bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

touch "$(WebKitOutputDir)\tmp.cpp"
cl /analyze /nologo /c "$(WebKitOutputDir)\tmp.cpp" 2>&1 | findstr D9040
if ERRORLEVEL 0 set EnablePREfast="false" else set EnablePREfast="true"
if ERRORLEVEL 0 set AnalyzeWithLargeStack="" AnalyzeWithLargeStack="/analyze:65536"

mkdir 2>NUL "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"
xcopy /y /d "$(WebKitLibrariesDir)\include\JavaScriptCore\JavaScriptCore\*" "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"

bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -113,16 +115,18 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;ENABLE_XSLT;ENABLE_XPATH;ENABLE_SVG;FRAMEWORK_NAME=WebKit"
- ForcedIncludeFiles=""
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;ENABLE_DOM_STORAGE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SVG;ENABLE_XSLT;ENABLE_XPATH;FRAMEWORK_NAME=WebKit"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""
+ AdditionalIncludeDirectories="$(WebKitOutputDir)\obj\WebKit\"
/>
<Tool
Name="VCPreLinkEventTool"
@@ -130,11 +134,11 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib"
+ AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
AdditionalLibraryDirectories=""
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll"
/>
<Tool
Name="VCALinkTool"
@@ -159,7 +163,7 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
<Configuration
@@ -170,7 +174,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
touch "$(WebKitOutputDir)\tmp.cpp"
cl /analyze /nologo /c "$(WebKitOutputDir)\tmp.cpp" 2>&1 | findstr D9040
if ERRORLEVEL 0 set EnablePREfast="false" else set EnablePREfast="true"
if ERRORLEVEL 0 set AnalyzeWithLargeStack="" AnalyzeWithLargeStack="/analyze:65536"

mkdir 2>NUL "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"
xcopy /y /d "$(WebKitLibrariesDir)\include\JavaScriptCore\JavaScriptCore\*" "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"

bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

touch "$(WebKitOutputDir)\tmp.cpp"
cl /analyze /nologo /c "$(WebKitOutputDir)\tmp.cpp" 2>&1 | findstr D9040
if ERRORLEVEL 0 set EnablePREfast="false" else set EnablePREfast="true"
if ERRORLEVEL 0 set AnalyzeWithLargeStack="" AnalyzeWithLargeStack="/analyze:65536"

mkdir 2>NUL "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"
xcopy /y /d "$(WebKitLibrariesDir)\include\JavaScriptCore\JavaScriptCore\*" "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"

bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -186,17 +190,19 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;ENABLE_XSLT;ENABLE_XPATH;ENABLE_SVG;FRAMEWORK_NAME=WebKit"
- Detect64BitPortabilityProblems="true"
- ForcedIncludeFiles=""
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;ENABLE_DOM_STORAGE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SVG;ENABLE_XSLT;ENABLE_XPATH;FRAMEWORK_NAME=WebKit"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="WebKitPrefix.h"
+ Detect64BitPortabilityProblems="false"
+ ForcedIncludeFiles="WebKitPrefix.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""
+ AdditionalIncludeDirectories="$(WebKitOutputDir)\obj\WebKit\"
/>
<Tool
Name="VCPreLinkEventTool"
@@ -204,11 +210,11 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib"
+ AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
AdditionalLibraryDirectories=""
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll"
/>
<Tool
Name="VCALinkTool"
@@ -233,7 +239,320 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_Cairo|Win32"
+ OutputDirectory="$(WebKitOutputDir)\bin"
+ IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

touch "$(WebKitOutputDir)\tmp.cpp"
cl /analyze /nologo /c "$(WebKitOutputDir)\tmp.cpp" 2>&1 | findstr D9040
if ERRORLEVEL 0 set EnablePREfast="false" else set EnablePREfast="true"
if ERRORLEVEL 0 set AnalyzeWithLargeStack="" AnalyzeWithLargeStack="/analyze:65536"

mkdir 2>NUL "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"
xcopy /y /d "$(WebKitLibrariesDir)\include\JavaScriptCore\JavaScriptCore\*" "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"

bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;ENABLE_DOM_STORAGE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SVG;ENABLE_XSLT;ENABLE_XPATH;FRAMEWORK_NAME=WebKit"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(WebKitOutputDir)\obj\WebKit\"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CoreGraphics.lib CFNetwork$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib cairo.lib giflib.lib jpeg.lib libpng.lib libcurl_imp.lib ws2_32.lib wininet.lib Wldap32.lib iphlpapi.lib"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
+ AdditionalLibraryDirectories=""
+ ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release_Cairo|Win32"
+ OutputDirectory="$(WebKitOutputDir)\bin"
+ IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

touch "$(WebKitOutputDir)\tmp.cpp"
cl /analyze /nologo /c "$(WebKitOutputDir)\tmp.cpp" 2>&1 | findstr D9040
if ERRORLEVEL 0 set EnablePREfast="false" else set EnablePREfast="true"
if ERRORLEVEL 0 set AnalyzeWithLargeStack="" AnalyzeWithLargeStack="/analyze:65536"

mkdir 2>NUL "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"
xcopy /y /d "$(WebKitLibrariesDir)\include\JavaScriptCore\JavaScriptCore\*" "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"

bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;ENABLE_DOM_STORAGE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SVG;ENABLE_XSLT;ENABLE_XPATH;FRAMEWORK_NAME=WebKit"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(WebKitOutputDir)\obj\WebKit\"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib cairo.lib giflib.lib jpeg.lib libpng.lib libcurl_imp.lib ws2_32.lib wininet.lib Wldap32.lib iphlpapi.lib"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
+ AdditionalLibraryDirectories=""
+ ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release_PGOInstrument|Win32"
+ IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\Release_PGO"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

touch "$(WebKitOutputDir)\tmp.cpp"
cl /analyze /nologo /c "$(WebKitOutputDir)\tmp.cpp" 2>&1 | findstr D9040
if ERRORLEVEL 0 set EnablePREfast="false" else set EnablePREfast="true"
if ERRORLEVEL 0 set AnalyzeWithLargeStack="" AnalyzeWithLargeStack="/analyze:65536"

mkdir 2>NUL "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"
xcopy /y /d "$(WebKitLibrariesDir)\include\JavaScriptCore\JavaScriptCore\*" "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"

bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;ENABLE_DOM_STORAGE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SVG;ENABLE_XSLT;ENABLE_XPATH;FRAMEWORK_NAME=WebKit"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(WebKitOutputDir)\obj\WebKit\"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
+ AdditionalLibraryDirectories=""
+ ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll"
+ LinkTimeCodeGeneration="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release_PGOOptimize|Win32"
+ IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\Release_PGO"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

touch "$(WebKitOutputDir)\tmp.cpp"
cl /analyze /nologo /c "$(WebKitOutputDir)\tmp.cpp" 2>&1 | findstr D9040
if ERRORLEVEL 0 set EnablePREfast="false" else set EnablePREfast="true"
if ERRORLEVEL 0 set AnalyzeWithLargeStack="" AnalyzeWithLargeStack="/analyze:65536"

mkdir 2>NUL "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"
xcopy /y /d "$(WebKitLibrariesDir)\include\JavaScriptCore\JavaScriptCore\*" "$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore"

bash "$(WebKitLibrariesDir)\tools\scripts\auto-version.sh" "$(IntDir)"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;ENABLE_DOM_STORAGE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SVG;ENABLE_XSLT;ENABLE_XPATH;FRAMEWORK_NAME=WebKit"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(WebKitOutputDir)\obj\WebKit\"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
+ AdditionalLibraryDirectories=""
+ ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll"
+ LinkTimeCodeGeneration="4"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
</Configurations>
@@ -254,10 +573,6 @@ >
</File>
<File
- RelativePath="..\WebInspectorClient.cpp"
- >
- </File>
- <File
RelativePath="..\WebKitClassFactory.cpp"
>
</File>
@@ -280,6 +595,14 @@ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
+ RelativePath="..\AccessibleBase.h"
+ >
+ </File>
+ <File
+ RelativePath="..\AccessibleDocument.h"
+ >
+ </File>
+ <File
RelativePath=".\autoversion.h"
>
</File>
@@ -296,6 +619,14 @@ >
</File>
<File
+ RelativePath="..\COMPropertyBag.h"
+ >
+ </File>
+ <File
+ RelativePath="..\COMVariantSetter.h"
+ >
+ </File>
+ <File
RelativePath="..\DefaultDownloadDelegate.h"
>
</File>
@@ -324,10 +655,6 @@ >
</File>
<File
- RelativePath="..\HTTPHeaderPropertyBag.h"
- >
- </File>
- <File
RelativePath="..\MarshallingHelpers.h"
>
</File>
@@ -348,6 +675,10 @@ >
</File>
<File
+ RelativePath="..\WebArchive.h"
+ >
+ </File>
+ <File
RelativePath="..\WebBackForwardList.h"
>
</File>
@@ -360,11 +691,11 @@ >
</File>
<File
- RelativePath="..\WebChromeClient.h"
+ RelativePath="..\WebCookieManager.h"
>
</File>
<File
- RelativePath="..\WebContextMenuClient.h"
+ RelativePath="..\WebCoreStatistics.h"
>
</File>
<File
@@ -384,18 +715,10 @@ >
</File>
<File
- RelativePath="..\WebDragClient.h"
- >
- </File>
- <File
RelativePath="..\WebDropSource.h"
>
</File>
<File
- RelativePath="..\WebEditorClient.h"
- >
- </File>
- <File
RelativePath="..\WebElementPropertyBag.h"
>
</File>
@@ -428,11 +751,11 @@ >
</File>
<File
- RelativePath="..\WebInspector.h"
+ RelativePath="..\WebIconFetcher.h"
>
</File>
<File
- RelativePath="..\WebInspectorClient.h"
+ RelativePath="..\WebInspector.h"
>
</File>
<File
@@ -504,10 +827,6 @@ >
</File>
<File
- RelativePath="..\WebScriptDebugger.h"
- >
- </File>
- <File
RelativePath="..\WebScriptDebugServer.h"
>
</File>
@@ -556,6 +875,14 @@ Name="Classes"
>
<File
+ RelativePath="..\AccessibleBase.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\AccessibleDocument.cpp"
+ >
+ </File>
+ <File
RelativePath="..\CFDictionaryPropertyBag.cpp"
>
</File>
@@ -588,15 +915,15 @@ >
</File>
<File
- RelativePath="..\HTTPHeaderPropertyBag.cpp"
+ RelativePath="..\MemoryStream.cpp"
>
</File>
<File
- RelativePath="..\MemoryStream.cpp"
+ RelativePath="..\WebActionPropertyBag.cpp"
>
</File>
<File
- RelativePath="..\WebActionPropertyBag.cpp"
+ RelativePath="..\WebArchive.cpp"
>
</File>
<File
@@ -608,11 +935,11 @@ >
</File>
<File
- RelativePath="..\WebChromeClient.cpp"
+ RelativePath="..\WebCookieManager.cpp"
>
</File>
<File
- RelativePath="..\WebContextMenuClient.cpp"
+ RelativePath="..\WebCoreStatistics.cpp"
>
</File>
<File
@@ -632,18 +959,10 @@ >
</File>
<File
- RelativePath="..\WebDragClient.cpp"
- >
- </File>
- <File
RelativePath="..\WebDropSource.cpp"
>
</File>
<File
- RelativePath="..\WebEditorClient.cpp"
- >
- </File>
- <File
RelativePath="..\WebElementPropertyBag.cpp"
>
</File>
@@ -676,6 +995,10 @@ >
</File>
<File
+ RelativePath="..\WebIconFetcher.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebInspector.cpp"
>
</File>
@@ -716,10 +1039,6 @@ >
</File>
<File
- RelativePath="..\WebScriptDebugger.cpp"
- >
- </File>
- <File
RelativePath="..\WebScriptDebugServer.cpp"
>
</File>
@@ -786,10 +1105,62 @@ <File
RelativePath=".\WebKit.rc"
>
- </File>
- <File
- RelativePath=".\WebKit.tlb"
- >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_PGOInstrument|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_PGOOptimize|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
+ />
+ </FileConfiguration>
</File>
<File
RelativePath=".\zoomInCursor.png"
@@ -1632,6 +2003,143 @@ </File>
</Filter>
</Filter>
+ <Filter
+ Name="WebCoreSupport"
+ >
+ <File
+ RelativePath="..\WebCoreSupport\EmbeddedWidget.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\EmbeddedWidget.h"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebChromeClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebChromeClient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebContextMenuClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebContextMenuClient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebDragClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebDragClient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebEditorClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebEditorClient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebFrameLoaderClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebFrameLoaderClient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebInspectorClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebInspectorClient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\cf\WebCoreSupport\WebInspectorClientCF.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebInspectorDelegate.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebInspectorDelegate.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="..\WebKitPrefix.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="WebKitPrefix.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_PGOInstrument|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_PGOOptimize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\WebKitPrefix.h"
+ >
+ </File>
</Files>
<Globals>
</Globals>
diff --git a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj index 74db204..8e5af7e 100644 --- a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj +++ b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj @@ -24,6 +24,7 @@ >
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -71,7 +72,7 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine=""
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed""
/>
</Configuration>
<Configuration
@@ -84,6 +85,7 @@ >
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -131,7 +133,7 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine=""
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed""
/>
</Configuration>
<Configuration
@@ -143,6 +145,7 @@ >
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -190,7 +193,7 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine=""
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed""
/>
</Configuration>
</Configurations>
@@ -198,646 +201,6 @@ </References>
<Files>
<File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\DOMCore_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\DOMCSS_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\DOMEvents_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\DOMExtensions_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\DOMHTML_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\DOMPrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\DOMRange_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMAttr_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCDATASection_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCharacterData_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMComment_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCounter_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSCharsetRule_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSFontFaceRule_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSImportRule_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSMediaRule_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSPageRule_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSPrimitiveValue_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSRule_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSRuleList_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSStyleDeclaration_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSStyleRule_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSStyleSheet_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSUnknownRule_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSValue_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMCSSValueList_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMDocument_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMDocumentFragment_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMDocumentType_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMDOMImplementation_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMEntity_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMEntityReference_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMEvent_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMEventListener_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMEventTarget_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLAnchorElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLAppletElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLAreaElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLBaseElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLBaseFontElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLBlockquoteElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLBodyElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLBRElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLButtonElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLCollection_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLDirectoryElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLDivElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLDListElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLDocument_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLEmbedElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLFieldSetElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLFontElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLFormElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLFrameElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLFrameSetElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLHeadElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLHeadingElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLHRElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLHtmlElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLIFrameElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLImageElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLInputElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLIsIndexElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLLabelElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLLegendElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLLIElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLLinkElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLMapElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLMarqueeElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLMenuElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLMetaElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLModElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLObjectElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLOListElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLOptGroupElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLOptionElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLOptionsCollection_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLParagraphElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLParamElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLPreElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLQuoteElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLScriptElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLSelectElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLStyleElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLTableCaptionElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLTableCellElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLTableColElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLTableElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLTableRowElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLTableSectionElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLTextAreaElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLTitleElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMHTMLUListElement_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMMediaList_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMNamedNodeMap_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMNode_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMNodeList_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMNotation_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMObject_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMProcessingInstruction_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMRect_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMStyleSheet_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMStyleSheetList_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IGEN_DOMText_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebArchive_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebBackForwardList_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebBackForwardListPrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebCache_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebDatabaseManager_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebDataSource_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebDocument_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebDownload_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebEditingDelegate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebError_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebErrorPrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebFormDelegate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebFrame_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebFrameLoadDelegate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebFrameLoadDelegatePrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebFramePrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebFrameView_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebHistory_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebHistoryItem_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebHistoryItemPrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebHTMLRepresentation_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebHTTPURLResponse_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebIconDatabase_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebInspector_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebJavaScriptCollector_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebKitStatistics_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebMutableURLRequest_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebNotification_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebNotificationCenter_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebNotificationObserver_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebPolicyDelegate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebPreferences_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebPreferencesPrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebResource_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebResourceLoadDelegate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebResourceLoadDelegatePrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebScriptCallFrame_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebScriptDebugListener_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebScriptDebugServer_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebScriptObject_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebScrollBarDelegatePrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebScrollBarPrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebSecurityOrigin_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebTextRenderer_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebUIDelegate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebUIDelegatePrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebUndoManager_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebUndoTarget_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebURLAuthenticationChallenge_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebURLRequest_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebURLResponse_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebURLResponsePrivate_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebView_i.c"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\IWebViewPrivate_i.c"
- >
- </File>
- <File
RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\WebKit_i.c"
>
</File>
diff --git a/WebKit/win/WebKit.vcproj/WebKit_debug.def b/WebKit/win/WebKit.vcproj/WebKit_debug.def index ff5c0ea..d4fb488 100644 --- a/WebKit/win/WebKit.vcproj/WebKit_debug.def +++ b/WebKit/win/WebKit.vcproj/WebKit_debug.def @@ -89,23 +89,49 @@ EXPORTS ; KJS_JSObject_JSObjectSetSlot ; KJS_JSObject_JSObjectToString setUseOpenSourceWebKit + shutDownWebKit progIDForClass WebLocalizedStringUTF8 WebLocalizedLPCTSTRUTF8 - DrawTextAtPoint WebDrawText FontMetrics TextFloatWidth CenterTruncateStringToWidth RightTruncateStringToWidth + WebKitSetShouldUseFontSmoothing + WebKitShouldUseFontSmoothing ?fastMalloc@WTF@@YAPAXI@Z ?fastZeroedMalloc@WTF@@YAPAXI@Z ?fastFree@WTF@@YAXPAX@Z ?fastCalloc@WTF@@YAPAXII@Z + ??0Mutex@WTF@@QAE@XZ + ??0ThreadCondition@WTF@@QAE@XZ + ??1Mutex@WTF@@QAE@XZ + ??1ThreadCondition@WTF@@QAE@XZ + ?broadcast@ThreadCondition@WTF@@QAEXXZ + ?callOnMainThread@WTF@@YAXP6AXPAX@Z0@Z + ?createThread@WTF@@YAIP6APAXPAX@Z0PBD@Z + ?currentThread@WTF@@YAIXZ + ?detachThread@WTF@@YAXI@Z + ?initializeMainThread@WTF@@YAXXZ + ?initializeThreading@WTF@@YAXXZ + ?isMainThread@WTF@@YA_NXZ + ?lock@Mutex@WTF@@QAEXXZ + ?lockAtomicallyInitializedStaticMutex@WTF@@YAXXZ + ?signal@ThreadCondition@WTF@@QAEXXZ + ?tryLock@Mutex@WTF@@QAE_NXZ + ?unlock@Mutex@WTF@@QAEXXZ + ?unlockAtomicallyInitializedStaticMutex@WTF@@YAXXZ + ?wait@ThreadCondition@WTF@@QAEXAAVMutex@2@@Z + ?waitForThreadCompletion@WTF@@YAHIPAPAX@Z + WTFLog + WTFReportArgumentAssertionFailure WTFReportAssertionFailure + WTFReportAssertionFailureWithMessage WTFReportError ; These functions are deprecated WebLocalizedString WebLocalizedLPCTSTR SetWebLocalizedStringMainBundle + ?createThread@WTF@@YAIP6APAXPAX@Z0@Z diff --git a/WebKit/win/WebKit.vcproj/panEastCursor.png b/WebKit/win/WebKit.vcproj/panEastCursor.png Binary files differnew file mode 100755 index 0000000..9c1592e --- /dev/null +++ b/WebKit/win/WebKit.vcproj/panEastCursor.png diff --git a/WebKit/win/WebKit.vcproj/panIcon.png b/WebKit/win/WebKit.vcproj/panIcon.png Binary files differnew file mode 100644 index 0000000..4ca8d70 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/panIcon.png diff --git a/WebKit/win/WebKit.vcproj/panNorthCursor.png b/WebKit/win/WebKit.vcproj/panNorthCursor.png Binary files differnew file mode 100755 index 0000000..0d020db --- /dev/null +++ b/WebKit/win/WebKit.vcproj/panNorthCursor.png diff --git a/WebKit/win/WebKit.vcproj/panNorthEastCursor.png b/WebKit/win/WebKit.vcproj/panNorthEastCursor.png Binary files differnew file mode 100755 index 0000000..0e89639 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/panNorthEastCursor.png diff --git a/WebKit/win/WebKit.vcproj/panNorthWestCursor.png b/WebKit/win/WebKit.vcproj/panNorthWestCursor.png Binary files differnew file mode 100755 index 0000000..6723f61 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/panNorthWestCursor.png diff --git a/WebKit/win/WebKit.vcproj/panSouthCursor.png b/WebKit/win/WebKit.vcproj/panSouthCursor.png Binary files differnew file mode 100755 index 0000000..60cf722 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/panSouthCursor.png diff --git a/WebKit/win/WebKit.vcproj/panSouthEastCursor.png b/WebKit/win/WebKit.vcproj/panSouthEastCursor.png Binary files differnew file mode 100755 index 0000000..415aa63 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/panSouthEastCursor.png diff --git a/WebKit/win/WebKit.vcproj/panSouthWestCursor.png b/WebKit/win/WebKit.vcproj/panSouthWestCursor.png Binary files differnew file mode 100755 index 0000000..8dc5cdc --- /dev/null +++ b/WebKit/win/WebKit.vcproj/panSouthWestCursor.png diff --git a/WebKit/win/WebKit.vcproj/panWestCursor.png b/WebKit/win/WebKit.vcproj/panWestCursor.png Binary files differnew file mode 100755 index 0000000..544439a --- /dev/null +++ b/WebKit/win/WebKit.vcproj/panWestCursor.png diff --git a/WebKit/win/WebKit.vcproj/resource.h b/WebKit/win/WebKit.vcproj/resource.h index 696dad8..134e215 100644 --- a/WebKit/win/WebKit.vcproj/resource.h +++ b/WebKit/win/WebKit.vcproj/resource.h @@ -10,6 +10,16 @@ #define IDR_ZOOM_IN_CURSOR 6 #define IDR_ZOOM_OUT_CURSOR 7 #define IDR_VERTICAL_TEXT_CURSOR 8 +#define IDR_PAN_SCROLL_ICON 9 +#define IDR_PAN_SOUTH_CURSOR 10 +#define IDR_PAN_NORTH_CURSOR 11 +#define IDR_PAN_EAST_CURSOR 12 +#define IDR_PAN_WEST_CURSOR 13 +#define IDR_PAN_SOUTH_EAST_CURSOR 14 +#define IDR_PAN_SOUTH_WEST_CURSOR 15 +#define IDR_PAN_NORTH_EAST_CURSOR 16 +#define IDR_PAN_NORTH_WEST_CURSOR 17 +#define IDC_STATIC -1 #define BUILD_NUMBER 1 @@ -17,7 +27,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 6 +#define _APS_NEXT_RESOURCE_VALUE 18 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/WebKit/win/WebKit.vcproj/urlIcon.png b/WebKit/win/WebKit.vcproj/urlIcon.png Binary files differdeleted file mode 100755 index 53cb354..0000000 --- a/WebKit/win/WebKit.vcproj/urlIcon.png +++ /dev/null diff --git a/WebKit/win/WebKitClassFactory.cpp b/WebKit/win/WebKitClassFactory.cpp index babff03..0da303a 100644 --- a/WebKit/win/WebKitClassFactory.cpp +++ b/WebKit/win/WebKitClassFactory.cpp @@ -29,7 +29,10 @@ #include "ForEachCoClass.h" #include "CFDictionaryPropertyBag.h" +#include "WebArchive.h" #include "WebCache.h" +#include "WebCookieManager.h" +#include "WebCoreStatistics.h" #include "WebDatabaseManager.h" #include "WebDownload.h" #include "WebError.h" @@ -56,7 +59,7 @@ #pragma warning(pop) // WebKitClassFactory --------------------------------------------------------- - +#if USE(SAFARI_THEME) #if !defined(NDEBUG) && defined(USE_DEBUG_SAFARI_THEME) SOFT_LINK_DEBUG_LIBRARY(SafariTheme) #else @@ -64,26 +67,31 @@ SOFT_LINK_LIBRARY(SafariTheme) #endif SOFT_LINK(SafariTheme, STInitialize, void, APIENTRY, (), ()) +#endif WebKitClassFactory::WebKitClassFactory(CLSID targetClass) : m_targetClass(targetClass) , m_refCount(0) { +#if USE(SAFARI_THEME) static bool didInitializeSafariTheme; if (!didInitializeSafariTheme) { if (SafariThemeLibrary()) STInitialize(); didInitializeSafariTheme = true; } +#endif WebCore::populateFontDatabase(); gClassCount++; + gClassNameCount.add("WebKitClassFactory"); } WebKitClassFactory::~WebKitClassFactory() { gClassCount--; + gClassNameCount.remove("WebKitClassFactory"); } // IUnknown ------------------------------------------------------------------- diff --git a/WebKit/win/WebKitDLL.cpp b/WebKit/win/WebKitDLL.cpp index 8a8fcaa..eab96b9 100644 --- a/WebKit/win/WebKitDLL.cpp +++ b/WebKit/win/WebKitDLL.cpp @@ -26,40 +26,36 @@ #include "config.h" #include "WebKitDLL.h" -#include "autoversion.h" #include "ForEachCoClass.h" -#include "IWebURLResponse.h" -#include "ProgIDMacros.h" #include "resource.h" #include "WebKit.h" #include "WebKitClassFactory.h" #include "WebScriptDebugServer.h" -#pragma warning( push, 0 ) #include <WebCore/COMPtr.h> #include <WebCore/IconDatabase.h> +#include <WebCore/LocalStorage.h> #include <WebCore/Page.h> +#include <WebCore/PageGroup.h> +#include <WebCore/RenderThemeWin.h> #include <WebCore/SharedBuffer.h> #include <WebCore/Widget.h> #include <wtf/Vector.h> -#pragma warning(pop) #include <tchar.h> #include <olectl.h> +using namespace WebCore; + ULONG gLockCount; ULONG gClassCount; +HashCountedSet<String> gClassNameCount; HINSTANCE gInstance; #define CLSID_FOR_CLASS(cls) CLSID_##cls, -static CLSID gRegCLSIDs[] = { +CLSID gRegCLSIDs[] = { FOR_EACH_COCLASS(CLSID_FOR_CLASS) }; #undef CLSID_FOR_CLASS -void shutDownWebKit() -{ - WebCore::iconDatabase()->close(); -} - STDAPI_(BOOL) DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID /*lpReserved*/) { switch (ul_reason_for_call) { @@ -70,7 +66,7 @@ STDAPI_(BOOL) DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID /*lpRe return TRUE; case DLL_PROCESS_DETACH: - shutDownWebKit(); + WebCore::RenderThemeWin::setWebKitIsBeingUnloaded(); break; case DLL_THREAD_ATTACH: @@ -112,179 +108,36 @@ STDAPI DllCanUnloadNow(void) return S_FALSE; } -#if __PRODUCTION__ -#define VERSION_INDEPENDENT_PROGID(className) VERSION_INDEPENDENT_PRODUCTION_PROGID(className) -#else -#define VERSION_INDEPENDENT_PROGID(className) VERSION_INDEPENDENT_OPENSOURCE_PROGID(className) -#endif -#define CURRENT_VERSIONED_PROGID(className) VERSIONED_PROGID(VERSION_INDEPENDENT_PROGID(className), CURRENT_PROGID_VERSION) -#define VERSIONED_303_PROGID(className) VERSIONED_PROGID(VERSION_INDEPENDENT_PROGID(className), 3) - -// FIXME: The last line of this macro only here for the benefit of Safari 3.0.3. Once a newer version -// is released, the last line should be removed and gSlotsPerEntry should be decremented by 1. -//key value name value } -#define KEYS_FOR_CLASS(cls) \ -{ TEXT("CLSID\\{########-####-####-####-############}"), 0, TEXT(#cls) }, \ -{ TEXT("CLSID\\{########-####-####-####-############}\\InprocServer32"), 0, (LPCTSTR)-1 }, \ -{ TEXT("CLSID\\{########-####-####-####-############}\\InprocServer32"), TEXT("ThreadingModel"), TEXT("Apartment") }, \ -{ TEXT("CLSID\\{########-####-####-####-############}\\ProgID"), 0, CURRENT_VERSIONED_PROGID(cls) }, \ -{ CURRENT_VERSIONED_PROGID(cls), 0, TEXT(#cls) }, \ -{ CURRENT_VERSIONED_PROGID(cls) TEXT("\\CLSID"), 0, TEXT("{########-####-####-####-############}") }, \ -{ TEXT("CLSID\\{########-####-####-####-############}\\VersionIndependentProgID"), 0, VERSION_INDEPENDENT_PROGID(cls) }, \ -{ VERSION_INDEPENDENT_PROGID(cls), 0, TEXT(#cls) }, \ -{ VERSION_INDEPENDENT_PROGID(cls) TEXT("\\CLSID"), 0, TEXT("{########-####-####-####-############}") }, \ -{ VERSION_INDEPENDENT_PROGID(cls) TEXT("\\CurVer"), 0, STRINGIFIED_VERSION(CURRENT_PROGID_VERSION) }, \ -{ VERSIONED_303_PROGID(cls), 0, TEXT(#cls) }, \ -{ VERSIONED_303_PROGID(cls) TEXT("\\CLSID"), 0, TEXT("{########-####-####-####-############}") }, \ -// end of macro - -static const int gSlotsPerEntry = 12; -static LPCTSTR gRegTable[][3] = { - FOR_EACH_COCLASS(KEYS_FOR_CLASS) -}; -#undef KEYS_FOR_CLASS - -static void substituteGUID(LPTSTR str, const UUID* guid) -{ - if (!guid || !str) - return; - - TCHAR uuidString[40]; - _stprintf_s(uuidString, ARRAYSIZE(uuidString), TEXT("%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X"), guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); - - LPCTSTR guidPattern = TEXT("########-####-####-####-############"); - size_t patternLength = _tcslen(guidPattern); - size_t strLength = _tcslen(str); - LPTSTR guidSubStr = str; - while (strLength) { - guidSubStr = _tcsstr(guidSubStr, guidPattern); - if (!guidSubStr) - break; - _tcsncpy(guidSubStr, uuidString, patternLength); - guidSubStr += patternLength; - strLength -= (guidSubStr - str); - } -} - +// deprecated - do not use STDAPI DllUnregisterServer(void) { - HRESULT hr = S_OK; - HKEY userClasses; - -#if __PRODUCTION__ - const GUID libID = LIBID_WebKit; -#else - const GUID libID = LIBID_OpenSourceWebKit; -#endif - - typedef HRESULT (WINAPI *UnRegisterTypeLibForUserPtr)(REFGUID, unsigned short, unsigned short, LCID, SYSKIND); - if (UnRegisterTypeLibForUserPtr unRegisterTypeLibForUser = reinterpret_cast<UnRegisterTypeLibForUserPtr>(GetProcAddress(GetModuleHandle(TEXT("oleaut32.dll")), "UnRegisterTypeLibForUser"))) - unRegisterTypeLibForUser(libID, __BUILD_NUMBER_MAJOR__, __BUILD_NUMBER_MINOR__, 0, SYS_WIN32); - else - UnRegisterTypeLib(libID, __BUILD_NUMBER_MAJOR__, __BUILD_NUMBER_MINOR__, 0, SYS_WIN32); - - if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\CLASSES"), 0, KEY_WRITE, &userClasses) != ERROR_SUCCESS) - userClasses = 0; - - int nEntries = ARRAYSIZE(gRegTable); - for (int i = nEntries - 1; i >= 0; i--) { - LPTSTR pszKeyName = _tcsdup(gRegTable[i][0]); - if (pszKeyName) { - substituteGUID(pszKeyName, &gRegCLSIDs[i/gSlotsPerEntry]); - RegDeleteKey(HKEY_CLASSES_ROOT, pszKeyName); - if (userClasses) - RegDeleteKey(userClasses, pszKeyName); - free(pszKeyName); - } else - hr = E_OUTOFMEMORY; - } - - if (userClasses) - RegCloseKey(userClasses); - return hr; + return 0; } +// deprecated - do not use STDAPI DllRegisterServer(void) { - HRESULT hr = S_OK; - - // look up server's file name - TCHAR szFileName[MAX_PATH]; - GetModuleFileName(gInstance, szFileName, MAX_PATH); - - typedef HRESULT (WINAPI *RegisterTypeLibForUserPtr)(ITypeLib*, OLECHAR*, OLECHAR*); - COMPtr<ITypeLib> typeLib; - LoadTypeLibEx(szFileName, REGKIND_NONE, &typeLib); - if (RegisterTypeLibForUserPtr registerTypeLibForUser = reinterpret_cast<RegisterTypeLibForUserPtr>(GetProcAddress(GetModuleHandle(TEXT("oleaut32.dll")), "RegisterTypeLibForUser"))) - registerTypeLibForUser(typeLib.get(), szFileName, 0); - else - RegisterTypeLib(typeLib.get(), szFileName, 0); - - HKEY userClasses; - if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\CLASSES"), 0, KEY_WRITE, &userClasses) != ERROR_SUCCESS) - userClasses = 0; - - // register entries from table - int nEntries = ARRAYSIZE(gRegTable); - for (int i = 0; SUCCEEDED(hr) && i < nEntries; i++) { - LPTSTR pszKeyName = _tcsdup(gRegTable[i][0]); - LPTSTR pszValueName = gRegTable[i][1] ? _tcsdup(gRegTable[i][1]) : 0; - LPTSTR allocatedValue = (gRegTable[i][2] != (LPTSTR)-1) ? _tcsdup(gRegTable[i][2]) : (LPTSTR)-1; - LPTSTR pszValue = allocatedValue; - - if (pszKeyName && pszValue) { - - int clsidIndex = i/gSlotsPerEntry; - substituteGUID(pszKeyName, &gRegCLSIDs[clsidIndex]); - substituteGUID(pszValueName, &gRegCLSIDs[clsidIndex]); - - // map rogue value to module file name - if (pszValue == (LPTSTR)-1) - pszValue = szFileName; - else - substituteGUID(pszValue, &gRegCLSIDs[clsidIndex]); - - // create the key - HKEY hkey; - LONG err = RegCreateKey(HKEY_CLASSES_ROOT, pszKeyName, &hkey); - if (err != ERROR_SUCCESS && userClasses) - err = RegCreateKey(userClasses, pszKeyName, &hkey); - if (err == ERROR_SUCCESS) { - // set the value - err = RegSetValueEx(hkey, pszValueName, 0, REG_SZ, (const BYTE*)pszValue, (DWORD) sizeof(pszValue[0])*(_tcslen(pszValue) + 1)); - RegCloseKey(hkey); - } - } - if (pszKeyName) - free(pszKeyName); - if (pszValueName) - free(pszValueName); - if (allocatedValue && allocatedValue != (LPTSTR)-1) - free(allocatedValue); - } - - if (userClasses) - RegCloseKey(userClasses); - - return hr; + return 0; } +// deprecated - do not use STDAPI RunAsLocalServer() { - DWORD reg; - COMPtr<IUnknown> classFactory; - DllGetClassObject(CLSID_WebScriptDebugServer, IID_IUnknown, (void**)&classFactory); - CoRegisterClassObject(CLSID_WebScriptDebugServer, classFactory.get(), CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE, ®); return 0; } +// deprecated - do not use STDAPI LocalServerDidDie() { - WebScriptDebugServer::sharedWebScriptDebugServer()->serverDidDie(); return 0; } +void shutDownWebKit() +{ + WebCore::iconDatabase()->close(); + WebCore::PageGroup::closeLocalStorage(); +} + //FIXME: We should consider moving this to a new file for cross-project functionality PassRefPtr<WebCore::SharedBuffer> loadResourceIntoBuffer(const char* name) { @@ -294,10 +147,26 @@ PassRefPtr<WebCore::SharedBuffer> loadResourceIntoBuffer(const char* name) idr = IDR_RESIZE_CORNER; else if (!strcmp(name, "missingImage")) idr = IDR_MISSING_IMAGE; - else if (!strcmp(name, "urlIcon")) - idr = IDR_URL_ICON; else if (!strcmp(name, "nullPlugin")) idr = IDR_NULL_PLUGIN; + else if (!strcmp(name, "panIcon")) + idr = IDR_PAN_SCROLL_ICON; + else if (!strcmp(name, "panSouthCursor")) + idr = IDR_PAN_SOUTH_CURSOR; + else if (!strcmp(name, "panNorthCursor")) + idr = IDR_PAN_NORTH_CURSOR; + else if (!strcmp(name, "panEastCursor")) + idr = IDR_PAN_EAST_CURSOR; + else if (!strcmp(name, "panWestCursor")) + idr = IDR_PAN_WEST_CURSOR; + else if (!strcmp(name, "panSouthEastCursor")) + idr = IDR_PAN_SOUTH_EAST_CURSOR; + else if (!strcmp(name, "panSouthWestCursor")) + idr = IDR_PAN_SOUTH_WEST_CURSOR; + else if (!strcmp(name, "panNorthEastCursor")) + idr = IDR_PAN_NORTH_EAST_CURSOR; + else if (!strcmp(name, "panNorthWestCursor")) + idr = IDR_PAN_NORTH_WEST_CURSOR; else if (!strcmp(name, "zoomInCursor")) idr = IDR_ZOOM_IN_CURSOR; else if (!strcmp(name, "zoomOutCursor")) @@ -318,5 +187,5 @@ PassRefPtr<WebCore::SharedBuffer> loadResourceIntoBuffer(const char* name) return 0; int size = SizeofResource(gInstance, resInfo); - return new WebCore::SharedBuffer(reinterpret_cast<const char*>(resource), size); + return WebCore::SharedBuffer::create(reinterpret_cast<const char*>(resource), size); } diff --git a/WebKit/win/WebKitDLL.h b/WebKit/win/WebKitDLL.h index 469a6f6..d944b07 100644 --- a/WebKit/win/WebKitDLL.h +++ b/WebKit/win/WebKitDLL.h @@ -32,6 +32,9 @@ #include <winsock2.h> #include <windows.h> +#include <wtf/HashCountedSet.h> +#include <WebCore/PlatformString.h> +#include <WebCore/StringHash.h> #ifdef WEBKIT_EXPORTS #define WEBKIT_API __declspec(dllexport) @@ -45,7 +48,9 @@ extern "C" { extern ULONG gLockCount; extern ULONG gClassCount; +extern HashCountedSet<WebCore::String> gClassNameCount; extern HINSTANCE gInstance; +extern CLSID gRegCLSIDs[]; #ifdef __cplusplus } diff --git a/WebKit/win/WebKitGraphics.cpp b/WebKit/win/WebKitGraphics.cpp index 5953644..9727ee6 100644 --- a/WebKit/win/WebKitGraphics.cpp +++ b/WebKit/win/WebKitGraphics.cpp @@ -29,6 +29,8 @@ #include "WebKit.h" #include "WebKitDLL.h" +#include "WebPreferences.h" + #pragma warning(push, 0) #include <WebCore/CharacterNames.h> #include <WebCore/Font.h> @@ -61,28 +63,38 @@ static Font makeFont(const WebFontDescription& description) f.setSpecifiedSize(description.size); f.setComputedSize(description.size); f.setItalic(description.italic); - f.setBold(description.bold); + f.setWeight(description.bold ? FontWeightBold : FontWeightNormal); f.setIsAbsoluteSize(true); + FontSmoothingType smoothingType; + if (SUCCEEDED(WebPreferences::sharedStandardPreferences()->fontSmoothing(&smoothingType))) + f.setRenderingMode(smoothingType == FontSmoothingTypeWindows ? AlternateRenderingMode : NormalRenderingMode); + Font font(f, 0, 0); font.update(0); return font; } -void DrawTextAtPoint(CGContextRef cgContext, LPCTSTR text, int length, POINT point, const WebFontDescription& description, CGColorRef color, int underlinedIndex, bool drawAsPassword) +// Text shadow is added post 3.1.1. In order for nightlies to not break Safari 3.1.1, we should still allow +// the old WebTextRenderInfo that has a smaller structSize than the current one with the new text shadow data members. +struct WebTextRenderInfoWithoutShadow { - GraphicsContext context(cgContext); - - String drawString(text, length); - if (drawAsPassword) - drawString = drawString.impl()->secure(WebCore::bullet); - WebCoreDrawTextAtPoint(context, drawString, point, makeFont(description), color, underlinedIndex); -} + DWORD structSize; + CGContextRef cgContext; + LPCTSTR text; + int length; + POINT pt; + const WebFontDescription* description; + CGColorRef color; + int underlinedIndex; + bool drawAsPassword; + int overrideSmoothingLevel; // pass in -1 if caller does not want to override smoothing level +}; void WebDrawText(WebTextRenderInfo* info) { - if (!info || info->structSize != sizeof(WebTextRenderInfo) || !info->cgContext || !info->description) + if (!info || info->structSize < sizeof(WebTextRenderInfoWithoutShadow) || !info->cgContext || !info->description) return; int oldFontSmoothingLevel = -1; @@ -91,7 +103,22 @@ void WebDrawText(WebTextRenderInfo* info) wkSetFontSmoothingLevel(info->overrideSmoothingLevel); } - DrawTextAtPoint(info->cgContext, info->text, info->length, info->pt, *(info->description), info->color, info->underlinedIndex, info->drawAsPassword); + { + GraphicsContext context(info->cgContext); + String drawString(info->text, info->length); + if (info->drawAsPassword) + drawString = drawString.impl()->secure(WebCore::bullet); + + context.save(); + + // Set shadow setting + if (info->structSize == sizeof(WebTextRenderInfo) && + (info->shadowOffset.cx || info->shadowOffset.cy || info->shadowBlur || info->shadowColor)) + context.setShadow(info->shadowOffset, info->shadowBlur, info->shadowColor); + + WebCoreDrawTextAtPoint(context, drawString, info->pt, makeFont(*(info->description)), info->color, info->underlinedIndex); + context.restore(); + } if (info->overrideSmoothingLevel >= 0) wkSetFontSmoothingLevel(oldFontSmoothingLevel); @@ -119,20 +146,32 @@ void FontMetrics(const WebFontDescription& description, int* ascent, int* descen *lineSpacing = font.lineSpacing(); } -void CenterTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription& description, float width, WCHAR* buffer) +unsigned CenterTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription& description, float width, WCHAR* buffer) { ASSERT(buffer); String result = StringTruncator::centerTruncate(String(text, length), width, makeFont(description), false); memcpy(buffer, result.characters(), result.length() * sizeof(UChar)); buffer[result.length()] = '\0'; + return result.length(); } -void RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription& description, float width, WCHAR* buffer) +unsigned RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription& description, float width, WCHAR* buffer) { ASSERT(buffer); String result = StringTruncator::rightTruncate(String(text, length), width, makeFont(description), false); memcpy(buffer, result.characters(), result.length() * sizeof(UChar)); buffer[result.length()] = '\0'; + return result.length(); +} + +void WebKitSetShouldUseFontSmoothing(bool smooth) +{ + WebCoreSetShouldUseFontSmoothing(smooth); +} + +bool WebKitShouldUseFontSmoothing() +{ + return WebCoreShouldUseFontSmoothing(); } diff --git a/WebKit/win/WebKitGraphics.h b/WebKit/win/WebKitGraphics.h index 1994698..59c874b 100644 --- a/WebKit/win/WebKitGraphics.h +++ b/WebKit/win/WebKitGraphics.h @@ -28,6 +28,8 @@ #include <windows.h> +extern "C" { + typedef struct CGColor* CGColorRef; typedef struct CGContext* CGContextRef; @@ -39,6 +41,7 @@ struct WebFontDescription { LPCTSTR family; unsigned familyLength; float size; + // FIXME: Change to weight. bool bold; bool italic; }; @@ -55,15 +58,22 @@ struct WebTextRenderInfo int underlinedIndex; bool drawAsPassword; int overrideSmoothingLevel; // pass in -1 if caller does not want to override smoothing level + SIZE shadowOffset; + int shadowBlur; + CGColorRef shadowColor; }; -void DrawTextAtPoint(CGContextRef, LPCTSTR text, int length, POINT, const WebFontDescription&, CGColorRef, int underlinedIndex = -1, bool drawAsPassword = false); void WebDrawText(WebTextRenderInfo*); float TextFloatWidth(LPCTSTR text, int length, const WebFontDescription&); void FontMetrics(const WebFontDescription&, int* ascent, int* descent, int* lineSpacing); -// buffer must be large enough to hold all of "text", including its null terminator. -void CenterTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription&, float width, WCHAR* buffer); -void RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription&, float width, WCHAR* buffer); +// buffer must be large enough to hold all of "text", including its null terminator. Returns the number of characters put in buffer (excluding the null terminator). +unsigned CenterTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription&, float width, WCHAR* buffer); +unsigned RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription&, float width, WCHAR* buffer); + +void WebKitSetShouldUseFontSmoothing(bool); +bool WebKitShouldUseFontSmoothing(); + +} #endif // !defined(WebKitGraphics_h) diff --git a/WebKit/win/WebKitPrefix.cpp b/WebKit/win/WebKitPrefix.cpp new file mode 100644 index 0000000..e82b88d --- /dev/null +++ b/WebKit/win/WebKitPrefix.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "WebKitPrefix.h" diff --git a/WebKit/win/WebKitPrefix.h b/WebKit/win/WebKitPrefix.h new file mode 100644 index 0000000..13cf8e0 --- /dev/null +++ b/WebKit/win/WebKitPrefix.h @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif + +#ifndef WINVER +#define WINVER 0x0500 +#endif + +// If we don't define these, they get defined in windef.h. +// We want to use std::min and std::max. +#ifndef max +#define max max +#endif +#ifndef min +#define min min +#endif + +#ifndef _WINSOCKAPI_ +#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h +#endif + +#include <WebKit/WebKit.h> diff --git a/WebKit/win/WebKitStatistics.cpp b/WebKit/win/WebKitStatistics.cpp index 8a83cd7..9cd95c7 100644 --- a/WebKit/win/WebKitStatistics.cpp +++ b/WebKit/win/WebKitStatistics.cpp @@ -31,6 +31,9 @@ #include "WebKitStatistics.h" #include "WebKitStatisticsPrivate.h" +#include <WebCore/BString.h> + +using namespace WebCore; int WebViewCount; int WebDataSourceCount; @@ -44,11 +47,13 @@ WebKitStatistics::WebKitStatistics() : m_refCount(0) { gClassCount++; + gClassNameCount.add("WebKitStatistics"); } WebKitStatistics::~WebKitStatistics() { gClassCount--; + gClassNameCount.remove("WebKitStatistics"); } WebKitStatistics* WebKitStatistics::createInstance() @@ -131,3 +136,19 @@ HRESULT STDMETHODCALLTYPE WebKitStatistics::comClassCount( *classCount = gClassCount; return S_OK; } + +HRESULT STDMETHODCALLTYPE WebKitStatistics::comClassNameCounts( + /* [retval][out] */ BSTR *output) +{ + typedef HashCountedSet<String>::const_iterator Iterator; + Iterator end = gClassNameCount.end(); + Vector<UChar> vector; + for (Iterator current = gClassNameCount.begin(); current != end; ++current) { + append(vector, String::format("%4u", current->second)); + vector.append('\t'); + append(vector, static_cast<String>(current->first)); + vector.append('\n'); + } + *output = BString(String::adopt(vector)).release(); + return S_OK; +} diff --git a/WebKit/win/WebKitStatistics.h b/WebKit/win/WebKitStatistics.h index d2dcd08..b7d116d 100644 --- a/WebKit/win/WebKitStatistics.h +++ b/WebKit/win/WebKitStatistics.h @@ -29,7 +29,7 @@ #ifndef WebKitStatistics_h #define WebkitStatistics_h -#include "IWebKitStatistics.h" +#include "WebKit.h" class WebKitStatistics : public IWebKitStatistics { public: @@ -63,6 +63,9 @@ public: virtual HRESULT STDMETHODCALLTYPE comClassCount( /* [retval][out] */ int *classCount); + virtual HRESULT STDMETHODCALLTYPE comClassNameCounts( + /* [retval][out] */ BSTR *output); + protected: ULONG m_refCount; }; diff --git a/WebKit/win/WebMutableURLRequest.cpp b/WebKit/win/WebMutableURLRequest.cpp index 8bbe1d6..c4e034e 100644 --- a/WebKit/win/WebMutableURLRequest.cpp +++ b/WebKit/win/WebMutableURLRequest.cpp @@ -27,9 +27,10 @@ #include "WebKitDLL.h" #include "WebMutableURLRequest.h" -#include "IWebURLResponse.h" +#include "WebKit.h" #include "MarshallingHelpers.h" #include "WebKit.h" +#include <CFNetwork/CFURLRequestPriv.h> #pragma warning(push, 0) #include <WebCore/BString.h> #include <WebCore/CString.h> @@ -46,6 +47,7 @@ WebMutableURLRequest::WebMutableURLRequest(bool isMutable) , m_isMutable(isMutable) { gClassCount++; + gClassNameCount.add("WebMutableURLRequest"); } WebMutableURLRequest* WebMutableURLRequest::createInstance() @@ -89,6 +91,7 @@ WebMutableURLRequest* WebMutableURLRequest::createImmutableInstance(const Resour WebMutableURLRequest::~WebMutableURLRequest() { gClassCount--; + gClassNameCount.remove("WebMutableURLRequest"); } // IUnknown ------------------------------------------------------------------- @@ -280,10 +283,10 @@ HRESULT STDMETHODCALLTYPE WebMutableURLRequest::setHTTPMethod( } HRESULT STDMETHODCALLTYPE WebMutableURLRequest::setHTTPShouldHandleCookies( - /* [in] */ BOOL /*handleCookies*/) + /* [in] */ BOOL handleCookies) { - ASSERT_NOT_REACHED(); - return E_NOTIMPL; + m_request.setAllowHTTPCookies(handleCookies); + return S_OK; } HRESULT STDMETHODCALLTYPE WebMutableURLRequest::setMainDocumentURL( @@ -354,6 +357,21 @@ HRESULT STDMETHODCALLTYPE WebMutableURLRequest::setClientCertificate( return S_OK; } +CFURLRequestRef STDMETHODCALLTYPE WebMutableURLRequest::cfRequest() +{ + return m_request.cfURLRequest(); +} + +HRESULT STDMETHODCALLTYPE WebMutableURLRequest::mutableCopy( + /* [out, retval] */ IWebMutableURLRequest** result) +{ + if (!result) + return E_POINTER; + RetainPtr<CFMutableURLRequestRef> mutableRequest(AdoptCF, CFURLRequestCreateMutableCopy(kCFAllocatorDefault, m_request.cfURLRequest())); + *result = createInstance(ResourceRequest(mutableRequest.get())); + return S_OK; +} + // IWebMutableURLRequest ---------------------------------------------------- void WebMutableURLRequest::setFormData(const PassRefPtr<FormData> data) diff --git a/WebKit/win/WebMutableURLRequest.h b/WebKit/win/WebMutableURLRequest.h index 910a51a..1007a02 100644 --- a/WebKit/win/WebMutableURLRequest.h +++ b/WebKit/win/WebMutableURLRequest.h @@ -26,7 +26,7 @@ #ifndef WebMutableURLRequest_H #define WebMutableURLRequest_H -#include "IWebMutableURLRequest.h" +#include "WebKit.h" #pragma warning(push, 0) #include <WebCore/ResourceRequest.h> #pragma warning(pop) @@ -46,7 +46,7 @@ inline WebURLRequestCachePolicy kit(WebCore::ResourceRequestCachePolicy policy) return static_cast<WebURLRequestCachePolicy>(policy); } -class WebMutableURLRequest : public IWebMutableURLRequest +class WebMutableURLRequest : public IWebMutableURLRequest, IWebMutableURLRequestPrivate { public: static WebMutableURLRequest* createInstance(); @@ -110,7 +110,10 @@ public: virtual HRESULT STDMETHODCALLTYPE isEmpty( /* [retval][out] */ BOOL* result); - // WebMutableURLRequest + virtual HRESULT STDMETHODCALLTYPE mutableCopy( + /* [out, retval] */ IWebMutableURLRequest** result); + + // IWebMutableURLRequest virtual HRESULT STDMETHODCALLTYPE addValue( /* [in] */ BSTR value, /* [in] */ BSTR field); @@ -148,6 +151,13 @@ public: virtual HRESULT STDMETHODCALLTYPE setAllowsAnyHTTPSCertificate(void); + // IWebMutableURLRequestPrivate + + virtual HRESULT STDMETHODCALLTYPE setClientCertificate( + /* [in] */ OLE_HANDLE cert); + + virtual /* [local] */ CFURLRequestRef STDMETHODCALLTYPE cfRequest(); + // WebMutableURLRequest void setFormData(const PassRefPtr<WebCore::FormData> data); const PassRefPtr<WebCore::FormData> formData() const; diff --git a/WebKit/win/WebNodeHighlight.cpp b/WebKit/win/WebNodeHighlight.cpp index d2ba30d..274eb82 100644 --- a/WebKit/win/WebNodeHighlight.cpp +++ b/WebKit/win/WebNodeHighlight.cpp @@ -48,44 +48,76 @@ static LPCTSTR kWebNodeHighlightPointerProp = TEXT("WebNodeHighlightPointer"); WebNodeHighlight::WebNodeHighlight(WebView* webView) : m_inspectedWebView(webView) - , m_inspectedWebViewWindow(0) , m_overlay(0) , m_observedWindow(0) + , m_showsWhileWebViewIsVisible(false) { + m_inspectedWebView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&m_inspectedWebViewWindow)); } WebNodeHighlight::~WebNodeHighlight() { if (m_observedWindow) WindowMessageBroadcaster::removeListener(m_observedWindow, this); + if (m_inspectedWebViewWindow) + WindowMessageBroadcaster::removeListener(m_inspectedWebViewWindow, this); if (m_overlay) ::DestroyWindow(m_overlay); } +void WebNodeHighlight::setShowsWhileWebViewIsVisible(bool shows) +{ + if (m_showsWhileWebViewIsVisible == shows) + return; + m_showsWhileWebViewIsVisible = shows; + + if (!m_showsWhileWebViewIsVisible) { + hide(); + return; + } + + bool webViewVisible = isWebViewVisible(); + + if (isShowing() == webViewVisible) + return; + + if (webViewVisible) + show(); + else + hide(); +} + +bool WebNodeHighlight::isWebViewVisible() const +{ + if (!m_inspectedWebViewWindow) + return false; + + return IsWindowVisible(m_inspectedWebViewWindow); +} + void WebNodeHighlight::show() { if (!m_overlay) { - if (FAILED(m_inspectedWebView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&m_inspectedWebViewWindow))) || !IsWindow(m_inspectedWebViewWindow)) - return; - registerOverlayClass(); - m_overlay = ::CreateWindowEx(WS_EX_LAYERED | WS_EX_TOOLWINDOW, kOverlayWindowClassName, 0, WS_POPUP | WS_VISIBLE, + m_overlay = ::CreateWindowEx(WS_EX_LAYERED | WS_EX_TOOLWINDOW | WS_EX_TRANSPARENT, kOverlayWindowClassName, 0, WS_POPUP, 0, 0, 0, 0, m_inspectedWebViewWindow, 0, 0, 0); if (!m_overlay) return; ::SetProp(m_overlay, kWebNodeHighlightPointerProp, reinterpret_cast<HANDLE>(this)); - ::SetWindowPos(m_overlay, m_inspectedWebViewWindow, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); m_observedWindow = GetAncestor(m_inspectedWebViewWindow, GA_ROOT); WindowMessageBroadcaster::addListener(m_observedWindow, this); + WindowMessageBroadcaster::addListener(m_inspectedWebViewWindow, this); } - updateWindow(); - ::ShowWindow(m_overlay, SW_SHOW); + ASSERT(m_showsWhileWebViewIsVisible); + + update(); + SetWindowPos(m_overlay, 0, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); } void WebNodeHighlight::hide() @@ -94,12 +126,12 @@ void WebNodeHighlight::hide() ::ShowWindow(m_overlay, SW_HIDE); } -bool WebNodeHighlight::visible() const +bool WebNodeHighlight::isShowing() const { return m_overlay && ::IsWindowVisible(m_overlay); } -void WebNodeHighlight::updateWindow() +void WebNodeHighlight::update() { ASSERT(m_overlay); @@ -155,6 +187,12 @@ void WebNodeHighlight::updateWindow() ::DeleteDC(hdc); } +void WebNodeHighlight::placeBehindWindow(HWND window) +{ + ASSERT(m_overlay); + SetWindowPos(m_overlay, window, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); +} + static ATOM registerOverlayClass() { static bool haveRegisteredWindowClass = false; @@ -192,12 +230,72 @@ LRESULT CALLBACK OverlayWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara return ::DefWindowProc(hwnd, msg, wParam, lParam); } -void WebNodeHighlight::windowReceivedMessage(HWND, UINT msg, WPARAM, LPARAM) +void WebNodeHighlight::onWebViewShowWindow(bool showing) { + if (!m_showsWhileWebViewIsVisible) + return; + + if (isShowing() == showing) + return; + + if (showing) + show(); + else + hide(); +} + +void WebNodeHighlight::onWebViewWindowPosChanged(WINDOWPOS* windowPos) +{ + bool sizing = !(windowPos->flags & SWP_NOSIZE); + + if (!sizing) + return; + + if (!isShowing()) + return; + + update(); +} + +void WebNodeHighlight::onRootWindowPosChanged(WINDOWPOS* windowPos) +{ + bool moving = !(windowPos->flags & SWP_NOMOVE); + bool sizing = !(windowPos->flags & SWP_NOSIZE); + + if (!moving) + return; + + // Size changes are handled by onWebViewWindowPosChanged. + if (sizing) + return; + + if (!isShowing()) + return; + + update(); +} + +void WebNodeHighlight::windowReceivedMessage(HWND window, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (window == m_inspectedWebViewWindow) { + switch (msg) { + case WM_SHOWWINDOW: + onWebViewShowWindow(wParam); + break; + case WM_WINDOWPOSCHANGED: + onWebViewWindowPosChanged(reinterpret_cast<WINDOWPOS*>(lParam)); + break; + default: + break; + } + + return; + } + + ASSERT(window == m_observedWindow); switch (msg) { case WM_WINDOWPOSCHANGED: - if (visible()) - updateWindow(); + onRootWindowPosChanged(reinterpret_cast<WINDOWPOS*>(lParam)); break; default: break; diff --git a/WebKit/win/WebNodeHighlight.h b/WebKit/win/WebNodeHighlight.h index fcb2f18..de347d3 100644 --- a/WebKit/win/WebNodeHighlight.h +++ b/WebKit/win/WebNodeHighlight.h @@ -42,19 +42,31 @@ public: WebNodeHighlight(WebView*); ~WebNodeHighlight(); + void setShowsWhileWebViewIsVisible(bool); + + bool isShowing() const; + + void update(); + + void placeBehindWindow(HWND); + +private: void show(); void hide(); - void updateWindow(); - bool visible() const; + bool isWebViewVisible() const; -private: virtual void windowReceivedMessage(HWND, UINT message, WPARAM, LPARAM); + void onWebViewShowWindow(bool showing); + void onWebViewWindowPosChanged(WINDOWPOS*); + void onRootWindowPosChanged(WINDOWPOS*); + WebView* m_inspectedWebView; HWND m_inspectedWebViewWindow; HWND m_overlay; HWND m_observedWindow; + bool m_showsWhileWebViewIsVisible; friend static LRESULT CALLBACK OverlayWndProc(HWND, UINT, WPARAM, LPARAM); }; diff --git a/WebKit/win/WebNotification.cpp b/WebKit/win/WebNotification.cpp index 1420faa..56f8a56 100644 --- a/WebKit/win/WebNotification.cpp +++ b/WebKit/win/WebNotification.cpp @@ -46,6 +46,7 @@ WebNotification::WebNotification(BSTR name, IUnknown* anObject, IPropertyBag* us m_userInfo->AddRef(); gClassCount++; + gClassNameCount.add("WebNotification"); } WebNotification::~WebNotification() @@ -58,6 +59,7 @@ WebNotification::~WebNotification() m_userInfo->Release(); gClassCount--; + gClassNameCount.remove("WebNotification"); } WebNotification* WebNotification::createInstance(BSTR name /*=0*/, IUnknown* anObject /*=0*/, IPropertyBag* userInfo /*=0*/) diff --git a/WebKit/win/WebNotification.h b/WebKit/win/WebNotification.h index c0ea082..f95018e 100644 --- a/WebKit/win/WebNotification.h +++ b/WebKit/win/WebNotification.h @@ -26,7 +26,7 @@ #ifndef WebNotification_H #define WebNotification_H -#include "IWebNotification.h" +#include "WebKit.h" class WebNotification : public IWebNotification { diff --git a/WebKit/win/WebNotificationCenter.cpp b/WebKit/win/WebNotificationCenter.cpp index cc27795..919f499 100644 --- a/WebKit/win/WebNotificationCenter.cpp +++ b/WebKit/win/WebNotificationCenter.cpp @@ -59,11 +59,13 @@ WebNotificationCenter::WebNotificationCenter() , d(new WebNotificationCenterPrivate) { gClassCount++; + gClassNameCount.add("WebNotificationCenter"); } WebNotificationCenter::~WebNotificationCenter() { gClassCount--; + gClassNameCount.remove("WebNotificationCenter"); } WebNotificationCenter* WebNotificationCenter::createInstance() diff --git a/WebKit/win/WebNotificationCenter.h b/WebKit/win/WebNotificationCenter.h index f785120..4e909a7 100644 --- a/WebKit/win/WebNotificationCenter.h +++ b/WebKit/win/WebNotificationCenter.h @@ -26,7 +26,7 @@ #ifndef WebNotificationCenter_H #define WebNotificationCenter_H -#include "IWebNotificationCenter.h" +#include "WebKit.h" #include <wtf/OwnPtr.h> struct WebNotificationCenterPrivate; diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h index a8b9200..6f3dacd 100644 --- a/WebKit/win/WebPreferenceKeysPrivate.h +++ b/WebKit/win/WebPreferenceKeysPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -59,6 +59,7 @@ #define WebKitIconDatabaseEnabledPreferenceKey "WebKitIconDatabaseEnabled" #define WebKitUsesPageCachePreferenceKey "WebKitUsesPageCachePreferenceKey" #define WebKitCacheModelPreferenceKey "WebKitCacheModelPreferenceKey" +#define WebKitLocalStorageDatabasePathPreferenceKey "WebKitLocalStorageDatabasePath" // These are private both because callers should be using the cover methods and because the // cover methods themselves are private. @@ -97,10 +98,21 @@ #define WebKitDOMPasteAllowedPreferenceKey "WebKitDOMPasteAllowedPreferenceKey" // default: false +#define WebKitApplicationChromeModePreferenceKey "WebKitApplicationChromeMode" // default: false + +#define WebKitOfflineWebApplicationCacheEnabledPreferenceKey "WebKitOfflineWebApplicationCacheEnabled" // default: false + // If this key is present and has a value of true, we have already removed the default values from the user's preferences <rdar://problem/5214504> #define WebKitDidMigrateDefaultSettingsFromSafari3BetaPreferenceKey "WebKitDidMigrateDefaultSettingsFromSafari3BetaPreferenceKey" +#define WebKitDidMigrateWebKitPreferencesToCFPreferencesPreferenceKey "WebKitDidMigrateWebKitPreferencesToCFPreferences" + #define WebKitDeveloperExtrasEnabledPreferenceKey "WebKitDeveloperExtras" #define DisableWebKitDeveloperExtrasPreferenceKey "DisableWebKitDeveloperExtras" #define WebKitAuthorAndUserStylesEnabledPreferenceKey "WebKitAuthorAndUserStylesEnabled" + +#define WebKitPaintCustomScrollbarsPreferenceKey "WebKitPaintCustomScrollbars" + +#define WebKitPaintNativeControlsPreferenceKey "WebKitPaintNativeControls" + diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp index bc087e5..316524a 100644 --- a/WebKit/win/WebPreferences.cpp +++ b/WebKit/win/WebPreferences.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,8 +27,8 @@ #include "WebKit.h" #include "WebKitDLL.h" #include "WebPreferences.h" -#include "WebKit.h" +#include "COMPtr.h" #include "WebNotificationCenter.h" #include "WebPreferenceKeysPrivate.h" @@ -48,30 +48,66 @@ #include <tchar.h> #include <WebKitSystemInterface/WebKitSystemInterface.h> #include <wtf/HashMap.h> -#include <wtf/OwnPtr.h> -#include <wtf/Vector.h> +#include <wtf/OwnArrayPtr.h> using namespace WebCore; -static String preferencesPath() +static const String& oldPreferencesPath() { static String path = pathByAppendingComponent(roamingUserSpecificStorageDirectory(), "WebKitPreferences.plist"); return path; } +template<typename NumberType> struct CFNumberTraits { static const unsigned Type; }; +template<> struct CFNumberTraits<int> { static const unsigned Type = kCFNumberSInt32Type; }; +template<> struct CFNumberTraits<LONGLONG> { static const unsigned Type = kCFNumberLongLongType; }; +template<> struct CFNumberTraits<float> { static const unsigned Type = kCFNumberFloat32Type; }; + +template<typename NumberType> +static NumberType numberValueForPreferencesValue(CFPropertyListRef value) +{ + if (!value) + return 0; + + CFTypeID cfType = CFGetTypeID(value); + if (cfType == CFStringGetTypeID()) + return static_cast<NumberType>(CFStringGetIntValue(static_cast<CFStringRef>(value))); + else if (cfType == CFBooleanGetTypeID()) { + Boolean boolVal = CFBooleanGetValue(static_cast<CFBooleanRef>(value)); + return boolVal ? 1 : 0; + } else if (cfType == CFNumberGetTypeID()) { + NumberType val = 0; + CFNumberGetValue(static_cast<CFNumberRef>(value), CFNumberTraits<NumberType>::Type, &val); + return val; + } + + return 0; +} + +template<typename NumberType> +static RetainPtr<CFNumberRef> cfNumber(NumberType value) +{ + return RetainPtr<CFNumberRef>(AdoptCF, CFNumberCreate(0, CFNumberTraits<NumberType>::Type, &value)); +} + +static bool booleanValueForPreferencesValue(CFPropertyListRef value) +{ + return numberValueForPreferencesValue<int>(value); +} + // WebPreferences ---------------------------------------------------------------- -CFDictionaryRef WebPreferences::s_defaultSettings = 0; +static CFDictionaryRef defaultSettings; -static HashMap<WebCore::String, WebPreferences*> webPreferencesInstances; +static HashMap<WebCore::String, COMPtr<WebPreferences> > webPreferencesInstances; WebPreferences* WebPreferences::sharedStandardPreferences() { static WebPreferences* standardPreferences; if (!standardPreferences) { standardPreferences = WebPreferences::createInstance(); - standardPreferences->load(); standardPreferences->setAutosaves(TRUE); + standardPreferences->load(); } return standardPreferences; @@ -84,11 +120,13 @@ WebPreferences::WebPreferences() , m_numWebViews(0) { gClassCount++; + gClassNameCount.add("WebPreferences"); } WebPreferences::~WebPreferences() { gClassCount--; + gClassNameCount.remove("WebPreferences"); } WebPreferences* WebPreferences::createInstance() @@ -114,7 +152,7 @@ WebPreferences* WebPreferences::getInstanceForIdentifier(BSTR identifier) return sharedStandardPreferences(); WebCore::String identifierString(identifier, SysStringLen(identifier)); - return webPreferencesInstances.get(identifierString); + return webPreferencesInstances.get(identifierString).get(); } void WebPreferences::setInstance(WebPreferences* instance, BSTR identifier) @@ -131,14 +169,14 @@ void WebPreferences::removeReferenceForIdentifier(BSTR identifier) return; WebCore::String identifierString(identifier, SysStringLen(identifier)); - WebPreferences* webPreference = webPreferencesInstances.get(identifierString); + WebPreferences* webPreference = webPreferencesInstances.get(identifierString).get(); if (webPreference && webPreference->m_refCount == 1) webPreferencesInstances.remove(identifierString); } void WebPreferences::initializeDefaultSettings() { - if (s_defaultSettings) + if (defaultSettings) return; CFMutableDictionaryRef defaults = CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); @@ -188,31 +226,52 @@ void WebPreferences::initializeDefaultSettings() CFDictionaryAddValue(defaults, CFSTR(WebGrammarCheckingEnabledPreferenceKey), kCFBooleanFalse); CFDictionaryAddValue(defaults, CFSTR(AllowContinuousSpellCheckingPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitUsesPageCachePreferenceKey), kCFBooleanTrue); + CFDictionaryAddValue(defaults, CFSTR(WebKitLocalStorageDatabasePathPreferenceKey), CFSTR("")); RetainPtr<CFStringRef> cacheModelRef(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%d"), WebCacheModelDocumentViewer)); CFDictionaryAddValue(defaults, CFSTR(WebKitCacheModelPreferenceKey), cacheModelRef.get()); CFDictionaryAddValue(defaults, CFSTR(WebKitAuthorAndUserStylesEnabledPreferenceKey), kCFBooleanTrue); + CFDictionaryAddValue(defaults, CFSTR(WebKitApplicationChromeModePreferenceKey), kCFBooleanFalse); + + CFDictionaryAddValue(defaults, CFSTR(WebKitOfflineWebApplicationCacheEnabledPreferenceKey), kCFBooleanFalse); - s_defaultSettings = defaults; + CFDictionaryAddValue(defaults, CFSTR(WebKitPaintNativeControlsPreferenceKey), kCFBooleanFalse); + + defaultSettings = defaults; } -const void* WebPreferences::valueForKey(CFStringRef key) +RetainPtr<CFPropertyListRef> WebPreferences::valueForKey(CFStringRef key) { - const void* value = CFDictionaryGetValue(m_privatePrefs.get(), key); - if (!value) - value = CFDictionaryGetValue(s_defaultSettings, key); + RetainPtr<CFPropertyListRef> value = CFDictionaryGetValue(m_privatePrefs.get(), key); + if (value) + return value; - return value; + value.adoptCF(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication)); + if (value) + return value; + + return CFDictionaryGetValue(defaultSettings, key); +} + +void WebPreferences::setValueForKey(CFStringRef key, CFPropertyListRef value) +{ + CFDictionarySetValue(m_privatePrefs.get(), key, value); + if (m_autoSaves) { + CFPreferencesSetAppValue(key, value, kCFPreferencesCurrentApplication); + save(); + } } BSTR WebPreferences::stringValueForKey(CFStringRef key) { - CFStringRef str = (CFStringRef)valueForKey(key); + RetainPtr<CFPropertyListRef> value = valueForKey(key); - if (!str || (CFGetTypeID(str) != CFStringGetTypeID())) + if (!value || (CFGetTypeID(value.get()) != CFStringGetTypeID())) return 0; + CFStringRef str = static_cast<CFStringRef>(value.get()); + CFIndex length = CFStringGetLength(str); const UniChar* uniChars = CFStringGetCharactersPtr(str); if (uniChars) @@ -233,73 +292,22 @@ BSTR WebPreferences::stringValueForKey(CFStringRef key) int WebPreferences::integerValueForKey(CFStringRef key) { - CFTypeRef cfVal = (CFStringRef)valueForKey(key); - if (!cfVal) - return 0; - - CFTypeID cfType = CFGetTypeID(cfVal); - if (cfType == CFStringGetTypeID()) - return CFStringGetIntValue((CFStringRef)cfVal); - else if (cfType == CFBooleanGetTypeID()) { - Boolean boolVal = CFBooleanGetValue((CFBooleanRef)cfVal); - return (boolVal) ? 1 : 0; - } - else if (cfType == CFNumberGetTypeID()) { - int val = 0; - CFNumberGetValue((CFNumberRef)cfVal, kCFNumberSInt32Type, &val); - return val; - } - - return 0; + return numberValueForPreferencesValue<int>(valueForKey(key).get()); } BOOL WebPreferences::boolValueForKey(CFStringRef key) { - return (integerValueForKey(key) != 0); + return booleanValueForPreferencesValue(valueForKey(key).get()); } float WebPreferences::floatValueForKey(CFStringRef key) { - CFTypeRef cfVal = (CFStringRef)valueForKey(key); - if (!cfVal) - return 0.0; - - CFTypeID cfType = CFGetTypeID(cfVal); - if (cfType == CFStringGetTypeID()) - return (float)CFStringGetDoubleValue((CFStringRef)cfVal); - else if (cfType == CFBooleanGetTypeID()) { - Boolean boolVal = CFBooleanGetValue((CFBooleanRef)cfVal); - return (boolVal) ? 1.0f : 0.0f; - } - else if (cfType == CFNumberGetTypeID()) { - float val = 0.0; - CFNumberGetValue((CFNumberRef)cfVal, kCFNumberFloatType, &val); - return val; - } - - return 0.0; + return numberValueForPreferencesValue<float>(valueForKey(key).get()); } LONGLONG WebPreferences::longlongValueForKey(CFStringRef key) { - CFTypeRef cfVal = (CFTypeRef) valueForKey(key); - if (!cfVal) - return 0; - - CFTypeID cfType = CFGetTypeID(cfVal); - if (cfType == CFStringGetTypeID()) - return (LONGLONG) CFStringGetIntValue((CFStringRef)cfVal); - else if (cfType == CFBooleanGetTypeID()) { - Boolean boolVal = CFBooleanGetValue((CFBooleanRef)cfVal); - return (boolVal) ? 1 : 0; - } - else if (cfType == CFNumberGetTypeID()) { - LONGLONG val = 0; - CFNumberGetValue((CFNumberRef)cfVal, kCFNumberLongLongType, &val); - return val; - } - - return 0; + return numberValueForPreferencesValue<LONGLONG>(valueForKey(key).get()); } void WebPreferences::setStringValue(CFStringRef key, LPCTSTR value) @@ -311,9 +319,7 @@ void WebPreferences::setStringValue(CFStringRef key, LPCTSTR value) RetainPtr<CFStringRef> valueRef(AdoptCF, CFStringCreateWithCharactersNoCopy(0, (UniChar*)_wcsdup(value), (CFIndex)_tcslen(value), kCFAllocatorMalloc)); - CFDictionarySetValue(m_privatePrefs.get(), key, valueRef.get()); - if (m_autoSaves) - save(); + setValueForKey(key, valueRef.get()); postPreferencesChangesNotification(); } @@ -323,10 +329,7 @@ void WebPreferences::setIntegerValue(CFStringRef key, int value) if (integerValueForKey(key) == value) return; - RetainPtr<CFNumberRef> valueRef(AdoptCF, CFNumberCreate(0, kCFNumberSInt32Type, &value)); - CFDictionarySetValue(m_privatePrefs.get(), key, valueRef.get()); - if (m_autoSaves) - save(); + setValueForKey(key, cfNumber(value).get()); postPreferencesChangesNotification(); } @@ -336,9 +339,7 @@ void WebPreferences::setBoolValue(CFStringRef key, BOOL value) if (boolValueForKey(key) == value) return; - CFDictionarySetValue(m_privatePrefs.get(), key, value ? kCFBooleanTrue : kCFBooleanFalse); - if (m_autoSaves) - save(); + setValueForKey(key, value ? kCFBooleanTrue : kCFBooleanFalse); postPreferencesChangesNotification(); } @@ -348,10 +349,7 @@ void WebPreferences::setLongLongValue(CFStringRef key, LONGLONG value) if (longlongValueForKey(key) == value) return; - RetainPtr<CFNumberRef> valueRef(AdoptCF, CFNumberCreate(0, kCFNumberLongLongType, &value)); - CFDictionarySetValue(m_privatePrefs.get(), key, valueRef.get()); - if (m_autoSaves) - save(); + setValueForKey(key, cfNumber(value).get()); postPreferencesChangesNotification(); } @@ -367,102 +365,82 @@ BSTR WebPreferences::webPreferencesRemovedNotification() static BSTR webPreferencesRemovedNotification = SysAllocString(WebPreferencesRemovedNotification); return webPreferencesRemovedNotification; } + void WebPreferences::save() { - RetainPtr<CFWriteStreamRef> stream(AdoptCF, - CFWriteStreamCreateWithAllocatedBuffers(kCFAllocatorDefault, kCFAllocatorDefault)); - if (!stream) - return; - - if (!CFWriteStreamOpen(stream.get())) - return; + CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); +} - if (!CFPropertyListWriteToStream(m_privatePrefs.get(), stream.get(), kCFPropertyListXMLFormat_v1_0, 0)) { - CFWriteStreamClose(stream.get()); - return; - } - CFWriteStreamClose(stream.get()); +void WebPreferences::load() +{ + initializeDefaultSettings(); - RetainPtr<CFDataRef> dataRef(AdoptCF, - (CFDataRef)CFWriteStreamCopyProperty(stream.get(), kCFStreamPropertyDataWritten)); - if (!dataRef) - return; + m_privatePrefs.adoptCF(CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); - safeCreateFile(preferencesPath(), dataRef.get()); + migrateWebKitPreferencesToCFPreferences(); } -void WebPreferences::load() +void WebPreferences::migrateWebKitPreferencesToCFPreferences() { - initializeDefaultSettings(); + CFStringRef didMigrateKey = CFSTR(WebKitDidMigrateWebKitPreferencesToCFPreferencesPreferenceKey); + if (boolValueForKey(didMigrateKey)) + return; + bool oldValue = m_autoSaves; + m_autoSaves = true; + setBoolValue(didMigrateKey, TRUE); + m_autoSaves = oldValue; - CString path = preferencesPath().utf8(); + CString path = oldPreferencesPath().utf8(); RetainPtr<CFURLRef> urlRef(AdoptCF, CFURLCreateFromFileSystemRepresentation(0, reinterpret_cast<const UInt8*>(path.data()), path.length(), false)); if (!urlRef) return; RetainPtr<CFReadStreamRef> stream(AdoptCF, CFReadStreamCreateWithFile(0, urlRef.get())); - if (!stream) + if (!stream) return; - if (CFReadStreamOpen(stream.get())) { - CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0 | kCFPropertyListXMLFormat_v1_0; - RetainPtr<CFPropertyListRef> plist(AdoptCF, CFPropertyListCreateFromStream(0, stream.get(), 0, kCFPropertyListMutableContainersAndLeaves, &format, 0)); - CFReadStreamClose(stream.get()); - - if (CFGetTypeID(plist.get()) == CFDictionaryGetTypeID()) - m_privatePrefs.adoptCF(const_cast<CFMutableDictionaryRef>(reinterpret_cast<CFDictionaryRef>(plist.releaseRef()))); - } - - if (!m_privatePrefs) - m_privatePrefs.adoptCF(CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); - - migrateDefaultSettingsFromSafari3Beta(); -} - -void WebPreferences::migrateDefaultSettingsFromSafari3Beta() -{ - // The "migration" happening here is a one-time removal of any default values - // that were stored in the user's preferences due to <rdar://problem/5214504>. - - ASSERT(s_defaultSettings); - if (!m_privatePrefs) + if (!CFReadStreamOpen(stream.get())) return; - CFStringRef didMigrateKey = CFSTR(WebKitDidMigrateDefaultSettingsFromSafari3BetaPreferenceKey); - if (boolValueForKey(didMigrateKey)) + CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0 | kCFPropertyListXMLFormat_v1_0; + RetainPtr<CFPropertyListRef> plist(AdoptCF, CFPropertyListCreateFromStream(0, stream.get(), 0, kCFPropertyListMutableContainersAndLeaves, &format, 0)); + CFReadStreamClose(stream.get()); + + if (!plist || CFGetTypeID(plist.get()) != CFDictionaryGetTypeID()) return; - removeValuesMatchingDefaultSettings(); + copyWebKitPreferencesToCFPreferences(static_cast<CFDictionaryRef>(plist.get())); - bool oldValue = m_autoSaves; - m_autoSaves = true; - setBoolValue(didMigrateKey, TRUE); - m_autoSaves = oldValue; + deleteFile(oldPreferencesPath()); } -void WebPreferences::removeValuesMatchingDefaultSettings() +void WebPreferences::copyWebKitPreferencesToCFPreferences(CFDictionaryRef dict) { - ASSERT(m_privatePrefs); + ASSERT_ARG(dict, dict); - int count = CFDictionaryGetCount(m_privatePrefs.get()); + int count = CFDictionaryGetCount(dict); if (count <= 0) return; - Vector<CFTypeRef> keys(count); - Vector<CFTypeRef> values(count); - CFDictionaryGetKeysAndValues(m_privatePrefs.get(), keys.data(), values.data()); + CFStringRef didRemoveDefaultsKey = CFSTR(WebKitDidMigrateDefaultSettingsFromSafari3BetaPreferenceKey); + bool omitDefaults = !booleanValueForPreferencesValue(CFDictionaryGetValue(dict, didRemoveDefaultsKey)); + + OwnArrayPtr<CFTypeRef> keys(new CFTypeRef[count]); + OwnArrayPtr<CFTypeRef> values(new CFTypeRef[count]); + CFDictionaryGetKeysAndValues(dict, keys.get(), values.get()); for (int i = 0; i < count; ++i) { - if (!values[i]) + if (!keys[i] || !values[i] || CFGetTypeID(keys[i]) != CFStringGetTypeID()) continue; - CFTypeRef defaultValue = CFDictionaryGetValue(s_defaultSettings, keys[i]); - if (!defaultValue) - continue; + if (omitDefaults) { + CFTypeRef defaultValue = CFDictionaryGetValue(defaultSettings, keys[i]); + if (defaultValue && CFEqual(defaultValue, values[i])) + continue; + } - if (CFEqual(values[i], defaultValue)) - CFDictionaryRemoveValue(m_privatePrefs.get(), keys[i]); + setValueForKey(static_cast<CFStringRef>(keys[i]), values[i]); } } @@ -1097,6 +1075,30 @@ HRESULT WebPreferences::setCacheModel(WebCacheModel cacheModel) return S_OK; } +HRESULT WebPreferences::setShouldPaintCustomScrollbars(BOOL shouldPaint) +{ + setBoolValue(CFSTR(WebKitPaintCustomScrollbarsPreferenceKey), shouldPaint); + return S_OK; +} + +HRESULT WebPreferences::shouldPaintCustomScrollbars(BOOL* shouldPaint) +{ + *shouldPaint = boolValueForKey(CFSTR(WebKitPaintCustomScrollbarsPreferenceKey)); + return S_OK; +} + +HRESULT WebPreferences::shouldPaintNativeControls(BOOL* shouldPaint) +{ + *shouldPaint = boolValueForKey(CFSTR(WebKitPaintNativeControlsPreferenceKey)); + return S_OK; +} + +HRESULT WebPreferences::setShouldPaintNativeControls(BOOL shouldPaint) +{ + setBoolValue(CFSTR(WebKitPaintNativeControlsPreferenceKey), shouldPaint); + return S_OK; +} + HRESULT WebPreferences::setDeveloperExtrasEnabled(BOOL enabled) { setBoolValue(CFSTR(WebKitDeveloperExtrasEnabledPreferenceKey), enabled); @@ -1147,6 +1149,42 @@ HRESULT STDMETHODCALLTYPE WebPreferences::authorAndUserStylesEnabled(BOOL* enabl return S_OK; } +HRESULT WebPreferences::inApplicationChromeMode(BOOL* enabled) +{ + *enabled = boolValueForKey(CFSTR(WebKitApplicationChromeModePreferenceKey)); + return S_OK; +} + +HRESULT WebPreferences::setApplicationChromeMode(BOOL enabled) +{ + setBoolValue(CFSTR(WebKitApplicationChromeModePreferenceKey), enabled); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebPreferences::setOfflineWebApplicationCacheEnabled(BOOL enabled) +{ + setBoolValue(CFSTR(WebKitOfflineWebApplicationCacheEnabledPreferenceKey), enabled); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebPreferences::offlineWebApplicationCacheEnabled(BOOL* enabled) +{ + *enabled = boolValueForKey(CFSTR(WebKitOfflineWebApplicationCacheEnabledPreferenceKey)); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebPreferences::localStorageDatabasePath(BSTR* location) +{ + *location = stringValueForKey(CFSTR(WebKitLocalStorageDatabasePathPreferenceKey)); + return (*location) ? S_OK : E_FAIL; +} + +HRESULT STDMETHODCALLTYPE WebPreferences::setLocalStorageDatabasePath(BSTR location) +{ + setStringValue(CFSTR(WebKitLocalStorageDatabasePathPreferenceKey), location); + return S_OK; +} + void WebPreferences::willAddToWebView() { ++m_numWebViews; diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h index 179c66c..46df0a2 100644 --- a/WebKit/win/WebPreferences.h +++ b/WebKit/win/WebPreferences.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,8 +26,7 @@ #ifndef WebPreferences_H #define WebPreferences_H -#include "IWebPreferences.h" -#include "IWebPreferencesPrivate.h" +#include "WebKit.h" #include <CoreFoundation/CoreFoundation.h> #include <WebCore/BString.h> #include <wtf/RetainPtr.h> @@ -269,11 +268,17 @@ public: virtual HRESULT STDMETHODCALLTYPE setDOMPasteAllowed( /* [in] */ BOOL enabled); - virtual HRESULT STDMETHODCALLTYPE cacheModel( - /* [retval][out] */ WebCacheModel* cacheModel); + virtual HRESULT STDMETHODCALLTYPE cacheModel( + /* [retval][out] */ WebCacheModel* cacheModel); - virtual HRESULT STDMETHODCALLTYPE setCacheModel( - /* [in] */ WebCacheModel cacheModel); + virtual HRESULT STDMETHODCALLTYPE setCacheModel( + /* [in] */ WebCacheModel cacheModel); + + virtual HRESULT STDMETHODCALLTYPE setShouldPaintCustomScrollbars( + /* [in] */ BOOL shouldPaint); + + virtual HRESULT STDMETHODCALLTYPE shouldPaintCustomScrollbars( + /* [retval][out] */ BOOL *shouldPaint); // IWebPreferencesPrivate virtual HRESULT STDMETHODCALLTYPE setDeveloperExtrasEnabled( @@ -291,6 +296,30 @@ public: virtual HRESULT STDMETHODCALLTYPE setAuthorAndUserStylesEnabled(BOOL); virtual HRESULT STDMETHODCALLTYPE authorAndUserStylesEnabled(BOOL*); + virtual HRESULT STDMETHODCALLTYPE inApplicationChromeMode( + /* [retval][out] */ BOOL *enabled); + + virtual HRESULT STDMETHODCALLTYPE setApplicationChromeMode( + /* [in] */ BOOL enabled); + + virtual HRESULT STDMETHODCALLTYPE setOfflineWebApplicationCacheEnabled( + /* [in] */ BOOL enabled); + + virtual HRESULT STDMETHODCALLTYPE offlineWebApplicationCacheEnabled( + /* [retval][out] */ BOOL *enabled); + + virtual HRESULT STDMETHODCALLTYPE localStorageDatabasePath( + /* [out, retval] */ BSTR* location); + + virtual HRESULT STDMETHODCALLTYPE setLocalStorageDatabasePath( + /* [in] */ BSTR location); + + virtual HRESULT STDMETHODCALLTYPE setShouldPaintNativeControls( + /* [in] */ BOOL shouldPaint); + + virtual HRESULT STDMETHODCALLTYPE shouldPaintNativeControls( + /* [retval][out] */ BOOL *shouldPaint); + // WebPreferences // This method accesses a different preference key than developerExtrasEnabled. @@ -316,7 +345,8 @@ public: HRESULT postPreferencesChangesNotification(); protected: - const void* valueForKey(CFStringRef key); + void setValueForKey(CFStringRef key, CFPropertyListRef value); + RetainPtr<CFPropertyListRef> valueForKey(CFStringRef key); BSTR stringValueForKey(CFStringRef key); int integerValueForKey(CFStringRef key); BOOL boolValueForKey(CFStringRef key); @@ -330,8 +360,8 @@ protected: static void initializeDefaultSettings(); void save(); void load(); - void migrateDefaultSettingsFromSafari3Beta(); - void removeValuesMatchingDefaultSettings(); + void migrateWebKitPreferencesToCFPreferences(); + void copyWebKitPreferencesToCFPreferences(CFDictionaryRef); protected: ULONG m_refCount; @@ -340,9 +370,6 @@ protected: bool m_autoSaves; bool m_automaticallyDetectsCacheModel; unsigned m_numWebViews; - - static CFDictionaryRef s_defaultSettings; - static WebPreferences* s_standardPreferences; }; #endif diff --git a/WebKit/win/WebResource.cpp b/WebKit/win/WebResource.cpp index e8d1f4d..9374aec 100644 --- a/WebKit/win/WebResource.cpp +++ b/WebKit/win/WebResource.cpp @@ -46,11 +46,13 @@ WebResource::WebResource(IStream* data, const WebCore::KURL& url, const WebCore: , m_frameName(frameName) { gClassCount++; + gClassNameCount.add("WebResource"); } WebResource::~WebResource() { gClassCount--; + gClassNameCount.remove("WebResource"); } WebResource* WebResource::createInstance(PassRefPtr<WebCore::SharedBuffer> data, const WebCore::ResourceResponse& response) @@ -103,7 +105,7 @@ HRESULT STDMETHODCALLTYPE WebResource::initWithData( /* [in] */ BSTR frameName) { m_data = data; - m_url = KURL(String(url).deprecatedString()); + m_url = KURL(String(url)); m_mimeType = String(mimeType); m_textEncodingName = String(textEncodingName); m_frameName = String(frameName); diff --git a/WebKit/win/WebResource.h b/WebKit/win/WebResource.h index e2d491a..d67cb56 100644 --- a/WebKit/win/WebResource.h +++ b/WebKit/win/WebResource.h @@ -26,7 +26,7 @@ #ifndef WebResource_h #define WebResource_h -#include "IWebResource.h" +#include "WebKit.h" #include "COMPtr.h" #pragma warning(push, 0) diff --git a/WebKit/win/WebScriptCallFrame.cpp b/WebKit/win/WebScriptCallFrame.cpp index 48c79c1..a831565 100644 --- a/WebKit/win/WebScriptCallFrame.cpp +++ b/WebKit/win/WebScriptCallFrame.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,14 +27,15 @@ */ #include "config.h" -#include "WebKitDLL.h" #include "WebScriptCallFrame.h" #include "COMEnumVariant.h" -#include "Function.h" +#include "WebKitDLL.h" #include <JavaScriptCore/Interpreter.h> +#include <JavaScriptCore/JSFunction.h> #include <JavaScriptCore/JSGlobalObject.h> +#include <JavaScriptCore/JSLock.h> #include <JavaScriptCore/JSStringRefBSTR.h> #include <JavaScriptCore/JSValueRef.h> #include <JavaScriptCore/PropertyNameArray.h> @@ -46,32 +47,22 @@ #include <wtf/Assertions.h> -using namespace KJS; +using namespace JSC; -UString WebScriptCallFrame::jsValueToString(KJS::ExecState* state, JSValue* jsvalue) +UString WebScriptCallFrame::jsValueToString(JSC::ExecState* state, JSValue* jsvalue) { if (!jsvalue) return "undefined"; - switch (jsvalue->type()) { - case NullType: - case UndefinedType: - case UnspecifiedType: - case GetterSetterType: - break; - case StringType: - return jsvalue->getString(); - break; - case NumberType: - return UString::from(jsvalue->getNumber()); - break; - case BooleanType: - return jsvalue->getBoolean() ? "True" : "False"; - break; - case ObjectType: - jsvalue = jsvalue->getObject()->defaultValue(state, StringType); - return jsvalue->getString(); - break; + if (jsvalue->isString()) + return jsvalue->getString(); + else if (jsvalue->isNumber()) + return UString::from(jsvalue->getNumber()); + else if (jsvalue->isBoolean()) + return jsvalue->getBoolean() ? "True" : "False"; + else if (jsvalue->isObject()) { + jsvalue = jsvalue->getObject()->defaultValue(state, PreferString); + return jsvalue->getString(); } return "undefined"; @@ -79,23 +70,35 @@ UString WebScriptCallFrame::jsValueToString(KJS::ExecState* state, JSValue* jsva // WebScriptCallFrame ----------------------------------------------------------- -WebScriptCallFrame::WebScriptCallFrame(ExecState* state, IWebScriptCallFrame* caller) - : m_refCount(0) +static ExecState* callingFunctionOrGlobalExecState(ExecState* exec) { - m_state = state; - m_caller = caller; +#if 0 + for (ExecState* current = exec; current; current = current->callingExecState()) + if (current->codeType() == FunctionCode || current->codeType() == GlobalCode) + return current; +#endif + return 0; +} +WebScriptCallFrame::WebScriptCallFrame(ExecState* state) + : m_refCount(0) + , m_state(callingFunctionOrGlobalExecState(state)) +{ + ASSERT_ARG(state, state); + ASSERT(m_state); gClassCount++; + gClassNameCount.add("WebScriptCallFrame"); } WebScriptCallFrame::~WebScriptCallFrame() { gClassCount--; + gClassNameCount.remove("WebScriptCallFrame"); } -WebScriptCallFrame* WebScriptCallFrame::createInstance(ExecState* state, IWebScriptCallFrame* caller) +WebScriptCallFrame* WebScriptCallFrame::createInstance(ExecState* state) { - WebScriptCallFrame* instance = new WebScriptCallFrame(state, caller); + WebScriptCallFrame* instance = new WebScriptCallFrame(state); instance->AddRef(); return instance; } @@ -135,7 +138,12 @@ ULONG STDMETHODCALLTYPE WebScriptCallFrame::Release() HRESULT STDMETHODCALLTYPE WebScriptCallFrame::caller( /* [out, retval] */ IWebScriptCallFrame** callFrame) { - return m_caller.copyRefTo(callFrame); + if (!callFrame) + return E_POINTER; +#if 0 + *callFrame = m_state->callingExecState() ? WebScriptCallFrame::createInstance(m_state->callingExecState()) : 0; +#endif + return S_OK; } HRESULT STDMETHODCALLTYPE WebScriptCallFrame::functionName( @@ -145,18 +153,18 @@ HRESULT STDMETHODCALLTYPE WebScriptCallFrame::functionName( return E_POINTER; *funcName = 0; - +#if 0 if (!m_state->scopeNode()) return S_OK; - FunctionImp* func = m_state->function(); + JSFunction* func = m_state->function(); if (!func) return E_FAIL; const Identifier& funcIdent = func->functionName(); if (!funcIdent.isEmpty()) *funcName = WebCore::BString(funcIdent).release(); - +#endif return S_OK; } @@ -172,7 +180,7 @@ HRESULT STDMETHODCALLTYPE WebScriptCallFrame::stringByEvaluatingJavaScriptFromSt *result = 0; - JSLock lock; + JSLock lock(false); JSValue* scriptExecutionResult = valueByEvaluatingJavaScriptFromString(script); *result = WebCore::BString(jsValueToString(m_state, scriptExecutionResult)).release(); @@ -188,11 +196,13 @@ HRESULT STDMETHODCALLTYPE WebScriptCallFrame::variableNames( *variableNames = 0; - PropertyNameArray propertyNames; - + PropertyNameArray propertyNames(m_state); +#if 0 m_state->scopeChain().top()->getPropertyNames(m_state, propertyNames); - *variableNames = COMEnumVariant<PropertyNameArray>::adopt(propertyNames); + // FIXME: It would be more efficient to use ::adopt here, but PropertyNameArray doesn't have a swap function. + *variableNames = COMEnumVariant<PropertyNameArray>::createInstance(propertyNames); +#endif return S_OK; } @@ -208,20 +218,22 @@ HRESULT STDMETHODCALLTYPE WebScriptCallFrame::valueForVariable( *value = 0; - Identifier identKey(reinterpret_cast<KJS::UChar*>(key), SysStringLen(key)); + Identifier identKey(m_state, reinterpret_cast<UChar*>(key), SysStringLen(key)); - JSValue* jsvalue = 0; +#if 0 + JSValue* jsvalue = noValue(); ScopeChain scopeChain = m_state->scopeChain(); for (ScopeChainIterator it = scopeChain.begin(); it != scopeChain.end() && !jsvalue; ++it) jsvalue = (*it)->get(m_state, identKey); - *value = WebCore::BString(jsValueToString(m_state, jsvalue)).release(); +#endif return S_OK; } JSValue* WebScriptCallFrame::valueByEvaluatingJavaScriptFromString(BSTR script) { +#if 0 ExecState* state = m_state; JSGlobalObject* globObj = state->dynamicGlobalObject(); @@ -229,8 +241,8 @@ JSValue* WebScriptCallFrame::valueByEvaluatingJavaScriptFromString(BSTR script) JSObject* eval = 0; if (state->scopeNode()) { // "eval" won't work without context (i.e. at global scope) JSValue* v = globObj->get(state, "eval"); - if (v->isObject() && static_cast<JSObject*>(v)->implementsCall()) - eval = static_cast<JSObject*>(v); + if (v->isObject() && asObject(v)->implementsCall()) + eval = asObject(v); else // no "eval" - fallback operates on global exec state state = globObj->globalExec(); @@ -239,13 +251,13 @@ JSValue* WebScriptCallFrame::valueByEvaluatingJavaScriptFromString(BSTR script) JSValue* savedException = state->exception(); state->clearException(); - UString code(reinterpret_cast<KJS::UChar*>(script), SysStringLen(script)); + UString code(reinterpret_cast<UChar*>(script), SysStringLen(script)); // evaluate JSValue* scriptExecutionResult; if (eval) { - List args; - args.append(jsString(code)); + ArgList args; + args.append(jsString(state, code)); scriptExecutionResult = eval->call(state, 0, args); } else // no "eval", or no context (i.e. global scope) - use global fallback @@ -256,6 +268,9 @@ JSValue* WebScriptCallFrame::valueByEvaluatingJavaScriptFromString(BSTR script) state->setException(savedException); return scriptExecutionResult; +#else + return jsNull(); +#endif } template<> struct COMVariantSetter<Identifier> diff --git a/WebKit/win/WebScriptCallFrame.h b/WebKit/win/WebScriptCallFrame.h index f7da9ea..d3cc4f8 100644 --- a/WebKit/win/WebScriptCallFrame.h +++ b/WebKit/win/WebScriptCallFrame.h @@ -29,25 +29,20 @@ #ifndef WebScriptCallFrame_h #define WebScriptCallFrame_h -#include "IWebScriptCallFrame.h" +#include "WebKit.h" +#include <runtime/JSValue.h> -#include <JavaScriptCore/ExecState.h> -#pragma warning(push, 0) -#include <WebCore/COMPtr.h> -#pragma warning(pop) - -namespace KJS { +namespace JSC { class ExecState; - class JSValue; class UString; } class WebScriptCallFrame : public IWebScriptCallFrame { public: - static WebScriptCallFrame* createInstance(KJS::ExecState*, IWebScriptCallFrame* caller); + static WebScriptCallFrame* createInstance(JSC::ExecState*); private: - WebScriptCallFrame(KJS::ExecState*, IWebScriptCallFrame* caller); + WebScriptCallFrame(JSC::ExecState*); virtual ~WebScriptCallFrame(); public: @@ -79,16 +74,15 @@ public: /* [out, retval] */ BSTR* value); // Helper and accessors - virtual KJS::JSValue* valueByEvaluatingJavaScriptFromString(BSTR script); - virtual KJS::ExecState* state() const { return m_state; } + virtual JSC::JSValue* valueByEvaluatingJavaScriptFromString(BSTR script); + virtual JSC::ExecState* state() const { return m_state; } - static KJS::UString jsValueToString(KJS::ExecState*, KJS::JSValue*); + static JSC::UString jsValueToString(JSC::ExecState*, JSC::JSValue*); private: ULONG m_refCount; - KJS::ExecState* m_state; - COMPtr<IWebScriptCallFrame> m_caller; + JSC::ExecState* m_state; }; #endif diff --git a/WebKit/win/WebScriptDebugServer.cpp b/WebKit/win/WebScriptDebugServer.cpp index 463da5d..ddf762f 100644 --- a/WebKit/win/WebScriptDebugServer.cpp +++ b/WebKit/win/WebScriptDebugServer.cpp @@ -24,36 +24,23 @@ */ #include "config.h" -#include "IWebScriptDebugListener.h" +#include "WebKit.h" #include "WebKitDLL.h" #include "WebScriptDebugServer.h" -#include "WebView.h" -#include <wtf/Assertions.h> -#include <wtf/Vector.h> - -typedef HashSet<COMPtr<IWebScriptDebugListener> > ListenerSet; - -static ListenerSet s_Listeners; -static unsigned s_ListenerCount = 0; -static OwnPtr<WebScriptDebugServer> s_SharedWebScriptDebugServer; -static bool s_dying = false; - -unsigned WebScriptDebugServer::listenerCount() { return s_ListenerCount; }; - // WebScriptDebugServer ------------------------------------------------------------ WebScriptDebugServer::WebScriptDebugServer() : m_refCount(0) - , m_paused(false) - , m_step(false) { gClassCount++; + gClassNameCount.add("WebScriptDebugServer"); } WebScriptDebugServer::~WebScriptDebugServer() { gClassCount--; + gClassNameCount.remove("WebScriptDebugServer"); } WebScriptDebugServer* WebScriptDebugServer::createInstance() @@ -63,17 +50,6 @@ WebScriptDebugServer* WebScriptDebugServer::createInstance() return instance; } -WebScriptDebugServer* WebScriptDebugServer::sharedWebScriptDebugServer() -{ - if (!s_SharedWebScriptDebugServer) { - s_dying = false; - s_SharedWebScriptDebugServer.set(WebScriptDebugServer::createInstance()); - } - - return s_SharedWebScriptDebugServer.get(); -} - - // IUnknown ------------------------------------------------------------------- HRESULT STDMETHODCALLTYPE WebScriptDebugServer::QueryInterface(REFIID riid, void** ppvObject) @@ -107,255 +83,40 @@ ULONG STDMETHODCALLTYPE WebScriptDebugServer::Release() // IWebScriptDebugServer ----------------------------------------------------------- HRESULT STDMETHODCALLTYPE WebScriptDebugServer::sharedWebScriptDebugServer( - /* [retval][out] */ IWebScriptDebugServer** server) + /* [retval][out] */ IWebScriptDebugServer**) { - if (!server) - return E_POINTER; - - *server = WebScriptDebugServer::sharedWebScriptDebugServer(); - (*server)->AddRef(); - - return S_OK; + return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE WebScriptDebugServer::addListener( - /* [in] */ IWebScriptDebugListener* listener) + /* [in] */ IWebScriptDebugListener*) { - if (s_dying) - return E_FAIL; - - if (!listener) - return E_POINTER; - - ++s_ListenerCount; - s_Listeners.add(listener); - - return S_OK; + return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE WebScriptDebugServer::removeListener( - /* [in] */ IWebScriptDebugListener* listener) + /* [in] */ IWebScriptDebugListener*) { - if (s_dying) - return S_OK; - - if (!listener) - return E_POINTER; - - if (!s_Listeners.contains(listener)) - return S_OK; - - s_Listeners.remove(listener); - - ASSERT(s_ListenerCount >= 1); - if (--s_ListenerCount == 0) - resume(); - - return S_OK; + return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE WebScriptDebugServer::step() { - m_step = true; - m_paused = false; - - return S_OK; + return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE WebScriptDebugServer::pause() { - m_paused = true; - m_step = false; - - return S_OK; + return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE WebScriptDebugServer::resume() { - m_paused = false; - m_step = false; - - return S_OK; + return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE WebScriptDebugServer::isPaused( - /* [out, retval] */ BOOL* isPaused) -{ - if (!isPaused) - return E_POINTER; - - *isPaused = m_paused; - return S_OK; -} - - -void WebScriptDebugServer::suspendProcessIfPaused() + /* [out, retval] */ BOOL*) { - static bool alreadyHere = false; - - if (alreadyHere) - return; - - alreadyHere = true; - - MSG msg; - while (m_paused && GetMessage(&msg, 0, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - if (m_step) { - m_step = false; - m_paused = true; - } - - alreadyHere = false; -} - -// IWebScriptDebugListener -HRESULT STDMETHODCALLTYPE WebScriptDebugServer::didLoadMainResourceForDataSource( - /* [in] */ IWebView* webView, - /* [in] */ IWebDataSource* dataSource) -{ - if (!webView || !dataSource) - return E_FAIL; - - ListenerSet listenersCopy = s_Listeners; - ListenerSet::iterator end = listenersCopy.end(); - for (ListenerSet::iterator it = listenersCopy.begin(); it != end; ++it) - (**it).didLoadMainResourceForDataSource(webView, dataSource); - - return S_OK; -} - -HRESULT STDMETHODCALLTYPE WebScriptDebugServer::didParseSource( - /* [in] */ IWebView* webView, - /* [in] */ BSTR sourceCode, - /* [in] */ UINT baseLineNumber, - /* [in] */ BSTR url, - /* [in] */ int sourceID, - /* [in] */ IWebFrame* webFrame) -{ - if (!webView || !sourceCode || !url || !webFrame) - return E_FAIL; - - ListenerSet listenersCopy = s_Listeners; - ListenerSet::iterator end = listenersCopy.end(); - for (ListenerSet::iterator it = listenersCopy.begin(); it != end; ++it) - (**it).didParseSource(webView, sourceCode, baseLineNumber, url, sourceID, webFrame); - - return S_OK; -} - -HRESULT STDMETHODCALLTYPE WebScriptDebugServer::failedToParseSource( - /* [in] */ IWebView* webView, - /* [in] */ BSTR sourceCode, - /* [in] */ UINT baseLineNumber, - /* [in] */ BSTR url, - /* [in] */ BSTR error, - /* [in] */ IWebFrame* webFrame) -{ - if (!webView || !sourceCode || !url || !error || !webFrame) - return E_FAIL; - - ListenerSet listenersCopy = s_Listeners; - ListenerSet::iterator end = listenersCopy.end(); - for (ListenerSet::iterator it = listenersCopy.begin(); it != end; ++it) - (**it).failedToParseSource(webView, sourceCode, baseLineNumber, url, error, webFrame); - - return S_OK; -} - -HRESULT STDMETHODCALLTYPE WebScriptDebugServer::didEnterCallFrame( - /* [in] */ IWebView* webView, - /* [in] */ IWebScriptCallFrame* frame, - /* [in] */ int sourceID, - /* [in] */ int lineNumber, - /* [in] */ IWebFrame* webFrame) -{ - if (!webView || !frame || !webFrame) - return E_FAIL; - - ListenerSet listenersCopy = s_Listeners; - ListenerSet::iterator end = listenersCopy.end(); - for (ListenerSet::iterator it = listenersCopy.begin(); it != end; ++it) - (**it).didEnterCallFrame(webView, frame, sourceID, lineNumber, webFrame); - - suspendProcessIfPaused(); - - return S_OK; -} - -HRESULT STDMETHODCALLTYPE WebScriptDebugServer::willExecuteStatement( - /* [in] */ IWebView* webView, - /* [in] */ IWebScriptCallFrame* frame, - /* [in] */ int sourceID, - /* [in] */ int lineNumber, - /* [in] */ IWebFrame* webFrame) -{ - if (!webView || !frame || !webFrame) - return E_FAIL; - - ListenerSet listenersCopy = s_Listeners; - ListenerSet::iterator end = listenersCopy.end(); - for (ListenerSet::iterator it = listenersCopy.begin(); it != end; ++it) - (**it).willExecuteStatement(webView, frame, sourceID, lineNumber, webFrame); - - suspendProcessIfPaused(); - - return S_OK; -} - -HRESULT STDMETHODCALLTYPE WebScriptDebugServer::willLeaveCallFrame( - /* [in] */ IWebView* webView, - /* [in] */ IWebScriptCallFrame* frame, - /* [in] */ int sourceID, - /* [in] */ int lineNumber, - /* [in] */ IWebFrame* webFrame) -{ - if (!webView || !frame || !webFrame) - return E_FAIL; - - ListenerSet listenersCopy = s_Listeners; - ListenerSet::iterator end = listenersCopy.end(); - for (ListenerSet::iterator it = listenersCopy.begin(); it != end; ++it) - (**it).willLeaveCallFrame(webView, frame, sourceID, lineNumber, webFrame); - - suspendProcessIfPaused(); - - return S_OK; -} - -HRESULT STDMETHODCALLTYPE WebScriptDebugServer::exceptionWasRaised( - /* [in] */ IWebView* webView, - /* [in] */ IWebScriptCallFrame* frame, - /* [in] */ int sourceID, - /* [in] */ int lineNumber, - /* [in] */ IWebFrame* webFrame) -{ - if (!webView || !frame || !webFrame) - return E_FAIL; - - ListenerSet listenersCopy = s_Listeners; - ListenerSet::iterator end = listenersCopy.end(); - for (ListenerSet::iterator it = listenersCopy.begin(); it != end; ++it) - (**it).exceptionWasRaised(webView, frame, sourceID, lineNumber, webFrame); - - suspendProcessIfPaused(); - - return S_OK; -} - -HRESULT STDMETHODCALLTYPE WebScriptDebugServer::serverDidDie() -{ - s_dying = true; - - ListenerSet listenersCopy = s_Listeners; - ListenerSet::iterator end = listenersCopy.end(); - for (ListenerSet::iterator it = listenersCopy.begin(); it != end; ++it) { - (**it).serverDidDie(); - s_Listeners.remove((*it).get()); - } - - return S_OK; + return E_NOTIMPL; } diff --git a/WebKit/win/WebScriptDebugServer.h b/WebKit/win/WebScriptDebugServer.h index e7a695f..bb8eb79 100644 --- a/WebKit/win/WebScriptDebugServer.h +++ b/WebKit/win/WebScriptDebugServer.h @@ -26,27 +26,11 @@ #ifndef WebScriptDebugServer_H #define WebScriptDebugServer_H -#include "IWebScriptDebugServer.h" +#include "WebKit.h" -#include "IWebScriptDebugListener.h" -#include <wtf/HashSet.h> -#pragma warning(push, 0) -#include <WebCore/COMPtr.h> -#pragma warning(pop) - -interface IWebView; - -class WebScriptDebugServer : public IWebScriptDebugServer, public IWebScriptDebugListener -{ +class WebScriptDebugServer : public IWebScriptDebugServer { public: static WebScriptDebugServer* createInstance(); - static WebScriptDebugServer* sharedWebScriptDebugServer(); - -private: - WebScriptDebugServer(); - -public: - virtual ~WebScriptDebugServer(); // IUnknown virtual HRESULT STDMETHODCALLTYPE QueryInterface( @@ -76,63 +60,9 @@ public: virtual HRESULT STDMETHODCALLTYPE isPaused( /* [out, retval] */ BOOL* isPaused); - // IWebScriptDebugListener - virtual HRESULT STDMETHODCALLTYPE didLoadMainResourceForDataSource( - /* [in] */ IWebView* webView, - /* [in] */ IWebDataSource* dataSource); - - virtual HRESULT STDMETHODCALLTYPE didParseSource( - /* [in] */ IWebView* webView, - /* [in] */ BSTR sourceCode, - /* [in] */ UINT baseLineNumber, - /* [in] */ BSTR url, - /* [in] */ int sourceID, - /* [in] */ IWebFrame* webFrame); - - virtual HRESULT STDMETHODCALLTYPE failedToParseSource( - /* [in] */ IWebView* webView, - /* [in] */ BSTR sourceCode, - /* [in] */ UINT baseLineNumber, - /* [in] */ BSTR url, - /* [in] */ BSTR error, - /* [in] */ IWebFrame*); - - virtual HRESULT STDMETHODCALLTYPE didEnterCallFrame( - /* [in] */ IWebView* webView, - /* [in] */ IWebScriptCallFrame* frame, - /* [in] */ int sourceID, - /* [in] */ int lineNumber, - /* [in] */ IWebFrame*); - - virtual HRESULT STDMETHODCALLTYPE willExecuteStatement( - /* [in] */ IWebView*, - /* [in] */ IWebScriptCallFrame*, - /* [in] */ int sourceID, - /* [in] */ int lineNumber, - /* [in] */ IWebFrame*); - - virtual HRESULT STDMETHODCALLTYPE willLeaveCallFrame( - /* [in] */ IWebView* webView, - /* [in] */ IWebScriptCallFrame* frame, - /* [in] */ int sourceID, - /* [in] */ int lineNumber, - /* [in] */ IWebFrame*); - - virtual HRESULT STDMETHODCALLTYPE exceptionWasRaised( - /* [in] */ IWebView* webView, - /* [in] */ IWebScriptCallFrame*, - /* [in] */ int sourceID, - /* [in] */ int lineNumber, - /* [in] */ IWebFrame*); - - virtual HRESULT STDMETHODCALLTYPE serverDidDie(); - - void suspendProcessIfPaused(); - static unsigned listenerCount(); - private: - bool m_paused; - bool m_step; + WebScriptDebugServer(); + ~WebScriptDebugServer(); ULONG m_refCount; }; diff --git a/WebKit/win/WebScriptDebugger.cpp b/WebKit/win/WebScriptDebugger.cpp deleted file mode 100644 index 54309f6..0000000 --- a/WebKit/win/WebScriptDebugger.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (C) 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 - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebKitDLL.h" -#include "WebScriptDebugger.h" - -#include "IWebView.h" -#include "WebFrame.h" -#include "WebScriptCallFrame.h" -#include "WebScriptDebugServer.h" - -#pragma warning(push, 0) -#include <WebCore/BString.h> -#include <WebCore/kjs_binding.h> -#include <WebCore/kjs_proxy.h> -#include <WebCore/PlatformString.h> -#pragma warning(pop) - -using namespace WebCore; -using namespace KJS; - -WebScriptDebugger::WebScriptDebugger(WebFrame* frame) - : m_frame(frame) -{ - ASSERT(m_frame); - - m_callingServer = true; - - KJSProxy* proxy = core(m_frame)->scriptProxy(); - if (!proxy) - return; - - JSGlobalObject* globalObject = proxy->globalObject(); - attach(globalObject); - - m_frame->webView(&m_webView); - ASSERT(m_webView); - - callEvent(globalObject->globalExec(), -1, -1, 0, List()); - m_callingServer = false; -} - -bool WebScriptDebugger::sourceParsed(ExecState*, int sourceId, const UString& sourceURL, - const UString& source, int startingLineNumber, int errorLine, const UString& /*errorMsg*/) -{ - if (m_callingServer) - return true; - - m_callingServer = true; - - if (WebScriptDebugServer::listenerCount() <= 0) - return true; - - BString bSource = String(source); - BString bSourceURL = String(sourceURL); - - if (errorLine == -1) { - WebScriptDebugServer::sharedWebScriptDebugServer()->didParseSource(m_webView.get(), - bSource, - startingLineNumber, - bSourceURL, - sourceId, - m_frame); - } else { - // FIXME: the error var should be made with the information in the errorMsg. It is not a simple - // UString to BSTR conversion there is some logic involved that I don't fully understand yet. - BString error(L"An Error Occurred."); - WebScriptDebugServer::sharedWebScriptDebugServer()->failedToParseSource(m_webView.get(), - bSource, - startingLineNumber, - bSourceURL, - error, - m_frame); - } - - m_callingServer = false; - return true; -} - -bool WebScriptDebugger::callEvent(ExecState* state, int sourceId, int lineno, JSObject* /*function*/, const List &/*args*/) -{ - if (m_callingServer) - return true; - - m_callingServer = true; - - enterFrame(state); - WebScriptDebugServer::sharedWebScriptDebugServer()->didEnterCallFrame(m_webView.get(), m_topStackFrame.get(), sourceId, lineno, m_frame); - - m_callingServer = false; - - return true; -} - -bool WebScriptDebugger::atStatement(ExecState*, int sourceId, int firstLine, int /*lastLine*/) -{ - if (m_callingServer) - return true; - - m_callingServer = true; - - WebScriptDebugServer::sharedWebScriptDebugServer()->willExecuteStatement(m_webView.get(), m_topStackFrame.get(), sourceId, firstLine, m_frame); - - m_callingServer = false; - - return true; -} - -bool WebScriptDebugger::returnEvent(ExecState*, int sourceId, int lineno, JSObject* /*function*/) -{ - if (m_callingServer) - return true; - - m_callingServer = true; - - leaveFrame(); - WebScriptDebugServer::sharedWebScriptDebugServer()->willLeaveCallFrame(m_webView.get(), m_topStackFrame.get(), sourceId, lineno, m_frame); - - m_callingServer = false; - - return true; -} - -bool WebScriptDebugger::exception(ExecState*, int sourceId, int lineno, JSValue* /*exception */) -{ - if (m_callingServer) - return true; - - m_callingServer = true; - - WebScriptDebugServer::sharedWebScriptDebugServer()->exceptionWasRaised(m_webView.get(), m_topStackFrame.get(), sourceId, lineno, m_frame); - - m_callingServer = false; - - return true; -} - -void WebScriptDebugger::enterFrame(ExecState* state) -{ - m_topStackFrame = WebScriptCallFrame::createInstance(state, m_topStackFrame.get()); // Set the top as the caller -} - -void WebScriptDebugger::leaveFrame() -{ - if (!m_topStackFrame) - return; - - COMPtr<IWebScriptCallFrame> caller; - if (FAILED(m_topStackFrame->caller(&caller))) - return; - - m_topStackFrame = caller; -} diff --git a/WebKit/win/WebScriptDebugger.h b/WebKit/win/WebScriptDebugger.h deleted file mode 100644 index ae3dd6d..0000000 --- a/WebKit/win/WebScriptDebugger.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 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 - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScriptDebugger_H -#define WebScriptDebugger_H - -#include "IWebView.h" -#include "IWebScriptCallFrame.h" - -#include <JavaScriptCore/debugger.h> -#pragma warning(push, 0) -#include <WebCore/COMPtr.h> -#pragma warning(pop) - -class WebFrame; -interface IWebScriptCallFrame; - -namespace KJS { - class ExecState; - class JSObject; - class JSValue; - class List; -} - -class WebScriptDebugger : public KJS::Debugger { -public: - WebScriptDebugger(WebFrame*); - - bool sourceParsed(KJS::ExecState*, int sourceId, const KJS::UString& sourceURL, - const KJS::UString& source, int startingLineNumber, int errorLine, const KJS::UString& errorMsg); - - bool callEvent(KJS::ExecState*, int sourceId, int lineno, KJS::JSObject* function, const KJS::List& args); - bool atStatement(KJS::ExecState*, int sourceId, int firstLine, int lastLine); - bool returnEvent(KJS::ExecState*, int sourceId, int lineno, KJS::JSObject* function); - bool exception(KJS::ExecState*, int sourceId, int lineno, KJS::JSValue* exception); - -private: - void enterFrame(KJS::ExecState*); - void leaveFrame(); - bool m_callingServer; - - WebFrame* m_frame; - COMPtr<IWebView> m_webView; - COMPtr<IWebScriptCallFrame> m_topStackFrame; -}; - -#endif diff --git a/WebKit/win/WebScriptObject.cpp b/WebKit/win/WebScriptObject.cpp index 83f9e67..55d92e7 100644 --- a/WebKit/win/WebScriptObject.cpp +++ b/WebKit/win/WebScriptObject.cpp @@ -35,11 +35,13 @@ WebScriptObject::WebScriptObject() : m_refCount(0) { gClassCount++; + gClassNameCount.add("WebScriptObject"); } WebScriptObject::~WebScriptObject() { gClassCount--; + gClassNameCount.remove("WebScriptObject"); } // IUnknown ------------------------------------------------------------------- diff --git a/WebKit/win/WebScriptObject.h b/WebKit/win/WebScriptObject.h index c35da31..5716393 100644 --- a/WebKit/win/WebScriptObject.h +++ b/WebKit/win/WebScriptObject.h @@ -26,7 +26,7 @@ #ifndef WebScriptObject_H #define WebScriptObject_H -#include "IWebScriptObject.h" +#include "WebKit.h" class WebScriptObject : public IWebScriptObject { diff --git a/WebKit/win/WebScrollBar.cpp b/WebKit/win/WebScrollBar.cpp index 43c0ee9..ccf40d9 100644 --- a/WebKit/win/WebScrollBar.cpp +++ b/WebKit/win/WebScrollBar.cpp @@ -31,7 +31,8 @@ #pragma warning(push, 0) #include <WebCore/GraphicsContext.h> #include <WebCore/PlatformMouseEvent.h> -#include <WebCore/PlatformScrollBar.h> +#include <WebCore/Scrollbar.h> +#include <WebCore/ScrollbarTheme.h> #pragma warning(pop) using namespace WebCore; @@ -40,13 +41,16 @@ using namespace WebCore; WebScrollBar::WebScrollBar() : m_refCount(0) + , m_containingWindow(0) { gClassCount++; + gClassNameCount.add("WebScrollBar"); } WebScrollBar::~WebScrollBar() { gClassCount--; + gClassNameCount.remove("WebScrollBar"); } WebScrollBar* WebScrollBar::createInstance() @@ -98,10 +102,10 @@ HRESULT STDMETHODCALLTYPE WebScrollBar::init( ScrollbarOrientation webCoreOrientation = (ScrollbarOrientation) orientation; ScrollbarControlSize webCoreControlSize = (ScrollbarControlSize) controlSize; m_delegate = delegate; - m_scrollBar = new PlatformScrollbar(this, webCoreOrientation, webCoreControlSize); + m_scrollBar = Scrollbar::createNativeScrollbar(this, webCoreOrientation, webCoreControlSize); if (!m_scrollBar) return E_FAIL; - m_scrollBar->setContainingWindow((HWND)(ULONG64)containingWindow); + m_containingWindow = (HWND)(ULONG64)containingWindow; return S_OK; } @@ -132,7 +136,7 @@ HRESULT STDMETHODCALLTYPE WebScrollBar::setRect( /* [in] */ RECT bounds) { IntRect rect(bounds.left, bounds.top, bounds.right-bounds.left, bounds.bottom-bounds.top); - m_scrollBar->setRect(rect); + m_scrollBar->setFrameRect(rect); return S_OK; } @@ -162,12 +166,12 @@ HRESULT STDMETHODCALLTYPE WebScrollBar::paint( return S_OK; } -HRESULT STDMETHODCALLTYPE WebScrollBar::frameGeometry( +HRESULT STDMETHODCALLTYPE WebScrollBar::frameRect( /* [retval][out] */ RECT* bounds) { if (!bounds) return E_POINTER; - IntRect rect = m_scrollBar->frameGeometry(); + IntRect rect = m_scrollBar->frameRect(); bounds->left = rect.x(); bounds->right = rect.right(); bounds->top = rect.y(); @@ -199,7 +203,7 @@ HRESULT STDMETHODCALLTYPE WebScrollBar::requestedWidth( if (!w) return E_POINTER; - *w = m_scrollBar->orientation() == VerticalScrollbar ? PlatformScrollbar::verticalScrollbarWidth(m_scrollBar->controlSize()) : -1; + *w = m_scrollBar->orientation() == VerticalScrollbar ? ScrollbarTheme::nativeTheme()->scrollbarThickness(m_scrollBar->controlSize()) : -1; return S_OK; } @@ -209,7 +213,7 @@ HRESULT STDMETHODCALLTYPE WebScrollBar::requestedHeight( if (!h) return E_POINTER; - *h = m_scrollBar->orientation() == HorizontalScrollbar ? PlatformScrollbar::horizontalScrollbarHeight(m_scrollBar->controlSize()) : -1; + *h = m_scrollBar->orientation() == HorizontalScrollbar ? ScrollbarTheme::nativeTheme()->scrollbarThickness(m_scrollBar->controlSize()) : -1; return S_OK; } @@ -223,13 +227,13 @@ HRESULT STDMETHODCALLTYPE WebScrollBar::handleMouseEvent( PlatformMouseEvent mouseEvent((HWND)(ULONG64)window, msg, wParam, lParam); switch (msg) { case WM_LBUTTONDOWN: - m_scrollBar->handleMousePressEvent(mouseEvent); + m_scrollBar->mouseDown(mouseEvent); break; case WM_LBUTTONUP: - m_scrollBar->handleMouseReleaseEvent(mouseEvent); + m_scrollBar->mouseUp(); break; case WM_MOUSEMOVE: - m_scrollBar->handleMouseMoveEvent(mouseEvent); + m_scrollBar->mouseMoved(mouseEvent); break; } @@ -257,10 +261,8 @@ void WebScrollBar::valueChanged(Scrollbar* scrollBar) m_delegate->valueChanged(this); } -IntRect WebScrollBar::windowClipRect() const +void WebScrollBar::invalidateScrollbarRect(Scrollbar*, const IntRect& rect) { - HWND sbContainingWindow = m_scrollBar->containingWindow(); - RECT clientRect; - ::GetClientRect(sbContainingWindow, &clientRect); - return IntRect(clientRect.left, clientRect.top, clientRect.right-clientRect.left, clientRect.bottom-clientRect.top); + RECT r = rect; + ::InvalidateRect(m_containingWindow, &r, false); } diff --git a/WebKit/win/WebScrollBar.h b/WebKit/win/WebScrollBar.h index 5007ebe..0fed8a3 100644 --- a/WebKit/win/WebScrollBar.h +++ b/WebKit/win/WebScrollBar.h @@ -26,19 +26,19 @@ #ifndef WebScrollBar_h #define WebScrollBar_h -#include "IWebScrollBarDelegatePrivate.h" -#include "IWebScrollBarPrivate.h" +#include "WebKit.h" #include <wtf/RefPtr.h> #include <wtf/OwnPtr.h> #pragma warning(push, 0) #include <WebCore/COMPtr.h> -#include <WebCore/ScrollBar.h> +#include <WebCore/Scrollbar.h> +#include <WebCore/ScrollbarClient.h> #pragma warning(pop) namespace WebCore { -class PlatformScrollbar; +class Scrollbar; } using namespace WebCore; @@ -88,7 +88,7 @@ public: /* [in] */ HDC dc, /* [in] */ RECT damageRect); - virtual HRESULT STDMETHODCALLTYPE frameGeometry( + virtual HRESULT STDMETHODCALLTYPE frameRect( /* [retval][out] */ RECT* bounds); virtual HRESULT STDMETHODCALLTYPE width( @@ -117,13 +117,16 @@ public: protected: // ScrollbarClient virtual void valueChanged(Scrollbar*); - virtual IntRect windowClipRect() const; + virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&); // FIXME: We should provide a way to set this value. virtual bool isActive() const { return true; } + virtual bool scrollbarCornerPresent() const { return false; } + ULONG m_refCount; - RefPtr<WebCore::PlatformScrollbar> m_scrollBar; + HWND m_containingWindow; + RefPtr<WebCore::Scrollbar> m_scrollBar; COMPtr<IWebScrollBarDelegatePrivate> m_delegate; }; diff --git a/WebKit/win/WebSecurityOrigin.cpp b/WebKit/win/WebSecurityOrigin.cpp index 33a3a3a..c027b13 100644 --- a/WebKit/win/WebSecurityOrigin.cpp +++ b/WebKit/win/WebSecurityOrigin.cpp @@ -48,11 +48,13 @@ WebSecurityOrigin::WebSecurityOrigin(SecurityOrigin* securityOrigin) , m_securityOrigin(securityOrigin) { gClassCount++; + gClassNameCount.add("WebSecurityOrigin"); } WebSecurityOrigin::~WebSecurityOrigin() { gClassCount--; + gClassNameCount.remove("WebSecurityOrigin"); } // IUnknown ------------------------------------------------------------------------ @@ -99,7 +101,7 @@ HRESULT STDMETHODCALLTYPE WebSecurityOrigin::protocol( return S_OK; } -HRESULT STDMETHODCALLTYPE WebSecurityOrigin::domain( +HRESULT STDMETHODCALLTYPE WebSecurityOrigin::host( /* [retval][out] */ BSTR* result) { if (!result) diff --git a/WebKit/win/WebSecurityOrigin.h b/WebKit/win/WebSecurityOrigin.h index 1946a39..a4d9f01 100644 --- a/WebKit/win/WebSecurityOrigin.h +++ b/WebKit/win/WebSecurityOrigin.h @@ -29,7 +29,7 @@ #ifndef WebSecurityOrigin_h #define WebSecurityOrigin_h -#include "IWebSecurityOrigin.h" +#include "WebKit.h" #include <WebCore/SecurityOrigin.h> class DECLSPEC_UUID("6EB8D98F-2723-4472-88D3-5936F9D6E631") WebSecurityOrigin : public IWebSecurityOrigin { @@ -52,7 +52,7 @@ public: virtual HRESULT STDMETHODCALLTYPE protocol( /* [retval][out] */ BSTR* result); - virtual HRESULT STDMETHODCALLTYPE domain( + virtual HRESULT STDMETHODCALLTYPE host( /* [retval][out] */ BSTR* result); virtual HRESULT STDMETHODCALLTYPE port( diff --git a/WebKit/win/WebTextRenderer.cpp b/WebKit/win/WebTextRenderer.cpp index 43a0c82..38fa544 100644 --- a/WebKit/win/WebTextRenderer.cpp +++ b/WebKit/win/WebTextRenderer.cpp @@ -29,6 +29,8 @@ #include "config.h" #include "WebTextRenderer.h" +#include "WebKitDLL.h" + #include <CoreFoundation/CFString.h> #include <WebKitSystemInterface/WebKitSystemInterface.h> #include <wtf/RetainPtr.h> @@ -43,10 +45,14 @@ WebTextRenderer* WebTextRenderer::createInstance() WebTextRenderer::WebTextRenderer() : m_refCount(0) { + gClassCount++; + gClassNameCount.add("WebTextRenderer"); } WebTextRenderer::~WebTextRenderer() { + gClassCount--; + gClassNameCount.remove("WebTextRenderer"); } HRESULT STDMETHODCALLTYPE WebTextRenderer::QueryInterface(const IID &riid, void** ppvObject) diff --git a/WebKit/win/WebTextRenderer.h b/WebKit/win/WebTextRenderer.h index 6424b3d..3348948 100644 --- a/WebKit/win/WebTextRenderer.h +++ b/WebKit/win/WebTextRenderer.h @@ -29,7 +29,7 @@ #ifndef WebTextRenderer_h #define WebTextRenderer_h -#include "IWebTextRenderer.h" +#include "WebKit.h" class WebTextRenderer : public IWebTextRenderer { public: diff --git a/WebKit/win/WebURLAuthenticationChallenge.cpp b/WebKit/win/WebURLAuthenticationChallenge.cpp index b6d31fc..e0923d5 100644 --- a/WebKit/win/WebURLAuthenticationChallenge.cpp +++ b/WebKit/win/WebURLAuthenticationChallenge.cpp @@ -52,11 +52,13 @@ WebURLAuthenticationChallenge::WebURLAuthenticationChallenge(const Authenticatio , m_sender(sender) { gClassCount++; + gClassNameCount.add("WebURLAuthenticationChallenge"); } WebURLAuthenticationChallenge::~WebURLAuthenticationChallenge() { gClassCount--; + gClassNameCount.remove("WebURLAuthenticationChallenge"); } WebURLAuthenticationChallenge* WebURLAuthenticationChallenge::createInstance(const AuthenticationChallenge& authenticationChallenge) @@ -168,9 +170,14 @@ HRESULT STDMETHODCALLTYPE WebURLAuthenticationChallenge::initWithAuthenticationC if (!webSender) return E_NOINTERFACE; +#if USE(CFNETWORK) m_authenticationChallenge = AuthenticationChallenge(webChallenge->authenticationChallenge().cfURLAuthChallengeRef(), webSender->resourceHandle()); return S_OK; +#else + + return E_FAIL; +#endif } HRESULT STDMETHODCALLTYPE WebURLAuthenticationChallenge::error( diff --git a/WebKit/win/WebURLAuthenticationChallenge.h b/WebKit/win/WebURLAuthenticationChallenge.h index 7b2372f..d0eba20 100644 --- a/WebKit/win/WebURLAuthenticationChallenge.h +++ b/WebKit/win/WebURLAuthenticationChallenge.h @@ -26,7 +26,7 @@ #ifndef WebURLAuthenticationChallenge_h #define WebURLAuthenticationChallenge_h -#include "IWebURLAuthenticationChallenge.h" +#include "WebKit.h" #pragma warning(push, 0) #include <WebCore/AuthenticationChallenge.h> diff --git a/WebKit/win/WebURLAuthenticationChallengeSender.cpp b/WebKit/win/WebURLAuthenticationChallengeSender.cpp index eb6bf67..dfd2689 100644 --- a/WebKit/win/WebURLAuthenticationChallengeSender.cpp +++ b/WebKit/win/WebURLAuthenticationChallengeSender.cpp @@ -47,11 +47,13 @@ WebURLAuthenticationChallengeSender::WebURLAuthenticationChallengeSender(PassRef { ASSERT(m_handle); gClassCount++; + gClassNameCount.add("WebURLAuthenticationChallengeSender"); } WebURLAuthenticationChallengeSender::~WebURLAuthenticationChallengeSender() { gClassCount--; + gClassNameCount.remove("WebURLAuthenticationChallengeSender"); } WebURLAuthenticationChallengeSender* WebURLAuthenticationChallengeSender::createInstance(PassRefPtr<WebCore::ResourceHandle> handle) diff --git a/WebKit/win/WebURLAuthenticationChallengeSender.h b/WebKit/win/WebURLAuthenticationChallengeSender.h index 30b08d1..cfb8cc3 100644 --- a/WebKit/win/WebURLAuthenticationChallengeSender.h +++ b/WebKit/win/WebURLAuthenticationChallengeSender.h @@ -26,7 +26,7 @@ #ifndef WebURLAuthenticationChallengeSender_h #define WebURLAuthenticationChallengeSender_h -#include "IWebURLAuthenticationChallenge.h" +#include "WebKit.h" #include <wtf/Forward.h> #include <wtf/RefPtr.h> diff --git a/WebKit/win/WebURLCredential.cpp b/WebKit/win/WebURLCredential.cpp index a6cc35c..82cf78c 100644 --- a/WebKit/win/WebURLCredential.cpp +++ b/WebKit/win/WebURLCredential.cpp @@ -41,11 +41,13 @@ WebURLCredential::WebURLCredential(const Credential& credential) , m_credential(credential) { gClassCount++; + gClassNameCount.add("WebURLCredential"); } WebURLCredential::~WebURLCredential() { gClassCount--; + gClassNameCount.remove("WebURLCredential"); } WebURLCredential* WebURLCredential::createInstance() diff --git a/WebKit/win/WebURLCredential.h b/WebKit/win/WebURLCredential.h index 4f94ee8..094c966 100644 --- a/WebKit/win/WebURLCredential.h +++ b/WebKit/win/WebURLCredential.h @@ -26,7 +26,7 @@ #ifndef WebURLCredential_h #define WebURLCredential_h -#include "IWebURLAuthenticationChallenge.h" +#include "WebKit.h" #pragma warning(push, 0) #include <WebCore/Credential.h> diff --git a/WebKit/win/WebURLProtectionSpace.cpp b/WebKit/win/WebURLProtectionSpace.cpp index 9b1913c..dc40704 100644 --- a/WebKit/win/WebURLProtectionSpace.cpp +++ b/WebKit/win/WebURLProtectionSpace.cpp @@ -41,11 +41,13 @@ WebURLProtectionSpace::WebURLProtectionSpace(const ProtectionSpace& protectionSp , m_protectionSpace(protectionSpace) { gClassCount++; + gClassNameCount.add("WebURLProtectionSpace"); } WebURLProtectionSpace::~WebURLProtectionSpace() { gClassCount--; + gClassNameCount.remove("WebURLProtectionSpace"); } WebURLProtectionSpace* WebURLProtectionSpace::createInstance() diff --git a/WebKit/win/WebURLProtectionSpace.h b/WebKit/win/WebURLProtectionSpace.h index f01ba2a..579d21b 100644 --- a/WebKit/win/WebURLProtectionSpace.h +++ b/WebKit/win/WebURLProtectionSpace.h @@ -26,7 +26,7 @@ #ifndef WebURLProtectionSpace_h #define WebURLProtectionSpace_h -#include "IWebURLAuthenticationChallenge.h" +#include "WebKit.h" #pragma warning(push, 0) #include <WebCore/ProtectionSpace.h> diff --git a/WebKit/win/WebURLResponse.cpp b/WebKit/win/WebURLResponse.cpp index b372a54..7f2c795 100644 --- a/WebKit/win/WebURLResponse.cpp +++ b/WebKit/win/WebURLResponse.cpp @@ -24,10 +24,12 @@ */ #include "config.h" +#include "WebURLResponse.h" + #include "WebKitDLL.h" #include "WebKit.h" -#include "HTTPHeaderPropertyBag.h" +#include "COMPropertyBag.h" #include "MarshallingHelpers.h" #include "WebLocalizableStrings.h" @@ -35,7 +37,6 @@ #include <wtf/platform.h> #pragma warning( push, 0 ) #include <WebCore/BString.h> -#include <WebCore/DeprecatedString.h> #include <WebCore/KURL.h> #include <WebCore/ResourceHandle.h> #pragma warning( pop ) @@ -211,18 +212,20 @@ WebURLResponse::WebURLResponse() :m_refCount(0) { gClassCount++; + gClassNameCount.add("WebURLResponse"); } WebURLResponse::~WebURLResponse() { gClassCount--; + gClassNameCount.remove("WebURLResponse"); } WebURLResponse* WebURLResponse::createInstance() { WebURLResponse* instance = new WebURLResponse(); // fake an http response - so it has the IWebHTTPURLResponse interface - instance->m_response = ResourceResponse(String("http://").deprecatedString(), String(), 0, String(), String()); + instance->m_response = ResourceResponse(KURL("http://"), String(), 0, String(), String()); instance->AddRef(); return instance; } @@ -290,7 +293,7 @@ HRESULT STDMETHODCALLTYPE WebURLResponse::initWithURL( /* [in] */ int expectedContentLength, /* [in] */ BSTR textEncodingName) { - m_response = ResourceResponse(String(url).deprecatedString(), String(mimeType), expectedContentLength, String(textEncodingName), String()); + m_response = ResourceResponse(KURL(url), String(mimeType), expectedContentLength, String(textEncodingName), String()); return S_OK; } @@ -356,7 +359,8 @@ HRESULT STDMETHODCALLTYPE WebURLResponse::allHeaderFields( /* [retval][out] */ IPropertyBag** headerFields) { ASSERT(m_response.isHTTP()); - *headerFields = HTTPHeaderPropertyBag::createInstance(this); + + *headerFields = COMPropertyBag<String, CaseFoldingHash>::createInstance(m_response.httpHeaderFields()); return S_OK; } @@ -398,6 +402,8 @@ HRESULT STDMETHODCALLTYPE WebURLResponse::sslPeerCertificate( if (!result) return E_POINTER; *result = 0; + +#if USE(CFNETWORK) CFDictionaryRef dict = certificateDictionary(); if (!dict) return E_FAIL; @@ -405,6 +411,8 @@ HRESULT STDMETHODCALLTYPE WebURLResponse::sslPeerCertificate( if (!data) return E_FAIL; *result = (OLE_HANDLE)(ULONG64)data; +#endif + return *result ? S_OK : E_FAIL; } @@ -464,6 +472,7 @@ const ResourceResponse& WebURLResponse::resourceResponse() const return m_response; } +#if USE(CFNETWORK) CFDictionaryRef WebURLResponse::certificateDictionary() const { if (m_SSLCertificateInfo) @@ -475,3 +484,4 @@ CFDictionaryRef WebURLResponse::certificateDictionary() const m_SSLCertificateInfo = wkGetSSLCertificateInfo(cfResponse); return m_SSLCertificateInfo.get(); } +#endif diff --git a/WebKit/win/WebURLResponse.h b/WebKit/win/WebURLResponse.h index 5cea5af..761ca8e 100644 --- a/WebKit/win/WebURLResponse.h +++ b/WebKit/win/WebURLResponse.h @@ -26,9 +26,7 @@ #ifndef WebURLResponse_H #define WebURLResponse_H -#include "IWebURLResponse.h" -#include "IWebHTTPURLResponse.h" -#include "IWebURLResponsePrivate.h" +#include "WebKit.h" #pragma warning(push, 0) #include <WebCore/ResourceResponse.h> @@ -93,12 +91,18 @@ public: protected: HRESULT suggestedFileExtension(BSTR* result); + +#if USE(CFNETWORK) CFDictionaryRef certificateDictionary() const; +#endif protected: ULONG m_refCount; WebCore::ResourceResponse m_response; + +#if USE(CFNETWORK) mutable RetainPtr<CFDictionaryRef> m_SSLCertificateInfo; // this ensures certificate contexts are valid for the lifetime of this WebURLResponse. +#endif }; #endif diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index 1f5fb15..273d626 100644 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -29,7 +29,6 @@ #include "CFDictionaryPropertyBag.h" #include "DOMCoreClasses.h" -#include "IWebNotification.h" #include "WebDatabaseManager.h" #include "WebDocumentLoader.h" #include "WebEditorClient.h" @@ -38,6 +37,7 @@ #include "WebBackForwardList.h" #include "WebChromeClient.h" #include "WebContextMenuClient.h" +#include "WebCoreTextRenderer.h" #include "WebDragClient.h" #include "WebIconDatabase.h" #include "WebInspector.h" @@ -48,13 +48,15 @@ #include "WebMutableURLRequest.h" #include "WebNotificationCenter.h" #include "WebPreferences.h" -#include "WebScriptDebugServer.h" #pragma warning( push, 0 ) #include <CoreGraphics/CGContext.h> +#include <WebCore/ApplicationCacheStorage.h> +#include <WebCore/AXObjectCache.h> #include <WebCore/BString.h> #include <WebCore/Cache.h> #include <WebCore/ContextMenu.h> #include <WebCore/ContextMenuController.h> +#include <WebCore/CookieStorageWin.h> #include <WebCore/CString.h> #include <WebCore/Cursor.h> #include <WebCore/Document.h> @@ -87,32 +89,46 @@ #include <WebCore/PluginInfoStore.h> #include <WebCore/PluginView.h> #include <WebCore/ProgressTracker.h> +#include <WebCore/RenderTheme.h> #include <WebCore/ResourceHandle.h> #include <WebCore/ResourceHandleClient.h> +#include <WebCore/ScrollbarTheme.h> #include <WebCore/SelectionController.h> #include <WebCore/Settings.h> #include <WebCore/SimpleFontData.h> #include <WebCore/TypingCommand.h> #include <WebCore/WindowMessageBroadcaster.h> #pragma warning(pop) -#include <JavaScriptCore/collector.h> -#include <JavaScriptCore/value.h> +#include <JavaScriptCore/InitializeThreading.h> +#include <JavaScriptCore/JSLock.h> +#include <JavaScriptCore/JSValue.h> #include <CFNetwork/CFURLCachePriv.h> #include <CFNetwork/CFURLProtocolPriv.h> #include <CoreFoundation/CoreFoundation.h> -#include <WebKitSystemInterface/WebKitSystemInterface.h> +#include <WebKitSystemInterface/WebKitSystemInterface.h> #include <wtf/HashSet.h> -#include <tchar.h> #include <dimm.h> -#include <windowsx.h> +#include <oleacc.h> #include <ShlObj.h> +#include <tchar.h> +#include <windowsx.h> using namespace WebCore; -using namespace WebCore::EventNames; -using KJS::JSLock; +using JSC::JSLock; using std::min; using std::max; +static HMODULE accessibilityLib; +static HashSet<WebView*> pendingDeleteBackingStoreSet; + +static String osVersion(); +static String webKitVersion(); + +WebView* kit(Page* page) +{ + return page ? static_cast<WebChromeClient*>(page->chrome()->client())->webView() : 0; +} + class PreferencesChangedOrRemovedObserver : public IWebNotificationObserver { public: static PreferencesChangedOrRemovedObserver* sharedInstance(); @@ -180,7 +196,7 @@ HRESULT PreferencesChangedOrRemovedObserver::notifyPreferencesChanged(WebCacheMo { HRESULT hr = S_OK; - if (WebView::didSetCacheModel() || cacheModel > WebView::cacheModel()) + if (!WebView::didSetCacheModel() || cacheModel > WebView::cacheModel()) WebView::setCacheModel(cacheModel); else if (cacheModel < WebView::cacheModel()) { WebCacheModel sharedPreferencesCacheModel; @@ -216,6 +232,8 @@ const int WM_VISTA_MOUSEHWHEEL = 0x020E; static const int maxToolTipWidth = 250; +static const int delayBeforeDeletingBackingStoreMsec = 5000; + static ATOM registerWebView(); static LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); @@ -233,6 +251,7 @@ static WebCacheModel s_cacheModel = WebCacheModelDocumentViewer; enum { UpdateActiveStateTimer = 1, + DeleteBackingStoreTimer = 2, }; // WebView ---------------------------------------------------------------- @@ -248,7 +267,8 @@ WebView::WebView() , m_hasCustomDropTarget(false) , m_useBackForwardList(true) , m_userAgentOverridden(false) -, m_textSizeMultiplier(1) +, m_zoomMultiplier(1.0f) +, m_zoomMultiplierIsTextOnly(true) , m_mouseActivated(false) , m_dragData(0) , m_currentCharacterCode(0) @@ -261,8 +281,10 @@ WebView::WebView() , m_toolTipHwnd(0) , m_closeWindowTimer(this, &WebView::closeWindowTimerFired) , m_topLevelParent(0) +, m_deleteBackingStoreTimerActive(false) +, m_transparent(false) { - KJS::Collector::registerAsMainThread(); + JSC::initializeThreading(); m_backingStoreSize.cx = m_backingStoreSize.cy = 0; @@ -279,6 +301,7 @@ WebView::WebView() WebViewCount++; gClassCount++; + gClassNameCount.add("WebView"); } WebView::~WebView() @@ -291,11 +314,16 @@ WebView::~WebView() if (::IsWindow(m_viewWindow)) ::DestroyWindow(m_viewWindow); + // the tooltip window needs to be explicitly destroyed since it isn't a WS_CHILD + if (::IsWindow(m_toolTipHwnd)) + ::DestroyWindow(m_toolTipHwnd); + ASSERT(!m_page); ASSERT(!m_preferences); WebViewCount--; gClassCount--; + gClassNameCount.remove("WebView"); } WebView* WebView::createInstance() @@ -338,13 +366,16 @@ void WebView::setCacheModel(WebCacheModel cacheModel) if (s_didSetCacheModel && cacheModel == s_cacheModel) return; +#ifdef CFURLCacheCopySharedURLCachePresent + RetainPtr<CFURLCacheRef> cfurlCache(AdoptCF, CFURLCacheCopySharedURLCache()); +#else + RetainPtr<CFURLCacheRef> cfurlCache = CFURLCacheSharedURLCache(); +#endif + RetainPtr<CFStringRef> cfurlCacheDirectory(AdoptCF, wkCopyFoundationCacheDirectory()); if (!cfurlCacheDirectory) cfurlCacheDirectory.adoptCF(WebCore::localUserSpecificStorageDirectory().createCFString()); - - CFURLCacheRef cfurlSharedCache = CFURLCacheSharedURLCache(); - // As a fudge factor, use 1000 instead of 1024, in case the reported byte // count doesn't align exactly to a megabyte boundary. unsigned long long memSize = WebMemorySize() / 1024 / 1000; @@ -353,6 +384,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel) unsigned cacheTotalCapacity = 0; unsigned cacheMinDeadCapacity = 0; unsigned cacheMaxDeadCapacity = 0; + double deadDecodedDataDeletionInterval = 0; unsigned pageCacheCapacity = 0; @@ -365,11 +397,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel) pageCacheCapacity = 0; // Object cache capacities (in bytes) - if (memSize >= 4096) - cacheTotalCapacity = 256 * 1024 * 1024; - else if (memSize >= 3072) - cacheTotalCapacity = 192 * 1024 * 1024; - else if (memSize >= 2048) + if (memSize >= 2048) cacheTotalCapacity = 128 * 1024 * 1024; else if (memSize >= 1536) cacheTotalCapacity = 86 * 1024 * 1024; @@ -387,7 +415,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel) cfurlCacheMemoryCapacity = 0; // Foundation disk cache capacity (in bytes) - cfurlCacheDiskCapacity = CFURLCacheDiskCapacity(cfurlSharedCache); + cfurlCacheDiskCapacity = CFURLCacheDiskCapacity(cfurlCache.get()); break; } @@ -403,11 +431,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel) pageCacheCapacity = 0; // Object cache capacities (in bytes) - if (memSize >= 4096) - cacheTotalCapacity = 256 * 1024 * 1024; - else if (memSize >= 3072) - cacheTotalCapacity = 192 * 1024 * 1024; - else if (memSize >= 2048) + if (memSize >= 2048) cacheTotalCapacity = 128 * 1024 * 1024; else if (memSize >= 1536) cacheTotalCapacity = 86 * 1024 * 1024; @@ -446,11 +470,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel) case WebCacheModelPrimaryWebBrowser: { // Page cache capacity (in pages) // (Research indicates that value / page drops substantially after 3 pages.) - if (memSize >= 8192) - pageCacheCapacity = 7; - if (memSize >= 4096) - pageCacheCapacity = 6; - else if (memSize >= 2048) + if (memSize >= 2048) pageCacheCapacity = 5; else if (memSize >= 1024) pageCacheCapacity = 4; @@ -465,11 +485,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel) // (Testing indicates that value / MB depends heavily on content and // browsing pattern. Even growth above 128MB can have substantial // value / MB for some content / browsing patterns.) - if (memSize >= 4096) - cacheTotalCapacity = 512 * 1024 * 1024; - else if (memSize >= 3072) - cacheTotalCapacity = 384 * 1024 * 1024; - else if (memSize >= 2048) + if (memSize >= 2048) cacheTotalCapacity = 256 * 1024 * 1024; else if (memSize >= 1536) cacheTotalCapacity = 172 * 1024 * 1024; @@ -487,6 +503,8 @@ void WebView::setCacheModel(WebCacheModel cacheModel) // can prove that the overall system gain would justify the regression. cacheMaxDeadCapacity = max(24u, cacheMaxDeadCapacity); + deadDecodedDataDeletionInterval = 60; + // Foundation memory cache capacity (in bytes) // (These values are small because WebCore does most caching itself.) if (memSize >= 1024) @@ -516,16 +534,17 @@ void WebView::setCacheModel(WebCacheModel cacheModel) } default: ASSERT_NOT_REACHED(); - }; + } // Don't shrink a big disk cache, since that would cause churn. - cfurlCacheDiskCapacity = max(cfurlCacheDiskCapacity, CFURLCacheDiskCapacity(cfurlSharedCache)); + cfurlCacheDiskCapacity = max(cfurlCacheDiskCapacity, CFURLCacheDiskCapacity(cfurlCache.get())); cache()->setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity); + cache()->setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval); pageCache()->setCapacity(pageCacheCapacity); - CFURLCacheSetMemoryCapacity(cfurlSharedCache, cfurlCacheMemoryCapacity); - CFURLCacheSetDiskCapacity(cfurlSharedCache, cfurlCacheDiskCapacity); + CFURLCacheSetMemoryCapacity(cfurlCache.get(), cfurlCacheMemoryCapacity); + CFURLCacheSetDiskCapacity(cfurlCache.get(), cfurlCacheDiskCapacity); s_didSetCacheModel = true; s_cacheModel = cacheModel; @@ -579,8 +598,7 @@ void WebView::close() ::TrackMouseEvent(m_mouseOutTracker.get()); m_mouseOutTracker.set(0); } - - m_page->setGroupName(String()); + setHostWindow(0); setDownloadDelegate(0); @@ -603,20 +621,45 @@ void WebView::close() notifyCenter->removeObserver(this, WebPreferences::webPreferencesChangedNotification(), static_cast<IWebPreferences*>(m_preferences.get())); BSTR identifier = 0; - if (SUCCEEDED(m_preferences->identifier(&identifier))) - WebPreferences::removeReferenceForIdentifier(identifier); - if (identifier) - SysFreeString(identifier); + m_preferences->identifier(&identifier); COMPtr<WebPreferences> preferences = m_preferences; m_preferences = 0; preferences->didRemoveFromWebView(); + // Make sure we release the reference, since WebPreferences::removeReferenceForIdentifier will check for last reference to WebPreferences + preferences = 0; + if (identifier) { + WebPreferences::removeReferenceForIdentifier(identifier); + SysFreeString(identifier); + } deleteBackingStore(); } +void WebView::repaint(const WebCore::IntRect& windowRect, bool contentChanged, bool immediate, bool repaintContentOnly) +{ + if (!repaintContentOnly) { + RECT rect = windowRect; + ::InvalidateRect(m_viewWindow, &rect, false); + } + if (contentChanged) + addToDirtyRegion(windowRect); + if (immediate) { + if (repaintContentOnly) + updateBackingStore(core(topLevelFrame())->view()); + else + ::UpdateWindow(m_viewWindow); + } +} + void WebView::deleteBackingStore() { + pendingDeleteBackingStoreSet.remove(this); + + if (m_deleteBackingStoreTimerActive) { + KillTimer(m_viewWindow, DeleteBackingStoreTimer); + m_deleteBackingStoreTimerActive = false; + } m_backingStoreBitmap.clear(); m_backingStoreDirtyRegion.clear(); @@ -869,7 +912,7 @@ void WebView::paint(HDC dc, LPARAM options) RECT r; if (SUCCEEDED(uiPrivate->webViewResizerRect(this, &r))) { LOCAL_GDI_COUNTER(2, __FUNCTION__" webViewDrawResizer delegate call"); - uiPrivate->webViewDrawResizer(this, hdc, (frameView->resizerOverlapsContent() ? true : false), &r); + uiPrivate->webViewDrawResizer(this, hdc, (frameView->containsScrollbarsAvoidingResizer() ? true : false), &r); } } } @@ -878,6 +921,11 @@ void WebView::paint(HDC dc, LPARAM options) EndPaint(m_viewWindow, &ps); m_paintCount--; + + if (active()) + cancelDeleteBackingStoreSoon(); + else + deleteBackingStoreSoon(); } void WebView::paintIntoBackingStore(FrameView* frameView, HDC bitmapDC, const IntRect& dirtyRect) @@ -897,8 +945,8 @@ void WebView::paintIntoBackingStore(FrameView* frameView, HDC bitmapDC, const In #endif FillRect(bitmapDC, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); - if (frameView && frameView->frame() && frameView->frame()->renderer()) { - GraphicsContext gc(bitmapDC); + if (frameView && frameView->frame() && frameView->frame()->contentRenderer()) { + GraphicsContext gc(bitmapDC, m_transparent); gc.save(); gc.clip(dirtyRect); frameView->paint(&gc, dirtyRect); @@ -959,11 +1007,20 @@ bool WebView::canHandleRequest(const WebCore::ResourceRequest& request) if (equalIgnoringCase(String(request.url().protocol()), "about")) return true; +#if USE(CFNETWORK) if (CFURLProtocolCanHandleRequest(request.cfURLRequest())) return true; // FIXME: Mac WebKit calls _representationExistsForURLScheme here return false; +#else + return true; +#endif +} + +String WebView::standardUserAgentWithApplicationName(const String& applicationName) +{ + return String::format("Mozilla/5.0 (Windows; U; %s; %s) AppleWebKit/%s (KHTML, like Gecko)%s%s", osVersion().latin1().data(), defaultLanguage().latin1().data(), webKitVersion().latin1().data(), (applicationName.length() ? " " : ""), applicationName.latin1().data()); } Page* WebView::page() @@ -986,8 +1043,8 @@ bool WebView::handleContextMenuEvent(WPARAM wParam, LPARAM lParam) IntPoint location; // The context menu event was generated from the keyboard, so show the context menu by the current selection. - Position start = m_page->mainFrame()->selectionController()->selection().start(); - Position end = m_page->mainFrame()->selectionController()->selection().end(); + Position start = m_page->mainFrame()->selection()->selection().start(); + Position end = m_page->mainFrame()->selection()->selection().end(); if (!start.node() || !end.node()) location = IntPoint(rightAligned ? view->contentsWidth() - contextMenuMargin : contextMenuMargin, contextMenuMargin); @@ -998,8 +1055,16 @@ bool WebView::handleContextMenuEvent(WPARAM wParam, LPARAM lParam) // Calculate the rect of the first line of the selection (cribbed from -[WebCoreFrameBridge firstRectForDOMRange:]). int extraWidthToEndOfLine = 0; - IntRect startCaretRect = renderer->caretRect(start.offset(), DOWNSTREAM, &extraWidthToEndOfLine); - IntRect endCaretRect = renderer->caretRect(end.offset(), UPSTREAM); + + InlineBox* startInlineBox; + int startCaretOffset; + start.getInlineBoxAndOffset(DOWNSTREAM, startInlineBox, startCaretOffset); + IntRect startCaretRect = renderer->caretRect(startInlineBox, startCaretOffset, &extraWidthToEndOfLine); + + InlineBox* endInlineBox; + int endCaretOffset; + end.getInlineBoxAndOffset(UPSTREAM, endInlineBox, endCaretOffset); + IntRect endCaretRect = renderer->caretRect(endInlineBox, endCaretOffset); IntRect firstRect; if (startCaretRect.y() == endCaretRect.y()) @@ -1058,7 +1123,7 @@ bool WebView::handleContextMenuEvent(WPARAM wParam, LPARAM lParam) POINT point(view->contentsToWindow(coreMenu->hitTestResult().point())); // Translate the point to screen coordinates - if (!::ClientToScreen(view->containingWindow(), &point)) + if (!::ClientToScreen(m_viewWindow, &point)) return false; BOOL hasCustomMenus = false; @@ -1071,7 +1136,7 @@ bool WebView::handleContextMenuEvent(WPARAM wParam, LPARAM lParam) // Surprisingly, TPM_RIGHTBUTTON means that items are selectable with either the right OR left mouse button UINT flags = TPM_RIGHTBUTTON | TPM_TOPALIGN | TPM_VERPOSANIMATION | TPM_HORIZONTAL | TPM_LEFTALIGN | TPM_HORPOSANIMATION; - ::TrackPopupMenuEx(coreMenu->platformDescription(), flags, point.x, point.y, view->containingWindow(), 0); + ::TrackPopupMenuEx(coreMenu->platformDescription(), flags, point.x, point.y, m_viewWindow, 0); } return true; @@ -1169,8 +1234,19 @@ bool WebView::handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam) bool insideThreshold = abs(globalPrevPoint.x() - mouseEvent.pos().x()) < ::GetSystemMetrics(SM_CXDOUBLECLK) && abs(globalPrevPoint.y() - mouseEvent.pos().y()) < ::GetSystemMetrics(SM_CYDOUBLECLK); LONG messageTime = ::GetMessageTime(); - + + if (inResizer(position)) { + if (m_uiDelegate) { + COMPtr<IWebUIDelegatePrivate4> uiPrivate(Query, m_uiDelegate); + + if (uiPrivate) + uiPrivate->webViewSendResizeMessage(message, wParam, position); + } + return true; + } + bool handled = false; + if (message == WM_LBUTTONDOWN || message == WM_MBUTTONDOWN || message == WM_RBUTTONDOWN) { // FIXME: I'm not sure if this is the "right" way to do this // but without this call, we never become focused since we don't allow @@ -1359,7 +1435,7 @@ static const KeyPressEntry keyPressEntries[] = { const char* WebView::interpretKeyEvent(const KeyboardEvent* evt) { - ASSERT(evt->type() == keydownEvent || evt->type() == keypressEvent); + ASSERT(evt->type() == eventNames().keydownEvent || evt->type() == eventNames().keypressEvent); static HashMap<int, const char*>* keyDownCommandsMap = 0; static HashMap<int, const char*>* keyPressCommandsMap = 0; @@ -1383,7 +1459,7 @@ const char* WebView::interpretKeyEvent(const KeyboardEvent* evt) if (evt->ctrlKey()) modifiers |= CtrlKey; - if (evt->type() == keydownEvent) { + if (evt->type() == eventNames().keydownEvent) { int mapKey = modifiers << 16 | evt->keyCode(); return mapKey ? keyDownCommandsMap->get(mapKey) : 0; } @@ -1689,7 +1765,7 @@ static LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, L // Send focus events unless the previously focused window is a // child of ours (for example a plugin). if (!IsChild(hWnd, reinterpret_cast<HWND>(wParam))) - frame->selectionController()->setFocused(true); + frame->selection()->setFocused(true); } else focusController->setFocusedFrame(webView->page()->mainFrame()); break; @@ -1707,7 +1783,7 @@ static LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, L webView->resetIME(frame); // Send blur events unless we're losing focus to a child of ours. if (!IsChild(hWnd, newFocusWnd)) - frame->selectionController()->setFocused(false); + frame->selection()->setFocused(false); break; } case WM_WINDOWPOSCHANGED: @@ -1754,7 +1830,11 @@ static LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, L case WM_XP_THEMECHANGED: if (Frame* coreFrame = core(mainFrameImpl)) { webView->deleteBackingStore(); - coreFrame->view()->themeChanged(); + theme()->themeChanged(); + ScrollbarTheme::nativeTheme()->themeChanged(); + RECT windowRect; + ::GetClientRect(hWnd, &windowRect); + ::InvalidateRect(hWnd, &windowRect, false); } break; case WM_MOUSEACTIVATE: @@ -1777,7 +1857,9 @@ static LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, L handled = false; break; } - + case WM_GETOBJECT: + handled = webView->onGetObject(wParam, lParam, lResult); + break; case WM_IME_STARTCOMPOSITION: handled = webView->onIMEStartComposition(); break; @@ -1808,6 +1890,9 @@ static LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, L KillTimer(hWnd, UpdateActiveStateTimer); webView->updateActiveState(); break; + case DeleteBackingStoreTimer: + webView->deleteBackingStore(); + break; } break; case WM_SETCURSOR: @@ -1910,7 +1995,7 @@ const String& WebView::userAgentForKURL(const KURL&) return m_userAgentCustom; if (!m_userAgentStandard.length()) - m_userAgentStandard = String::format("Mozilla/5.0 (Windows; U; %s; %s) AppleWebKit/%s (KHTML, like Gecko)%s%s", osVersion().latin1().data(), defaultLanguage().latin1().data(), webKitVersion().latin1().data(), (m_applicationName.length() ? " " : ""), m_applicationName.latin1().data()); + m_userAgentStandard = WebView::standardUserAgentWithApplicationName(m_applicationName); return m_userAgentStandard; } @@ -2020,6 +2105,19 @@ HRESULT STDMETHODCALLTYPE WebView::URLTitleFromPasteboard( return E_NOTIMPL; } +static void WebKitSetApplicationCachePathIfNecessary() +{ + static bool initialized = false; + if (initialized) + return; + + String path = localUserSpecificStorageDirectory(); + if (!path.isNull()) + cacheStorage().setCacheDirectory(path); + + initialized = true; +} + HRESULT STDMETHODCALLTYPE WebView::initWithFrame( /* [in] */ RECT frame, /* [in] */ BSTR frameName, @@ -2049,12 +2147,17 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame( sharedPreferences->willAddToWebView(); m_preferences = sharedPreferences; - m_groupName = String(groupName, SysStringLen(groupName)); - WebKitSetWebDatabasesPathIfNecessary(); - + WebKitSetApplicationCachePathIfNecessary(); + m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this)); + BSTR localStoragePath; + if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) { + m_page->settings()->setLocalStorageDatabasePath(String(localStoragePath, SysStringLen(localStoragePath))); + SysFreeString(localStoragePath); + } + if (m_uiDelegate) { COMPtr<IWebUIDelegate2> uiDelegate2; if (SUCCEEDED(m_uiDelegate->QueryInterface(IID_IWebUIDelegate2, (void**)&uiDelegate2))) { @@ -2067,13 +2170,13 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame( } WebFrame* webFrame = WebFrame::createInstance(); - webFrame->initWithWebFrameView(0 /*FIXME*/, this, m_page, 0); + RefPtr<Frame> coreFrame = webFrame->init(this, m_page, 0); m_mainFrame = webFrame; webFrame->Release(); // The WebFrame is owned by the Frame, so release our reference to it. - m_page->mainFrame()->tree()->setName(String(frameName, SysStringLen(frameName))); - m_page->mainFrame()->init(); - m_page->setGroupName(m_groupName); + coreFrame->tree()->setName(String(frameName, SysStringLen(frameName))); + coreFrame->init(); + setGroupName(groupName); addToAllWebViewsSet(); @@ -2376,23 +2479,50 @@ HRESULT STDMETHODCALLTYPE WebView::goToBackForwardItem( HRESULT STDMETHODCALLTYPE WebView::setTextSizeMultiplier( /* [in] */ float multiplier) { - if (m_textSizeMultiplier != multiplier) - m_textSizeMultiplier = multiplier; - if (!m_mainFrame) return E_FAIL; + setZoomMultiplier(multiplier, true); + return S_OK; +} - m_mainFrame->setTextSizeMultiplier(multiplier); +HRESULT STDMETHODCALLTYPE WebView::setPageSizeMultiplier( + /* [in] */ float multiplier) +{ + if (!m_mainFrame) + return E_FAIL; + setZoomMultiplier(multiplier, false); return S_OK; } +void WebView::setZoomMultiplier(float multiplier, bool isTextOnly) +{ + m_zoomMultiplier = multiplier; + m_zoomMultiplierIsTextOnly = isTextOnly; + if (Frame* coreFrame = core(m_mainFrame)) + coreFrame->setZoomFactor(multiplier, isTextOnly); +} + HRESULT STDMETHODCALLTYPE WebView::textSizeMultiplier( /* [retval][out] */ float* multiplier) { - *multiplier = m_textSizeMultiplier; + *multiplier = zoomMultiplier(true); return S_OK; } +HRESULT STDMETHODCALLTYPE WebView::pageSizeMultiplier( + /* [retval][out] */ float* multiplier) +{ + *multiplier = zoomMultiplier(false); + return S_OK; +} + +float WebView::zoomMultiplier(bool isTextOnly) +{ + if (isTextOnly != m_zoomMultiplierIsTextOnly) + return 1.0f; + return m_zoomMultiplier; +} + HRESULT STDMETHODCALLTYPE WebView::setApplicationNameForUserAgent( /* [in] */ BSTR applicationName) { @@ -2434,7 +2564,7 @@ HRESULT STDMETHODCALLTYPE WebView::userAgentForURL( /* [in] */ BSTR url, /* [retval][out] */ BSTR* userAgent) { - DeprecatedString urlStr((DeprecatedChar*)url, SysStringLen(url)); + String urlStr(url, SysStringLen(url)); String userAgentString = this->userAgentForKURL(KURL(urlStr)); *userAgent = SysAllocStringLen(userAgentString.characters(), userAgentString.length()); if (!*userAgent && userAgentString.length()) @@ -2532,11 +2662,11 @@ HRESULT STDMETHODCALLTYPE WebView::stringByEvaluatingJavaScriptFromString( if (!coreFrame) return E_FAIL; - KJS::JSValue* scriptExecutionResult = coreFrame->loader()->executeScript(WebCore::String(script), true); + JSC::JSValue* scriptExecutionResult = coreFrame->loader()->executeScript(WebCore::String(script), true); if(!scriptExecutionResult) return E_FAIL; else if (scriptExecutionResult->isString()) { - JSLock lock; + JSLock lock(false); *result = BString(String(scriptExecutionResult->getString())); } @@ -2569,18 +2699,18 @@ HRESULT STDMETHODCALLTYPE WebView::setPreferences( IWebNotificationCenter* nc = WebNotificationCenter::defaultCenterInternal(); nc->removeObserver(this, WebPreferences::webPreferencesChangedNotification(), static_cast<IWebPreferences*>(m_preferences.get())); - BSTR identifierBSTR = 0; - HRESULT hr = oldPrefs->identifier(&identifierBSTR); + BSTR identifier = 0; + oldPrefs->identifier(&identifier); oldPrefs->didRemoveFromWebView(); oldPrefs = 0; // Make sure we release the reference, since WebPreferences::removeReferenceForIdentifier will check for last reference to WebPreferences - if (SUCCEEDED(hr)) { - BString identifier; - identifier.adoptBSTR(identifierBSTR); - WebPreferences::removeReferenceForIdentifier(identifier); - } m_preferences = webPrefs; + if (identifier) { + WebPreferences::removeReferenceForIdentifier(identifier); + SysFreeString(identifier); + } + nc->addObserver(this, WebPreferences::webPreferencesChangedNotification(), static_cast<IWebPreferences*>(m_preferences.get())); m_preferences->postPreferencesChangesNotification(); @@ -2613,20 +2743,55 @@ HRESULT STDMETHODCALLTYPE WebView::preferencesIdentifier( return E_NOTIMPL; } -void WebView::windowReceivedMessage(HWND, UINT message, WPARAM, LPARAM) +void WebView::windowReceivedMessage(HWND, UINT message, WPARAM wParam, LPARAM) { switch (message) { case WM_NCACTIVATE: updateActiveStateSoon(); + if (!wParam) + deleteBackingStoreSoon(); break; } } void WebView::updateActiveStateSoon() const { + // This function is called while processing the WM_NCACTIVATE message. + // While processing WM_NCACTIVATE when we are being deactivated, GetActiveWindow() will + // still return our window. If we were to call updateActiveState() in that case, we would + // wrongly think that we are still the active window. To work around this, we update our + // active state after a 0-delay timer fires, at which point GetActiveWindow() will return + // the newly-activated window. + SetTimer(m_viewWindow, UpdateActiveStateTimer, 0, 0); } +void WebView::deleteBackingStoreSoon() +{ + if (pendingDeleteBackingStoreSet.size() > 2) { + Vector<WebView*> views; + HashSet<WebView*>::iterator end = pendingDeleteBackingStoreSet.end(); + for (HashSet<WebView*>::iterator it = pendingDeleteBackingStoreSet.begin(); it != end; ++it) + views.append(*it); + for (int i = 0; i < views.size(); ++i) + views[i]->deleteBackingStore(); + ASSERT(pendingDeleteBackingStoreSet.isEmpty()); + } + + pendingDeleteBackingStoreSet.add(this); + m_deleteBackingStoreTimerActive = true; + SetTimer(m_viewWindow, DeleteBackingStoreTimer, delayBeforeDeletingBackingStoreMsec, 0); +} + +void WebView::cancelDeleteBackingStoreSoon() +{ + if (!m_deleteBackingStoreTimerActive) + return; + pendingDeleteBackingStoreSet.remove(this); + m_deleteBackingStoreTimerActive = false; + KillTimer(m_viewWindow, DeleteBackingStoreTimer); +} + HRESULT STDMETHODCALLTYPE WebView::setHostWindow( /* [in] */ OLE_HANDLE oleWindow) { @@ -2673,36 +2838,19 @@ HRESULT STDMETHODCALLTYPE WebView::searchFor( if (!str || !SysStringLen(str)) return E_INVALIDARG; - String search(str, SysStringLen(str)); - - - WebCore::Frame* frame = m_page->focusController()->focusedOrMainFrame(); - WebCore::Frame* startFrame = frame; - do { - *found = frame->findString(search, !!forward, !!caseFlag, false, true); - if (*found) { - if (frame != startFrame) - startFrame->selectionController()->clear(); - m_page->focusController()->setFocusedFrame(frame); - return S_OK; - } - frame = incrementFrame(frame, !!forward, !!wrapFlag); - } while (frame && frame != startFrame); - - // Search contents of startFrame, on the other side of the selection that we did earlier. - // We cheat a bit and just research with wrap on - if (wrapFlag && !startFrame->selectionController()->isNone()) { - *found = startFrame->findString(search, !!forward, !!caseFlag, true, true); - m_page->focusController()->setFocusedFrame(frame); - } - + *found = m_page->findString(String(str, SysStringLen(str)), caseFlag ? TextCaseSensitive : TextCaseInsensitive, forward ? FindDirectionForward : FindDirectionBackward, wrapFlag); return S_OK; } -void WebView::updateActiveState() +bool WebView::active() { HWND activeWindow = GetActiveWindow(); - m_page->focusController()->setActive(activeWindow && m_topLevelParent == findTopLevelParent(activeWindow)); + return (activeWindow && m_topLevelParent == findTopLevelParent(activeWindow)); +} + +void WebView::updateActiveState() +{ + m_page->focusController()->setActive(active()); } HRESULT STDMETHODCALLTYPE WebView::updateFocusedAndActiveState() @@ -2712,7 +2860,7 @@ HRESULT STDMETHODCALLTYPE WebView::updateFocusedAndActiveState() bool active = m_page->focusController()->isActive(); Frame* mainFrame = m_page->mainFrame(); Frame* focusedFrame = m_page->focusController()->focusedOrMainFrame(); - mainFrame->selectionController()->setFocused(active && mainFrame == focusedFrame); + mainFrame->selection()->setFocused(active && mainFrame == focusedFrame); return S_OK; } @@ -2727,6 +2875,13 @@ HRESULT STDMETHODCALLTYPE WebView::executeCoreCommandByName(BSTR bName, BSTR bVa return S_OK; } +HRESULT STDMETHODCALLTYPE WebView::clearMainFrameName() +{ + m_page->mainFrame()->tree()->clearName(); + + return S_OK; +} + HRESULT STDMETHODCALLTYPE WebView::markAllMatchesForText( BSTR str, BOOL caseSensitive, BOOL highlight, UINT limit, UINT* matches) { @@ -2739,18 +2894,8 @@ HRESULT STDMETHODCALLTYPE WebView::markAllMatchesForText( if (!str || !SysStringLen(str)) return E_INVALIDARG; - String search(str, SysStringLen(str)); - *matches = 0; - - WebCore::Frame* frame = m_page->mainFrame(); - do { - frame->setMarkedTextMatchesAreHighlighted(!!highlight); - *matches += frame->markAllMatchesForText(search, !!caseSensitive, (limit == 0)? 0 : (limit - *matches)); - frame = incrementFrame(frame, true, false); - } while (frame); - + *matches = m_page->markAllMatchesForText(String(str, SysStringLen(str)), caseSensitive ? TextCaseSensitive : TextCaseInsensitive, highlight, limit); return S_OK; - } HRESULT STDMETHODCALLTYPE WebView::unmarkAllTextMatches() @@ -2758,14 +2903,7 @@ HRESULT STDMETHODCALLTYPE WebView::unmarkAllTextMatches() if (!m_page || !m_page->mainFrame()) return E_UNEXPECTED; - WebCore::Frame* frame = m_page->mainFrame(); - do { - if (Document* document = frame->document()) - document->removeMarkers(DocumentMarker::TextMatch); - frame = incrementFrame(frame, true, false); - } while (frame); - - + m_page->unmarkAllTextMatches(); return S_OK; } @@ -2776,7 +2914,7 @@ HRESULT STDMETHODCALLTYPE WebView::rectsForTextMatches( WebCore::Frame* frame = m_page->mainFrame(); do { if (Document* document = frame->document()) { - IntRect visibleRect = enclosingIntRect(frame->view()->visibleContentRect()); + IntRect visibleRect = frame->view()->visibleContentRect(); Vector<IntRect> frameRects = document->renderedRectsForMarkers(DocumentMarker::TextMatch); IntPoint frameOffset(-frame->view()->scrollOffset().width(), -frame->view()->scrollOffset().height()); frameOffset = frame->view()->convertToContainingWindow(frameOffset); @@ -2837,15 +2975,21 @@ HRESULT STDMETHODCALLTYPE WebView::registerViewClass( HRESULT STDMETHODCALLTYPE WebView::setGroupName( /* [in] */ BSTR groupName) { - m_groupName = String(groupName, SysStringLen(groupName)); + if (!m_page) + return S_OK; + m_page->setGroupName(String(groupName, SysStringLen(groupName))); return S_OK; } HRESULT STDMETHODCALLTYPE WebView::groupName( /* [retval][out] */ BSTR* groupName) { - *groupName = SysAllocStringLen(m_groupName.characters(), m_groupName.length()); - if (!*groupName && m_groupName.length()) + *groupName = 0; + if (!m_page) + return S_OK; + String groupNameString = m_page->groupName(); + *groupName = SysAllocStringLen(groupNameString.characters(), groupNameString.length()); + if (!*groupName && groupNameString.length()) return E_OUTOFMEMORY; return S_OK; } @@ -2896,7 +3040,7 @@ HRESULT STDMETHODCALLTYPE WebView::elementAtPoint( IntPoint webCorePoint = IntPoint(point->x, point->y); HitTestResult result = HitTestResult(webCorePoint); - if (frame->renderer()) + if (frame->contentRenderer()) result = frame->eventHandler()->hitTestResultAtPoint(webCorePoint, false); *elementDictionary = WebElementPropertyBag::createInstance(result); return S_OK; @@ -3102,64 +3246,137 @@ HRESULT STDMETHODCALLTYPE WebView::goForward( return E_NOTIMPL; } -#define MinimumTextSizeMultiplier 0.5f -#define MaximumTextSizeMultiplier 3.0f -#define TextSizeMultiplierRatio 1.2f +// FIXME: This code should move into WebCore so it can be shared by all the WebKits. +#define MinimumZoomMultiplier 0.5f +#define MaximumZoomMultiplier 3.0f +#define ZoomMultiplierRatio 1.2f HRESULT STDMETHODCALLTYPE WebView::canMakeTextLarger( /* [in] */ IUnknown* /*sender*/, /* [retval][out] */ BOOL* result) { - bool canGrowMore = m_textSizeMultiplier*TextSizeMultiplierRatio < MaximumTextSizeMultiplier; + bool canGrowMore = canZoomIn(true); *result = canGrowMore ? TRUE : FALSE; return S_OK; } + +HRESULT STDMETHODCALLTYPE WebView::canZoomPageIn( + /* [in] */ IUnknown* /*sender*/, + /* [retval][out] */ BOOL* result) +{ + bool canGrowMore = canZoomIn(false); + *result = canGrowMore ? TRUE : FALSE; + return S_OK; +} + +bool WebView::canZoomIn(bool isTextOnly) +{ + return zoomMultiplier(isTextOnly) * ZoomMultiplierRatio < MaximumZoomMultiplier; +} HRESULT STDMETHODCALLTYPE WebView::makeTextLarger( /* [in] */ IUnknown* /*sender*/) { - float newScale = m_textSizeMultiplier*TextSizeMultiplierRatio; - bool canGrowMore = newScale < MaximumTextSizeMultiplier; - if (!canGrowMore) - return E_FAIL; - return setTextSizeMultiplier(newScale); + return zoomIn(true); +} +HRESULT STDMETHODCALLTYPE WebView::zoomPageIn( + /* [in] */ IUnknown* /*sender*/) +{ + return zoomIn(false); } - + +HRESULT WebView::zoomIn(bool isTextOnly) +{ + if (!canZoomIn(isTextOnly)) + return E_FAIL; + setZoomMultiplier(zoomMultiplier(isTextOnly) * ZoomMultiplierRatio, isTextOnly); + return S_OK; +} + HRESULT STDMETHODCALLTYPE WebView::canMakeTextSmaller( /* [in] */ IUnknown* /*sender*/, /* [retval][out] */ BOOL* result) { - bool canShrinkMore = m_textSizeMultiplier/TextSizeMultiplierRatio > MinimumTextSizeMultiplier; + bool canShrinkMore = canZoomOut(true); *result = canShrinkMore ? TRUE : FALSE; return S_OK; } +HRESULT STDMETHODCALLTYPE WebView::canZoomPageOut( + /* [in] */ IUnknown* /*sender*/, + /* [retval][out] */ BOOL* result) +{ + bool canShrinkMore = canZoomOut(false); + *result = canShrinkMore ? TRUE : FALSE; + return S_OK; +} + +bool WebView::canZoomOut(bool isTextOnly) +{ + return zoomMultiplier(isTextOnly) / ZoomMultiplierRatio > MinimumZoomMultiplier; +} + HRESULT STDMETHODCALLTYPE WebView::makeTextSmaller( /* [in] */ IUnknown* /*sender*/) { - float newScale = m_textSizeMultiplier/TextSizeMultiplierRatio; - bool canShrinkMore = newScale > MinimumTextSizeMultiplier; - if (!canShrinkMore) + return zoomOut(true); +} + +HRESULT STDMETHODCALLTYPE WebView::zoomPageOut( + /* [in] */ IUnknown* /*sender*/) +{ + return zoomOut(false); +} + +HRESULT WebView::zoomOut(bool isTextOnly) +{ + if (!canZoomOut(isTextOnly)) return E_FAIL; - return setTextSizeMultiplier(newScale); + setZoomMultiplier(zoomMultiplier(isTextOnly) / ZoomMultiplierRatio, isTextOnly); + return S_OK; } HRESULT STDMETHODCALLTYPE WebView::canMakeTextStandardSize( /* [in] */ IUnknown* /*sender*/, /* [retval][out] */ BOOL* result) { - bool notAlreadyStandard = m_textSizeMultiplier != 1.0f; + bool notAlreadyStandard = canResetZoom(true); *result = notAlreadyStandard ? TRUE : FALSE; return S_OK; } +HRESULT STDMETHODCALLTYPE WebView::canResetPageZoom( + /* [in] */ IUnknown* /*sender*/, + /* [retval][out] */ BOOL* result) +{ + bool notAlreadyStandard = canResetZoom(false); + *result = notAlreadyStandard ? TRUE : FALSE; + return S_OK; +} + +bool WebView::canResetZoom(bool isTextOnly) +{ + return zoomMultiplier(isTextOnly) != 1.0f; +} + HRESULT STDMETHODCALLTYPE WebView::makeTextStandardSize( /* [in] */ IUnknown* /*sender*/) { - bool notAlreadyStandard = m_textSizeMultiplier != 1.0f; - if (notAlreadyStandard) - return setTextSizeMultiplier(1.0f); + return resetZoom(true); +} + +HRESULT STDMETHODCALLTYPE WebView::resetPageZoom( + /* [in] */ IUnknown* /*sender*/) +{ + return resetZoom(false); +} + +HRESULT WebView::resetZoom(bool isTextOnly) +{ + if (!canResetZoom(isTextOnly)) + return E_FAIL; + setZoomMultiplier(1.0f, isTextOnly); return S_OK; } @@ -3401,7 +3618,7 @@ HRESULT STDMETHODCALLTYPE WebView::styleDeclarationWithText( HRESULT STDMETHODCALLTYPE WebView::hasSelectedRange( /* [retval][out] */ BOOL* hasSelectedRange) { - *hasSelectedRange = m_page->mainFrame()->selectionController()->isRange(); + *hasSelectedRange = m_page->mainFrame()->selection()->isRange(); return S_OK; } @@ -3491,9 +3708,9 @@ HRESULT STDMETHODCALLTYPE WebView::replaceSelectionWithText( /* [in] */ BSTR text) { String textString(text, ::SysStringLen(text)); - Position start = m_page->mainFrame()->selectionController()->selection().start(); + Position start = m_page->mainFrame()->selection()->selection().start(); m_page->focusController()->focusedOrMainFrame()->editor()->insertText(textString, 0); - m_page->mainFrame()->selectionController()->setBase(start); + m_page->mainFrame()->selection()->setBase(start); return S_OK; } @@ -3520,7 +3737,7 @@ HRESULT STDMETHODCALLTYPE WebView::deleteSelection( void) HRESULT STDMETHODCALLTYPE WebView::clearSelection( void) { - m_page->focusController()->focusedOrMainFrame()->selectionController()->clear(); + m_page->focusController()->focusedOrMainFrame()->selection()->clear(); return S_OK; } @@ -3558,7 +3775,7 @@ HRESULT STDMETHODCALLTYPE WebView::copyURL( /* [in] */ BSTR url) { String temp(url, SysStringLen(url)); - m_page->focusController()->focusedOrMainFrame()->editor()->copyURL(KURL(temp.deprecatedString()), ""); + m_page->focusController()->focusedOrMainFrame()->editor()->copyURL(KURL(temp), ""); return S_OK; } @@ -3870,7 +4087,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) settings->setUserStyleSheetLocation(url.get()); SysFreeString(str); } else { - settings->setUserStyleSheetLocation(KURL(DeprecatedString(""))); + settings->setUserStyleSheetLocation(KURL()); } hr = preferences->shouldPrintBackgrounds(&enabled); @@ -3899,9 +4116,15 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) return hr; settings->setDOMPasteAllowed(!!enabled); + hr = preferences->shouldPaintCustomScrollbars(&enabled); + if (FAILED(hr)) + return hr; + settings->setShouldPaintCustomScrollbars(!!enabled); + settings->setShowsURLsInToolTips(false); settings->setForceFTPDirectoryListings(true); settings->setDeveloperExtrasEnabled(developerExtrasEnabled()); + settings->setNeedsSiteSpecificQuirks(s_allowSiteSpecificHacks); FontSmoothingType smoothingType; hr = preferences->fontSmoothing(&smoothingType); @@ -3917,7 +4140,25 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) settings->setAuthorAndUserStylesEnabled(enabled); } - m_mainFrame->invalidate(); // FIXME + hr = prefsPrivate->inApplicationChromeMode(&enabled); + if (FAILED(hr)) + return hr; + settings->setApplicationChromeMode(enabled); + + hr = prefsPrivate->offlineWebApplicationCacheEnabled(&enabled); + if (FAILED(hr)) + return hr; + settings->setOfflineWebApplicationCacheEnabled(enabled); + +#if USE(SAFARI_THEME) + hr = prefsPrivate->shouldPaintNativeControls(&enabled); + if (FAILED(hr)) + return hr; + settings->setShouldPaintNativeControls(!!enabled); +#endif + + if (!m_closeWindowTimer.isActive()) + m_mainFrame->invalidate(); // FIXME hr = updateSharedSettingsFromPreferencesIfNeeded(preferences.get()); if (FAILED(hr)) @@ -3937,8 +4178,8 @@ HRESULT updateSharedSettingsFromPreferencesIfNeeded(IWebPreferences* preferences return hr; // Set cookie storage accept policy - if (CFHTTPCookieStorageRef defaultCookieStorage = wkGetDefaultHTTPCookieStorage()) - CFHTTPCookieStorageSetCookieAcceptPolicy(defaultCookieStorage, acceptPolicy); + if (CFHTTPCookieStorageRef cookieStorage = currentCookieStorage()) + CFHTTPCookieStorageSetCookieAcceptPolicy(cookieStorage, acceptPolicy); return S_OK; } @@ -4038,7 +4279,7 @@ HRESULT STDMETHODCALLTYPE WebView::scrollBy( { if (!offset) return E_POINTER; - m_page->mainFrame()->view()->scrollBy(offset->x, offset->y); + m_page->mainFrame()->view()->scrollBy(IntSize(offset->x, offset->y)); return S_OK; } @@ -4156,6 +4397,27 @@ HRESULT STDMETHODCALLTYPE WebView::canHandleRequest( return S_OK; } +HRESULT STDMETHODCALLTYPE WebView::standardUserAgentWithApplicationName( + BSTR applicationName, + BSTR* groupName) +{ + if (!groupName) { + ASSERT_NOT_REACHED(); + return E_POINTER; + } + + *groupName; + + if (!applicationName) { + ASSERT_NOT_REACHED(); + return E_POINTER; + } + + BString applicationNameBString(applicationName); + *groupName = BString(standardUserAgentWithApplicationName(String(applicationNameBString, SysStringLen(applicationNameBString)))).release(); + return S_OK; +} + HRESULT STDMETHODCALLTYPE WebView::clearFocusNode() { if (m_page && m_page->focusController()) @@ -4199,13 +4461,15 @@ HRESULT STDMETHODCALLTYPE WebView::setAllowSiteSpecificHacks( /* [in] */ BOOL allow) { s_allowSiteSpecificHacks = !!allow; + // FIXME: This sets a global so it needs to call notifyPreferencesChanged + // on all WebView objects (not just itself). return S_OK; } -HRESULT STDMETHODCALLTYPE WebView::addAdditionalPluginPath( - /* [in] */ BSTR path) +HRESULT STDMETHODCALLTYPE WebView::addAdditionalPluginDirectory( + /* [in] */ BSTR directory) { - PluginDatabase::installedPlugins()->addExtraPluginPath(String(path, SysStringLen(path))); + PluginDatabase::installedPlugins()->addExtraPluginDirectory(String(directory, SysStringLen(directory))); return S_OK; } @@ -4287,7 +4551,7 @@ HRESULT WebView::setProhibitsMainFrameScrolling(BOOL b) if (!m_page) return E_FAIL; - m_page->mainFrame()->setProhibitsScrolling(b); + m_page->mainFrame()->view()->setProhibitsScrolling(b); return S_OK; } @@ -4362,7 +4626,7 @@ void WebView::releaseIMMContext(HIMC hIMC) void WebView::prepareCandidateWindow(Frame* targetFrame, HIMC hInputContext) { IntRect caret; - if (RefPtr<Range> range = targetFrame->selectionController()->selection().toRange()) { + if (RefPtr<Range> range = targetFrame->selection()->selection().toRange()) { ExceptionCode ec = 0; RefPtr<Range> tempRange = range->cloneRange(ec); caret = targetFrame->firstRectForRange(tempRange.get()); @@ -4525,7 +4789,7 @@ bool WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* char { IntRect caret; ASSERT(charPos->dwCharPos == 0 || targetFrame->editor()->hasComposition()); - if (RefPtr<Range> range = targetFrame->editor()->hasComposition() ? targetFrame->editor()->compositionRange() : targetFrame->selectionController()->selection().toRange()) { + if (RefPtr<Range> range = targetFrame->editor()->hasComposition() ? targetFrame->editor()->compositionRange() : targetFrame->selection()->selection().toRange()) { ExceptionCode ec = 0; RefPtr<Range> tempRange = range->cloneRange(ec); tempRange->setStart(tempRange->startContainer(ec), tempRange->startOffset(ec) + charPos->dwCharPos, ec); @@ -4543,7 +4807,7 @@ bool WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* char bool WebView::onIMERequestReconvertString(Frame* targetFrame, RECONVERTSTRING* reconvertString, LRESULT* result) { - RefPtr<Range> selectedRange = targetFrame->selectionController()->toRange(); + RefPtr<Range> selectedRange = targetFrame->selection()->toRange(); String text = selectedRange->text(); if (!reconvertString) { *result = sizeof(RECONVERTSTRING) + text.length() * sizeof(UChar); @@ -4617,6 +4881,167 @@ HRESULT STDMETHODCALLTYPE WebView::windowAncestryDidChange() return S_OK; } +HRESULT STDMETHODCALLTYPE WebView::paintDocumentRectToContext( + /* [in] */ RECT rect, + /* [in] */ OLE_HANDLE deviceContext) +{ + if (!deviceContext) + return E_POINTER; + + if (!m_mainFrame) + return E_FAIL; + + return m_mainFrame->paintDocumentRectToContext(rect, deviceContext); +} + +HRESULT STDMETHODCALLTYPE WebView::setCustomHTMLTokenizerTimeDelay( + /* [in] */ double timeDelay) +{ + if (!m_page) + return E_FAIL; + + m_page->setCustomHTMLTokenizerTimeDelay(timeDelay); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::setCustomHTMLTokenizerChunkSize( + /* [in] */ int chunkSize) +{ + if (!m_page) + return E_FAIL; + + m_page->setCustomHTMLTokenizerChunkSize(chunkSize); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::backingStore( + /* [out, retval] */ OLE_HANDLE* hBitmap) +{ + if (!hBitmap) + return E_POINTER; + *hBitmap = reinterpret_cast<OLE_HANDLE>(m_backingStoreBitmap.get()); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::setTransparent(BOOL transparent) +{ + if (m_transparent == !!transparent) + return S_OK; + + m_transparent = transparent; + m_mainFrame->updateBackground(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::transparent(BOOL* transparent) +{ + if (!transparent) + return E_POINTER; + + *transparent = this->transparent() ? TRUE : FALSE; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::setCookieEnabled(BOOL enable) +{ + if (!m_page) + return E_FAIL; + + m_page->setCookieEnabled(enable); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::cookieEnabled(BOOL* enabled) +{ + if (!enabled) + return E_POINTER; + + if (!m_page) + return E_FAIL; + + *enabled = m_page->cookieEnabled(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::setDefersCallbacks(BOOL defersCallbacks) +{ + if (!m_page) + return E_FAIL; + + m_page->setDefersLoading(defersCallbacks); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::defersCallbacks(BOOL* defersCallbacks) +{ + if (!defersCallbacks) + return E_POINTER; + + if (!m_page) + return E_FAIL; + + *defersCallbacks = m_page->defersLoading(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::setAlwaysUsesComplexTextCodePath(BOOL complex) +{ + WebCoreSetAlwaysUsesComplexTextCodePath(complex); + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::alwaysUsesComplexTextCodePath(BOOL* complex) +{ + if (!complex) + return E_POINTER; + + *complex = WebCoreAlwaysUsesComplexTextCodePath(); + return S_OK; +} + +bool WebView::onGetObject(WPARAM wParam, LPARAM lParam, LRESULT& lResult) const +{ + lResult = 0; + + if (lParam != OBJID_CLIENT) + return false; + + AXObjectCache::enableAccessibility(); + + // Get the accessible object for the top-level frame. + WebFrame* mainFrameImpl = topLevelFrame(); + if (!mainFrameImpl) + return false; + + COMPtr<IAccessible> accessible = mainFrameImpl->accessible(); + if (!accessible) + return false; + + if (!accessibilityLib) { + if (!(accessibilityLib = ::LoadLibrary(TEXT("oleacc.dll")))) + return false; + } + + static LPFNLRESULTFROMOBJECT procPtr = reinterpret_cast<LPFNLRESULTFROMOBJECT>(::GetProcAddress(accessibilityLib, "LresultFromObject")); + if (!procPtr) + return false; + + // LresultFromObject returns a reference to the accessible object, stored + // in an LRESULT. If this call is not successful, Windows will handle the + // request through DefWindowProc. + return SUCCEEDED(lResult = procPtr(__uuidof(IAccessible), wParam, accessible.get())); +} + +STDMETHODIMP WebView::AccessibleObjectFromWindow(HWND hwnd, DWORD objectID, REFIID riid, void** ppObject) +{ + ASSERT(accessibilityLib); + static LPFNACCESSIBLEOBJECTFROMWINDOW procPtr = reinterpret_cast<LPFNACCESSIBLEOBJECTFROMWINDOW>(::GetProcAddress(accessibilityLib, "AccessibleObjectFromWindow")); + if (!procPtr) + return E_FAIL; + return procPtr(hwnd, objectID, riid, ppObject); +} + class EnumTextMatches : public IEnumTextMatches { long m_ref; @@ -4700,3 +5125,4 @@ Page* core(IWebView* iWebView) return page; } + diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h index 112e1df..c64bc59 100644 --- a/WebKit/win/WebView.h +++ b/WebKit/win/WebView.h @@ -27,10 +27,7 @@ #define WebView_H #include "COMPtr.h" -#include "IWebNotificationObserver.h" -#include "IWebUIDelegatePrivate.h" -#include "IWebView.h" -#include "IWebViewPrivate.h" +#include "WebKit.h" #include "WebFrame.h" #include "WebPreferences.h" @@ -44,6 +41,7 @@ class WebBackForwardList; class WebInspector; class WebInspectorClient; +WebView* kit(WebCore::Page*); WebCore::Page* core(IWebView*); interface IDropTargetHelper; @@ -439,6 +437,33 @@ public: virtual HRESULT STDMETHODCALLTYPE setGrammarCheckingEnabled( BOOL enabled); + virtual HRESULT STDMETHODCALLTYPE setPageSizeMultiplier( + /* [in] */ float multiplier); + + virtual HRESULT STDMETHODCALLTYPE pageSizeMultiplier( + /* [retval][out] */ float *multiplier); + + virtual HRESULT STDMETHODCALLTYPE canZoomPageIn( + /* [in] */ IUnknown *sender, + /* [retval][out] */ BOOL *result); + + virtual HRESULT STDMETHODCALLTYPE zoomPageIn( + /* [in] */ IUnknown *sender); + + virtual HRESULT STDMETHODCALLTYPE canZoomPageOut( + /* [in] */ IUnknown *sender, + /* [retval][out] */ BOOL *result); + + virtual HRESULT STDMETHODCALLTYPE zoomPageOut( + /* [in] */ IUnknown *sender); + + virtual HRESULT STDMETHODCALLTYPE canResetPageZoom( + /* [in] */ IUnknown *sender, + /* [retval][out] */ BOOL *result); + + virtual HRESULT STDMETHODCALLTYPE resetPageZoom( + /* [in] */ IUnknown *sender); + // IWebViewUndoableEditing virtual HRESULT STDMETHODCALLTYPE replaceSelectionWithNode( @@ -573,6 +598,8 @@ public: virtual HRESULT STDMETHODCALLTYPE executeCoreCommandByName(BSTR name, BSTR value); + virtual HRESULT STDMETHODCALLTYPE clearMainFrameName(); + virtual HRESULT STDMETHODCALLTYPE markAllMatchesForText( BSTR search, BOOL caseSensitive, BOOL highlight, UINT limit, UINT* matches); @@ -602,6 +629,10 @@ public: IWebURLRequest *request, BOOL *result); + virtual HRESULT STDMETHODCALLTYPE standardUserAgentWithApplicationName( + /* [in] */ BSTR applicationName, + /* [retval][out] */ BSTR *groupName); + virtual HRESULT STDMETHODCALLTYPE clearFocusNode(); virtual HRESULT STDMETHODCALLTYPE setInitialFocus( @@ -616,8 +647,8 @@ public: virtual HRESULT STDMETHODCALLTYPE setAllowSiteSpecificHacks( /* [in] */ BOOL allows); - virtual HRESULT STDMETHODCALLTYPE addAdditionalPluginPath( - /* [in] */ BSTR path); + virtual HRESULT STDMETHODCALLTYPE addAdditionalPluginDirectory( + /* [in] */ BSTR directory); virtual HRESULT STDMETHODCALLTYPE loadBackForwardListFromOtherView( /* [in] */ IWebView *otherView); @@ -634,6 +665,43 @@ public: virtual HRESULT STDMETHODCALLTYPE windowAncestryDidChange(); + virtual HRESULT STDMETHODCALLTYPE paintDocumentRectToContext( + /* [in] */ RECT rect, + /* [in] */ OLE_HANDLE dc); + + virtual HRESULT STDMETHODCALLTYPE setCustomHTMLTokenizerTimeDelay( + /* [in] */ double timeDelay); + + virtual HRESULT STDMETHODCALLTYPE setCustomHTMLTokenizerChunkSize( + /* [in] */ int chunkSize); + + virtual HRESULT STDMETHODCALLTYPE backingStore( + /* [out, retval] */ OLE_HANDLE* hBitmap); + + virtual HRESULT STDMETHODCALLTYPE setTransparent( + /* [in] */ BOOL transparent); + + virtual HRESULT STDMETHODCALLTYPE transparent( + /* [out, retval] */ BOOL* transparent); + + virtual HRESULT STDMETHODCALLTYPE setDefersCallbacks( + /* [in] */ BOOL defersCallbacks); + + virtual HRESULT STDMETHODCALLTYPE defersCallbacks( + /* [out, retval] */ BOOL* defersCallbacks); + + virtual HRESULT STDMETHODCALLTYPE setAlwaysUsesComplexTextCodePath( + /* [in] */ BOOL complex); + + virtual HRESULT STDMETHODCALLTYPE alwaysUsesComplexTextCodePath( + /* [out, retval] */ BOOL* complex); + + virtual HRESULT STDMETHODCALLTYPE setCookieEnabled( + /* [in] */ BOOL enable); + + virtual HRESULT STDMETHODCALLTYPE cookieEnabled( + /* [out, retval] */ BOOL* enabled); + // WebView WebCore::Page* page(); bool handleMouseEvent(UINT, WPARAM, LPARAM); @@ -657,14 +725,17 @@ public: void addToDirtyRegion(const WebCore::IntRect&); void addToDirtyRegion(HRGN); void scrollBackingStore(WebCore::FrameView*, int dx, int dy, const WebCore::IntRect& scrollViewRect, const WebCore::IntRect& clipRect); - void updateBackingStore(WebCore::FrameView*, HDC, bool backingStoreCompletelyDirty); + void updateBackingStore(WebCore::FrameView*, HDC = 0, bool backingStoreCompletelyDirty = false); void deleteBackingStore(); + void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false); void frameRect(RECT* rect); void closeWindow(); void closeWindowSoon(); void close(); bool didClose() const { return m_didClose; } + bool transparent() const { return m_transparent; } + bool onIMEStartComposition(); bool onIMEComposition(LPARAM); bool onIMEEndComposition(); @@ -681,11 +752,13 @@ public: HRESULT revokeDragDrop(); // Convenient to be able to violate the rules of COM here for easy movement to the frame. - WebFrame* topLevelFrame() { return m_mainFrame; } + WebFrame* topLevelFrame() const { return m_mainFrame; } const WebCore::String& userAgentForKURL(const WebCore::KURL& url); static bool canHandleRequest(const WebCore::ResourceRequest&); + static WebCore::String standardUserAgentWithApplicationName(const WebCore::String&); + void setIsBeingDestroyed() { m_isBeingDestroyed = true; } bool isBeingDestroyed() const { return m_isBeingDestroyed; } @@ -708,11 +781,27 @@ public: static WebCacheModel maxCacheModelInAnyInstance(); void updateActiveStateSoon() const; + void deleteBackingStoreSoon(); + void cancelDeleteBackingStoreSoon(); HWND topLevelParent() const { return m_topLevelParent; } void updateActiveState(); + bool onGetObject(WPARAM, LPARAM, LRESULT&) const; + static STDMETHODIMP AccessibleObjectFromWindow(HWND, DWORD objectID, REFIID, void** ppObject); + +private: + void setZoomMultiplier(float multiplier, bool isTextOnly); + float zoomMultiplier(bool isTextOnly); + bool canZoomIn(bool isTextOnly); + HRESULT zoomIn(bool isTextOnly); + bool canZoomOut(bool isTextOnly); + HRESULT zoomOut(bool isTextOnly); + bool canResetZoom(bool isTextOnly); + HRESULT resetZoom(bool isTextOnly); + bool active(); + protected: HIMC getIMMContext(); void releaseIMMContext(HIMC); @@ -734,7 +823,6 @@ protected: virtual void windowReceivedMessage(HWND, UINT message, WPARAM, LPARAM); ULONG m_refCount; - WebCore::String m_groupName; HWND m_hostWindow; HWND m_viewWindow; WebFrame* m_mainFrame; @@ -760,7 +848,8 @@ protected: bool m_useBackForwardList; WebCore::String m_userAgentCustom; WebCore::String m_userAgentStandard; - float m_textSizeMultiplier; + float m_zoomMultiplier; + bool m_zoomMultiplierIsTextOnly; WebCore::String m_overrideEncoding; WebCore::String m_applicationName; bool m_mouseActivated; @@ -778,6 +867,9 @@ protected: unsigned m_inIMEComposition; HWND m_toolTipHwnd; WebCore::String m_toolTip; + bool m_deleteBackingStoreTimerActive; + + bool m_transparent; static bool s_allowSiteSpecificHacks; |