diff options
Diffstat (limited to 'WebKit/win')
-rw-r--r-- | WebKit/win/ChangeLog | 106 | ||||
-rwxr-xr-x | WebKit/win/Interfaces/IWebFramePrivate.idl | 6 | ||||
-rw-r--r-- | WebKit/win/Interfaces/IWebPreferencesPrivate.idl | 3 | ||||
-rw-r--r-- | WebKit/win/Interfaces/WebKit.idl | 2 | ||||
-rw-r--r-- | WebKit/win/WebCoreSupport/WebChromeClient.cpp | 6 | ||||
-rw-r--r-- | WebKit/win/WebCoreSupport/WebChromeClient.h | 1 | ||||
-rw-r--r-- | WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp | 4 | ||||
-rw-r--r-- | WebKit/win/WebCoreSupport/WebFrameLoaderClient.h | 1 | ||||
-rw-r--r-- | WebKit/win/WebFrame.cpp | 57 | ||||
-rw-r--r-- | WebKit/win/WebFrame.h | 13 | ||||
-rw-r--r-- | WebKit/win/WebKit.vcproj/WebKit.def | 1 | ||||
-rw-r--r-- | WebKit/win/WebKit.vcproj/WebKit_debug.def | 1 | ||||
-rw-r--r-- | WebKit/win/WebKitGraphics.cpp | 6 | ||||
-rw-r--r-- | WebKit/win/WebKitGraphics.h | 2 | ||||
-rw-r--r-- | WebKit/win/WebPreferenceKeysPrivate.h | 1 | ||||
-rw-r--r-- | WebKit/win/WebPreferences.cpp | 15 | ||||
-rw-r--r-- | WebKit/win/WebPreferences.h | 6 | ||||
-rw-r--r-- | WebKit/win/WebView.cpp | 12 |
18 files changed, 238 insertions, 5 deletions
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index feb22a1..8dd19ad 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,109 @@ +2010-02-17 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Dan Bernstein. + + WebKit on Windows needs a mechanism to listen for WM_SETTINGCHANGED messages + https://bugs.webkit.org/show_bug.cgi?id=35076 + + * WebKit.vcproj/WebKit.def: Added WebKitSystemParameterChanged. + * WebKit.vcproj/WebKit_debug.def: Added WebKitSystemParameterChanged. + * WebKitGraphics.cpp: + (WebKitSystemParameterChanged): Call through to wkSystemFontSmoothingChanged for font smoothing changes. + * WebKitGraphics.h: Added WebKitSystemParameterChanged. + +2010-02-17 Dmitry Titov <dimich@chromium.org> + + Reviewed by David Levin, Darin Fisher, Simon Hausmann. + + When a live iframe element is moved between pages, it still depends on the old page. + https://bugs.webkit.org/show_bug.cgi?id=34382 + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::didTransferChildFrameToNewDocument): + Added empty implementation of a new virtual method. + + * WebCoreSupport/WebFrameLoaderClient.h: + +2010-02-17 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Introduces new Icon loading interface in order to support + asynchronous loading. + https://bugs.webkit.org/show_bug.cgi?id=32054 + + Add an empty implementation of ChromeClient::iconForFiles(). + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::iconForFiles): + * WebCoreSupport/WebChromeClient.h: + +2010-02-17 Shinichiro Hamaji <hamaji@chromium.org> + + Unreviewed. Touch WebKit.idl to fix the build. + + [Win] Implement test functions for printing + https://bugs.webkit.org/show_bug.cgi?id=34570 + + * Interfaces/WebKit.idl: + +2010-02-17 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Eric Seidel. + + [Win] Implement test functions for printing + https://bugs.webkit.org/show_bug.cgi?id=34570 + + * Interfaces/IWebFramePrivate.idl: + * WebFrame.cpp: + (WebFrame::pageNumberForElementById): + (WebFrame::numberOfPages): + * WebFrame.h: + +2010-02-16 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Generalize delayed plug-in start for background tabs for use for other media + https://bugs.webkit.org/show_bug.cgi?id=34981 + + * WebView.cpp: + (WebView::setCanStartPlugins): Change to call setCanStartMedia. + In a later patch we can change the of the public function in the IDL file too, + but for now this should be enough. + +2010-02-15 Adam Roben <aroben@apple.com> + + Add IWebFramePrivate::visibleContentRect + + Fixes <http://webkit.org/b/34956> Add API to get a WebFrame's visible + content rect + + Reviewed by Jon Honeycutt. + + * Interfaces/IWebFramePrivate.idl: Added visibleContentRect. + + * Interfaces/WebKit.idl: Touched to force a build. + + * WebFrame.cpp: + (WebFrame::visibleContentRect): + * WebFrame.h: + Added. Calls through to FrameView::visibleContentRect. + +2010-02-12 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + onmouseout fired when moving over tooltip on Windows + https://bugs.webkit.org/show_bug.cgi?id=16794 + <rdar://5762038>. + + Add WS_EX_TRANSPARENT to out tooltip HWND so it isn't subject to hit testing, and when + you mouse over the tooltip, it doesn't send a mouseout to the web content. + + * WebView.cpp: + (WebView::initializeToolTipWindow): Add WS_EX_TRANSPARENT. + 2010-02-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> Reviewed by Kenneth Rohde Christiansen. diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl index ef1c133..4e26cfa 100755 --- a/WebKit/win/Interfaces/IWebFramePrivate.idl +++ b/WebKit/win/Interfaces/IWebFramePrivate.idl @@ -102,4 +102,10 @@ interface IWebFramePrivate : IUnknown HRESULT counterValueForElementById([in] BSTR id, [out, retval] BSTR* result); HRESULT pauseSVGAnimation([in] BSTR elementId, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning); + + HRESULT visibleContentRect([out, retval] RECT*); + + HRESULT pageNumberForElementById([in] BSTR id, [in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber); + + HRESULT numberOfPages([in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber); } diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl index 613a53d..54c1d42 100644 --- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl +++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl @@ -100,4 +100,7 @@ interface IWebPreferencesPrivate : IUnknown HRESULT setCustomDragCursorsEnabled([in] BOOL); HRESULT customDragCursorsEnabled([out, retval] BOOL*); + + HRESULT allowFileAccessFromFileURLs([out, retval] BOOL *allowAccess); + HRESULT setAllowFileAccessFromFileURLs([in] BOOL allowAccess); } diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl index 3cd748c..0de6b0b 100644 --- a/WebKit/win/Interfaces/WebKit.idl +++ b/WebKit/win/Interfaces/WebKit.idl @@ -283,7 +283,7 @@ library WebKit coclass WebScriptWorld { [default] interface IWebScriptWorld; } - + [uuid(13C45703-A3B3-8797-276B-75632F6165C3)] coclass WebSerializedJSValue { [default] interface IWebSerializedJSValue; diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp index a1bb3a8..45f7662 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp +++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp @@ -734,6 +734,12 @@ void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChoose // FIXME: Show some sort of error if too many files are selected and the buffer is too small. For now, this will fail silently. } +void WebChromeClient::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>) +{ + // FIXME: Move the code of Icon::createIconForFiles() here. + notImplemented(); +} + bool WebChromeClient::setCursor(PlatformCursorHandle cursor) { if (!cursor) diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h index 5198e7c..0958cf7 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.h +++ b/WebKit/win/WebCoreSupport/WebChromeClient.h @@ -123,6 +123,7 @@ public: virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::FloatRect&); virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); + virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>); virtual bool setCursor(WebCore::PlatformCursorHandle cursor); diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp index b927c72..6ae6c5e 100644 --- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp @@ -737,6 +737,10 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin return result.release(); } +void WebFrameLoaderClient::didTransferChildFrameToNewDocument() +{ +} + PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& URL, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer) { Frame* coreFrame = core(m_webFrame); diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h index f1fb5f7..a5f2b1b 100644 --- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h @@ -112,6 +112,7 @@ public: virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WebCore::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); + virtual void didTransferChildFrameToNewDocument(); virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WebCore::String>&, const Vector<WebCore::String>&, const WebCore::String&, bool loadManually); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp index b7ad014..8e03794 100644 --- a/WebKit/win/WebFrame.cpp +++ b/WebKit/win/WebFrame.cpp @@ -86,6 +86,7 @@ #include <WebCore/PluginInfoStore.h> #include <WebCore/PluginDatabase.h> #include <WebCore/PluginView.h> +#include <WebCore/PrintContext.h> #include <WebCore/ResourceHandle.h> #include <WebCore/ResourceHandleWin.h> #include <WebCore/ResourceRequest.h> @@ -849,6 +850,44 @@ HRESULT STDMETHODCALLTYPE WebFrame::counterValueForElementById( return S_OK; } +HRESULT STDMETHODCALLTYPE WebFrame::pageNumberForElementById( + /* [in] */ BSTR id, + /* [in] */ float pageWidthInPixels, + /* [in] */ float pageHeightInPixels, + /* [retval][out] */ int* result) +{ + if (!result) + return E_POINTER; + + Frame* coreFrame = core(this); + if (!coreFrame) + return E_FAIL; + + String coreId = String(id, SysStringLen(id)); + + Element* element = coreFrame->document()->getElementById(coreId); + if (!element) + return E_FAIL; + *result = PrintContext::pageNumberForElement(element, FloatSize(pageWidthInPixels, pageHeightInPixels)); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebFrame::numberOfPages( + /* [in] */ float pageWidthInPixels, + /* [in] */ float pageHeightInPixels, + /* [retval][out] */ int* result) +{ + if (!result) + return E_POINTER; + + Frame* coreFrame = core(this); + if (!coreFrame) + return E_FAIL; + + *result = PrintContext::numberOfPages(coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels)); + return S_OK; +} + HRESULT STDMETHODCALLTYPE WebFrame::scrollOffset( /* [retval][out] */ SIZE* offset) { @@ -1192,6 +1231,24 @@ HRESULT WebFrame::pauseSVGAnimation(BSTR elementId, IDOMNode* node, double secon return S_OK; } +HRESULT WebFrame::visibleContentRect(RECT* rect) +{ + if (!rect) + return E_POINTER; + SetRectEmpty(rect); + + Frame* frame = core(this); + if (!frame) + return E_FAIL; + + FrameView* view = frame->view(); + if (!view) + return E_FAIL; + + *rect = view->visibleContentRect(false); + return S_OK; +} + HRESULT WebFrame::numberOfActiveAnimations(UINT* number) { if (!number) diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h index 1a92751..f4973ea 100644 --- a/WebKit/win/WebFrame.h +++ b/WebKit/win/WebFrame.h @@ -162,6 +162,17 @@ public: /* [in] */ BSTR id, /* [retval][out] */ BSTR *result); + virtual HRESULT STDMETHODCALLTYPE pageNumberForElementById( + /* [in] */ BSTR id, + /* [in] */ float pageWidthInPixels, + /* [in] */ float pageHeightInPixels, + /* [retval][out] */ int* result); + + virtual HRESULT STDMETHODCALLTYPE numberOfPages( + /* [in] */ float pageWidthInPixels, + /* [in] */ float pageHeightInPixels, + /* [retval][out] */ int* result); + virtual HRESULT STDMETHODCALLTYPE scrollOffset( /* [retval][out] */ SIZE* offset); @@ -252,6 +263,8 @@ public: virtual HRESULT STDMETHODCALLTYPE stringByEvaluatingJavaScriptInScriptWorld(IWebScriptWorld*, JSObjectRef globalObjectRef, BSTR script, BSTR* evaluationResult); virtual JSGlobalContextRef STDMETHODCALLTYPE globalContextForScriptWorld(IWebScriptWorld*); + virtual HRESULT STDMETHODCALLTYPE visibleContentRect(RECT*); + // IWebDocumentText virtual HRESULT STDMETHODCALLTYPE supportsTextEncoding( /* [retval][out] */ BOOL* result); diff --git a/WebKit/win/WebKit.vcproj/WebKit.def b/WebKit/win/WebKit.vcproj/WebKit.def index 8d091ec..9e6e55f 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.def +++ b/WebKit/win/WebKit.vcproj/WebKit.def @@ -20,6 +20,7 @@ EXPORTS WebKitSetShouldUseFontSmoothing WebKitShouldUseFontSmoothing WebKitCreateInstance + WebKitSystemParameterChanged ; These functions are deprecated WebLocalizedString diff --git a/WebKit/win/WebKit.vcproj/WebKit_debug.def b/WebKit/win/WebKit.vcproj/WebKit_debug.def index c15957a..fac9d6f 100644 --- a/WebKit/win/WebKit.vcproj/WebKit_debug.def +++ b/WebKit/win/WebKit.vcproj/WebKit_debug.def @@ -20,6 +20,7 @@ EXPORTS WebKitSetShouldUseFontSmoothing WebKitShouldUseFontSmoothing WebKitCreateInstance + WebKitSystemParameterChanged ; These functions are deprecated WebLocalizedString diff --git a/WebKit/win/WebKitGraphics.cpp b/WebKit/win/WebKitGraphics.cpp index 03fe903..444c43c 100644 --- a/WebKit/win/WebKitGraphics.cpp +++ b/WebKit/win/WebKitGraphics.cpp @@ -175,3 +175,9 @@ bool WebKitShouldUseFontSmoothing() { return WebCoreShouldUseFontSmoothing(); } + +void WebKitSystemParameterChanged(UINT parameter) +{ + if (parameter == SPI_SETFONTSMOOTHING || parameter == SPI_SETFONTSMOOTHINGTYPE || parameter == SPI_SETFONTSMOOTHINGCONTRAST || parameter == SPI_SETFONTSMOOTHINGORIENTATION) + wkSystemFontSmoothingChanged(); +} diff --git a/WebKit/win/WebKitGraphics.h b/WebKit/win/WebKitGraphics.h index 59c874b..75ab36c 100644 --- a/WebKit/win/WebKitGraphics.h +++ b/WebKit/win/WebKitGraphics.h @@ -74,6 +74,8 @@ unsigned RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescr void WebKitSetShouldUseFontSmoothing(bool); bool WebKitShouldUseFontSmoothing(); +void WebKitSystemParameterChanged(UINT parameter); + } #endif // !defined(WebKitGraphics_h) diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h index 9f768f2..d1e0f5e 100644 --- a/WebKit/win/WebPreferenceKeysPrivate.h +++ b/WebKit/win/WebPreferenceKeysPrivate.h @@ -49,6 +49,7 @@ #define WebKitJavaScriptEnabledPreferenceKey "WebKitJavaScriptEnabled" #define WebKitWebSecurityEnabledPreferenceKey "WebKitWebSecurityEnabled" #define WebKitAllowUniversalAccessFromFileURLsPreferenceKey "WebKitAllowUniversalAccessFromFileURLs" +#define WebKitAllowFileAccessFromFileURLsPreferenceKey "WebKitAllowFileAccessFromFileURLs" #define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey "WebKitJavaScriptCanOpenWindowsAutomatically" #define WebKitPluginsEnabledPreferenceKey "WebKitPluginsEnabled" #define WebKitDatabasesEnabledPreferenceKey "WebKitDatabasesEnabled" diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp index 13c2ac4..0e44d9f 100644 --- a/WebKit/win/WebPreferences.cpp +++ b/WebKit/win/WebPreferences.cpp @@ -205,6 +205,7 @@ void WebPreferences::initializeDefaultSettings() CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitWebSecurityEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitAllowUniversalAccessFromFileURLsPreferenceKey), kCFBooleanFalse); + CFDictionaryAddValue(defaults, CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitXSSAuditorEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitFrameSetFlatteningEnabledPreferenceKey), kCFBooleanFalse); CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey), kCFBooleanTrue); @@ -792,6 +793,20 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setAllowUniversalAccessFromFileURLs( return S_OK; } +HRESULT STDMETHODCALLTYPE WebPreferences::allowFileAccessFromFileURLs( + /* [retval][out] */ BOOL* allowAccess) +{ + *allowAccess = boolValueForKey(CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey)); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebPreferences::setAllowFileAccessFromFileURLs( + /* [in] */ BOOL allowAccess) +{ + setBoolValue(CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey), allowAccess); + return S_OK; +} + HRESULT STDMETHODCALLTYPE WebPreferences::isXSSAuditorEnabled( /* [retval][out] */ BOOL* enabled) { diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h index 9209b7d..e4af17a 100644 --- a/WebKit/win/WebPreferences.h +++ b/WebKit/win/WebPreferences.h @@ -362,6 +362,12 @@ public: virtual HRESULT STDMETHODCALLTYPE setAllowUniversalAccessFromFileURLs( /* [in] */ BOOL allowAccess); + virtual HRESULT STDMETHODCALLTYPE allowFileAccessFromFileURLs( + /* [retval][out] */ BOOL* allowAccess); + + virtual HRESULT STDMETHODCALLTYPE setAllowFileAccessFromFileURLs( + /* [in] */ BOOL allowAccess); + virtual HRESULT STDMETHODCALLTYPE isXSSAuditorEnabled( /* [retval][out] */ BOOL* enabled); diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index 880c75f..8636d15 100644 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2008 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 @@ -24,7 +24,6 @@ */ #include "config.h" - #include "WebView.h" #include "CFDictionaryPropertyBag.h" @@ -2596,7 +2595,7 @@ void WebView::initializeToolTipWindow() if (!initCommonControls()) return; - m_toolTipHwnd = CreateWindowEx(0, TOOLTIPS_CLASS, 0, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, + m_toolTipHwnd = CreateWindowEx(WS_EX_TRANSPARENT, TOOLTIPS_CLASS, 0, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, m_viewWindow, 0, 0, 0); if (!m_toolTipHwnd) @@ -4622,6 +4621,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) return hr; settings->setAllowUniversalAccessFromFileURLs(!!enabled); + hr = prefsPrivate->allowFileAccessFromFileURLs(&enabled); + if (FAILED(hr)) + return hr; + settings->setAllowFileAccessFromFileURLs(!!enabled); + hr = prefsPrivate->isXSSAuditorEnabled(&enabled); if (FAILED(hr)) return hr; @@ -5766,7 +5770,7 @@ HRESULT WebView::setJavaScriptURLsAreAllowed(BOOL areAllowed) HRESULT WebView::setCanStartPlugins(BOOL canStartPlugins) { - m_page->setCanStartPlugins(canStartPlugins); + m_page->setCanStartMedia(canStartPlugins); return S_OK; } |