diff options
author | Steve Block <steveblock@google.com> | 2010-02-02 14:57:50 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-04 15:06:55 +0000 |
commit | d0825bca7fe65beaee391d30da42e937db621564 (patch) | |
tree | 7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /WebKit/win | |
parent | 3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff) | |
download | external_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2 |
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'WebKit/win')
61 files changed, 3306 insertions, 525 deletions
diff --git a/WebKit/win/AccessibleBase.cpp b/WebKit/win/AccessibleBase.cpp index 47b8369..0704771 100644 --- a/WebKit/win/AccessibleBase.cpp +++ b/WebKit/win/AccessibleBase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2008, 2009, 2010 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,6 +29,8 @@ #include "AccessibleImage.h" #include "WebView.h" +#include <WebCore/AccessibilityListBox.h> +#include <WebCore/AccessibilityMenuListPopup.h> #include <WebCore/AccessibilityObject.h> #include <WebCore/AXObjectCache.h> #include <WebCore/BString.h> @@ -75,15 +77,30 @@ AccessibleBase* AccessibleBase::createInstance(AccessibilityObject* obj) return new AccessibleBase(obj); } +HRESULT AccessibleBase::QueryService(REFGUID guidService, REFIID riid, void **ppvObject) +{ + if (!IsEqualGUID(guidService, SID_AccessibleComparable)) { + *ppvObject = 0; + return E_INVALIDARG; + } + return QueryInterface(riid, ppvObject); +} + // IUnknown HRESULT STDMETHODCALLTYPE AccessibleBase::QueryInterface(REFIID riid, void** ppvObject) { if (IsEqualGUID(riid, __uuidof(IAccessible))) - *ppvObject = this; + *ppvObject = static_cast<IAccessible*>(this); else if (IsEqualGUID(riid, __uuidof(IDispatch))) - *ppvObject = this; + *ppvObject = static_cast<IAccessible*>(this); else if (IsEqualGUID(riid, __uuidof(IUnknown))) - *ppvObject = this; + *ppvObject = static_cast<IAccessible*>(this); + else if (IsEqualGUID(riid, __uuidof(IAccessibleComparable))) + *ppvObject = static_cast<IAccessibleComparable*>(this); + else if (IsEqualGUID(riid, __uuidof(IServiceProvider))) + *ppvObject = static_cast<IServiceProvider*>(this); + else if (IsEqualGUID(riid, __uuidof(AccessibleBase))) + *ppvObject = static_cast<AccessibleBase*>(this); else { *ppvObject = 0; return E_NOINTERFACE; @@ -106,7 +123,17 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accParent(IDispatch** parent) { *parent = 0; - if (!m_object || !m_object->topDocumentFrameView()) + if (!m_object) + return E_FAIL; + + AccessibilityObject* parentObject = m_object->parentObjectUnignored(); + if (parentObject) { + *parent = wrapper(parentObject); + (*parent)->AddRef(); + return S_OK; + } + + if (!m_object->topDocumentFrameView()) return E_FAIL; return WebView::AccessibleObjectFromWindow(m_object->topDocumentFrameView()->hostWindow()->platformPageClient(), @@ -252,9 +279,6 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accState(VARIANT vChild, VARIANT* if (childObj->isOffScreen()) pvState->lVal |= STATE_SYSTEM_OFFSCREEN; - if (childObj->isMultiSelect()) - pvState->lVal |= STATE_SYSTEM_MULTISELECTABLE; - if (childObj->isPasswordField()) pvState->lVal |= STATE_SYSTEM_PROTECTED; @@ -276,7 +300,27 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accState(VARIANT vChild, VARIANT* if (childObj->canSetFocusAttribute()) pvState->lVal |= STATE_SYSTEM_FOCUSABLE; - // TODO: Add selected and selectable states. + if (childObj->isSelected()) + pvState->lVal |= STATE_SYSTEM_SELECTED; + + if (childObj->canSetSelectedAttribute()) + pvState->lVal |= STATE_SYSTEM_SELECTABLE; + + if (childObj->isMultiSelectable()) + pvState->lVal |= STATE_SYSTEM_EXTSELECTABLE | STATE_SYSTEM_MULTISELECTABLE; + + if (!childObj->isVisible()) + pvState->lVal |= STATE_SYSTEM_INVISIBLE; + + if (childObj->isCollapsed()) + pvState->lVal |= STATE_SYSTEM_COLLAPSED; + + if (childObj->roleValue() == PopUpButtonRole) { + pvState->lVal |= STATE_SYSTEM_HASPOPUP; + + if (!childObj->isCollapsed()) + pvState->lVal |= STATE_SYSTEM_EXPANDED; + } return S_OK; } @@ -335,9 +379,54 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accKeyboardShortcut(VARIANT vChild return S_OK; } -HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long, VARIANT) +HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long selectionFlags, VARIANT vChild) { - return E_NOTIMPL; + // According to MSDN, these combinations are invalid. + if (((selectionFlags & (SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION)) == (SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION)) || + ((selectionFlags & (SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION)) || + ((selectionFlags & (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)) || + ((selectionFlags & (SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION))) + return E_INVALIDARG; + + AccessibilityObject* childObject; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObject); + + if (FAILED(hr)) + return hr; + + if (selectionFlags & SELFLAG_TAKEFOCUS) + childObject->setFocused(true); + + AccessibilityObject* parentObject = childObject->parentObject(); + if (!parentObject) + return E_INVALIDARG; + + if (selectionFlags & SELFLAG_TAKESELECTION) { + if (parentObject->isListBox()) { + Vector<RefPtr<AccessibilityObject> > selectedChildren(1); + selectedChildren[0] = childObject; + static_cast<AccessibilityListBox*>(parentObject)->setSelectedChildren(selectedChildren); + } else if (parentObject->isMenuListPopup()) + childObject->setSelected(true); + else + return E_INVALIDARG; + } + + // MSDN says that ADD, REMOVE, and EXTENDSELECTION are invalid for + // single-select. + if (!parentObject->isMultiSelectable()) + return E_INVALIDARG; + + if (selectionFlags & SELFLAG_ADDSELECTION) + childObject->setSelected(true); + + if (selectionFlags & SELFLAG_REMOVESELECTION) + childObject->setSelected(false); + + // FIXME: Should implement SELFLAG_EXTENDSELECTION. For now, we just return + // S_OK, matching Firefox. + + return S_OK; } HRESULT STDMETHODCALLTYPE AccessibleBase::get_accSelection(VARIANT*) @@ -405,7 +494,7 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::accLocation(long* left, long* top, lon if (!childObj->documentFrameView()) return E_FAIL; - IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->boundingBoxRect())); + IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->elementRect())); *left = screenRect.x(); *top = screenRect.y(); *width = screenRect.width(); @@ -542,8 +631,9 @@ static long MSAARole(AccessibilityRole role) return ROLE_SYSTEM_PAGETABLIST; case WebCore::TextFieldRole: case WebCore::TextAreaRole: - case WebCore::ListMarkerRole: + case WebCore::EditableTextRole: return ROLE_SYSTEM_TEXT; + case WebCore::ListMarkerRole: case WebCore::StaticTextRole: return ROLE_SYSTEM_STATICTEXT; case WebCore::OutlineRole: @@ -555,6 +645,8 @@ static long MSAARole(AccessibilityRole role) case WebCore::GroupRole: return ROLE_SYSTEM_GROUPING; case WebCore::ListRole: + case WebCore::ListBoxRole: + case WebCore::MenuListPopupRole: return ROLE_SYSTEM_LIST; case WebCore::TableRole: return ROLE_SYSTEM_TABLE; @@ -564,6 +656,12 @@ static long MSAARole(AccessibilityRole role) case WebCore::ImageMapRole: case WebCore::ImageRole: return ROLE_SYSTEM_GRAPHIC; + case WebCore::MenuListOptionRole: + case WebCore::ListItemRole: + case WebCore::ListBoxOptionRole: + return ROLE_SYSTEM_LISTITEM; + case WebCore::PopUpButtonRole: + return ROLE_SYSTEM_COMBOBOX; default: // This is the default role for MSAA. return ROLE_SYSTEM_CLIENT; @@ -572,7 +670,7 @@ static long MSAARole(AccessibilityRole role) long AccessibleBase::role() const { - return MSAARole(m_object->roleValue()); + return MSAARole(m_object->roleValueForMSAA()); } HRESULT AccessibleBase::getAccessibilityObjectForChild(VARIANT vChild, AccessibilityObject*& childObj) const @@ -616,3 +714,10 @@ AccessibleBase* AccessibleBase::wrapper(AccessibilityObject* obj) result = createInstance(obj); return result; } + +HRESULT AccessibleBase::isSameObject(IAccessibleComparable* other, BOOL* result) +{ + COMPtr<AccessibleBase> otherAccessibleBase(Query, other); + *result = (otherAccessibleBase == this || otherAccessibleBase->m_object == m_object); + return S_OK; +} diff --git a/WebKit/win/AccessibleBase.h b/WebKit/win/AccessibleBase.h index 3b6bce8..ca1703f 100644 --- a/WebKit/win/AccessibleBase.h +++ b/WebKit/win/AccessibleBase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2008, 2009, 2010 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,14 +26,18 @@ #ifndef AccessibleBase_h #define AccessibleBase_h -#include <oleacc.h> #include <WebCore/AccessibilityObject.h> #include <WebCore/AccessibilityObjectWrapperWin.h> +#include <WebKit/WebKit.h> +#include <oleacc.h> -class AccessibleBase : public IAccessible, public WebCore::AccessibilityObjectWrapper { +class DECLSPEC_UUID("3dbd565b-db22-4d88-8e0e-778bde54524a") AccessibleBase : public IAccessibleComparable, public IServiceProvider, public WebCore::AccessibilityObjectWrapper { public: static AccessibleBase* createInstance(WebCore::AccessibilityObject*); + // IServiceProvider + virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppv); + // IUnknown virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); virtual ULONG STDMETHODCALLTYPE AddRef(void) { return ++m_refCount; } @@ -89,6 +93,9 @@ public: m_object = 0; } + // IAccessibleComparable + virtual HRESULT STDMETHODCALLTYPE isSameObject(IAccessibleComparable* other, BOOL* result); + protected: AccessibleBase(WebCore::AccessibilityObject*); virtual ~AccessibleBase(); diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index 9ea12f6..e661272 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,785 @@ +<<<<<<< HEAD +======= +2010-01-29 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + Drag and Drop: Windows uses "stop" sign as cursor when dragging + https://bugs.webkit.org/show_bug.cgi?id=34305 + <rdar://problem/7589672> + + Add a preference in WebKit (that defaults to false), for whether or not + we should show the custom cursors during drag and drop. However, this is + currently only used on Windows, and only used to hide the "drop not allowed" + icon inside the WebView is the preference is set to true. + + This will be off by default, so no change in behavior. + + * Interfaces/IWebPreferencesPrivate.idl: Added new functions. + * Interfaces/WebKit.idl: Touched to force Interfaces build. + * WebDropSource.cpp: + (WebDropSource::GiveFeedback): Implementation of conditional showing cursor + logic. + * WebPreferenceKeysPrivate.h: Added new preference key. + * WebPreferences.cpp: Added new functions. + (WebPreferences::setCustomDragCursorsEnabled): + (WebPreferences::customDragCursorsEnabled): + * WebPreferences.h: Added new functions. + +2010-01-28 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Crash when posting a notification for a detached object + + https://bugs.webkit.org/show_bug.cgi?id=34309 + <rdar://problem/7409759> + + Reviewed by Darin Adler. + + * AccessibleBase.cpp: + (AccessibleBase::QueryService): + If an unrecognized service ID is passed, return early. Otherwise, return + the result of QueryInterface. + (AccessibleBase::QueryInterface): + Add static_casts. Check for new UUIDs. + (AccessibleBase::isSameObject): + Query the object for AccessibleBase. Return whether the pointers or the + wrapped objects match. + + * AccessibleBase.h: + Give the class a UUID so we can query for it in isSameObject(). Inherit + from IAccessibleComparable; inherit from IServiceProvider so clients can + use QueryService to query for a custom interface. + + * Interfaces/AccessibleComparable.idl: Added. Declares a function that + can be called to compare to accessible objects. + + * Interfaces/WebKit.idl: + Include the new IDL. + + * WebKit.vcproj/Interfaces.vcproj: + Add the new IDL to the project. + +2010-01-27 Aaron Boodman <aa@chromium.org> + + Expand NotificationCenter::checkPermission() interface. + It now passes the full URL instead of just the origin. + + https://bugs.webkit.org/show_bug.cgi?id=34238 + + * WebCoreSupport/WebDesktopNotificationsDelegate.cpp: + (WebDesktopNotificationsDelegate::checkPermission): + * WebCoreSupport/WebDesktopNotificationsDelegate.h: + +2010-01-27 Adam Roben <aroben@apple.com> + + Make it possible to instantiate WebSerializedJSValue using + WebKitCreateInstance + + Reviewed by Dave Hyatt. + + * ForEachCoClass.h: + * WebKitClassFactory.cpp: + Added WebSerializedJSValue. + +2010-01-26 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Oliver Hunt. + + Windows build references non-existent include paths + https://bugs.webkit.org/show_bug.cgi?id=34175 + + * WebKit.vcproj/WebKit.vcproj: + +2010-01-25 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Simon Fraser. + + A WebGeolocationControllerClient is leaked for every WebView + https://bugs.webkit.org/show_bug.cgi?id=34145 + + * WebCoreSupport/WebGeolocationControllerClient.cpp: + (WebGeolocationControllerClient::geolocationDestroyed): Added. + * WebCoreSupport/WebGeolocationControllerClient.h: + +2010-01-23 Dan Bernstein <mitz@apple.com> + + Reviewed by Maciej Stachowiak. + + <rdar://problem/7569820> svg/custom/text-zoom.xhtml fails on Windows + https://bugs.webkit.org/show_bug.cgi?id=34006 + + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): Added WebKitZoomsTextOnlyPreferenceKey + with a default value of true. + +2010-01-20 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Sam Weinig. + + Add missing implementation for WebGeolocationPosition::initWithTimestamp. + + * WebGeolocationPosition.cpp: + (WebGeolocationPosition::initWithTimestamp): Implemented. + +2010-01-20 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: accSelect() is not implemented + + https://bugs.webkit.org/show_bug.cgi?id=33918 + <rdar://problem/7436861> + + Reviewed by Darin Adler. + + * AccessibleBase.cpp: + (AccessibleBase::accSelect): + If there is an invalid combination of state flags, return early. If the + caller passed the "take focus" flag, focus the object. If the "take + selection" flag was passed, check whether the parent object is an + AccessibilityListBox; if so, call the object's setSelectedChildren() + function. If the parent is an AccessibilityMenuListPopup, call the + child object's setSelected() function. Otherwise, if the parent is some + other, unsupported object, return early. + If the selection flags include "add", "remove", or "extend" selection, + and the parent object is not multi-selectable, return early. Otherwise, + set or unset the child's selected flag based on the passed flag. + +2010-01-20 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler and Adam Roben. + + Feature defines are difficult to maintain on Windows builds + https://bugs.webkit.org/show_bug.cgi?id=33883 + + FeatureDefines.vsprops are now maintained in a way similar to + Configurations/FeatureDefines.xcconfig, with the added advantage + of having a single FeatureDefines file across all projects. + + * WebKit.vcproj/Interfaces.vcproj: Add FeatureDefines.vsprops inherited property sheet. + * WebKit.vcproj/WebKit.sln: Set up Cairo configuration for WebCoreGenerated. + * WebKit.vcproj/WebKit.vcproj: Remove ENABLE_ preprocessor definitions. + Add FeatureDefines.vsprops inherited property sheet. + * WebKit.vcproj/WebKitGUID.vcproj: Add FeatureDefines.vsprops inherited property sheet. + +2010-01-17 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: The child <option> elements of a non-multiple <select> are not + exposed + + https://bugs.webkit.org/show_bug.cgi?id=33773 + <rdar://problem/7550556> + + Reviewed by Alice Liu. + + * AccessibleBase.cpp: + (AccessibleBase::get_accState): + If the object is invisible, set the invisible state flag. If the object + is collapsed, set the collapsed state. If the object is a combo box, + set the has popup flag, and if it's not collapsed, set the expanded + flag. + (MSAARole): + Add new WebCore to MSAA role mappings. + + * WebCoreLocalizedStrings.cpp: + (WebCore::AXMenuListActionVerb): + Return the action verb that Firefox uses for <select> elements with + popups. + (WebCore::AXMenuListPopupActionVerb): + Return the verb that Firefox uses for a popup list. + +2010-01-19 John Sullivan <sullivan@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=33854 + Would like a variant of WebHTMLRepresentation's searchForLabelsBeforeElement that returns + more info about where the result was found + + Reviewed by Darin Adler + + * Interfaces/IWebHTMLRepresentation.idl: + Created variant of searchForLabels that includes additional in/out parameters resultDistance and resultIsInCellAbove. + + * Interfaces/WebKit.idl: + Touched in order to get other idl change to propagate correctly. + + * WebHTMLRepresentation.cpp: + (WebHTMLRepresentation::deprecatedSearchForLabels): + Renamed since iDL doesn't support two functions with the same name but different signatures. + (WebHTMLRepresentation::searchForLabels): + Implemented variant of searchForLabels that includes additional in/out parameters resultDistance and resultIsInCellAbove. + + * WebHTMLRepresentation.h: + Declared variant of searchForLabels that includes additional in/out parameters resultDistance and resultIsInCellAbove. + +2010-01-19 Adam Roben <aroben@apple.com> + + Windows build fix + + * WebScriptWorld.cpp: Added missing #include. + +2010-01-19 Dave Hyatt <hyatt@apple.com> + + Build bustage fix. Make sure the newly added scriptWorldForGlobalContext function is [local] in the IDL. + + * Interfaces/IWebScriptWorld.idl: + +2010-01-19 Dave Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben. + + Add an API to obtain a WebScriptWorld from a JSGlobalContextRef. + + * Interfaces/IWebScriptWorld.idl: + * WebScriptWorld.cpp: + (WebScriptWorld::scriptWorldForGlobalContext): + * WebScriptWorld.h: + +2010-01-18 Adam Roben <aroben@apple.com> + + Add IWebViewPrivate::setDomainRelaxationForbiddenForURLScheme + + WebKit/win part of fixing <http://webkit.org/b/33806> + <rdar://problem/7552837> Would like API to disallow setting of + document.domain for pages with certain URL schemes + + Reviewed by Sam Weinig. + + * Interfaces/IWebViewPrivate.idl: Added + setDomainRelaxationForbiddenForURLScheme. + + * Interfaces/WebKit.idl: Touched to force a build. + + * WebView.cpp: + (WebView::setDomainRelaxationForbiddenForURLScheme): + * WebView.h: + Added. Calls through to SecurityOrigin. + +2010-01-18 Chris Marrin <cmarrin@apple.com> + + Reviewed by Darin Adler. + + Use new setScrollFrame API + https://bugs.webkit.org/show_bug.cgi?id=32279 + + * WebView.cpp: + (WebView::updateRootLayerContents): + +2010-01-15 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Screen rect for <option> elements is always the zero rect + + https://bugs.webkit.org/show_bug.cgi?id=33758 + + Reviewed by Oliver Hunt. + + * AccessibleBase.cpp: + (AccessibleBase::accLocation): + Use elementRect() rather than boundingBoxRect(), which + AccessibilityListBoxOption overrides. + +2010-01-15 Jon Honeycutt <jhoneycutt@apple.com> + + get_accParent should try to retrieve parent AccessibilityObject, before + calling upon window + + https://bugs.webkit.org/show_bug.cgi?id=22893 + + Reviewed by Darin Adler. + + * AccessibleBase.cpp: + (AccessibleBase::get_accParent): + If the object has a parent object, return it. If not, return the + accessible for the WebView window. + +2010-01-12 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: selected, selectable, extended selectable, and multiple + selectable states are not reported + + https://bugs.webkit.org/show_bug.cgi?id=33574 + <rdar://problem/7536826> + + Reviewed by Darin Adler. + + * AccessibleBase.cpp: + (AccessibleBase::get_accState): + Remove the call to isMultiSelect(). Call the correctly-named + isMultiSelectable(), and if it returns true, set both the "extended + selectable" and "multiple selectable" states. Check whether the object + is selected or selectable, and report those states. + +2010-01-13 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + Add additional Geolocation interfaces in WebKit for Windows. + + * Interfaces/IWebGeolocationPolicyListener.idl: Added. + * Interfaces/IWebUIDelegatePrivate.idl: Add decidePolicyForGeolocationRequest to IWebUIDelegatePrivate2. + Append since this version hasn't shipped. + * Interfaces/WebKit.idl: Add include of IWebGeolocationPolicyListener.idl. + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::requestGeolocationPermissionForFrame): Call into decidePolicyForGeolocationRequest. + * WebCoreSupport/WebGeolocationControllerClient.cpp: + (WebGeolocationControllerClient::WebGeolocationControllerClient): Moved *. + * WebGeolocationPolicyListener.cpp: Added. + * WebGeolocationPolicyListener.h: Added. + * WebKit.vcproj/Interfaces.vcproj: Added IWebGeolocationPolicyListener. + * WebKit.vcproj/WebKit.vcproj: Added WebGeolocationPolicyListener, WebGeolocationPolicyListener. + * WebView.cpp: + (WebView::setGeolocationProvider): Removed extraneous STDMETHODCALLTYPE. + (WebView::geolocationProvider): Removed extraneous STDMETHODCALLTYPE. + (WebView::geolocationDidChangePosition): Removed extraneous STDMETHODCALLTYPE. + (WebView::geolocationDidFailWithError): Removed extraneous STDMETHODCALLTYPE. + +2010-01-12 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben, Sam Weinig. + + Add Geolocation interfaces in WebKit for Windows. + + * ForEachCoClass.h: Added WebGeolocationPosition. + * Interfaces/IWebError.idl: + * Interfaces/IWebGeolocationPosition.idl: Added. + * Interfaces/IWebGeolocationProvider.idl: Added. + * Interfaces/IWebViewPrivate.idl: + * Interfaces/WebKit.idl: + * WebCoreSupport/WebGeolocationControllerClient.cpp: Added. + (WebGeolocationControllerClient::WebGeolocationControllerClient): + (WebGeolocationControllerClient::startUpdating): + (WebGeolocationControllerClient::stopUpdating): + (WebGeolocationControllerClient::lastPosition): + * WebCoreSupport/WebGeolocationControllerClient.h: Added. + * WebGeolocationPosition.cpp: Added IWebGeolocationPosition implementation. + * WebGeolocationPosition.h: Added IWebGeolocationPosition implementation. + * WebKit.vcproj/Interfaces.vcproj: Added IWebGeolocationPosition.idl, IWebGeolocationProvider.idl, + relocated JavaScriptCoreAPITypes.idl, WebScrollbarTypes.idl + * WebKit.vcproj/WebKit.vcproj: Added WebGeolocationPosition.h/.cpp, WebGeolocationControllerClient.h/cpp, + * WebKitClassFactory.cpp: Add WebGeolocationPosition include. + * WebView.cpp: + (WebView::initWithFrame): Create WebGeolocationControllerClient if Geolocation is enabled. + (WebView::setGeolocationProvider): Added Geolocation-specific method. + (WebView::geolocationProvider): Added Geolocation-specific method. + (WebView::geolocationDidChangePosition): Added Geolocation-specific method. + (WebView::geolocationDidFailWithError): Added Geolocation-specific method. + * WebView.h: Added setGeolocationProvider, geolocationProvider, geolocationDidChangePosition, geolocationDidFailWithError. + +2010-01-11 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Accessibility role of <select multiple> elements is wrong + + https://bugs.webkit.org/show_bug.cgi?id=33522 + + Reviewed by Darin Adler. + + * AccessibleBase.cpp: + (MSAARole): + Map the WebCore::ListBox and WebCore::ListBoxOption roles to the MSAA + "list" and "list item" roles. + +2010-01-08 Brent Fulgham <bfulgham@webkit.org> + + Build fix, no review. + + Protect video control logic inside ENABLE(VIDEO). + + * WebView.cpp: + (WebView::enterFullscreenForNode): + (WebView::exitFullscreen): + * WebView.h: + +2010-01-08 Chris Marrin <cmarrin@apple.com> + + Reviewed by Adam Roben. + + Implement full-screen video for Windows + https://bugs.webkit.org/show_bug.cgi?id=31318 + + This adds a full-screen controller, FullscreenVideoController, + which manages going in and out of full-screen. The actual + full-screen window is created and managed by logic added + to QTMovieWin. FullscreenVideoController also creates and + manages a HUD. The HUD renders and manages events to + control the playing video. Movie controller events go to + FullscreenVideoController which then sends them to HTMLMediaElement, + which is passed to the controller by WebView, which gets the call + to go into full-screen mode from HTMLMediaElement via + ChromeClient. + + I've also updated the icons so the related sets (Play/Pause and + volume high/volume low/exit fullscreen) are the same size. This + allows me to position them using common code. + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::supportsFullscreenForNode): + (WebChromeClient::enterFullscreenForNode): + (WebChromeClient::exitFullscreenForNode): + * WebCoreSupport/WebChromeClient.h: + * WebKit.vcproj/WebKit.vcproj: + * WebKit.vcproj/fsVideoAudioVolumeHigh.png: + * WebKit.vcproj/fsVideoAudioVolumeLow.png: + * WebKit.vcproj/fsVideoExitFullscreen.png: + * WebKit.vcproj/fsVideoPause.png: + * WebKit.vcproj/fsVideoPlay.png: + * WebKitDLL.cpp: + (loadResourceIntoBuffer): + * FullscreenVideoController.cpp: Added. + * FullscreenVideoController.h: Added. + * WebView.cpp: + (WebView::enterFullscreenForNode): + (WebView::exitFullscreen): + * WebView.h: + +2010-01-08 Brent Fulgham <bfulgham@webkit.org> + + Unreviewed correction. + + Accidentally left unnecessary modification to hdcFromContext + in when landing r52995. + + * WebFrame.cpp: + (hdcFromContext): Back out unneeded modification. + +2010-01-08 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Adam Roben. + + Use correct cairo surface data type for handling print operations. + https://bugs.webkit.org/show_bug.cgi?id=33022. + + * WebFrame.cpp: + (scaleFactor): Handle 'scale = 0' case. + (WebFrame::spoolPage): Use scaleFactor helper function. Account for + margin size in region passed to header/footer routines. + (WebFrame::spoolPages): Properly clean up Cairo surface. + +2010-01-07 Kent Tamura <tkent@chromium.org> + + Reviewed by Maciej Stachowiak. + + Remove COM code generation files. + https://bugs.webkit.org/show_bug.cgi?id=32854 + + * WebKit.vcproj/DerivedSources.make: Removed. + * WebKit.vcproj/build-generated-files.sh: Removed. + +2010-01-05 Adam Roben <aroben@apple.com> + + Make IWebView::close and destroying a WebView's HWND optional for + WebKit clients + + WebView will now take care of these operations itself when its last + reference is released, if they haven't already been done. + + IWebView::close now also destroys the WebView's HWND. All WebKit + clients were already performing these operations in succession anyway, + or were attempting to by calling IWebView::close then destroying the + WebView's host window (which actually resulted in the WebView's HWND + leaking, and the crash in the below bug). + + Fixes <rdar://problem/7374218> <http://webkit.org/b/32827> Crash when + calling IWebView::close, then releasing the WebView, without calling + DestroyWindow + + Fixes a few WebViewDestruction tests, too. + + Reviewed by Steve Falkenburg. + + * WebView.cpp: + (WebView::~WebView): Don't try to destroy m_viewWindow here. That + should already have happened. Assert that this is the case. + (WebView::close): If m_viewWindow isn't already being destroyed, + destroy it now. Moved the call to revokeDragDrop() here from our + WM_DESTROY handler because it needs to be done before m_viewWindow is + nulled out. + (WebView::WebViewWndProc): Removed call to revokeDragDrop() that + close() now performs. + (WebView::Release): If our last reference is being released, call + close() so that clients don't have to. (It's harmless to call close() + multiple times.) We do this here instead of in the destructor because + close() can cause AddRef() and Release() to be called, and calling + those from within the destructor leads to double-destruction. + (WebView::setHostWindow): Removed an unnecessary (and now harmful) + null-check. + (WebView::revokeDragDrop): Changed an assertion into a run-time check, + since this will now sometimes be called when m_viewWindow hasn't been + created yet. Changed the IsWindow call to a null-check because we + never hold onto a destroyed m_viewWindow. + (WebView::windowAncestryDidChange): If we don't have a view window, + stop tracking changes to our parent's active state. + +2010-01-05 Adam Roben <aroben@apple.com> + + Make it safe to call IWebView::close when IWebView::initWithFrame + hasn't been called + + Part of <rdar://problem/7374218> <http://webkit.org/b/32827> Crash + when IWebView::close, then releasing the WebView, without calling + DestroyWindow + + Reviewed by Steve Falkenburg. + + * WebView.cpp: + (WebView::close): Null-check m_page and m_preferences before using + them. They will be null if initWithFrame was never called. + +2010-01-05 Adam Roben <aroben@apple.com> + + Add assertions to catch double-destruction of WebViews earlier + + I basically copied the m_deletionHasBegun logic from WTF::RefCounted. + + Fixes <http://webkit.org/b/33219>. + + Reviewed by Darin Adler. + + * WebView.cpp: + (WebView::WebView): Initialize m_deletionHasBegun + (WebView::AddRef): Assert that deletion hasn't already begun. + (WebView::Release): Assert that deletion hasn't already begun, then + record when deletion *does* begin. + + * WebView.h: Added m_deletionHasBegun. + +2010-01-05 Adam Roben <aroben@apple.com> + + Remove dead code in WebViewWndProc + + Fixes <http://webkit.org/b/33218>. + + Reviewed by Darin Adler. + + * WebView.cpp: + (WebView::WebViewWndProc): Removed a redundant isBeingDestroyed check. + We bail out much earlier in this function if isBeingDestroyed is true. + +2010-01-04 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Accessibility role of <select> elements is wrong + + https://bugs.webkit.org/show_bug.cgi?id=33192 + + Reviewed by Sam Weinig. + + * AccessibleBase.cpp: + (MSAARole): + Map WebCore::PopUpButtonRole to MSAA's ROLE_SYSTEM_COMBOBOX. + +2010-01-04 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33181 + The first letter is not removed properly from inline input hole + + * WebView.cpp: (WebView::onIMEEndComposition): If composition is ended before it was + confirmed, cancel it. + +2010-01-04 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33161 + Assertion failure in WebView when using Chinese Simplified IME + + * WebView.cpp: (WebView::onIMERequestCharPosition): Changed the assertion into release mode + check. We can't make assertions about arguments passed from outside WebKit. + +2010-01-04 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33157 + Implement TextInput logging channel on Windows + + * WebKitLogging.cpp: (WebKitInitializeLoggingChannelsIfNecessary): + * WebKitLogging.h: + Added a TextInput channel in place of unused Network one. + + * WebView.cpp: + (WebView::WebViewWndProc): Changed onIMERequest to return result directly. We never forward + it to DefWindowProc, so there is no need to return an unused boolean result for "handled". + (WebView::onIMEStartComposition): Added logging. + (imeCompositionArgumentNames): A helper function for detailed logging in onIMEComposition. + (imeNotificationName): A helper function for detailed logging in onIMENotify. + (imeRequestName): A helper function for detailed logging in onIMERequest. + (WebView::onIMEComposition): Added logging. + (WebView::onIMEEndComposition): Ditto. + (WebView::onIMEChar): Ditto. + (WebView::onIMENotify): Ditto. + (WebView::onIMERequestCharPosition): Changed to return result directly. + (WebView::onIMERequestReconvertString): Ditto. + (WebView::onIMERequest): Changed to return result directly. Added logging. + (WebView::onIMESelect): Added logging. + (WebView::onIMESetContext): Added logging. + + * WebView.h: onIMERequest functions now return result directly. + + +2010-01-04 Adam Roben <aroben@apple.com> + + Add WebKitAPITest + + Fixes <http://webkit.org/b/33167>. + + Reviewed by Sam Weinig. + + * WebKit.vcproj/WebKit.sln: Added WebKitAPITest.vcproj. It builds just + after DumpRenderTree.vcproj. + +2010-01-04 Dan Bernstein <mitz@apple.com> + + Reviewed by Ada Chan and Mark Rowe. + + Updated copyright string + + * WebKit.vcproj/WebKit.rc: + +2009-12-22 Darin Adler <darin@apple.com> + + Another try at fixing Windows build. + + * WebKitPrefix.cpp: Touch it. + +2009-12-22 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + Turn off datagrid by default, at least for all platforms Apple ships. + The datagrid implementation isn't ready for general web use yet. + + * WebKit.vcproj/WebKit.vcproj: Turn off datagrid by default. + +2009-12-21 Adam Roben <aroben@apple.com> + + Fix non-ACCELERATED_COMPOSITING builds + + * WebPreferences.cpp: + (WebPreferences::acceleratedCompositingEnabled): Guard use of + WKCACFLayerRenderer with USE(ACCELERATED_COMPOSITING). + +2009-12-18 Adam Roben <aroben@apple.com> + + Add IWebPreferencesPrivate::[set]AcceleratedCompositingEnabled + + Fixes <http://webkit.org/b/32745>. + + Reviewed by Ada Chan. + + * Interfaces/IWebPreferencesPrivate.idl: Added + [set]AcceleratedCompositingEnabled. + + * Interfaces/WebKit.idl: Touched to force a build. + + * WebPreferenceKeysPrivate.h: Added + WebKitAcceleratedCompositingEnabledPreferenceKey. + + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): Make accelerated + compositing be on by default. + (WebPreferences::setAcceleratedCompositingEnabled): Store the new + value. + (WebPreferences::acceleratedCompositingEnabled): If accelerated + compositing isn't available, return false. Otherwise, return the value + stored in preferences. + + * WebPreferences.h: Added [set]AcceleratedCompositingAvailable. + + * WebView.cpp: + (WebView::notifyPreferencesChanged): Just pass the value from + WebPreferences on down. + +2009-12-17 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Accessibility role of list items is wrong + + https://bugs.webkit.org/show_bug.cgi?id=32688 + + Reviewed by Adam Roben. + + * AccessibleBase.cpp: + (MSAARole): + Make the WebCore list item role map to the MSAA list item role. + +2009-12-17 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Accessibility role of list markers is wrong + + https://bugs.webkit.org/show_bug.cgi?id=32687 + + Reviewed by Adam Roben. + + * AccessibleBase.cpp: + (MSAARole): + Make the WebCore list marker role map to the MSAA static text role. + +2009-12-18 Adam Roben <aroben@apple.com> + + Add #includes needed after WebCore clean-up + + Rubber-stamped by Anders Carlsson. + + Fixes <http://webkit.org/b/32718>. + + * WebCoreSupport/WebContextMenuClient.cpp: + * WebDataSource.cpp: + * WebHTMLRepresentation.cpp: + * WebView.cpp: + * WebView.h: + +2009-12-17 Benjamin Otte <otte@gnome.org> + + Reviewed by Adam Roben. + + Don't include all JSC headers everywhere + https://bugs.webkit.org/show_bug.cgi?id=32663 + + * WebCoreLocalizedStrings.cpp: Added now-needed #include of + MathExtras.h. + +2009-12-17 Adam Roben <aroben@apple.com> + + Remove WebKit.sln's Debug_All and Debug_Internal configurations + + These configurations aren't buildable by people outside of Apple, and + Apple doesn't use this solution file. + + Fixes <http://webkit.org/b/31000> Windows WebKit Build Configuration + should default to Debug instead of Debug_all. + + Rubber-stamped by Dan Bernstein. + + * WebKit.vcproj/WebKit.sln: + +2009-12-16 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Accessibility role of text nodes is wrong + + https://bugs.webkit.org/show_bug.cgi?id=32631 + <rdar://problem/7369084> + + Reviewed by Alice Liu. + + * AccessibleBase.cpp: + (MSAARole): + If the role is WebCore::EditableTextRole, return ROLE_SYSTEM_TEXT. + (AccessibleBase::role): + Call roleValueForMSAA(). + +2009-12-14 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Adam Roben. + + Provide working printing support for WinCairo port. + + * WebFrame.cpp: + (WebFrame::spoolPage): Conditionalize initialization of + PlatformGraphicsContext handling for CG vs. Cairo. + (scaleFactor): Add helper function. + (hdcFromContext): Add helper function. + (WebFrame::drawHeader): Correct Cairo variation. + (WebFrame::drawFooter): Correct Cairo variation. + (WebFrame::spoolPages): Correct Cairo variation. + +>>>>>>> webkit.org at r54127 2009-12-13 Sam Weinig <sam@webkit.org> Reviewed by Dan Bernstein. @@ -13,6 +795,59 @@ * WebView.cpp: (WebView::initWithFrame): +<<<<<<< HEAD +======= +2009-12-14 Adam Roben <aroben@apple.com> + + Change IWebFramePrivate's vtable to be compatible with Safari 4.0.4 + + Reviewed by Steve Falkenburg. + + Fixes <http://webkit.org/b/32433> REGRESSION (r51567): Right click on + a link element crashes WebKit nightly + + * Interfaces/IWebFramePrivate.idl: Moved pauseSVGAnimation to the end + of the interface so the vtable that Safari 4.0.4 sees is unchanged. + +2009-12-14 Adam Roben <aroben@apple.com> + + Build fix + + * WebKit.vcproj/WebKit.vcproj: Added $(DXSDK_DIR)\Lib\x86 to the + libpath for all non-Cairo configurations (it was missing from most of + them). + +2009-12-11 Chris Marrin <cmarrin@apple.com> + + Reviewed by Jon Honeycutt. + + Added icons for full-screen video on Windows + https://bugs.webkit.org/show_bug.cgi?id=31318 + + * WebKit.vcproj/WebKit.rc: + * WebKit.vcproj/WebKit.vcproj: + * WebKit.vcproj/fsVideoAudioVolumeHigh.png: Added. + * WebKit.vcproj/fsVideoAudioVolumeLow.png: Added. + * WebKit.vcproj/fsVideoExitFullscreen.png: Added. + * WebKit.vcproj/fsVideoPause.png: Added. + * WebKit.vcproj/fsVideoPlay.png: Added. + * WebKit.vcproj/resource.h: + +2009-12-11 Chris Marrin <cmarrin@apple.com> + + Reviewed by Adam Roben. + + Delay load DLLs for accelerated compositing + https://bugs.webkit.org/show_bug.cgi?id=31856 + + If the DLLs (d3d9 and QuartzCore). are not present it + turns off accelerated compositing and avoids calling + any of the functions in the DLLs. + + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +>>>>>>> webkit.org at r54127 2009-12-10 Jon Honeycutt <jhoneycutt@apple.com> Pass more information about a plug-in to the PluginHalterDelegate diff --git a/WebKit/win/ForEachCoClass.h b/WebKit/win/ForEachCoClass.h index 39f8e32..ab7182d 100644 --- a/WebKit/win/ForEachCoClass.h +++ b/WebKit/win/ForEachCoClass.h @@ -64,6 +64,8 @@ macro(WebCookieManager) \ macro(WebWorkersPrivate) \ macro(WebScriptWorld) \ + macro(WebGeolocationPosition) \ + macro(WebSerializedJSValue) \ // end of macro // Everything below this point is deprecated. Please do not use. diff --git a/WebKit/win/FullscreenVideoController.cpp b/WebKit/win/FullscreenVideoController.cpp new file mode 100644 index 0000000..6b8e5ac --- /dev/null +++ b/WebKit/win/FullscreenVideoController.cpp @@ -0,0 +1,615 @@ +/* + * Copyright (C) 2010 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" + +#if ENABLE(VIDEO) + +#include "FullscreenVideoController.h" + +#include "WebKitDLL.h" +#include <ApplicationServices/ApplicationServices.h> +#include <WebCore/BitmapInfo.h> +#include <WebCore/Font.h> +#include <WebCore/FontSelector.h> +#include <WebCore/GraphicsContext.h> +#include <WebCore/TextRun.h> +#include <WebKitSystemInterface/WebKitSystemInterface.h> +#include <windowsx.h> +#include <wtf/StdLibExtras.h> + +using namespace std; +using namespace WebCore; + +static const float timerInterval = 0.033; + +// HUD Size +static const int windowHeight = 59; +static const int windowWidth = 438; + +// Margins and button sizes +static const int margin = 9; +static const int marginTop = 9; +static const int buttonSize = 25; +static const int buttonMiniSize = 16; +static const int volumeSliderWidth = 50; +static const int timeSliderWidth = 310; +static const int sliderHeight = 8; +static const int volumeSliderButtonSize = 10; +static const int timeSliderButtonSize = 8; +static const int textSize = 11; +static const float initialHUDPositionY = 0.9; // Initial Y position of HUD in percentage from top of screen + +// Background values +static const int borderRadius = 12; +static const int borderThickness = 2; + +// Colors +static const unsigned int backgroundColor = 0xA0202020; +static const unsigned int borderColor = 0xFFA0A0A0; +static const unsigned int sliderGutterColor = 0xFF141414; +static const unsigned int sliderButtonColor = 0xFF808080; +static const unsigned int textColor = 0xFFFFFFFF; + +HUDButton::HUDButton(HUDButtonType type, const IntPoint& position) + : HUDWidget(IntRect(position, IntSize())) + , m_type(type) + , m_showAltButton(false) +{ + const char* buttonResource = 0; + const char* buttonResourceAlt = 0; + switch (m_type) { + case PlayPauseButton: + buttonResource = "fsVideoPlay"; + buttonResourceAlt = "fsVideoPause"; + break; + case TimeSliderButton: + break; + case VolumeUpButton: + buttonResource = "fsVideoAudioVolumeHigh"; + break; + case VolumeSliderButton: + break; + case VolumeDownButton: + buttonResource = "fsVideoAudioVolumeLow"; + break; + case ExitFullscreenButton: + buttonResource = "fsVideoExitFullscreen"; + break; + } + + if (buttonResource) { + m_buttonImage = Image::loadPlatformResource(buttonResource); + m_rect.setWidth(m_buttonImage->width()); + m_rect.setHeight(m_buttonImage->height()); + } + if (buttonResourceAlt) + m_buttonImageAlt = Image::loadPlatformResource(buttonResourceAlt); +} + +void HUDButton::draw(GraphicsContext& context) +{ + Image* image = (m_showAltButton && m_buttonImageAlt) ? m_buttonImageAlt.get() : m_buttonImage.get(); + context.drawImage(image, DeviceColorSpace, m_rect.location()); +} + +HUDSlider::HUDSlider(HUDSliderButtonShape shape, int buttonSize, const IntRect& rect) + : HUDWidget(rect) + , m_buttonShape(shape) + , m_buttonSize(buttonSize) + , m_buttonPosition(0) + , m_dragStartOffset(0) +{ +} + +void HUDSlider::draw(GraphicsContext& context) +{ + // Draw gutter + IntSize radius(m_rect.height() / 2, m_rect.height() / 2); + context.fillRoundedRect(m_rect, radius, radius, radius, radius, Color(sliderGutterColor), DeviceColorSpace); + + // Draw button + context.setStrokeColor(Color(sliderButtonColor), DeviceColorSpace); + context.setFillColor(Color(sliderButtonColor), DeviceColorSpace); + + if (m_buttonShape == RoundButton) { + context.drawEllipse(IntRect(m_rect.location().x() + m_buttonPosition, m_rect.location().y() - (m_buttonSize - m_rect.height()) / 2, m_buttonSize, m_buttonSize)); + return; + } + + // Draw a diamond + FloatPoint points[4]; + float half = static_cast<float>(m_buttonSize) / 2; + points[0].setX(m_rect.location().x() + m_buttonPosition + half); + points[0].setY(m_rect.location().y()); + points[1].setX(m_rect.location().x() + m_buttonPosition + m_buttonSize); + points[1].setY(m_rect.location().y() + half); + points[2].setX(m_rect.location().x() + m_buttonPosition + half); + points[2].setY(m_rect.location().y() + m_buttonSize); + points[3].setX(m_rect.location().x() + m_buttonPosition); + points[3].setY(m_rect.location().y() + half); + context.drawConvexPolygon(4, points, true); +} + +void HUDSlider::drag(const IntPoint& point, bool start) +{ + if (start) { + // When we start, we need to snap the slider position to the x position if we clicked the gutter. + // But if we click the button, we need to drag relative to where we clicked down. We only need + // to check X because we would not even get here unless Y were already inside. + int relativeX = point.x() - m_rect.location().x(); + if (relativeX >= m_buttonPosition && relativeX <= m_buttonPosition + m_buttonSize) + m_dragStartOffset = point.x() - m_buttonPosition; + else + m_dragStartOffset = m_rect.location().x() + m_buttonSize / 2; + } + + m_buttonPosition = max(0, min(m_rect.width() - m_buttonSize, point.x() - m_dragStartOffset)); +} + +FullscreenVideoController::FullscreenVideoController() + : m_hudWindow(0) + , m_videoWindow(0) + , m_playPauseButton(HUDButton::PlayPauseButton, IntPoint((windowWidth - buttonSize) / 2, marginTop)) + , m_timeSliderButton(HUDButton::TimeSliderButton, IntPoint(0, 0)) + , m_volumeUpButton(HUDButton::VolumeUpButton, IntPoint(margin + buttonMiniSize + volumeSliderWidth + buttonMiniSize / 2, marginTop + (buttonSize - buttonMiniSize) / 2)) + , m_volumeSliderButton(HUDButton::VolumeSliderButton, IntPoint(0, 0)) + , m_volumeDownButton(HUDButton::VolumeDownButton, IntPoint(margin, marginTop + (buttonSize - buttonMiniSize) / 2)) + , m_exitFullscreenButton(HUDButton::ExitFullscreenButton, IntPoint(windowWidth - 2 * margin - buttonMiniSize, marginTop + (buttonSize - buttonMiniSize) / 2)) + , m_volumeSlider(HUDSlider::RoundButton, volumeSliderButtonSize, IntRect(IntPoint(margin + buttonMiniSize, marginTop + (buttonSize - buttonMiniSize) / 2 + buttonMiniSize / 2 - sliderHeight / 2), IntSize(volumeSliderWidth, sliderHeight))) + , m_timeSlider(HUDSlider::DiamondButton, timeSliderButtonSize, IntRect(IntPoint(windowWidth / 2 - timeSliderWidth / 2, windowHeight - margin - sliderHeight), IntSize(timeSliderWidth, sliderHeight))) + , m_hitWidget(0) + , m_movingWindow(false) + , m_timer(this, &FullscreenVideoController::timerFired) +{ +} + +FullscreenVideoController::~FullscreenVideoController() +{ + if (movie()) + movie()->exitFullscreen(); +} + +QTMovieWin* FullscreenVideoController::movie() const +{ + return m_mediaElement ? reinterpret_cast<QTMovieWin*>(m_mediaElement->platformMedia().qtMovie) : 0; +} + +void FullscreenVideoController::setMediaElement(HTMLMediaElement* mediaElement) +{ + if (mediaElement == m_mediaElement) + return; + + m_mediaElement = mediaElement; + if (!m_mediaElement) { + // Can't do full-screen, just get out + exitFullscreen(); + } +} + +void FullscreenVideoController::enterFullscreen() +{ + if (!movie()) + return; + + m_videoWindow = movie()->enterFullscreen(this); + + RECT windowRect; + GetClientRect(m_videoWindow, &windowRect); + m_fullscreenSize.setWidth(windowRect.right - windowRect.left); + m_fullscreenSize.setHeight(windowRect.bottom - windowRect.top); + + createHUDWindow(); +} + +void FullscreenVideoController::exitFullscreen() +{ + if (movie()) + movie()->exitFullscreen(); + + m_videoWindow = 0; + SetWindowLongPtr(m_hudWindow, 0, 0); + DestroyWindow(m_hudWindow); + m_hudWindow = 0; +} + +bool FullscreenVideoController::canPlay() const +{ + return m_mediaElement && m_mediaElement->canPlay(); +} + +void FullscreenVideoController::play() +{ + if (m_mediaElement) + m_mediaElement->play(); +} + +void FullscreenVideoController::pause() +{ + if (m_mediaElement) + m_mediaElement->pause(); +} + +float FullscreenVideoController::volume() const +{ + return m_mediaElement ? m_mediaElement->volume() : 0; +} + +void FullscreenVideoController::setVolume(float volume) +{ + if (m_mediaElement) { + ExceptionCode ec; + m_mediaElement->setVolume(volume, ec); + } +} + +float FullscreenVideoController::currentTime() const +{ + return m_mediaElement ? m_mediaElement->currentTime() : 0; +} + +void FullscreenVideoController::setCurrentTime(float value) +{ + if (m_mediaElement) { + ExceptionCode ec; + m_mediaElement->setCurrentTime(value, ec); + } +} + +float FullscreenVideoController::duration() const +{ + return m_mediaElement ? m_mediaElement->duration() : 0; +} + +void FullscreenVideoController::beginScrubbing() +{ + if (m_mediaElement) + m_mediaElement->beginScrubbing(); +} + +void FullscreenVideoController::endScrubbing() +{ + if (m_mediaElement) + m_mediaElement->endScrubbing(); +} + +LRESULT FullscreenVideoController::fullscreenClientWndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) { + case WM_CHAR: + onChar(wParam); + break; + case WM_LBUTTONDOWN: + onMouseDown(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + case WM_MOUSEMOVE: + onMouseMove(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + case WM_LBUTTONUP: + onMouseUp(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + } + + return DefWindowProc(wnd, message, wParam, lParam); +} + +static const LPCWSTR fullscreenVideeoHUDWindowClassName = L"fullscreenVideeoHUDWindowClass"; + +void FullscreenVideoController::registerHUDWindowClass() +{ + static bool haveRegisteredHUDWindowClass; + if (haveRegisteredHUDWindowClass) + return; + + haveRegisteredHUDWindowClass = true; + + WNDCLASSEX wcex; + + wcex.cbSize = sizeof(WNDCLASSEX); + + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = hudWndProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 4; + wcex.hInstance = gInstance; + wcex.hIcon = 0; + wcex.hCursor = LoadCursor(0, IDC_ARROW); + wcex.hbrBackground = 0; + wcex.lpszMenuName = 0; + wcex.lpszClassName = fullscreenVideeoHUDWindowClassName; + wcex.hIconSm = 0; + + RegisterClassEx(&wcex); +} + +void FullscreenVideoController::createHUDWindow() +{ + m_hudPosition.setX((m_fullscreenSize.width() - windowWidth) / 2); + m_hudPosition.setY(m_fullscreenSize.height() * initialHUDPositionY - windowHeight / 2); + + // Local variable that will hold the returned pixels. No need to cleanup this value. It + // will get cleaned up when m_bitmap is destroyed in the dtor + void* pixels; + BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(IntSize(windowWidth, windowHeight)); + m_bitmap.set(::CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0)); + + // Dirty the window so the HUD draws + RECT clearRect = { m_hudPosition.x(), m_hudPosition.y(), m_hudPosition.x() + windowWidth, m_hudPosition.y() + windowHeight }; + InvalidateRect(m_videoWindow, &clearRect, true); + + m_playPauseButton.setShowAltButton(!canPlay()); + m_volumeSlider.setValue(volume()); + m_timeSlider.setValue(currentTime() / duration()); + + if (!canPlay()) + m_timer.startRepeating(timerInterval); + + registerHUDWindowClass(); + + m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST | WS_EX_TOOLWINDOW, + fullscreenVideeoHUDWindowClassName, 0, WS_POPUP | WS_VISIBLE, + m_hudPosition.x(), m_hudPosition.y(), 0, 0, 0, 0, gInstance, 0); + ASSERT(::IsWindow(m_hudWindow)); + SetWindowLongPtr(m_hudWindow, 0, reinterpret_cast<LONG_PTR>(this)); + + draw(); +} + +static String timeToString(float time) +{ + if (!isfinite(time)) + time = 0; + int seconds = fabsf(time); + int hours = seconds / (60 * 60); + int minutes = (seconds / 60) % 60; + seconds %= 60; + + if (hours) { + if (hours > 9) + return String::format("%s%02d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds); + return String::format("%s%01d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds); + } + + return String::format("%s%02d:%02d", (time < 0 ? "-" : ""), minutes, seconds); +} + +void FullscreenVideoController::draw() +{ + HDC windowDC = GetDC(m_hudWindow); + HDC bitmapDC = CreateCompatibleDC(windowDC); + ::ReleaseDC(m_hudWindow, windowDC); + SelectObject(bitmapDC, m_bitmap.get()); + + GraphicsContext context(bitmapDC, true); + + context.save(); + + // Draw the background + IntSize outerRadius(borderRadius, borderRadius); + IntRect outerRect(0, 0, windowWidth, windowHeight); + IntSize innerRadius(borderRadius - borderThickness, borderRadius - borderThickness); + IntRect innerRect(borderThickness, borderThickness, windowWidth - borderThickness * 2, windowHeight - borderThickness * 2); + + context.fillRoundedRect(outerRect, outerRadius, outerRadius, outerRadius, outerRadius, Color(borderColor), DeviceColorSpace); + context.setCompositeOperation(CompositeCopy); + context.fillRoundedRect(innerRect, innerRadius, innerRadius, innerRadius, innerRadius, Color(backgroundColor), DeviceColorSpace); + + // Draw the widgets + m_playPauseButton.draw(context); + m_volumeUpButton.draw(context); + m_volumeSliderButton.draw(context); + m_volumeDownButton.draw(context); + m_timeSliderButton.draw(context); + m_exitFullscreenButton.draw(context); + m_volumeSlider.draw(context); + m_timeSlider.draw(context); + + // Draw the text strings + FontDescription desc; + + NONCLIENTMETRICS metrics; + metrics.cbSize = sizeof(metrics); + SystemParametersInfo(SPI_GETNONCLIENTMETRICS, metrics.cbSize, &metrics, 0); + FontFamily family; + family.setFamily(metrics.lfSmCaptionFont.lfFaceName); + desc.setFamily(family); + + desc.setComputedSize(textSize); + Font font = Font(desc, 0, 0); + font.update(0); + + String s; + + // The y positioning of these two text strings is tricky because they are so small. They + // are currently positioned relative to the center of the slider and then down the font + // height / 4 (which is actually half of font height /2), which positions the center of + // the text at the center of the slider. + // Left string + s = timeToString(currentTime()); + TextRun leftText(s); + context.setFillColor(Color(textColor), DeviceColorSpace); + context.drawText(font, leftText, IntPoint(windowWidth / 2 - timeSliderWidth / 2 - margin - font.width(leftText), windowHeight - margin - sliderHeight / 2 + font.height() / 4)); + + // Right string + s = timeToString(currentTime() - duration()); + TextRun rightText(s); + context.setFillColor(Color(textColor), DeviceColorSpace); + context.drawText(font, rightText, IntPoint(windowWidth / 2 + timeSliderWidth / 2 + margin, windowHeight - margin - sliderHeight / 2 + font.height() / 4)); + + // Copy to the window + BLENDFUNCTION blendFunction = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA}; + SIZE size = { windowWidth, windowHeight }; + POINT sourcePoint = {0, 0}; + POINT destPoint = { m_hudPosition.x(), m_hudPosition.y() }; + BOOL result = UpdateLayeredWindow(m_hudWindow, 0, &destPoint, &size, bitmapDC, &sourcePoint, 0, &blendFunction, ULW_ALPHA); + + context.restore(); + + ::DeleteDC(bitmapDC); +} + +LRESULT FullscreenVideoController::hudWndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + LONG_PTR longPtr = GetWindowLongPtr(wnd, 0); + FullscreenVideoController* controller = reinterpret_cast<FullscreenVideoController*>(longPtr); + if (!controller) + return DefWindowProc(wnd, message, wParam, lParam); + + switch (message) { + case WM_CHAR: + controller->onChar(wParam); + break; + case WM_LBUTTONDOWN: + controller->onMouseDown(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + case WM_MOUSEMOVE: + controller->onMouseMove(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + case WM_LBUTTONUP: + controller->onMouseUp(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + } + + return DefWindowProc(wnd, message, wParam, lParam); +} + +void FullscreenVideoController::onChar(int c) +{ + if (c == VK_ESCAPE) { + if (m_mediaElement) + m_mediaElement->exitFullscreen(); + } else if (c == VK_SPACE) + togglePlay(); +} + +void FullscreenVideoController::timerFired(Timer<FullscreenVideoController>*) +{ + // Update the time slider + m_timeSlider.setValue(currentTime() / duration()); + draw(); +} + +void FullscreenVideoController::onMouseDown(const IntPoint& point) +{ + IntPoint convertedPoint(fullScreenToHUDCoordinates(point)); + + // Don't bother hit testing if we're outside the bounds of the window + if (convertedPoint.x() < 0 || convertedPoint.x() >= windowWidth || convertedPoint.y() < 0 || convertedPoint.y() >= windowHeight) + return; + + m_hitWidget = 0; + m_movingWindow = false; + + if (m_playPauseButton.hitTest(convertedPoint)) + m_hitWidget = &m_playPauseButton; + else if (m_exitFullscreenButton.hitTest(convertedPoint)) + m_hitWidget = &m_exitFullscreenButton; + else if (m_volumeUpButton.hitTest(convertedPoint)) + m_hitWidget = &m_volumeUpButton; + else if (m_volumeDownButton.hitTest(convertedPoint)) + m_hitWidget = &m_volumeDownButton; + else if (m_volumeSlider.hitTest(convertedPoint)) { + m_hitWidget = &m_volumeSlider; + m_volumeSlider.drag(convertedPoint, true); + setVolume(m_volumeSlider.value()); + } else if (m_timeSlider.hitTest(convertedPoint)) { + m_hitWidget = &m_timeSlider; + m_timeSlider.drag(convertedPoint, true); + beginScrubbing(); + setCurrentTime(m_timeSlider.value() * duration()); + } + + // If we did not pick any of our widgets we are starting a window move + if (!m_hitWidget) { + m_moveOffset = convertedPoint; + m_movingWindow = true; + } + + draw(); +} + +void FullscreenVideoController::onMouseMove(const IntPoint& point) +{ + IntPoint convertedPoint(fullScreenToHUDCoordinates(point)); + + if (m_hitWidget) { + m_hitWidget->drag(convertedPoint, false); + if (m_hitWidget == &m_volumeSlider) + setVolume(m_volumeSlider.value()); + else if (m_hitWidget == &m_timeSlider) + setCurrentTime(m_timeSlider.value() * duration()); + draw(); + } else if (m_movingWindow) + m_hudPosition.move(convertedPoint.x() - m_moveOffset.x(), convertedPoint.y() - m_moveOffset.y()); +} + +void FullscreenVideoController::onMouseUp(const IntPoint& point) +{ + IntPoint convertedPoint(fullScreenToHUDCoordinates(point)); + m_movingWindow = false; + + if (m_hitWidget) { + if (m_hitWidget == &m_playPauseButton && m_playPauseButton.hitTest(convertedPoint)) + togglePlay(); + else if (m_hitWidget == &m_volumeUpButton && m_volumeUpButton.hitTest(convertedPoint)) { + setVolume(1); + m_volumeSlider.setValue(1); + } else if (m_hitWidget == &m_volumeDownButton && m_volumeDownButton.hitTest(convertedPoint)) { + setVolume(0); + m_volumeSlider.setValue(0); + } else if (m_hitWidget == &m_timeSlider) + endScrubbing(); + else if (m_hitWidget == &m_exitFullscreenButton && m_exitFullscreenButton.hitTest(convertedPoint)) { + m_hitWidget = 0; + if (m_mediaElement) + m_mediaElement->exitFullscreen(); + return; + } + } + + m_hitWidget = 0; + draw(); +} + +void FullscreenVideoController::togglePlay() +{ + if (canPlay()) + play(); + else + pause(); + + m_playPauseButton.setShowAltButton(!canPlay()); + + // Run a timer while the video is playing so we can keep the time + // slider and time values up to date. + if (!canPlay()) + m_timer.startRepeating(timerInterval); + else + m_timer.stop(); + + draw(); +} + +#endif diff --git a/WebKit/win/FullscreenVideoController.h b/WebKit/win/FullscreenVideoController.h new file mode 100644 index 0000000..b39e30c --- /dev/null +++ b/WebKit/win/FullscreenVideoController.h @@ -0,0 +1,173 @@ +/* + * Copyright (C) 2010 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 FullscreenVideoController_h +#define FullscreenVideoController_h + +#if ENABLE(VIDEO) + +#include "QTMovieWin.h" + +#include <WebCore/HTMLMediaElement.h> +#include <WebCore/Image.h> +#include <WebCore/IntPoint.h> +#include <WebCore/IntSize.h> +#include <wtf/RefPtr.h> + +namespace WebCore { +class GraphicsContext; +} + +class HUDWidget { +public: + HUDWidget(const WebCore::IntRect& rect) : m_rect(rect) { } + + virtual ~HUDWidget() { } + + virtual void draw(WebCore::GraphicsContext&) = 0; + virtual void drag(const WebCore::IntPoint&, bool start) = 0; + bool hitTest(const WebCore::IntPoint& point) const { return m_rect.contains(point); } + +protected: + WebCore::IntRect m_rect; +}; + +class HUDButton : public HUDWidget { +public: + enum HUDButtonType { + NoButton, + PlayPauseButton, + TimeSliderButton, + VolumeUpButton, + VolumeSliderButton, + VolumeDownButton, + ExitFullscreenButton + }; + + HUDButton(HUDButtonType, const WebCore::IntPoint&); + ~HUDButton() { } + + virtual void draw(WebCore::GraphicsContext&); + virtual void drag(const WebCore::IntPoint&, bool start) { } + void setShowAltButton(bool b) { m_showAltButton = b; } + +private: + RefPtr<WebCore::Image> m_buttonImage; + RefPtr<WebCore::Image> m_buttonImageAlt; + HUDButtonType m_type; + bool m_showAltButton; +}; + +class HUDSlider : public HUDWidget { +public: + enum HUDSliderButtonShape { RoundButton, DiamondButton }; + + HUDSlider(HUDSliderButtonShape, int buttonSize, const WebCore::IntRect& rect); + ~HUDSlider() { } + + virtual void draw(WebCore::GraphicsContext&); + virtual void drag(const WebCore::IntPoint&, bool start); + float value() const { return static_cast<float>(m_buttonPosition) / (m_rect.width() - m_buttonSize); } + void setValue(float value) { m_buttonPosition = static_cast<int>(value * (m_rect.width() - m_buttonSize)); } + +private: + HUDSliderButtonShape m_buttonShape; + int m_buttonSize; + int m_buttonPosition; + int m_dragStartOffset; +}; + +class FullscreenVideoController : QTMovieWinFullscreenClient, public Noncopyable { +public: + FullscreenVideoController(); + virtual ~FullscreenVideoController(); + + void setMediaElement(WebCore::HTMLMediaElement*); + WebCore::HTMLMediaElement* mediaElement() const { return m_mediaElement.get(); } + + void enterFullscreen(); + void exitFullscreen(); + +private: + // QTMovieWinFullscreenClient + virtual LRESULT fullscreenClientWndProc(HWND, UINT message, WPARAM, LPARAM); + + void ensureWindow(); + QTMovieWin* movie() const; + + bool canPlay() const; + void play(); + void pause(); + float volume() const; + void setVolume(float); + float currentTime() const; + void setCurrentTime(float); + float duration() const; + void beginScrubbing(); + void endScrubbing(); + + WebCore::IntPoint fullScreenToHUDCoordinates(const WebCore::IntPoint& point) const + { + return WebCore::IntPoint(point.x()- m_hudPosition.x(), point.y() - m_hudPosition.y()); + } + + static void registerHUDWindowClass(); + static LRESULT CALLBACK hudWndProc(HWND, UINT message, WPARAM, LPARAM); + void createHUDWindow(); + void timerFired(WebCore::Timer<FullscreenVideoController>*); + + void togglePlay(); + void draw(); + + void onChar(int c); + void onMouseDown(const WebCore::IntPoint&); + void onMouseMove(const WebCore::IntPoint&); + void onMouseUp(const WebCore::IntPoint&); + + RefPtr<WebCore::HTMLMediaElement> m_mediaElement; + + HWND m_hudWindow, m_videoWindow; + OwnPtr<HBITMAP> m_bitmap; + WebCore::IntSize m_fullscreenSize; + WebCore::IntPoint m_hudPosition; + + HUDButton m_playPauseButton; + HUDButton m_timeSliderButton; + HUDButton m_volumeUpButton; + HUDButton m_volumeSliderButton; + HUDButton m_volumeDownButton; + HUDButton m_exitFullscreenButton; + HUDSlider m_volumeSlider; + HUDSlider m_timeSlider; + + HUDWidget* m_hitWidget; + WebCore::IntPoint m_moveOffset; + bool m_movingWindow; + WebCore::Timer<FullscreenVideoController> m_timer; +}; + +#endif + +#endif // FullscreenVideoController_h diff --git a/WebKit/win/Interfaces/AccessibleComparable.idl b/WebKit/win/Interfaces/AccessibleComparable.idl new file mode 100644 index 0000000..710e0d1 --- /dev/null +++ b/WebKit/win/Interfaces/AccessibleComparable.idl @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2010 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 + +import "oleacc.idl"; + +cpp_quote("extern const GUID __declspec(selectany) SID_AccessibleComparable = { 0x62b8cb5f, 0xfb7a, 0x4faf, 0x81, 0xe8, 0x52, 0xb6, 0x5f, 0x12, 0x8b, 0x31 };") + +[ + object, + uuid(4f0381ad-dab3-42ad-9ca2-a85b0ae041c0), + hidden, + dual, + pointer_default(unique) +] +interface IAccessibleComparable : IAccessible +{ + HRESULT isSameObject([in] IAccessibleComparable* other, [out, retval] BOOL* result); +} diff --git a/WebKit/win/Interfaces/IWebError.idl b/WebKit/win/Interfaces/IWebError.idl index 4353ac6..e4a4ae9 100644 --- a/WebKit/win/Interfaces/IWebError.idl +++ b/WebKit/win/Interfaces/IWebError.idl @@ -99,6 +99,15 @@ enum { WebKitErrorJavaUnavailable = 202, }; +/*! + @enum + @abstract Geolocation errors + @constant WebKitErrorGeolocationLocationUnknown +*/ +enum { + WebKitErrorGeolocationLocationUnknown = 300, +}; + cpp_quote("#define WebKitErrorMIMETypeKey TEXT(\"WebKitErrorMIMETypeKey\")") cpp_quote("#define WebKitErrorPlugInNameKey TEXT(\"WebKitErrorPlugInNameKey\")") cpp_quote("#define WebKitErrorPlugInPageURLStringKey TEXT(\"WebKitErrorPlugInPageURLStringKey\")") diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl index 3ba71c8..ef1c133 100755 --- a/WebKit/win/Interfaces/IWebFramePrivate.idl +++ b/WebKit/win/Interfaces/IWebFramePrivate.idl @@ -89,7 +89,6 @@ interface IWebFramePrivate : IUnknown HRESULT pauseAnimation([in] BSTR animationName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning); HRESULT pauseTransition([in] BSTR propertyName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* transitionWasRunning); - HRESULT pauseSVGAnimation([in] BSTR elementId, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning); HRESULT numberOfActiveAnimations([out, retval] UINT* number); HRESULT isDisplayingStandaloneImage([out, retval] BOOL* result); @@ -101,4 +100,6 @@ interface IWebFramePrivate : IUnknown [local] JSGlobalContextRef globalContextForScriptWorld([in] IWebScriptWorld*); HRESULT counterValueForElementById([in] BSTR id, [out, retval] BSTR* result); + + HRESULT pauseSVGAnimation([in] BSTR elementId, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning); } diff --git a/WebKit/win/Interfaces/IWebGeolocationPolicyListener.idl b/WebKit/win/Interfaces/IWebGeolocationPolicyListener.idl new file mode 100644 index 0000000..54b00bd --- /dev/null +++ b/WebKit/win/Interfaces/IWebGeolocationPolicyListener.idl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2010 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. 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 INC. 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 + +[ + object, + oleautomation, + uuid(1300A76E-26DF-4BED-B79F-3930D7A4202F), + pointer_default(unique) +] +interface IWebGeolocationPolicyListener : IUnknown +{ + HRESULT allow(); + HRESULT deny(); +} diff --git a/WebKit/win/Interfaces/IWebGeolocationPosition.idl b/WebKit/win/Interfaces/IWebGeolocationPosition.idl new file mode 100644 index 0000000..c8f8eb4 --- /dev/null +++ b/WebKit/win/Interfaces/IWebGeolocationPosition.idl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2010 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. 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 INC. 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 + +[ + object, + oleautomation, + uuid(8C92A6B9-4CBB-4626-A596-24C1B47D7CC7), + pointer_default(unique) +] +interface IWebGeolocationPosition : IUnknown +{ + HRESULT initWithTimestamp([in] double timestamp, [in] double latitude, [in] double longitude, [in] double accuracy); +} diff --git a/WebKit/win/Interfaces/IWebGeolocationProvider.idl b/WebKit/win/Interfaces/IWebGeolocationProvider.idl new file mode 100644 index 0000000..9a8cb32 --- /dev/null +++ b/WebKit/win/Interfaces/IWebGeolocationProvider.idl @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2010 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. 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 INC. 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 IWebView; +interface IWebGeolocationPosition; + +[ + object, + oleautomation, + uuid(47F4CCF6-963D-4306-BE0B-8205C94672B5), + pointer_default(unique) +] +interface IWebGeolocationProvider : IUnknown +{ + HRESULT registerWebView([in] IWebView* webView); + HRESULT unregisterWebView([in] IWebView* webView); + HRESULT lastPosition([out, retval] IWebGeolocationPosition** lastPosition); +} diff --git a/WebKit/win/Interfaces/IWebHTMLRepresentation.idl b/WebKit/win/Interfaces/IWebHTMLRepresentation.idl index 7fbd451..ff39c0a 100644 --- a/WebKit/win/Interfaces/IWebHTMLRepresentation.idl +++ b/WebKit/win/Interfaces/IWebHTMLRepresentation.idl @@ -95,11 +95,17 @@ interface IWebHTMLRepresentation : IUnknown /* - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element; + Deprecated: use the variant that includes resultDistance and resultIsInCellAbove instead. */ - HRESULT searchForLabels([in, size_is(cLabels)] BSTR* labels, [in] int cLabels, [in] IDOMElement* beforeElement, [out, retval] BSTR* result); + HRESULT deprecatedSearchForLabels([in, size_is(cLabels)] BSTR* labels, [in] int cLabels, [in] IDOMElement* beforeElement, [out, retval] BSTR* result); /* - (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element; */ HRESULT matchLabels([in, size_is(cLabels)] BSTR* labels, [in] int cLabels, [in] IDOMElement* againstElement, [out, retval] BSTR* result); + + /* + - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element resultDistance:(NSUInteger*)outDistance resultIsInCellAbove:(BOOL*)outIsInCellAbove; + */ + HRESULT searchForLabels([in, size_is(cLabels)] BSTR* labels, [in] unsigned cLabels, [in] IDOMElement* beforeElement, [out] unsigned* resultDistance, [out] BOOL* resultIsInCellAbove, [out, retval] BSTR* result); } diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl index bec70e2..1293fb8 100644 --- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl +++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl @@ -91,4 +91,10 @@ interface IWebPreferencesPrivate : IUnknown HRESULT setPluginAllowedRunTime([in] UINT allowedRunTime); HRESULT pluginAllowedRunTime([out, retval] UINT* allowedRunTime); + + HRESULT setAcceleratedCompositingEnabled([in] BOOL); + HRESULT acceleratedCompositingEnabled([out, retval] BOOL*); + + HRESULT setCustomDragCursorsEnabled([in] BOOL); + HRESULT customDragCursorsEnabled([out, retval] BOOL*); } diff --git a/WebKit/win/Interfaces/IWebScriptWorld.idl b/WebKit/win/Interfaces/IWebScriptWorld.idl index 255255c..bd8012d 100644 --- a/WebKit/win/Interfaces/IWebScriptWorld.idl +++ b/WebKit/win/Interfaces/IWebScriptWorld.idl @@ -25,6 +25,7 @@ #ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +import "JavaScriptCoreAPITypes.idl"; #endif [ @@ -35,4 +36,5 @@ import "ocidl.idl"; ] interface IWebScriptWorld : IUnknown { HRESULT standardWorld([out, retval] IWebScriptWorld**); + [local] HRESULT scriptWorldForGlobalContext([in] JSGlobalContextRef, [out, retval] IWebScriptWorld**); } diff --git a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl index e09aac4..ce00430 100755 --- a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl +++ b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl @@ -26,6 +26,7 @@ #ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +import "IWebGeolocationPolicyListener.idl"; import "IWebSecurityOrigin.idl"; import "IWebView.idl"; #endif @@ -37,6 +38,7 @@ cpp_quote("#define WebEmbeddedViewMIMETypeKey TEXT(\"WebEmbeddedViewMIMETypeKey\ interface IWebEmbeddedView; interface IWebFrame; +interface IWebGeolocationPolicyListener; interface IWebSecurityOrigin; interface IWebView; @@ -94,4 +96,6 @@ interface IWebUIDelegatePrivate2 : IWebUIDelegatePrivate HRESULT createWebViewWithRequest([in] IWebView* sender, [in] IWebURLRequest* request, [in] IPropertyBag* windowFeatures, [out, retval] IWebView** newWebView); HRESULT drawBackground([in] IWebView* sender, [in] OLE_HANDLE hdc, [in] const RECT* dirtyRect); + + HRESULT decidePolicyForGeolocationRequest([in] IWebView* sender, [in] IWebFrame* frame, [in] IWebSecurityOrigin* origin, [in] IWebGeolocationPolicyListener* listener); } diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl index 1c8cea2..7ab2304 100644 --- a/WebKit/win/Interfaces/IWebViewPrivate.idl +++ b/WebKit/win/Interfaces/IWebViewPrivate.idl @@ -219,4 +219,11 @@ interface IWebViewPrivate : IUnknown HRESULT isNodeHaltedPlugin([in] IDOMNode*, [retval, out] BOOL*); HRESULT restartHaltedPluginForNode([in] IDOMNode*); HRESULT hasPluginForNodeBeenHalted([in] IDOMNode*, [retval, out] BOOL*); + + HRESULT setGeolocationProvider([in] IWebGeolocationProvider* locationProvider); + HRESULT geolocationProvider([out, retval] IWebGeolocationProvider** locationProvider); + HRESULT geolocationDidChangePosition([in] IWebGeolocationPosition* position); + HRESULT geolocationDidFailWithError([in] IWebError* error); + + HRESULT setDomainRelaxationForbiddenForURLScheme([in] BOOL forbidden, [in] BSTR scheme); } diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl index 7b308db..94dc697 100644 --- a/WebKit/win/Interfaces/WebKit.idl +++ b/WebKit/win/Interfaces/WebKit.idl @@ -45,7 +45,7 @@ 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(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.") cpp_quote(" */") #include "autoversion.h" @@ -55,6 +55,7 @@ cpp_quote(" */") import "oaidl.idl"; import "ocidl.idl"; +#include "AccessibleComparable.idl" #include "WebScrollbarTypes.idl" #include "JavaScriptCoreAPITypes.idl" #include "IWebScriptObject.idl" @@ -88,6 +89,9 @@ import "ocidl.idl"; #include "IWebFrameLoadDelegatePrivate2.idl" #include "IWebFramePrivate.idl" #include "IWebFrameView.idl" +#include "IWebGeolocationPolicyListener.idl" +#include "IWebGeolocationPosition.idl" +#include "IWebGeolocationProvider.idl" #include "IWebHTMLRepresentation.idl" #include "IWebHTTPURLResponse.idl" #include "IWebHistory.idl" @@ -284,4 +288,10 @@ library WebKit coclass WebSerializedJSValue { [default] interface IWebSerializedJSValue; } + + [uuid(67712611-83CF-4703-89FC-07A0E2A19C0D)] + coclass WebGeolocationPosition { + [default] interface IWebGeolocationPosition; + } } + diff --git a/WebKit/win/WebCoreLocalizedStrings.cpp b/WebKit/win/WebCoreLocalizedStrings.cpp index 9ee22db..5850605 100644 --- a/WebKit/win/WebCoreLocalizedStrings.cpp +++ b/WebKit/win/WebCoreLocalizedStrings.cpp @@ -28,6 +28,7 @@ #include <WebCore/IntSize.h> #include <WebCore/LocalizedStrings.h> #include <WebCore/PlatformString.h> +#include <wtf/MathExtras.h> #include <wtf/RetainPtr.h> using namespace WebCore; @@ -91,6 +92,8 @@ String WebCore::AXTextFieldActionVerb() { return String(LPCTSTR_UI_STRING("activ 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::AXMenuListActionVerb() { return String(LPCTSTR_UI_STRING("open", "Verb stating the action that will occur when a select element is clicked, as used by accessibility")); } +String WebCore::AXMenuListPopupActionVerb() { return String(LPCTSTR_UI_STRING("press", "Verb stating the action that will occur when a select element's popup list 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")); } diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp index 6e82caf..a1bb3a8 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp +++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp @@ -30,6 +30,7 @@ #include "COMVariantSetter.h" #include "WebElementPropertyBag.h" #include "WebFrame.h" +#include "WebGeolocationPolicyListener.h" #include "WebHistory.h" #include "WebMutableURLRequest.h" #include "WebDesktopNotificationsDelegate.h" @@ -44,6 +45,8 @@ #include <WebCore/FloatRect.h> #include <WebCore/FrameLoadRequest.h> #include <WebCore/FrameView.h> +#include <WebCore/Geolocation.h> +#include <WebCore/HTMLNames.h> #include <WebCore/LocalizedStrings.h> #include <WebCore/NotImplemented.h> #include <WebCore/Page.h> @@ -748,10 +751,27 @@ bool WebChromeClient::setCursor(PlatformCursorHandle cursor) return true; } -void WebChromeClient::requestGeolocationPermissionForFrame(Frame*, Geolocation*) +void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation) { - // See the comment in WebCore/page/ChromeClient.h - notImplemented(); + COMPtr<IWebUIDelegate> uiDelegate; + if (FAILED(m_webView->uiDelegate(&uiDelegate))) { + geolocation->setIsAllowed(false); + return; + } + + COMPtr<IWebUIDelegatePrivate2> uiDelegatePrivate2(Query, uiDelegate); + if (!uiDelegatePrivate2) { + geolocation->setIsAllowed(false); + return; + } + + COMPtr<WebSecurityOrigin> origin(AdoptCOM, WebSecurityOrigin::createInstance(frame->document()->securityOrigin())); + COMPtr<WebGeolocationPolicyListener> listener = WebGeolocationPolicyListener::createInstance(geolocation); + HRESULT hr = uiDelegatePrivate2->decidePolicyForGeolocationRequest(m_webView, kit(frame), origin.get(), listener.get()); + if (hr != E_NOTIMPL) + return; + + geolocation->setIsAllowed(false); } #if USE(ACCELERATED_COMPOSITING) @@ -773,3 +793,23 @@ COMPtr<IWebUIDelegate> WebChromeClient::uiDelegate() m_webView->uiDelegate(&delegate); return delegate; } + +#if ENABLE(VIDEO) + +bool WebChromeClient::supportsFullscreenForNode(const Node* node) +{ + return node->hasTagName(HTMLNames::videoTag); +} + +void WebChromeClient::enterFullscreenForNode(Node* node) +{ + m_webView->enterFullscreenForNode(node); +} + +void WebChromeClient::exitFullscreenForNode(Node*) +{ + m_webView->exitFullscreen(); +} + +#endif + diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h index e0c59ae..5198e7c 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.h +++ b/WebKit/win/WebCoreSupport/WebChromeClient.h @@ -147,6 +147,12 @@ public: virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); +#if ENABLE(VIDEO) + virtual bool supportsFullscreenForNode(const WebCore::Node*); + virtual void enterFullscreenForNode(WebCore::Node*); + virtual void exitFullscreenForNode(WebCore::Node*); +#endif + #if ENABLE(NOTIFICATIONS) virtual WebCore::NotificationPresenter* notificationPresenter() const { return reinterpret_cast<WebCore::NotificationPresenter*>(m_notificationsDelegate.get()); } #endif diff --git a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp index ca3a6c4..241c35d 100644 --- a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp +++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp @@ -30,15 +30,14 @@ #include "WebLocalizableStrings.h" #include "WebView.h" -#pragma warning(push, 0) #include <WebCore/ContextMenu.h> #include <WebCore/Event.h> +#include <WebCore/Frame.h> #include <WebCore/FrameLoader.h> #include <WebCore/FrameLoadRequest.h> #include <WebCore/Page.h> #include <WebCore/ResourceRequest.h> #include <WebCore/NotImplemented.h> -#pragma warning(pop) #include <tchar.h> diff --git a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp index f822bfe..3f6eb07 100644 --- a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp +++ b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp @@ -33,6 +33,8 @@ #include "WebSecurityOrigin.h" #include "WebView.h" #include <WebCore/BString.h> +#include <WebCore/Document.h> +#include <WebCore/KURL.h> #if ENABLE(NOTIFICATIONS) @@ -170,10 +172,10 @@ void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin* origin, notificationDelegate()->requestNotificationPermission(org); } -NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(SecurityOrigin* origin) +NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL& url, Document*) { int out = 0; - BString org(origin->toString()); + BString org(SecurityOrigin::create(url)->toString()); if (hasNotificationDelegate()) notificationDelegate()->checkNotificationPermission(org, &out); return (NotificationPresenter::Permission) out; diff --git a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h index 00c00d5..d30b1e7 100644 --- a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h +++ b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h @@ -36,6 +36,11 @@ interface IWebDesktopNotificationPresenter; +namespace WebCore { +class Document; +class KURL; +} + class WebDesktopNotificationsDelegate : public WebCore::NotificationPresenter { public: WebDesktopNotificationsDelegate(WebView* view); @@ -45,7 +50,7 @@ public: virtual void cancel(WebCore::Notification* object); virtual void notificationObjectDestroyed(WebCore::Notification* object); virtual void requestPermission(WebCore::SecurityOrigin* origin, PassRefPtr<WebCore::VoidCallback> callback); - virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::SecurityOrigin* origin); + virtual WebCore::NotificationPresenter::Permission checkPermission(const KURL& url, Document* document); private: bool hasNotificationDelegate(); diff --git a/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp new file mode 100644 index 0000000..db5ed90 --- /dev/null +++ b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2010 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. 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 INC. 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 "WebKitDLL.h" +#include "WebGeolocationControllerClient.h" + +#include "WebGeolocationPosition.h" +#include "WebView.h" + +using namespace WebCore; + +WebGeolocationControllerClient::WebGeolocationControllerClient(WebView* webView) + : m_webView(webView) +{ +} + +void WebGeolocationControllerClient::geolocationDestroyed() +{ + delete this; +} + +void WebGeolocationControllerClient::startUpdating() +{ + COMPtr<IWebGeolocationProvider> provider; + if (FAILED(m_webView->geolocationProvider(&provider))) + return; + provider->registerWebView(m_webView.get()); +} + +void WebGeolocationControllerClient::stopUpdating() +{ + COMPtr<IWebGeolocationProvider> provider; + if (FAILED(m_webView->geolocationProvider(&provider))) + return; + provider->registerWebView(m_webView.get()); +} + +GeolocationPosition* WebGeolocationControllerClient::lastPosition() +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + COMPtr<IWebGeolocationProvider> provider; + if (FAILED(m_webView->geolocationProvider(&provider))) + return 0; + COMPtr<IWebGeolocationPosition> position; + if (FAILED(provider->lastPosition(&position))) + return 0; + return core(position.get()); +#else + return 0; +#endif +} diff --git a/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.h b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.h new file mode 100644 index 0000000..ec0bef7 --- /dev/null +++ b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2010 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. 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 INC. 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 WebGeolocationControllerClient_h +#define WebGeolocationControllerClient_h + +#include "COMPtr.h" +#include <WebCore/GeolocationControllerClient.h> + +namespace WebCore { + class GeolocationPosition; +} + +class WebView; + +class WebGeolocationControllerClient : public WebCore::GeolocationControllerClient { +public: + WebGeolocationControllerClient(WebView*); + + virtual void geolocationDestroyed(); + virtual void startUpdating(); + virtual void stopUpdating(); + virtual WebCore::GeolocationPosition* lastPosition(); + +private: + COMPtr<WebView> m_webView; +}; + +#endif // WebGeolocationControllerClient_h diff --git a/WebKit/win/WebDataSource.cpp b/WebKit/win/WebDataSource.cpp index 6414bda..4ec1fd3 100644 --- a/WebKit/win/WebDataSource.cpp +++ b/WebKit/win/WebDataSource.cpp @@ -38,14 +38,12 @@ #include "WebMutableURLRequest.h" #include "WebResource.h" #include "WebURLResponse.h" - -#pragma warning(push, 0) #include <WebCore/BString.h> #include <WebCore/DocLoader.h> #include <WebCore/Document.h> +#include <WebCore/Frame.h> #include <WebCore/FrameLoader.h> #include <WebCore/KURL.h> -#pragma warning(pop) using namespace WebCore; diff --git a/WebKit/win/WebDropSource.cpp b/WebKit/win/WebDropSource.cpp index 294c337..8cf0588 100644 --- a/WebKit/win/WebDropSource.cpp +++ b/WebKit/win/WebDropSource.cpp @@ -29,9 +29,11 @@ #include "WebKitDLL.h" #include "WebView.h" +#include <WebCore/Cursor.h> #include <WebCore/DragActions.h> #include <WebCore/EventHandler.h> #include <WebCore/Frame.h> +#include <WebCore/FrameView.h> #include <WebCore/Page.h> #include <WebCore/PlatformMouseEvent.h> #include <wtf/CurrentTime.h> @@ -112,7 +114,43 @@ STDMETHODIMP WebDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyS return S_OK; } -STDMETHODIMP WebDropSource::GiveFeedback(DWORD) +STDMETHODIMP WebDropSource::GiveFeedback(DWORD dwEffect) { - return DRAGDROP_S_USEDEFAULTCURSORS; + BOOL showCustomCursors; + if (FAILED(WebPreferences::sharedStandardPreferences()->customDragCursorsEnabled(&showCustomCursors))) + return DRAGDROP_S_USEDEFAULTCURSORS; + + // If we don't want to hide the stop icon, let Windows select the cursor. + if (!showCustomCursors) + return DRAGDROP_S_USEDEFAULTCURSORS; + + // If we are going to show something other than the not allowed arrow, then let Windows + // show the cursor. + if (dwEffect != DROPEFFECT_NONE) + return DRAGDROP_S_USEDEFAULTCURSORS; + + HWND viewWindow; + if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow)))) + return DRAGDROP_S_USEDEFAULTCURSORS; + + RECT webViewRect; + GetWindowRect(viewWindow, &webViewRect); + + POINT cursorPoint; + GetCursorPos(&cursorPoint); + + if (!PtInRect(&webViewRect, cursorPoint)) { + // If our cursor is outside the bounds of the webView, we want to let Windows select the cursor. + return DRAGDROP_S_USEDEFAULTCURSORS; + } + + FrameView* view = m_webView->page()->mainFrame()->view(); + if (!view) + return DRAGDROP_S_USEDEFAULTCURSORS; + + // When dragging inside a WebView and the drag is not allowed, don't show the not allowed icon, + // instead, show the pointer cursor. + // FIXME <rdar://7577595>: Custom cursors aren't supported during drag and drop (default to pointer). + view->setCursor(pointerCursor()); + return S_OK; } diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp index 9063fde..c0c1601 100644 --- a/WebKit/win/WebFrame.cpp +++ b/WebKit/win/WebFrame.cpp @@ -1278,13 +1278,17 @@ HRESULT WebFrame::elementIsPassword(IDOMElement *element, bool *result) return S_OK; } -HRESULT WebFrame::searchForLabelsBeforeElement(const BSTR* labels, int cLabels, IDOMElement* beforeElement, BSTR* result) +HRESULT WebFrame::searchForLabelsBeforeElement(const BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* outResultDistance, BOOL* outResultIsInCellAbove, BSTR* result) { if (!result) { ASSERT_NOT_REACHED(); return E_POINTER; } + if (outResultDistance) + *outResultDistance = 0; + if (outResultIsInCellAbove) + *outResultIsInCellAbove = FALSE; *result = 0; if (!cLabels) @@ -1303,11 +1307,18 @@ HRESULT WebFrame::searchForLabelsBeforeElement(const BSTR* labels, int cLabels, if (!coreElement) return E_FAIL; - String label = coreFrame->searchForLabelsBeforeElement(labelStrings, coreElement); + size_t resultDistance; + bool resultIsInCellAbove; + String label = coreFrame->searchForLabelsBeforeElement(labelStrings, coreElement, &resultDistance, &resultIsInCellAbove); *result = SysAllocStringLen(label.characters(), label.length()); if (label.length() && !*result) return E_OUTOFMEMORY; + if (outResultDistance) + *outResultDistance = resultDistance; + if (outResultIsInCellAbove) + *outResultIsInCellAbove = resultIsInCellAbove; + return S_OK; } @@ -1952,6 +1963,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::getPrintedPageCount( return S_OK; } +#if PLATFORM(CG) void WebFrame::drawHeader(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, float headerHeight) { int x = pageRect.x(); @@ -1968,7 +1980,6 @@ void WebFrame::drawFooter(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, con ui->drawFooterInRect(d->webView, &footerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(pctx)), page+1, pageCount); } -#if PLATFORM(CG) void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCtx, HDC printDC, IWebUIDelegate* ui, float headerHeight, float footerHeight, UINT page, UINT pageCount) { Frame* coreFrame = core(this); @@ -1985,7 +1996,6 @@ void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCt CGContextBeginPage(pctx, &mediaBox); - // FIXME: Could some of this coordinate space manipulation be shared with Cairo? CGFloat scale = static_cast<float>(mediaBox.size.width)/static_cast<float>(pageRect.width()); CGAffineTransform ctm = CGContextGetBaseCTM(pctx); ctm = CGAffineTransformScale(ctm, -scale, -scale); @@ -2008,29 +2018,72 @@ void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCt CGContextRestoreGState(pctx); } #elif PLATFORM(CAIRO) +static float scaleFactor(HDC printDC, const IntRect& pageRect) +{ + const IntRect& printRect = printerRect(printDC); + + float scale = static_cast<float>(printRect.width()) / static_cast<float>(pageRect.width()); + if (!scale) + scale = 1.0; + + return scale; +} + +static HDC hdcFromContext(PlatformGraphicsContext* pctx) +{ + cairo_surface_t* surface = cairo_get_target(pctx); + return cairo_win32_surface_get_dc(surface); +} + +void WebFrame::drawHeader(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, float headerHeight) +{ + HDC hdc = hdcFromContext(pctx); + + const float scale = scaleFactor(hdc, pageRect); + int x = static_cast<int>(scale * pageRect.x()); + int y = 0; + RECT headerRect = {x, y, x + static_cast<int>(scale * pageRect.width()), y + static_cast<int>(scale * headerHeight)}; + + ui->drawHeaderInRect(d->webView, &headerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(hdc))); +} + +void WebFrame::drawFooter(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, UINT page, UINT pageCount, float headerHeight, float footerHeight) +{ + HDC hdc = hdcFromContext(pctx); + + const float scale = scaleFactor(hdc, pageRect); + int x = static_cast<int>(scale * pageRect.x()); + int y = static_cast<int>(scale * max(static_cast<int>(headerHeight) + pageRect.height(), m_pageHeight-static_cast<int>(footerHeight))); + RECT footerRect = {x, y, x + static_cast<int>(scale * pageRect.width()), y + static_cast<int>(scale * footerHeight)}; + + ui->drawFooterInRect(d->webView, &footerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(hdc)), page+1, pageCount); +} + void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCtx, HDC printDC, IWebUIDelegate* ui, float headerHeight, float footerHeight, UINT page, UINT pageCount) { Frame* coreFrame = core(this); - IntRect pageRect = m_pageRects[page]; + const IntRect& pageRect = m_pageRects[page]; + IntRect marginRect = printerMarginRect(printDC); cairo_save(pctx); + float scale = scaleFactor(printDC, pageRect); + cairo_scale(pctx, scale, scale); - IntRect printRect = printerRect(printDC); - IntRect mediaBox(0, 0, printRect.width(), printRect.height()); + cairo_translate(pctx, -pageRect.x() + marginRect.x(), -pageRect.y() + marginRect.y() + headerHeight); + coreFrame->view()->paintContents(spoolCtx, pageRect); - ::StartPage(printDC); + cairo_translate(pctx, pageRect.x() - marginRect.x(), pageRect.y() - marginRect.y() - headerHeight); - // FIXME: Could some of this coordinate space manipulation be shared with CG? - float scale = static_cast<float>(mediaBox.size().width())/static_cast<float>(pageRect.width()); - cairo_scale(pctx, -scale, -scale); - cairo_translate(pctx, -pageRect.x(), -pageRect.y()+headerHeight); - cairo_scale(pctx, scale, scale); - cairo_translate(pctx, -pageRect.x(), -pageRect.y()+headerHeight); // reserves space for header + XFORM originalWorld; + ::GetWorldTransform(printDC, &originalWorld); - coreFrame->view()->paintContents(spoolCtx, pageRect); + // Position world transform to account for margin + XFORM newWorld = originalWorld; + newWorld.eDx = scale * marginRect.x(); + newWorld.eDy = scale * marginRect.y(); - cairo_translate(pctx, pageRect.x(), pageRect.y()-headerHeight); + ::SetWorldTransform(printDC, &newWorld); if (headerHeight) drawHeader(pctx, ui, pageRect, headerHeight); @@ -2038,8 +2091,10 @@ void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCt if (footerHeight) drawFooter(pctx, ui, pageRect, page, pageCount, headerHeight, footerHeight); + ::SetWorldTransform(printDC, &originalWorld); + cairo_show_page(pctx); - ::EndPage(printDC); + ASSERT(!cairo_status(pctx)); cairo_restore(pctx); } #endif @@ -2050,10 +2105,25 @@ HRESULT STDMETHODCALLTYPE WebFrame::spoolPages( /* [in] */ UINT endPage, /* [retval][out] */ void* ctx) { +#if PLATFORM(CG) if (!printDC || !ctx) { ASSERT_NOT_REACHED(); return E_POINTER; } +#elif PLATFORM(CAIRO) + if (!printDC) { + ASSERT_NOT_REACHED(); + return E_POINTER; + } + + cairo_surface_t* printSurface = cairo_win32_printing_surface_create(printDC); + ctx = cairo_create(printSurface); + if (!ctx) { + cairo_surface_destroy(printSurface); + return E_FAIL; + } + cairo_surface_set_fallback_resolution(printSurface, 72.0, 72.0); +#endif if (!m_inPrintingMode) { ASSERT_NOT_REACHED(); @@ -2089,7 +2159,14 @@ HRESULT STDMETHODCALLTYPE WebFrame::spoolPages( for (UINT ii = startPage; ii < endPage; ii++) spoolPage(pctx, &spoolCtx, printDC, ui.get(), headerHeight, footerHeight, ii, pageCount); - + +#if PLATFORM(CAIRO) + cairo_destroy(pctx); + cairo_surface_finish(printSurface); + ASSERT(!cairo_surface_status(printSurface)); + cairo_surface_destroy(printSurface); +#endif + return S_OK; } diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h index 91b8e14..1a92751 100644 --- a/WebKit/win/WebFrame.h +++ b/WebKit/win/WebFrame.h @@ -336,7 +336,7 @@ public: HRESULT formForElement(IDOMElement* element, IDOMElement** form); 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 searchForLabelsBeforeElement(const BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* resultDistance, BOOL* resultIsInCellAbove, BSTR* result); HRESULT matchLabelsAgainstElement(const BSTR* labels, int cLabels, IDOMElement* againstElement, BSTR* result); HRESULT canProvideDocumentSource(bool* result); diff --git a/WebKit/win/WebGeolocationPolicyListener.cpp b/WebKit/win/WebGeolocationPolicyListener.cpp new file mode 100644 index 0000000..d16f892 --- /dev/null +++ b/WebKit/win/WebGeolocationPolicyListener.cpp @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2010 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 "WebGeolocationPolicyListener.h" + +#include <WebCore/Geolocation.h> + +using namespace WebCore; + +// WebGeolocationPolicyListener ---------------------------------------------------------------- + +COMPtr<WebGeolocationPolicyListener> WebGeolocationPolicyListener::createInstance(PassRefPtr<Geolocation> geolocation) +{ + return new WebGeolocationPolicyListener(geolocation); +} + +WebGeolocationPolicyListener::WebGeolocationPolicyListener(PassRefPtr<Geolocation> geolocation) + : m_refCount(0) + , m_geolocation(geolocation) +{ + gClassCount++; + gClassNameCount.add("WebGeolocationPolicyListener"); +} + +WebGeolocationPolicyListener::~WebGeolocationPolicyListener() +{ + gClassCount--; + gClassNameCount.remove("WebGeolocationPolicyListener"); +} + +// IUnknown ------------------------------------------------------------------- + +HRESULT STDMETHODCALLTYPE WebGeolocationPolicyListener::QueryInterface(REFIID riid, void** ppvObject) +{ + *ppvObject = 0; + if (IsEqualIID(riid, __uuidof(IUnknown))) + *ppvObject = static_cast<IWebGeolocationPolicyListener*>(this); + else if (IsEqualIID(riid, __uuidof(IWebGeolocationPolicyListener))) + *ppvObject = static_cast<IWebGeolocationPolicyListener*>(this); + else + return E_NOINTERFACE; + + AddRef(); + return S_OK; +} + +ULONG STDMETHODCALLTYPE WebGeolocationPolicyListener::AddRef() +{ + return ++m_refCount; +} + +ULONG STDMETHODCALLTYPE WebGeolocationPolicyListener::Release() +{ + ULONG newRef = --m_refCount; + if (!newRef) + delete this; + + return newRef; +} + +// IWebPolicyDecisionListener ------------------------------------------------------------ + +HRESULT STDMETHODCALLTYPE WebGeolocationPolicyListener::allow() +{ + m_geolocation->setIsAllowed(true); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebGeolocationPolicyListener::deny() +{ + m_geolocation->setIsAllowed(false); + return S_OK; +} diff --git a/WebKit/win/WebGeolocationPolicyListener.h b/WebKit/win/WebGeolocationPolicyListener.h new file mode 100644 index 0000000..636c5f5 --- /dev/null +++ b/WebKit/win/WebGeolocationPolicyListener.h @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2010 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 WebGeolocationPolicyListener_h +#define WebGeolocationPolicyListener_h + +#include "WebKit.h" + +#include <WebCore/COMPtr.h> + +#include <WTF/PassRefPtr.h> +#include <WTF/RefPtr.h> + +namespace WebCore { + class Geolocation; +} + +class WebGeolocationPolicyListener : public IWebGeolocationPolicyListener { +public: + static COMPtr<WebGeolocationPolicyListener> createInstance(PassRefPtr<WebCore::Geolocation>); + + // IUnknown + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE Release(); + + // IWebGeolocationPolicyListener + virtual HRESULT STDMETHODCALLTYPE allow(); + virtual HRESULT STDMETHODCALLTYPE deny(); + +private: + WebGeolocationPolicyListener(PassRefPtr<WebCore::Geolocation>); + ~WebGeolocationPolicyListener(); + + ULONG m_refCount; + RefPtr<WebCore::Geolocation> m_geolocation; +}; + +#endif WebGeolocationPolicyListener_h diff --git a/WebKit/win/WebGeolocationPosition.cpp b/WebKit/win/WebGeolocationPosition.cpp new file mode 100644 index 0000000..26554dd --- /dev/null +++ b/WebKit/win/WebGeolocationPosition.cpp @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2010 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. 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 INC. 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 "WebKitDLL.h" +#include "WebGeolocationPosition.h" +#include <WebCore/COMPtr.h> + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +#include <WebCore/GeolocationPosition.h> + +using namespace WebCore; +#endif + +COMPtr<WebGeolocationPosition> WebGeolocationPosition::createInstance() +{ + return new WebGeolocationPosition; +} + +WebGeolocationPosition::WebGeolocationPosition() + : m_refCount(0) +{ + gClassCount++; + gClassNameCount.add("WebGeolocationPosition"); +} + +WebGeolocationPosition::~WebGeolocationPosition() +{ + gClassCount--; + gClassNameCount.remove("WebGeolocationPosition"); +} + +HRESULT WebGeolocationPosition::QueryInterface(REFIID riid, void** ppvObject) +{ + *ppvObject = 0; + if (IsEqualIID(riid, __uuidof(WebGeolocationPosition))) + *ppvObject = this; + else if (IsEqualIID(riid, __uuidof(IUnknown))) + *ppvObject = static_cast<IWebGeolocationPosition*>(this); + else if (IsEqualIID(riid, __uuidof(IWebGeolocationPosition))) + *ppvObject = static_cast<IWebGeolocationPosition*>(this); + else + return E_NOINTERFACE; + + AddRef(); + return S_OK; +} + +ULONG WebGeolocationPosition::AddRef() +{ + return ++m_refCount; +} + +ULONG WebGeolocationPosition::Release() +{ + ULONG newRef = --m_refCount; + if (!newRef) + delete this; + + return newRef; +} + +HRESULT WebGeolocationPosition::initWithTimestamp(double timestamp, double latitude, double longitude, double accuracy) +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + m_position = GeolocationPosition::create(timestamp, latitude, longitude, accuracy); + return S_OK; +#else + return E_FAIL; +#endif +} + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +GeolocationPosition* core(IWebGeolocationPosition* position) +{ + if (!position) + return 0; + + COMPtr<WebGeolocationPosition> webGeolocationPosition(Query, position); + if (!webGeolocationPosition) + return 0; + + return webGeolocationPosition->impl(); +} +#endif diff --git a/WebKit/win/WebGeolocationPosition.h b/WebKit/win/WebGeolocationPosition.h new file mode 100644 index 0000000..8160270 --- /dev/null +++ b/WebKit/win/WebGeolocationPosition.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2010 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. 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 INC. 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 WebGeolocationPosition_h +#define WebGeolocationPosition_h + +#include "WebKit.h" +#include <WebCore/COMPtr.h> + +namespace WebCore { + class GeolocationPosition; +}; + +class WebGeolocationPosition : public IWebGeolocationPosition { +public: + static COMPtr<WebGeolocationPosition> createInstance(); +private: + WebGeolocationPosition(); + ~WebGeolocationPosition(); + +public: + // IUnknown + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE Release(); + + // IWebGeolocationPosition + virtual HRESULT STDMETHODCALLTYPE initWithTimestamp(double timestamp, double latitude, double longitude, double accuracy); + +#if ENABLE(CLIENT_BASED_GEOLOCATION) + WebCore::GeolocationPosition* impl() const { return m_position.get(); } +#endif + +private: + ULONG m_refCount; +#if ENABLE(CLIENT_BASED_GEOLOCATION) + RefPtr<WebCore::GeolocationPosition> m_position; +#endif +}; + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +WebCore::GeolocationPosition* core(IWebGeolocationPosition*); +#endif + +#endif // WebGeolocationPosition_h diff --git a/WebKit/win/WebHTMLRepresentation.cpp b/WebKit/win/WebHTMLRepresentation.cpp index 5e5d56b..dd5813d 100644 --- a/WebKit/win/WebHTMLRepresentation.cpp +++ b/WebKit/win/WebHTMLRepresentation.cpp @@ -30,11 +30,10 @@ #include "WebKit.h" #include "WebFrame.h" #include "WebKitStatisticsPrivate.h" -#pragma warning(push, 0) #include <WebCore/BString.h> +#include <WebCore/Frame.h> #include <WebCore/HTMLInputElement.h> #include <WebCore/TextResourceDecoder.h> -#pragma warning(pop) using namespace WebCore; @@ -104,7 +103,7 @@ ULONG STDMETHODCALLTYPE WebHTMLRepresentation::Release() // IWebHTMLRepresentation -------------------------------------------------------------------- -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedMIMETypes( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedMIMETypes( /* [out][in] */ BSTR* /*types*/, /* [out][in] */ int* /*cTypes*/) { @@ -112,7 +111,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedMIMETypes( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedNonImageMIMETypes( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedNonImageMIMETypes( /* [out][in] */ BSTR* /*types*/, /* [out][in] */ int* /*cTypes*/) { @@ -120,7 +119,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedNonImageMIMETypes( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedImageMIMETypes( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedImageMIMETypes( /* [out][in] */ BSTR* /*types*/, /* [out][in] */ int* /*cTypes*/) { @@ -128,7 +127,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedImageMIMETypes( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::attributedStringFromDOMNodes( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::attributedStringFromDOMNodes( /* [in] */ IDOMNode* /*startNode*/, /* [in] */ int /*startOffset*/, /* [in] */ IDOMNode* /*endNode*/, @@ -139,7 +138,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::attributedStringFromDOMNodes( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementWithName( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementWithName( /* [in] */ BSTR name, /* [in] */ IDOMElement* form, /* [retval][out] */ IDOMElement** element) @@ -150,7 +149,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementWithName( return m_frame->elementWithName(name, form, element); } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementDoesAutoComplete( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementDoesAutoComplete( /* [in] */ IDOMElement* element, /* [retval][out] */ BOOL* result) { @@ -160,7 +159,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementDoesAutoComplete( return hr; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementIsPassword( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementIsPassword( /* [in] */ IDOMElement* element, /* [retval][out] */ BOOL* result) { @@ -170,7 +169,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementIsPassword( return hr; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::formForElement( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::formForElement( /* [in] */ IDOMElement* element, /* [retval][out] */ IDOMElement** form) { @@ -180,7 +179,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::formForElement( return m_frame->formForElement(element, form); } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::currentForm( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::currentForm( /* [retval][out] */ IDOMElement** form) { if (!m_frame) @@ -189,7 +188,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::currentForm( return m_frame->currentForm(form); } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::controlsInForm( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::controlsInForm( /* [in] */ IDOMElement* form, /* [out][in] */ IDOMElement** controls, /* [out][in] */ int* cControls) @@ -197,16 +196,16 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::controlsInForm( return m_frame->controlsInForm(form, controls, cControls); } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::searchForLabels( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::deprecatedSearchForLabels( /* [size_is][in] */ BSTR* labels, /* [in] */ int cLabels, /* [in] */ IDOMElement* beforeElement, /* [retval][out] */ BSTR* result) { - return m_frame->searchForLabelsBeforeElement(labels, cLabels, beforeElement, result); + return m_frame->searchForLabelsBeforeElement(labels, cLabels, beforeElement, 0, 0, result); } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::matchLabels( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::matchLabels( /* [size_is][in] */ BSTR* labels, /* [in] */ int cLabels, /* [in] */ IDOMElement* againstElement, @@ -215,16 +214,21 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::matchLabels( return m_frame->matchLabelsAgainstElement(labels, cLabels, againstElement, result); } +HRESULT WebHTMLRepresentation::searchForLabels(BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* resultDistance, BOOL* resultIsInCellAbove, BSTR* result) +{ + return m_frame->searchForLabelsBeforeElement(labels, cLabels, beforeElement, resultDistance, resultIsInCellAbove, result); +} + // IWebDocumentRepresentation ---------------------------------------------------------------- -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::setDataSource( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::setDataSource( /* [in] */ IWebDataSource* /*dataSource*/) { ASSERT_NOT_REACHED(); return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedData( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedData( /* [in] */ IStream* /*data*/, /* [in] */ IWebDataSource* /*dataSource*/) { @@ -232,7 +236,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedData( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedError( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedError( /* [in] */ IWebError* /*error*/, /* [in] */ IWebDataSource* /*dataSource*/) { @@ -240,14 +244,14 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedError( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::finishedLoadingWithDataSource( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::finishedLoadingWithDataSource( /* [in] */ IWebDataSource* /*dataSource*/) { ASSERT_NOT_REACHED(); return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::canProvideDocumentSource( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::canProvideDocumentSource( /* [retval][out] */ BOOL* result) { bool canProvideSource; @@ -256,7 +260,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::canProvideDocumentSource( return hr; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::documentSource( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::documentSource( /* [retval][out] */ BSTR* source) { if (!source) @@ -307,7 +311,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::documentSource( return S_OK; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::title( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::title( /* [retval][out] */ BSTR* /*docTitle*/) { ASSERT_NOT_REACHED(); diff --git a/WebKit/win/WebHTMLRepresentation.h b/WebKit/win/WebHTMLRepresentation.h index 01b8988..4d5eade 100644 --- a/WebKit/win/WebHTMLRepresentation.h +++ b/WebKit/win/WebHTMLRepresentation.h @@ -45,84 +45,87 @@ public: virtual ULONG STDMETHODCALLTYPE Release(); // IWebHTMLRepresentation - virtual HRESULT STDMETHODCALLTYPE supportedMIMETypes( + virtual HRESULT STDMETHODCALLTYPE supportedMIMETypes( /* [out][in] */ BSTR* types, /* [out][in] */ int* cTypes); - virtual HRESULT STDMETHODCALLTYPE supportedNonImageMIMETypes( + virtual HRESULT STDMETHODCALLTYPE supportedNonImageMIMETypes( /* [out][in] */ BSTR* types, /* [out][in] */ int* cTypes); - virtual HRESULT STDMETHODCALLTYPE supportedImageMIMETypes( + virtual HRESULT STDMETHODCALLTYPE supportedImageMIMETypes( /* [out][in] */ BSTR* types, /* [out][in] */ int* cTypes); - virtual HRESULT STDMETHODCALLTYPE attributedStringFromDOMNodes( + virtual HRESULT STDMETHODCALLTYPE attributedStringFromDOMNodes( /* [in] */ IDOMNode* startNode, /* [in] */ int startOffset, /* [in] */ IDOMNode* endNode, /* [in] */ int endOffset, /* [retval][out] */ IDataObject** attributedString); - virtual HRESULT STDMETHODCALLTYPE elementWithName( + virtual HRESULT STDMETHODCALLTYPE elementWithName( /* [in] */ BSTR name, /* [in] */ IDOMElement* form, /* [retval][out] */ IDOMElement** element); - virtual HRESULT STDMETHODCALLTYPE elementDoesAutoComplete( + virtual HRESULT STDMETHODCALLTYPE elementDoesAutoComplete( /* [in] */ IDOMElement* element, /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE elementIsPassword( + virtual HRESULT STDMETHODCALLTYPE elementIsPassword( /* [in] */ IDOMElement* element, /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE formForElement( + virtual HRESULT STDMETHODCALLTYPE formForElement( /* [in] */ IDOMElement* element, /* [retval][out] */ IDOMElement** form); - virtual HRESULT STDMETHODCALLTYPE currentForm( + virtual HRESULT STDMETHODCALLTYPE currentForm( /* [retval][out] */ IDOMElement** form); - virtual HRESULT STDMETHODCALLTYPE controlsInForm( + virtual HRESULT STDMETHODCALLTYPE controlsInForm( /* [in] */ IDOMElement* form, /* [out][in] */ IDOMElement** controls, /* [out][in] */ int* cControls); - virtual HRESULT STDMETHODCALLTYPE searchForLabels( + /* Deprecated. Use the variant that includes resultDistance and resultIsInCellAbove instead. */ + virtual HRESULT STDMETHODCALLTYPE deprecatedSearchForLabels( /* [size_is][in] */ BSTR *labels, /* [in] */ int cLabels, /* [in] */ IDOMElement *beforeElement, /* [retval][out] */ BSTR *result); - virtual HRESULT STDMETHODCALLTYPE matchLabels( + virtual HRESULT STDMETHODCALLTYPE matchLabels( /* [size_is][in] */ BSTR *labels, /* [in] */ int cLabels, /* [in] */ IDOMElement *againstElement, /* [retval][out] */ BSTR *result); + virtual HRESULT STDMETHODCALLTYPE searchForLabels(BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* resultDistance, BOOL* resultIsInCellAbove, BSTR* result); + // IWebDocumentRepresentation - virtual HRESULT STDMETHODCALLTYPE setDataSource( + virtual HRESULT STDMETHODCALLTYPE setDataSource( /* [in] */ IWebDataSource* dataSource); - virtual HRESULT STDMETHODCALLTYPE receivedData( + virtual HRESULT STDMETHODCALLTYPE receivedData( /* [in] */ IStream* data, /* [in] */ IWebDataSource* dataSource); - virtual HRESULT STDMETHODCALLTYPE receivedError( + virtual HRESULT STDMETHODCALLTYPE receivedError( /* [in] */ IWebError* error, /* [in] */ IWebDataSource* dataSource); - virtual HRESULT STDMETHODCALLTYPE finishedLoadingWithDataSource( + virtual HRESULT STDMETHODCALLTYPE finishedLoadingWithDataSource( /* [in] */ IWebDataSource* dataSource); - virtual HRESULT STDMETHODCALLTYPE canProvideDocumentSource( + virtual HRESULT STDMETHODCALLTYPE canProvideDocumentSource( /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE documentSource( + virtual HRESULT STDMETHODCALLTYPE documentSource( /* [retval][out] */ BSTR* source); - virtual HRESULT STDMETHODCALLTYPE title( + virtual HRESULT STDMETHODCALLTYPE title( /* [retval][out] */ BSTR* docTitle); protected: diff --git a/WebKit/win/WebKit.vcproj/DerivedSources.make b/WebKit/win/WebKit.vcproj/DerivedSources.make deleted file mode 100644 index 73648a0..0000000 --- a/WebKit/win/WebKit.vcproj/DerivedSources.make +++ /dev/null @@ -1,161 +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 puter, 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. - -PREFIX = IGEN_DOM - -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 \ - $(PREFIX)Element.idl \ - $(PREFIX)Document.idl \ - $(PREFIX)CharacterData.idl \ - $(PREFIX)CDATASection.idl \ - $(PREFIX)Comment.idl \ - $(PREFIX)Text.idl \ - $(PREFIX)DocumentFragment.idl \ - $(PREFIX)DocumentType.idl \ - $(PREFIX)DOMImplementation.idl \ - $(PREFIX)Entity.idl \ - $(PREFIX)EntityReference.idl \ - $(PREFIX)NamedNodeMap.idl \ - $(PREFIX)Notation.idl \ - $(PREFIX)ProcessingInstruction.idl \ - \ - $(PREFIX)HTMLAnchorElement.idl \ - $(PREFIX)HTMLAppletElement.idl \ - $(PREFIX)HTMLAreaElement.idl \ - $(PREFIX)HTMLBRElement.idl \ - $(PREFIX)HTMLBaseElement.idl \ - $(PREFIX)HTMLBaseFontElement.idl \ - $(PREFIX)HTMLBlockquoteElement.idl \ - $(PREFIX)HTMLBodyElement.idl \ - $(PREFIX)HTMLButtonElement.idl \ - $(PREFIX)HTMLCollection.idl \ - $(PREFIX)HTMLDListElement.idl \ - $(PREFIX)HTMLDirectoryElement.idl \ - $(PREFIX)HTMLDivElement.idl \ - $(PREFIX)HTMLDocument.idl \ - $(PREFIX)HTMLElement.idl \ - $(PREFIX)HTMLEmbedElement.idl \ - $(PREFIX)HTMLFieldSetElement.idl \ - $(PREFIX)HTMLFontElement.idl \ - $(PREFIX)HTMLFormElement.idl \ - $(PREFIX)HTMLFrameElement.idl \ - $(PREFIX)HTMLFrameSetElement.idl \ - $(PREFIX)HTMLHRElement.idl \ - $(PREFIX)HTMLHeadElement.idl \ - $(PREFIX)HTMLHeadingElement.idl \ - $(PREFIX)HTMLHtmlElement.idl \ - $(PREFIX)HTMLIFrameElement.idl \ - $(PREFIX)HTMLImageElement.idl \ - $(PREFIX)HTMLInputElement.idl \ - $(PREFIX)HTMLIsIndexElement.idl \ - $(PREFIX)HTMLLIElement.idl \ - $(PREFIX)HTMLLabelElement.idl \ - $(PREFIX)HTMLLegendElement.idl \ - $(PREFIX)HTMLLinkElement.idl \ - $(PREFIX)HTMLMapElement.idl \ - $(PREFIX)HTMLMarqueeElement.idl \ - $(PREFIX)HTMLMenuElement.idl \ - $(PREFIX)HTMLMetaElement.idl \ - $(PREFIX)HTMLModElement.idl \ - $(PREFIX)HTMLOListElement.idl \ - $(PREFIX)HTMLObjectElement.idl \ - $(PREFIX)HTMLOptGroupElement.idl \ - $(PREFIX)HTMLOptionElement.idl \ - $(PREFIX)HTMLOptionsCollection.idl \ - $(PREFIX)HTMLParagraphElement.idl \ - $(PREFIX)HTMLParamElement.idl \ - $(PREFIX)HTMLPreElement.idl \ - $(PREFIX)HTMLQuoteElement.idl \ - $(PREFIX)HTMLScriptElement.idl \ - $(PREFIX)HTMLSelectElement.idl \ - $(PREFIX)HTMLStyleElement.idl \ - $(PREFIX)HTMLTableCaptionElement.idl \ - $(PREFIX)HTMLTableCellElement.idl \ - $(PREFIX)HTMLTableColElement.idl \ - $(PREFIX)HTMLTableElement.idl \ - $(PREFIX)HTMLTableRowElement.idl \ - $(PREFIX)HTMLTableSectionElement.idl \ - $(PREFIX)HTMLTextAreaElement.idl \ - $(PREFIX)HTMLTitleElement.idl \ - $(PREFIX)HTMLUListElement.idl \ - \ - $(PREFIX)CSSCharsetRule.idl \ - $(PREFIX)CSSFontFaceRule.idl \ - $(PREFIX)CSSImportRule.idl \ - $(PREFIX)CSSMediaRule.idl \ - $(PREFIX)CSSPageRule.idl \ - $(PREFIX)CSSPrimitiveValue.idl \ - $(PREFIX)CSSRule.idl \ - $(PREFIX)CSSRuleList.idl \ - $(PREFIX)CSSStyleDeclaration.idl \ - $(PREFIX)CSSStyleRule.idl \ - $(PREFIX)CSSStyleSheet.idl \ - $(PREFIX)CSSUnknownRule.idl \ - $(PREFIX)CSSValue.idl \ - $(PREFIX)CSSValueList.idl \ - $(PREFIX)Counter.idl \ - $(PREFIX)MediaList.idl \ - $(PREFIX)Rect.idl \ - $(PREFIX)StyleSheet.idl \ - $(PREFIX)StyleSheetList.idl \ - \ - $(PREFIX)Event.idl \ - $(PREFIX)EventTarget.idl \ - $(PREFIX)EventListener.idl \ -# - -.PHONY : all -all : \ - $(GENERATED_INTERFACES) \ - $(WEBKIT_IDL) \ -# - -# $(PREFIX)CanvasGradient.idl \ -# $(PREFIX)CanvasPattern.idl \ -# $(PREFIX)CanvasRenderingContext2D.idl \ -# $(PREFIX)HTMLCanvasElement.idl \ -# $(PREFIX)RGBColor.idl \ - -COM_BINDINGS_SCRIPTS = \ - $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/CodeGenerator.pm \ - $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/CodeGeneratorCOM.pm \ - $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/IDLParser.pm \ - $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/IDLStructure.pm \ - $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/generate-bindings.pl \ -# - -$(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 ca9b2a4..c6a0add 100644 --- a/WebKit/win/WebKit.vcproj/Interfaces.vcproj +++ b/WebKit/win/WebKit.vcproj/Interfaces.vcproj @@ -19,7 +19,7 @@ Name="Debug|Win32"
OutputDirectory="$(WebKitOutputDir)\include\WebKit"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
<Tool
@@ -86,7 +86,7 @@ Name="Release|Win32"
OutputDirectory="$(WebKitOutputDir)\include\WebKit"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -152,6 +152,26 @@ </References>
<Files>
<File
+ RelativePath="..\Interfaces\AccessibleComparable.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\DOMCore.idl"
>
<FileConfiguration
@@ -764,6 +784,66 @@ </FileConfiguration>
</File>
<File
+ RelativePath="..\Interfaces\IWebGeolocationPolicyListener.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\Interfaces\IWebGeolocationPosition.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\Interfaces\IWebGeolocationProvider.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\IWebHistory.idl"
>
<FileConfiguration
@@ -1644,47 +1724,47 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\Interfaces\WebKit.idl"
+ RelativePath="..\Interfaces\JavaScriptCoreAPITypes.idl"
>
<FileConfiguration
Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
- GenerateTypeLibrary="true"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
- GenerateTypeLibrary="true"
/>
</FileConfiguration>
</File>
<File
- RelativePath="..\Interfaces\WebScrollbarTypes.idl"
+ RelativePath="..\Interfaces\WebKit.idl"
>
<FileConfiguration
Name="Debug|Win32"
- ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
+ GenerateTypeLibrary="true"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
- ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
+ GenerateTypeLibrary="true"
/>
</FileConfiguration>
</File>
- <File
- RelativePath="..\Interfaces\JavaScriptCoreAPITypes.idl"
+ <File
+ RelativePath="..\Interfaces\WebScrollbarTypes.idl"
>
<FileConfiguration
Name="Debug|Win32"
diff --git a/WebKit/win/WebKit.vcproj/WebKit.rc b/WebKit/win/WebKit.vcproj/WebKit.rc index 3d00011..fa57ca3 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.rc +++ b/WebKit/win/WebKit.vcproj/WebKit.rc @@ -42,7 +42,7 @@ BEGIN VALUE "FileVersion", __VERSION_TEXT__ VALUE "CompanyName", "Apple Inc." VALUE "InternalName", "WebKit" - VALUE "LegalCopyright", "Copyright Apple Inc. 2003-2009" + VALUE "LegalCopyright", "Copyright Apple Inc. 2003-2010" VALUE "OriginalFilename", "WebKit.dll" VALUE "ProductName", "WebKit" VALUE "ProductVersion", __BUILD_NUMBER_SHORT__ @@ -81,4 +81,9 @@ IDR_SEARCH_CANCEL PNG "searchCancel.png" IDR_SEARCH_CANCEL_PRESSED PNG "searchCancelPressed.png" IDR_SEARCH_MAGNIFIER PNG "searchMagnifier.png" IDR_SEARCH_MAGNIFIER_RESULTS PNG "searchMagnifierResults.png" +IDR_FS_VIDEO_AUDIO_VOLUME_HIGH PNG "fsVideoAudioVolumeHigh.png" +IDR_FS_VIDEO_AUDIO_VOLUME_LOW PNG "fsVideoAudioVolumeLow.png" +IDR_FS_VIDEO_EXIT_FULLSCREEN PNG "fsVideoExitFullscreen.png" +IDR_FS_VIDEO_PAUSE PNG "fsVideoPause.png" +IDR_FS_VIDEO_PLAY PNG "fsVideoPlay.png" diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln index 433bf4c..3b641fd 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.sln +++ b/WebKit/win/WebKit.vcproj/WebKit.sln @@ -80,218 +80,161 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testapi", "..\..\..\JavaScr EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "record-memory-win", "..\..\..\WebKitTools\record-memory-win\record-memory-win.vcproj", "{44B9C152-1870-4035-B94D-7B3285AA0C12}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitAPITest", "..\..\..\WebKitTools\WebKitAPITest\WebKitAPITest.vcproj", "{626089A3-25D3-4883-A96C-B8C66E036397}"
+ ProjectSection(ProjectDependencies) = postProject
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1} = {6567DFD4-D6DE-4CD5-825D-17E353D160E1}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_All|Win32 = Debug_All|Win32
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_All|Win32.ActiveCfg = Debug_All|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.Build.0 = Debug_All|Win32
{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_All|Win32.ActiveCfg = Debug_All|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.Build.0 = Debug_All|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_All|Win32.ActiveCfg = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.Build.0 = Debug|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_All|Win32.ActiveCfg = Debug_All|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.Build.0 = Debug_All|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_All|Win32.ActiveCfg = Debug_All|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.Build.0 = Debug_All|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|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_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.Build.0 = Release_Cairo|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_All|Win32.ActiveCfg = Debug_All|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.Build.0 = Debug_All|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|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_All|Win32.ActiveCfg = Debug_All|Win32
- {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.Build.0 = Debug_All|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|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_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.Build.0 = Release_CFLite|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_All|Win32.ActiveCfg = Debug_All|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.Build.0 = Debug_All|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|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_All|Win32.ActiveCfg = Debug_All|Win32
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.Build.0 = Debug_All|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_All|Win32.ActiveCfg = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.Build.0 = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = all|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.Build.0 = Debug_All|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
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.ActiveCfg = all|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.Build.0 = all|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.ActiveCfg = all|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = cairo|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.Build.0 = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.ActiveCfg = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.ActiveCfg = cairo|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.ActiveCfg = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.Build.0 = all|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.Build.0 = Debug_All|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Cairo|Win32.ActiveCfg = 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|Win32.ActiveCfg = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.Build.0 = Release|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.Build.0 = Debug_All|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.Build.0 = Debug_Internal|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_All|Win32.ActiveCfg = Debug_All|Win32
- {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|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_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.Build.0 = Release_CFLite|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_All|Win32.ActiveCfg = Release|Win32
- {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|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
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.ActiveCfg = Debug_Internal|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.Build.0 = Debug_Internal|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug|Win32.ActiveCfg = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug|Win32.Build.0 = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.ActiveCfg = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.Build.0 = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release|Win32.ActiveCfg = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release|Win32.Build.0 = Debug|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj index 5846813..57d1da2 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.vcproj +++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj @@ -18,7 +18,7 @@ <Configuration
Name="Debug|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
<Tool
@@ -39,8 +39,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\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;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -61,9 +61,9 @@ 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 JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
+ AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
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;rpcrt4.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
/>
<Tool
Name="VCALinkTool"
@@ -94,7 +94,7 @@ <Configuration
Name="Release|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -116,8 +116,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\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;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -138,9 +138,9 @@ 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 JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
+ AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
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;rpcrt4.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
/>
<Tool
Name="VCALinkTool"
@@ -171,7 +171,7 @@ <Configuration
Name="Debug_Internal|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
CharacterSet="1"
>
<Tool
@@ -192,8 +192,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\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;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
Detect64BitPortabilityProblems="false"
@@ -217,7 +217,7 @@ OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
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;rpcrt4.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
/>
<Tool
Name="VCALinkTool"
@@ -248,7 +248,7 @@ <Configuration
Name="Debug_Cairo|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_wincairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_wincairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
CharacterSet="1"
>
<Tool
@@ -269,8 +269,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\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;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -327,7 +327,7 @@ OutputDirectory="$(WebKitOutputDir)\bin"
IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -349,8 +349,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\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;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -404,7 +404,7 @@ <Configuration
Name="Debug_All|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
CharacterSet="1"
>
<Tool
@@ -425,8 +425,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\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;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
Detect64BitPortabilityProblems="false"
@@ -448,7 +448,7 @@ 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 JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
+ AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
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;rpcrt4.dll"
/>
@@ -582,6 +582,10 @@ >
</File>
<File
+ RelativePath="..\FullscreenVideoController.h"
+ >
+ </File>
+ <File
RelativePath="..\MarshallingHelpers.h"
>
</File>
@@ -662,6 +666,14 @@ >
</File>
<File
+ RelativePath="..\WebGeolocationPolicyListener.h"
+ >
+ </File>
+ <File
+ RelativePath="..\WebGeolocationPosition.h"
+ >
+ </File>
+ <File
RelativePath="..\WebHistory.h"
>
</File>
@@ -722,14 +734,6 @@ >
</File>
<File
- RelativePath="..\WebScriptWorld.h"
- >
- </File>
- <File
- RelativePath="..\WebSerializedJSValue.h"
- >
- </File>
- <File
RelativePath="..\WebKitStatistics.h"
>
</File>
@@ -802,6 +806,10 @@ >
</File>
<File
+ RelativePath="..\WebScriptWorld.h"
+ >
+ </File>
+ <File
RelativePath="..\WebScrollBar.h"
>
</File>
@@ -810,6 +818,10 @@ >
</File>
<File
+ RelativePath="..\WebSerializedJSValue.h"
+ >
+ </File>
+ <File
RelativePath="..\WebTextRenderer.h"
>
</File>
@@ -894,6 +906,10 @@ >
</File>
<File
+ RelativePath="..\FullscreenVideoController.cpp"
+ >
+ </File>
+ <File
RelativePath="..\MemoryStream.cpp"
>
</File>
@@ -1070,6 +1086,14 @@ >
</File>
<File
+ RelativePath="..\WebGeolocationPolicyListener.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebGeolocationPosition.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebHistory.cpp"
>
</File>
@@ -1102,14 +1126,6 @@ >
</File>
<File
- RelativePath="..\WebScriptWorld.cpp"
- >
- </File>
- <File
- RelativePath="..\WebSerializedJSValue.cpp"
- >
- </File>
- <File
RelativePath="..\WebKitStatistics.cpp"
>
</File>
@@ -1146,6 +1162,10 @@ >
</File>
<File
+ RelativePath="..\WebScriptWorld.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebScrollBar.cpp"
>
</File>
@@ -1154,6 +1174,10 @@ >
</File>
<File
+ RelativePath="..\WebSerializedJSValue.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebTextRenderer.cpp"
>
</File>
@@ -1246,6 +1270,26 @@ Name="Resources"
>
<File
+ RelativePath=".\fsVideoAudioVolumeHigh.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoAudioVolumeLow.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoExitFullscreen.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoPause.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoPlay.png"
+ >
+ </File>
+ <File
RelativePath=".\missingImage.png"
>
</File>
@@ -1438,6 +1482,14 @@ >
</File>
<File
+ RelativePath="..\WebCoreSupport\WebGeolocationControllerClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebGeolocationControllerClient.h"
+ >
+ </File>
+ <File
RelativePath="..\WebCoreSupport\WebInspectorClient.cpp"
>
</File>
diff --git a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj index ab7a0b2..b2b708e 100644 --- a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj +++ b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj @@ -19,7 +19,7 @@ Name="Debug|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
<Tool
@@ -79,7 +79,7 @@ Name="Release|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -140,7 +140,7 @@ Name="Debug_Internal|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
CharacterSet="1"
>
<Tool
@@ -200,7 +200,7 @@ Name="Debug_All|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
CharacterSet="1"
>
<Tool
diff --git a/WebKit/win/WebKit.vcproj/build-generated-files.sh b/WebKit/win/WebKit.vcproj/build-generated-files.sh deleted file mode 100644 index ac26fd2..0000000 --- a/WebKit/win/WebKit.vcproj/build-generated-files.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/bash - -# 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 puter, 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. - -NUMCPUPATH="../../../WebKitTools/Scripts/num-cpus" -if [ -x $NUMCPUPATH ]; then - NUMCPUS=`$NUMCPUPATH` -else - NUMCPUS=1 -fi - -XSRCROOT="`pwd`/.." -XSRCROOT=`realpath "$XSRCROOT"` -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -XSRCROOT=`cygpath -m -s "$XSRCROOT"` -XSRCROOT=`cygpath -u "$XSRCROOT"` -export XSRCROOT -export SOURCE_ROOT=$XSRCROOT - -XDSTROOT="$1" -export XDSTROOT -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -XDSTROOT=`cygpath -m -s "$XDSTROOT"` -XDSTROOT=`cygpath -u "$XDSTROOT"` -export XDSTROOT - -export BUILT_PRODUCTS_DIR="$XDSTROOT/obj/WebKit" - -mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources" -cd "${BUILT_PRODUCTS_DIR}/DerivedSources" - -export WEBKIT=$XSRCROOT -export WEBKIT_OUTPUT=$XDSTROOT - -export FEATURE_DEFINES="ENABLE_XPATH ENABLE_SVG" -make -f "$WEBKIT/WebKit.vcproj/DerivedSources.make" -j ${NUMCPUS} || exit 1 diff --git a/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png Binary files differnew file mode 100755 index 0000000..d04df37 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png diff --git a/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png Binary files differnew file mode 100755 index 0000000..e824a21 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png diff --git a/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png b/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png Binary files differnew file mode 100755 index 0000000..01ce692 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png diff --git a/WebKit/win/WebKit.vcproj/fsVideoPause.png b/WebKit/win/WebKit.vcproj/fsVideoPause.png Binary files differnew file mode 100755 index 0000000..b98fb36 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/fsVideoPause.png diff --git a/WebKit/win/WebKit.vcproj/fsVideoPlay.png b/WebKit/win/WebKit.vcproj/fsVideoPlay.png Binary files differnew file mode 100755 index 0000000..035aeb2 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/fsVideoPlay.png diff --git a/WebKit/win/WebKit.vcproj/resource.h b/WebKit/win/WebKit.vcproj/resource.h index 028cb3c..b999de6 100644 --- a/WebKit/win/WebKit.vcproj/resource.h +++ b/WebKit/win/WebKit.vcproj/resource.h @@ -23,6 +23,11 @@ #define IDR_SEARCH_CANCEL_PRESSED 19 #define IDR_SEARCH_MAGNIFIER 20 #define IDR_SEARCH_MAGNIFIER_RESULTS 21 +#define IDR_FS_VIDEO_AUDIO_VOLUME_HIGH 22 +#define IDR_FS_VIDEO_AUDIO_VOLUME_LOW 23 +#define IDR_FS_VIDEO_EXIT_FULLSCREEN 24 +#define IDR_FS_VIDEO_PAUSE 25 +#define IDR_FS_VIDEO_PLAY 26 #define IDC_STATIC -1 #define BUILD_NUMBER 1 diff --git a/WebKit/win/WebKitClassFactory.cpp b/WebKit/win/WebKitClassFactory.cpp index b233a5c..d243588 100644 --- a/WebKit/win/WebKitClassFactory.cpp +++ b/WebKit/win/WebKitClassFactory.cpp @@ -37,6 +37,7 @@ #include "WebDownload.h" #include "WebError.h" #include "WebFrame.h" +#include "WebGeolocationPosition.h" #include "WebHistory.h" #include "WebHistoryItem.h" #include "WebIconDatabase.h" @@ -48,6 +49,7 @@ #include "WebPreferences.h" #include "WebScriptWorld.h" #include "WebScrollBar.h" +#include "WebSerializedJSValue.h" #include "WebTextRenderer.h" #include "WebURLCredential.h" #include "WebURLProtectionSpace.h" diff --git a/WebKit/win/WebKitDLL.cpp b/WebKit/win/WebKitDLL.cpp index c34fe4b..9f4eaeb 100644 --- a/WebKit/win/WebKitDLL.cpp +++ b/WebKit/win/WebKitDLL.cpp @@ -179,6 +179,16 @@ PassRefPtr<WebCore::SharedBuffer> loadResourceIntoBuffer(const char* name) idr = IDR_ZOOM_OUT_CURSOR; else if (!strcmp(name, "verticalTextCursor")) idr = IDR_VERTICAL_TEXT_CURSOR; + else if (!strcmp(name, "fsVideoAudioVolumeHigh")) + idr = IDR_FS_VIDEO_AUDIO_VOLUME_HIGH; + else if (!strcmp(name, "fsVideoAudioVolumeLow")) + idr = IDR_FS_VIDEO_AUDIO_VOLUME_LOW; + else if (!strcmp(name, "fsVideoExitFullscreen")) + idr = IDR_FS_VIDEO_EXIT_FULLSCREEN; + else if (!strcmp(name, "fsVideoPause")) + idr = IDR_FS_VIDEO_PAUSE; + else if (!strcmp(name, "fsVideoPlay")) + idr = IDR_FS_VIDEO_PLAY; else return 0; diff --git a/WebKit/win/WebKitLogging.cpp b/WebKit/win/WebKitLogging.cpp index f7a333c..273ab56 100644 --- a/WebKit/win/WebKitLogging.cpp +++ b/WebKit/win/WebKitLogging.cpp @@ -29,7 +29,7 @@ #include "config.h" #include "WebKitLogging.h" -WTFLogChannel WebKitLogNetwork = { 0x00000010, "WebKitLogLevel", WTFLogChannelOff }; +WTFLogChannel WebKitLogTextInput = { 0x00000010, "WebKitLogLevel", WTFLogChannelOff }; WTFLogChannel WebKitLogTiming = { 0x00000020, "WebKitLogLevel", WTFLogChannelOff }; WTFLogChannel WebKitLogLoading = { 0x00000040, "WebKitLogLevel", WTFLogChannelOff }; WTFLogChannel WebKitLogFontCache = { 0x00000100, "WebKitLogLevel", WTFLogChannelOff }; @@ -78,6 +78,7 @@ void WebKitInitializeLoggingChannelsIfNecessary() return; haveInitializedLoggingChannels = true; + initializeLogChannel(&WebKitLogTextInput); initializeLogChannel(&WebKitLogTiming); initializeLogChannel(&WebKitLogLoading); initializeLogChannel(&WebKitLogFontCache); diff --git a/WebKit/win/WebKitLogging.h b/WebKit/win/WebKitLogging.h index 0aafb51..d19933d 100644 --- a/WebKit/win/WebKitLogging.h +++ b/WebKit/win/WebKitLogging.h @@ -36,7 +36,7 @@ #endif -extern WTFLogChannel WebKitLogNetwork; +extern WTFLogChannel WebKitLogTextInput; extern WTFLogChannel WebKitLogTiming; extern WTFLogChannel WebKitLogLoading; extern WTFLogChannel WebKitLogFontCache; diff --git a/WebKit/win/WebKitPrefix.cpp b/WebKit/win/WebKitPrefix.cpp index e82b88d..9be9aed 100644 --- a/WebKit/win/WebKitPrefix.cpp +++ b/WebKit/win/WebKitPrefix.cpp @@ -25,5 +25,4 @@ * (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/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h index 09aeaff..3b4197c 100644 --- a/WebKit/win/WebPreferenceKeysPrivate.h +++ b/WebKit/win/WebPreferenceKeysPrivate.h @@ -129,3 +129,7 @@ #define WebKitUseHighResolutionTimersPreferenceKey "WebKitUseHighResolutionTimers" #define WebKitPluginAllowedRunTimePreferenceKey "WebKitPluginAllowedRunTime" + +#define WebKitAcceleratedCompositingEnabledPreferenceKey "WebKitAcceleratedCompositingEnabled" + +#define WebKitCustomDragCursorsEnabledPreferenceKey "WebKitCustomDragCursorsEnabled" diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp index 652e619..c23f236 100644 --- a/WebKit/win/WebPreferences.cpp +++ b/WebKit/win/WebPreferences.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,14 +32,13 @@ #include "WebNotificationCenter.h" #include "WebPreferenceKeysPrivate.h" -#pragma warning( push, 0 ) #include <WebCore/CString.h> #include <WebCore/FileSystem.h> #include <WebCore/Font.h> #include <WebCore/PlatformString.h> #include <WebCore/StringHash.h> +#include <WebCore/WKCACFLayerRenderer.h> #include "WebLocalizableStrings.h" -#pragma warning( pop ) #include <CoreFoundation/CoreFoundation.h> #include <limits> @@ -213,6 +212,7 @@ void WebPreferences::initializeDefaultSettings() CFDictionaryAddValue(defaults, CFSTR(WebKitDatabasesEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitLocalStorageEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitExperimentalNotificationsEnabledPreferenceKey), kCFBooleanFalse); + CFDictionaryAddValue(defaults, CFSTR(WebKitZoomsTextOnlyPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitAllowAnimatedImagesPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitAllowAnimatedImageLoopingPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitDisplayImagesKey), kCFBooleanTrue); @@ -255,6 +255,8 @@ void WebPreferences::initializeDefaultSettings() RetainPtr<CFStringRef> pluginAllowedRunTime(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%u"), numeric_limits<unsigned>::max())); CFDictionaryAddValue(defaults, CFSTR(WebKitPluginAllowedRunTimePreferenceKey), pluginAllowedRunTime.get()); + CFDictionaryAddValue(defaults, CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), kCFBooleanTrue); + defaultSettings = defaults; } @@ -1356,6 +1358,34 @@ HRESULT WebPreferences::setPreferenceForTest(BSTR key, BSTR value) return S_OK; } +HRESULT WebPreferences::setAcceleratedCompositingEnabled(BOOL enabled) +{ + setBoolValue(CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), enabled); + return S_OK; +} + +HRESULT WebPreferences::acceleratedCompositingEnabled(BOOL* enabled) +{ +#if USE(ACCELERATED_COMPOSITING) + *enabled = WKCACFLayerRenderer::acceleratedCompositingAvailable() && boolValueForKey(CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey)); +#else + *enabled = FALSE; +#endif + return S_OK; +} + +HRESULT WebPreferences::setCustomDragCursorsEnabled(BOOL enabled) +{ + setBoolValue(CFSTR(WebKitCustomDragCursorsEnabledPreferenceKey), enabled); + return S_OK; +} + +HRESULT WebPreferences::customDragCursorsEnabled(BOOL* enabled) +{ + *enabled = boolValueForKey(CFSTR(WebKitCustomDragCursorsEnabledPreferenceKey)); + return S_OK; +} + void WebPreferences::willAddToWebView() { ++m_numWebViews; diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h index 2a89269..1631e78 100644 --- a/WebKit/win/WebPreferences.h +++ b/WebKit/win/WebPreferences.h @@ -384,6 +384,11 @@ public: /* [in] */ BSTR key, /* [in] */ BSTR value); + virtual HRESULT STDMETHODCALLTYPE setAcceleratedCompositingEnabled(BOOL); + virtual HRESULT STDMETHODCALLTYPE acceleratedCompositingEnabled(BOOL*); + + virtual HRESULT STDMETHODCALLTYPE setCustomDragCursorsEnabled(BOOL); + virtual HRESULT STDMETHODCALLTYPE customDragCursorsEnabled(BOOL*); // WebPreferences diff --git a/WebKit/win/WebScriptWorld.cpp b/WebKit/win/WebScriptWorld.cpp index 03eede7..7bc04eb 100644 --- a/WebKit/win/WebScriptWorld.cpp +++ b/WebKit/win/WebScriptWorld.cpp @@ -26,6 +26,7 @@ #include "WebKitDLL.h" #include "WebScriptWorld.h" +#include <JavaScriptCore/APICast.h> #include <WebCore/JSDOMBinding.h> #include <WebCore/ScriptController.h> @@ -128,3 +129,10 @@ HRESULT WebScriptWorld::standardWorld(IWebScriptWorld** outWorld) (*outWorld)->AddRef(); return S_OK; } + +HRESULT WebScriptWorld::scriptWorldForGlobalContext(JSGlobalContextRef context, IWebScriptWorld** outWorld) +{ + if (!outWorld) + return E_POINTER; + return findOrCreateWorld(currentWorld(toJS(context))).copyRefTo(outWorld); +} diff --git a/WebKit/win/WebScriptWorld.h b/WebKit/win/WebScriptWorld.h index b800225..dc7e9db 100644 --- a/WebKit/win/WebScriptWorld.h +++ b/WebKit/win/WebScriptWorld.h @@ -51,6 +51,7 @@ private: virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void** ppvObject); virtual HRESULT STDMETHODCALLTYPE standardWorld(IWebScriptWorld**); + virtual HRESULT STDMETHODCALLTYPE scriptWorldForGlobalContext(JSGlobalContextRef, IWebScriptWorld**); ULONG m_refCount; RefPtr<WebCore::DOMWrapperWorld> m_world; diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index aadf15e..b4b47cd 100644 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -24,11 +24,12 @@ */ #include "config.h" -#include "WebKitDLL.h" + #include "WebView.h" #include "CFDictionaryPropertyBag.h" #include "DOMCoreClasses.h" +#include "FullscreenVideoController.h" #include "MarshallingHelpers.h" #include "SoftLinking.h" #include "WebBackForwardList.h" @@ -42,10 +43,14 @@ #include "WebEditorClient.h" #include "WebElementPropertyBag.h" #include "WebFrame.h" +#include "WebGeolocationControllerClient.h" +#include "WebGeolocationPosition.h" #include "WebIconDatabase.h" #include "WebInspector.h" #include "WebInspectorClient.h" #include "WebKit.h" +#include "WebKitDLL.h" +#include "WebKitLogging.h" #include "WebKitStatisticsPrivate.h" #include "WebKitSystemBits.h" #include "WebMutableURLRequest.h" @@ -54,16 +59,20 @@ #include "WebPreferences.h" #include "WebScriptWorld.h" #include "WindowsTouch.h" -#pragma warning( push, 0 ) -#include <WebCore/ApplicationCacheStorage.h> +#include <JavaScriptCore/InitializeThreading.h> +#include <JavaScriptCore/JSLock.h> +#include <JavaScriptCore/JSValue.h> #include <WebCore/AXObjectCache.h> -#include <WebCore/BitmapInfo.h> +#include <WebCore/ApplicationCacheStorage.h> #include <WebCore/BString.h> +#include <WebCore/BackForwardList.h> +#include <WebCore/BitmapInfo.h> +#include <WebCore/CString.h> #include <WebCore/Cache.h> +#include <WebCore/Chrome.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> #include <WebCore/DragController.h> @@ -72,14 +81,16 @@ #include <WebCore/EventHandler.h> #include <WebCore/EventNames.h> #include <WebCore/FileSystem.h> -#include <WebCore/FocusController.h> #include <WebCore/FloatQuad.h> +#include <WebCore/FocusController.h> #include <WebCore/FrameLoader.h> #include <WebCore/FrameTree.h> #include <WebCore/FrameView.h> #include <WebCore/FrameWin.h> #include <WebCore/GDIObjectCounter.h> #include <WebCore/GraphicsContext.h> +#include <WebCore/HTMLMediaElement.h> +#include <WebCore/HTMLNames.h> #include <WebCore/HistoryItem.h> #include <WebCore/HitTestRequest.h> #include <WebCore/HitTestResult.h> @@ -113,10 +124,11 @@ #include <WebCore/SimpleFontData.h> #include <WebCore/TypingCommand.h> #include <WebCore/WindowMessageBroadcaster.h> -#pragma warning(pop) -#include <JavaScriptCore/InitializeThreading.h> -#include <JavaScriptCore/JSLock.h> -#include <JavaScriptCore/JSValue.h> + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +#include <WebCore/GeolocationController.h> +#include <WebCore/GeolocationError.h> +#endif #if PLATFORM(CG) #include <CoreGraphics/CGContext.h> @@ -132,13 +144,13 @@ #include <WebKitSystemInterface/WebKitSystemInterface.h> #endif -#include <wtf/HashSet.h> +#include <ShlObj.h> #include <comutil.h> #include <dimm.h> #include <oleacc.h> -#include <ShlObj.h> #include <tchar.h> #include <windowsx.h> +#include <wtf/HashSet.h> // Soft link functions for gestures and panning feedback SOFT_LINK_LIBRARY(USER32); @@ -295,6 +307,9 @@ bool WebView::s_allowSiteSpecificHacks = false; WebView::WebView() : m_refCount(0) +#if !ASSERT_DISABLED + , m_deletionHasBegun(false) +#endif , m_hostWindow(0) , m_viewWindow(0) , m_mainFrame(0) @@ -350,18 +365,13 @@ WebView::~WebView() { deleteBackingStore(); - // <rdar://4958382> m_viewWindow will be destroyed when m_hostWindow is destroyed, but if - // setHostWindow was never called we will leak our HWND. If we still have a valid HWND at - // this point, we should just destroy it ourselves. - if (!isBeingDestroyed() && ::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); + ASSERT(!m_viewWindow); WebViewCount--; gClassCount--; @@ -631,9 +641,10 @@ HRESULT STDMETHODCALLTYPE WebView::close() removeFromAllWebViewsSet(); - Frame* frame = m_page->mainFrame(); - if (frame) - frame->loader()->detachFromParent(); + if (m_page) { + if (Frame* frame = m_page->mainFrame()) + frame->loader()->detachFromParent(); + } if (m_mouseOutTracker) { m_mouseOutTracker->dwFlags = TME_CANCEL; @@ -641,6 +652,18 @@ HRESULT STDMETHODCALLTYPE WebView::close() m_mouseOutTracker.set(0); } + revokeDragDrop(); + + if (m_viewWindow) { + // We can't check IsWindow(m_viewWindow) here, because that will return true even while + // we're already handling WM_DESTROY. So we check !isBeingDestroyed() instead. + if (!isBeingDestroyed()) + DestroyWindow(m_viewWindow); + // Either we just destroyed m_viewWindow, or it's in the process of being destroyed. Either + // way, we clear it out to make sure we don't try to use it later. + m_viewWindow = 0; + } + setHostWindow(0); setDownloadDelegate(0); @@ -664,17 +687,18 @@ HRESULT STDMETHODCALLTYPE WebView::close() IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal(); notifyCenter->removeObserver(this, WebPreferences::webPreferencesChangedNotification(), static_cast<IWebPreferences*>(m_preferences.get())); - BSTR identifier = 0; - 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); + if (COMPtr<WebPreferences> preferences = m_preferences) { + BSTR identifier = 0; + preferences->identifier(&identifier); + + 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(); @@ -1904,7 +1928,6 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, case WM_DESTROY: webView->setIsBeingDestroyed(); webView->close(); - webView->revokeDragDrop(); break; case WM_GESTURENOTIFY: handled = webView->gestureNotify(wParam, lParam); @@ -1953,10 +1976,6 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, break; // FIXME: We need to check WM_UNICHAR to support supplementary characters (that don't fit in 16 bits). case WM_SIZE: - if (webView->isBeingDestroyed()) - // If someone has sent us this message while we're being destroyed, we should bail out so we don't crash. - break; - if (lParam != 0) { webView->deleteBackingStore(); #if USE(ACCELERATED_COMPOSITING) @@ -2100,7 +2119,7 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, handled = webView->onIMEStartComposition(); break; case WM_IME_REQUEST: - webView->onIMERequest(wParam, lParam, &lResult); + lResult = webView->onIMERequest(wParam, lParam); break; case WM_IME_COMPOSITION: handled = webView->onIMEComposition(lParam); @@ -2270,14 +2289,29 @@ HRESULT STDMETHODCALLTYPE WebView::QueryInterface(REFIID riid, void** ppvObject) ULONG STDMETHODCALLTYPE WebView::AddRef(void) { + ASSERT(!m_deletionHasBegun); return ++m_refCount; } ULONG STDMETHODCALLTYPE WebView::Release(void) { + ASSERT(!m_deletionHasBegun); + + if (m_refCount == 1) { + // Call close() now so that clients don't have to. (It's harmless to call close() multiple + // times.) We do this here instead of in our destructor because close() can cause AddRef() + // and Release() to be called, and if that happened in our destructor we would be destroyed + // more than once. + close(); + } + ULONG newRef = --m_refCount; - if (!newRef) + if (!newRef) { +#if !ASSERT_DISABLED + m_deletionHasBegun = true; +#endif delete(this); + } return newRef; } @@ -2390,11 +2424,21 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame( Settings::setShouldPaintNativeControls(shouldPaintNativeControls); #endif +#if ENABLE(CLIENT_BASED_GEOLOCATION) + WebGeolocationControllerClient* geolocationControllerClient = new WebGeolocationControllerClient(this); +#else + WebGeolocationControllerClient* geolocationControllerClient = 0; +#endif + BOOL useHighResolutionTimer; if (SUCCEEDED(m_preferences->shouldUseHighResolutionTimers(&useHighResolutionTimer))) Settings::setShouldUseHighResolutionTimers(useHighResolutionTimer); +<<<<<<< HEAD m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this), 0); +======= + m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this), geolocationControllerClient); +>>>>>>> webkit.org at r54127 BSTR localStoragePath; if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) { @@ -3051,8 +3095,7 @@ HRESULT STDMETHODCALLTYPE WebView::setHostWindow( m_hostWindow = window; - if (m_viewWindow) - windowAncestryDidChange(); + windowAncestryDidChange(); return S_OK; } @@ -4504,6 +4547,13 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) return hr; settings->setPluginAllowedRunTime(runTime); +#if USE(ACCELERATED_COMPOSITING) + hr = prefsPrivate->acceleratedCompositingEnabled(&enabled); + if (FAILED(hr)) + return hr; + settings->setAcceleratedCompositingEnabled(enabled); +#endif + #if ENABLE(3D_CANVAS) settings->setExperimentalWebGLEnabled(true); #endif // ENABLE(3D_CANVAS) @@ -4925,7 +4975,9 @@ HRESULT WebView::registerDragDrop() HRESULT WebView::revokeDragDrop() { - ASSERT(::IsWindow(m_viewWindow)); + if (!m_viewWindow) + return S_OK; + return ::RevokeDragDrop(m_viewWindow); } @@ -5065,6 +5117,7 @@ void WebView::selectionChanged() bool WebView::onIMEStartComposition() { + LOG(TextInput, "onIMEStartComposition"); m_inIMEComposition++; Frame* targetFrame = m_page->focusController()->focusedOrMainFrame(); if (!targetFrame) @@ -5107,8 +5160,100 @@ static void compositionToUnderlines(const Vector<DWORD>& clauses, const Vector<B } } +#if !LOG_DISABLED +#define APPEND_ARGUMENT_NAME(name) \ + if (lparam & name) { \ + if (needsComma) \ + result += ", "; \ + result += #name; \ + needsComma = true; \ + } + +static String imeCompositionArgumentNames(LPARAM lparam) +{ + String result; + bool needsComma = false; + if (lparam & GCS_COMPATTR) { + result = "GCS_COMPATTR"; + needsComma = true; + } + APPEND_ARGUMENT_NAME(GCS_COMPCLAUSE); + APPEND_ARGUMENT_NAME(GCS_COMPREADSTR); + APPEND_ARGUMENT_NAME(GCS_COMPREADATTR); + APPEND_ARGUMENT_NAME(GCS_COMPREADCLAUSE); + APPEND_ARGUMENT_NAME(GCS_COMPSTR); + APPEND_ARGUMENT_NAME(GCS_CURSORPOS); + APPEND_ARGUMENT_NAME(GCS_DELTASTART); + APPEND_ARGUMENT_NAME(GCS_RESULTCLAUSE); + APPEND_ARGUMENT_NAME(GCS_RESULTREADCLAUSE); + APPEND_ARGUMENT_NAME(GCS_RESULTREADSTR); + APPEND_ARGUMENT_NAME(GCS_RESULTSTR); + APPEND_ARGUMENT_NAME(CS_INSERTCHAR); + APPEND_ARGUMENT_NAME(CS_NOMOVECARET); + + return result; +} + +static String imeNotificationName(WPARAM wparam) +{ + switch (wparam) { + case IMN_CHANGECANDIDATE: + return "IMN_CHANGECANDIDATE"; + case IMN_CLOSECANDIDATE: + return "IMN_CLOSECANDIDATE"; + case IMN_CLOSESTATUSWINDOW: + return "IMN_CLOSESTATUSWINDOW"; + case IMN_GUIDELINE: + return "IMN_GUIDELINE"; + case IMN_OPENCANDIDATE: + return "IMN_OPENCANDIDATE"; + case IMN_OPENSTATUSWINDOW: + return "IMN_OPENSTATUSWINDOW"; + case IMN_SETCANDIDATEPOS: + return "IMN_SETCANDIDATEPOS"; + case IMN_SETCOMPOSITIONFONT: + return "IMN_SETCOMPOSITIONFONT"; + case IMN_SETCOMPOSITIONWINDOW: + return "IMN_SETCOMPOSITIONWINDOW"; + case IMN_SETCONVERSIONMODE: + return "IMN_SETCONVERSIONMODE"; + case IMN_SETOPENSTATUS: + return "IMN_SETOPENSTATUS"; + case IMN_SETSENTENCEMODE: + return "IMN_SETSENTENCEMODE"; + case IMN_SETSTATUSWINDOWPOS: + return "IMN_SETSTATUSWINDOWPOS"; + default: + return "Unknown (" + String::number(wparam) + ")"; + } +} + +static String imeRequestName(WPARAM wparam) +{ + switch (wparam) { + case IMR_CANDIDATEWINDOW: + return "IMR_CANDIDATEWINDOW"; + case IMR_COMPOSITIONFONT: + return "IMR_COMPOSITIONFONT"; + case IMR_COMPOSITIONWINDOW: + return "IMR_COMPOSITIONWINDOW"; + case IMR_CONFIRMRECONVERTSTRING: + return "IMR_CONFIRMRECONVERTSTRING"; + case IMR_DOCUMENTFEED: + return "IMR_DOCUMENTFEED"; + case IMR_QUERYCHARPOSITION: + return "IMR_QUERYCHARPOSITION"; + case IMR_RECONVERTSTRING: + return "IMR_RECONVERTSTRING"; + default: + return "Unknown (" + String::number(wparam) + ")"; + } +} +#endif + bool WebView::onIMEComposition(LPARAM lparam) { + LOG(TextInput, "onIMEComposition %s", imeCompositionArgumentNames(lparam).latin1().data()); HIMC hInputContext = getIMMContext(); if (!hInputContext) return true; @@ -5153,25 +5298,39 @@ bool WebView::onIMEComposition(LPARAM lparam) bool WebView::onIMEEndComposition() { - if (m_inIMEComposition) + LOG(TextInput, "onIMEEndComposition"); + // If the composition hasn't been confirmed yet, it needs to be cancelled. + // This happens after deleting the last character from inline input hole. + Frame* targetFrame = m_page->focusController()->focusedOrMainFrame(); + if (targetFrame && targetFrame->editor()->hasComposition()) + targetFrame->editor()->confirmComposition(String()); + + if (m_inIMEComposition) m_inIMEComposition--; + return true; } -bool WebView::onIMEChar(WPARAM, LPARAM) +bool WebView::onIMEChar(WPARAM wparam, LPARAM lparam) { + UNUSED_PARAM(wparam); + UNUSED_PARAM(lparam); + LOG(TextInput, "onIMEChar U+%04X %08X", wparam, lparam); return true; } -bool WebView::onIMENotify(WPARAM, LPARAM, LRESULT*) +bool WebView::onIMENotify(WPARAM wparam, LPARAM, LRESULT*) { + UNUSED_PARAM(wparam); + LOG(TextInput, "onIMENotify %s", imeNotificationName(wparam).latin1().data()); return false; } -bool WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* charPos, LRESULT* result) +LRESULT WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* charPos) { + if (charPos->dwCharPos && !targetFrame->editor()->hasComposition()) + return 0; IntRect caret; - ASSERT(charPos->dwCharPos == 0 || targetFrame->editor()->hasComposition()); if (RefPtr<Range> range = targetFrame->editor()->hasComposition() ? targetFrame->editor()->compositionRange() : targetFrame->selection()->selection().toNormalizedRange()) { ExceptionCode ec = 0; RefPtr<Range> tempRange = range->cloneRange(ec); @@ -5184,56 +5343,55 @@ bool WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* char ::ClientToScreen(m_viewWindow, &charPos->pt); charPos->cLineHeight = caret.height(); ::GetWindowRect(m_viewWindow, &charPos->rcDocument); - *result = TRUE; return true; } -bool WebView::onIMERequestReconvertString(Frame* targetFrame, RECONVERTSTRING* reconvertString, LRESULT* result) +LRESULT WebView::onIMERequestReconvertString(Frame* targetFrame, RECONVERTSTRING* reconvertString) { RefPtr<Range> selectedRange = targetFrame->selection()->toNormalizedRange(); String text = selectedRange->text(); - if (!reconvertString) { - *result = sizeof(RECONVERTSTRING) + text.length() * sizeof(UChar); - return true; - } + if (!reconvertString) + return sizeof(RECONVERTSTRING) + text.length() * sizeof(UChar); unsigned totalSize = sizeof(RECONVERTSTRING) + text.length() * sizeof(UChar); - *result = totalSize; - if (totalSize > reconvertString->dwSize) { - *result = 0; - return false; - } + if (totalSize > reconvertString->dwSize) + return 0; reconvertString->dwCompStrLen = text.length(); reconvertString->dwStrLen = text.length(); reconvertString->dwTargetStrLen = text.length(); reconvertString->dwStrOffset = sizeof(RECONVERTSTRING); memcpy(reconvertString + 1, text.characters(), text.length() * sizeof(UChar)); - return true; + return totalSize; } -bool WebView::onIMERequest(WPARAM request, LPARAM data, LRESULT* result) +LRESULT WebView::onIMERequest(WPARAM request, LPARAM data) { + LOG(TextInput, "onIMERequest %s", imeRequestName(request).latin1().data()); Frame* targetFrame = m_page->focusController()->focusedOrMainFrame(); if (!targetFrame || !targetFrame->editor()->canEdit()) - return true; + return 0; switch (request) { case IMR_RECONVERTSTRING: - return onIMERequestReconvertString(targetFrame, (RECONVERTSTRING*)data, result); + return onIMERequestReconvertString(targetFrame, (RECONVERTSTRING*)data); case IMR_QUERYCHARPOSITION: - return onIMERequestCharPosition(targetFrame, (IMECHARPOSITION*)data, result); + return onIMERequestCharPosition(targetFrame, (IMECHARPOSITION*)data); } - return false; + return 0; } -bool WebView::onIMESelect(WPARAM, LPARAM) +bool WebView::onIMESelect(WPARAM wparam, LPARAM lparam) { + UNUSED_PARAM(wparam); + UNUSED_PARAM(lparam); + LOG(TextInput, "onIMESelect locale %ld %s", lparam, wparam ? "select" : "deselect"); return false; } -bool WebView::onIMESetContext(WPARAM, LPARAM) +bool WebView::onIMESetContext(WPARAM wparam, LPARAM) { + LOG(TextInput, "onIMESetContext %s", wparam ? "active" : "inactive"); return false; } @@ -5247,7 +5405,15 @@ HRESULT STDMETHODCALLTYPE WebView::inspector(IWebInspector** inspector) HRESULT STDMETHODCALLTYPE WebView::windowAncestryDidChange() { - HWND newParent = findTopLevelParent(m_hostWindow); + HWND newParent; + if (m_viewWindow) + newParent = findTopLevelParent(m_hostWindow); + else { + // There's no point in tracking active state changes of our parent window if we don't have + // a window ourselves. + newParent = 0; + } + if (newParent == m_topLevelParent) return S_OK; @@ -5511,6 +5677,44 @@ static KURL toKURL(BSTR bstr) return KURL(KURL(), toString(bstr)); } +void WebView::enterFullscreenForNode(Node* node) +{ + if (!node->hasTagName(HTMLNames::videoTag)) + return; + +#if ENABLE(VIDEO) + HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node); + + if (m_fullscreenController) { + if (m_fullscreenController->mediaElement() == videoElement) { + // The backend may just warn us that the underlaying plaftormMovie() + // has changed. Just force an update. + m_fullscreenController->setMediaElement(videoElement); + return; // No more to do. + } + + // First exit Fullscreen for the old mediaElement. + m_fullscreenController->mediaElement()->exitFullscreen(); + // This previous call has to trigger exitFullscreen, + // which has to clear m_fullscreenController. + ASSERT(!m_fullscreenController); + } + + m_fullscreenController = new FullscreenVideoController; + m_fullscreenController->setMediaElement(videoElement); + m_fullscreenController->enterFullscreen(); +#endif +} + +void WebView::exitFullscreen() +{ +#if ENABLE(VIDEO) + if (m_fullscreenController) + m_fullscreenController->exitFullscreen(); + m_fullscreenController = 0; +#endif +} + static PassOwnPtr<Vector<String> > toStringVector(unsigned patternsCount, BSTR* patterns) { // Convert the patterns into a Vector. @@ -5789,8 +5993,7 @@ void WebView::updateRootLayerContents() return; FrameView* frameView = coreFrame->view(); - m_layerRenderer->setScrollFrame(frameView->layoutWidth(), frameView->layoutHeight(), - frameView->scrollX(), frameView->scrollY()); + m_layerRenderer->setScrollFrame(IntRect(frameView->scrollX(), frameView->scrollY(), frameView->layoutWidth(), frameView->layoutHeight())); } #endif @@ -5875,6 +6078,63 @@ HRESULT WebView::hasPluginForNodeBeenHalted(IDOMNode* domNode, BOOL* result) return S_OK; } +HRESULT WebView::setGeolocationProvider(IWebGeolocationProvider* locationProvider) +{ + m_geolocationProvider = locationProvider; + return S_OK; +} + +HRESULT WebView::geolocationProvider(IWebGeolocationProvider** locationProvider) +{ + if (!locationProvider) + return E_POINTER; + + if (!m_geolocationProvider) + return E_FAIL; + + return m_geolocationProvider.copyRefTo(locationProvider); +} + +HRESULT WebView::geolocationDidChangePosition(IWebGeolocationPosition* position) +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + if (!m_page) + return E_FAIL; + m_page->geolocationController()->positionChanged(core(position)); + return S_OK; +#else + return E_NOTIMPL; +#endif +} + +HRESULT WebView::geolocationDidFailWithError(IWebError* error) +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + if (!m_page) + return E_FAIL; + if (!error) + return E_POINTER; + + BSTR descriptionBSTR; + if (FAILED(error->localizedDescription(&descriptionBSTR))) + return E_FAIL; + String descriptionString(descriptionBSTR, SysStringLen(descriptionBSTR)); + SysFreeString(descriptionBSTR); + + RefPtr<GeolocationError> geolocationError = GeolocationError::create(GeolocationError::PositionUnavailable, descriptionString); + m_page->geolocationController()->errorOccurred(geolocationError.get()); + return S_OK; +#else + return E_NOTIMPL; +#endif +} + +HRESULT WebView::setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme) +{ + SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, String(scheme, SysStringLen(scheme))); + return S_OK; +} + class EnumTextMatches : public IEnumTextMatches { long m_ref; diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h index 4bdc98f..cd857a8 100644 --- a/WebKit/win/WebView.h +++ b/WebKit/win/WebView.h @@ -30,7 +30,7 @@ #include "WebKit.h" #include "WebFrame.h" #include "WebPreferences.h" - +#include <WebCore/DragActions.h> #include <WebCore/IntRect.h> #include <WebCore/Timer.h> #include <WebCore/WindowMessageListener.h> @@ -39,8 +39,9 @@ #include <wtf/HashSet.h> #include <wtf/OwnPtr.h> -class WebFrame; +class FullscreenVideoController; class WebBackForwardList; +class WebFrame; class WebInspector; class WebInspectorClient; @@ -772,6 +773,13 @@ public: virtual HRESULT STDMETHODCALLTYPE restartHaltedPluginForNode(IDOMNode*); virtual HRESULT STDMETHODCALLTYPE hasPluginForNodeBeenHalted(IDOMNode*, BOOL*); + virtual HRESULT STDMETHODCALLTYPE setGeolocationProvider(IWebGeolocationProvider* locationProvider); + virtual HRESULT STDMETHODCALLTYPE geolocationProvider(IWebGeolocationProvider** locationProvider); + virtual HRESULT STDMETHODCALLTYPE geolocationDidChangePosition(IWebGeolocationPosition* position); + virtual HRESULT STDMETHODCALLTYPE geolocationDidFailWithError(IWebError* error); + + virtual HRESULT STDMETHODCALLTYPE setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme); + // WebView bool shouldUseEmbeddedView(const WebCore::String& mimeType) const; @@ -811,7 +819,7 @@ public: bool onIMEEndComposition(); bool onIMEChar(WPARAM, LPARAM); bool onIMENotify(WPARAM, LPARAM, LRESULT*); - bool onIMERequest(WPARAM, LPARAM, LRESULT*); + LRESULT onIMERequest(WPARAM, LPARAM); bool onIMESelect(WPARAM, LPARAM); bool onIMESetContext(WPARAM, LPARAM); void selectionChanged(); @@ -868,6 +876,9 @@ public: void setRootChildLayer(WebCore::PlatformLayer* layer); #endif + void enterFullscreenForNode(WebCore::Node*); + void exitFullscreen(); + private: void setZoomMultiplier(float multiplier, bool isTextOnly); float zoomMultiplier(bool isTextOnly); @@ -904,8 +915,8 @@ protected: void closeWindowTimerFired(WebCore::Timer<WebView>*); void prepareCandidateWindow(WebCore::Frame*, HIMC); void updateSelectionForIME(); - bool onIMERequestCharPosition(WebCore::Frame*, IMECHARPOSITION*, LRESULT*); - bool onIMERequestReconvertString(WebCore::Frame*, RECONVERTSTRING*, LRESULT*); + LRESULT onIMERequestCharPosition(WebCore::Frame*, IMECHARPOSITION*); + LRESULT onIMERequestReconvertString(WebCore::Frame*, RECONVERTSTRING*); bool developerExtrasEnabled() const; // AllWebViewSet functions @@ -915,6 +926,9 @@ protected: virtual void windowReceivedMessage(HWND, UINT message, WPARAM, LPARAM); ULONG m_refCount; +#if !ASSERT_DISABLED + bool m_deletionHasBegun; +#endif HWND m_hostWindow; HWND m_viewWindow; WebFrame* m_mainFrame; @@ -937,6 +951,7 @@ protected: COMPtr<WebPreferences> m_preferences; COMPtr<WebInspector> m_webInspector; COMPtr<IWebPluginHalterDelegate> m_pluginHalterDelegate; + COMPtr<IWebGeolocationProvider> m_geolocationProvider; bool m_userAgentOverridden; bool m_useBackForwardList; @@ -981,6 +996,10 @@ protected: long m_xOverpan; long m_yOverpan; +#if ENABLE(VIDEO) + OwnPtr<FullscreenVideoController> m_fullscreenController; +#endif + #if USE(ACCELERATED_COMPOSITING) bool isAcceleratedCompositing() const { return m_isAcceleratedCompositing; } void setAcceleratedCompositing(bool); |