diff options
author | Leon Clarke <leonclarke@google.com> | 2010-06-03 14:33:32 +0100 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-06-08 12:24:51 +0100 |
commit | 5af96e2c7b73ebc627c6894727826a7576d31758 (patch) | |
tree | f9d5e6f6175ccd7e3d14de9b290f08937a0d17ba /WebKit/win | |
parent | 8cc4fcf4f6adcbc0e0aebfc24fbad9a4cddf2cfb (diff) | |
download | external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.zip external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.gz external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.bz2 |
Merge webkit.org at r60469 : Initial merge by git.
Change-Id: I66a0047aa2af802f66bb0c7f2a8b02247a596234
Diffstat (limited to 'WebKit/win')
-rw-r--r-- | WebKit/win/ChangeLog | 105 | ||||
-rw-r--r-- | WebKit/win/FullscreenVideoController.cpp | 126 | ||||
-rw-r--r-- | WebKit/win/FullscreenVideoController.h | 24 | ||||
-rw-r--r-- | WebKit/win/WebDatabaseManager.cpp | 10 | ||||
-rw-r--r-- | WebKit/win/WebDatabaseManager.h | 2 | ||||
-rw-r--r-- | WebKit/win/WebFrame.cpp | 12 | ||||
-rw-r--r-- | WebKit/win/WebView.cpp | 74 | ||||
-rw-r--r-- | WebKit/win/WebView.h | 7 |
8 files changed, 307 insertions, 53 deletions
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index 69d7ea9..2979556 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,108 @@ +2010-05-30 Daniel Bates <dbates@rim.com> + + Unreviewed, attempt to fix the build after http://trac.webkit.org/changeset/60418. + + * WebFrame.cpp: + (WebFrame::elementWithName): + (WebFrame::controlsInForm): + +2010-05-22 Jer Noble <jer.noble@apple.com> + + Reviewed by Adam Roben. + + Full screen doesn't work for video elements + https://bugs.webkit.org/show_bug.cgi?id=39557 + rdar://problem/8011813 + + Modified FullscreenVideoController to work with MediaPlayerPrivateFullscreenWindow. The FullscreenVideoController + is now MediaPlayerPrivate agnostic.. + + * FullscreenVideoController.cpp: + (FullscreenVideoController::LayoutClient::LayoutClient): New helper class which implements WKCACFLayerLayoutClient. + (FullscreenVideoController::LayoutClient::layoutSublayersOfLayer): + (FullscreenVideoController::FullscreenVideoController): + (FullscreenVideoController::~FullscreenVideoController): + (FullscreenVideoController::enterFullscreen): + (FullscreenVideoController::exitFullscreen): + (FullscreenVideoController::fullscreenClientWndProc): Handle WM_KEYDOWN. + (FullscreenVideoController::createHUDWindow): + (FullscreenVideoController::hudWndProc): Handle WM_KEYDOWN. + (FullscreenVideoController::onChar): + (FullscreenVideoController::onKeyDown): New function: handles the VK_ESCAPE case more reliably than WM_CHAR. + * FullscreenVideoController.h: + * WebView.h: + (WebView::viewWindow): Added a simple viewWindow() accessor. + +2010-05-25 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler. + + Database origins aren't populated at launch (missing db in prefs sheet, possible other symptoms) + <rdar://problem/8013233> and https://bugs.webkit.org/show_bug.cgi?id=39486 + + * WebDatabaseManager.cpp: + (WebKitInitializeWebDatabasesIfNecessary): Call initializeTracker() instead of trying to set the path on + an already created tracker that already has its origins populated. + * WebDatabaseManager.h: + + * WebView.cpp: + (WebView::initWithFrame): Call a renamed method instead. + +2010-05-25 Ada Chan <adachan@apple.com> + + Reviewed by Steve Falkenburg. + + https://bugs.webkit.org/show_bug.cgi?id=39651 + + Make m_closeWindowTimer a SuspendableTimer, so it is properly suspended + when page loading is deferred. + + * WebView.cpp: + (WebView::WebView): m_closeWindowTimer is now a pointer to a SuspendableTimer. + (WindowCloseTimer::create): + (WindowCloseTimer::WindowCloseTimer): + (WindowCloseTimer::contextDestroyed): Make sure we delete the WindowCloseTimer in the end. + (WindowCloseTimer::fired): + (WebView::closeWindowSoon): + (WebView::closeWindowTimerFired): + (WebView::notifyPreferencesChanged): Can just check for the existence m_closeWindowTimer, since + we only create it when we need to start the timer. + * WebView.h: + +2010-05-24 Darin Adler <darin@apple.com> + + Reviewed by Eric Seidel. + + Move view-related functions from Frame to FrameView + https://bugs.webkit.org/show_bug.cgi?id=39366 + + * WebFrame.cpp: + (WebFrame::setTextSizeMultiplier): Call function on FrameView. + * WebView.cpp: + (WebView::setZoomMultiplier): Ditto. + +2010-05-24 Anders Carlsson <andersca@apple.com> + + Yet another Windows build fix. + + * WebView.cpp: + (WebView::canShowMIMEType): + Use the right capitalizatinon of 'MIME' (which also happens to be incorrect according to our guidelines). + +2010-05-24 Anders Carlsson <andersca@apple.com> + + Another Windows build fix. + + * WebView.cpp: + Don't include PlugInInfoStore.h, instead include PluginData.h + +2010-05-24 Anders Carlsson <andersca@apple.com> + + Fix Windows build. + + * WebView.cpp: + (WebView::canShowMIMEType): + 2010-05-21 Steve Block <steveblock@google.com> Reviewed by Jeremy Orlow. diff --git a/WebKit/win/FullscreenVideoController.cpp b/WebKit/win/FullscreenVideoController.cpp index 6132fca..3aeb1ba 100644 --- a/WebKit/win/FullscreenVideoController.cpp +++ b/WebKit/win/FullscreenVideoController.cpp @@ -30,12 +30,16 @@ #include "FullscreenVideoController.h" #include "WebKitDLL.h" +#include "WebView.h" #include <ApplicationServices/ApplicationServices.h> #include <WebCore/BitmapInfo.h> +#include <WebCore/Chrome.h> #include <WebCore/Font.h> #include <WebCore/FontSelector.h> #include <WebCore/GraphicsContext.h> +#include <WebCore/Page.h> #include <WebCore/TextRun.h> +#include <WebCore/WKCACFLayer.h> #include <WebKitSystemInterface/WebKitSystemInterface.h> #include <windowsx.h> #include <wtf/StdLibExtras.h> @@ -169,9 +173,53 @@ void HUDSlider::drag(const IntPoint& point, bool start) m_buttonPosition = max(0, min(m_rect.width() - m_buttonSize, point.x() - m_dragStartOffset)); } +#if USE(ACCELERATED_COMPOSITING) +class FullscreenVideoController::LayoutClient : public WKCACFLayerLayoutClient { +public: + LayoutClient(FullscreenVideoController* parent); + void layoutSublayersOfLayer(WKCACFLayer* layer); + + FullscreenVideoController* m_parent; +}; + +FullscreenVideoController::LayoutClient::LayoutClient(FullscreenVideoController* parent) + : m_parent(parent) +{ +} + +void FullscreenVideoController::LayoutClient::layoutSublayersOfLayer(WKCACFLayer* layer) +{ + ASSERT_ARG(layer, layer == m_parent->m_rootChild); + + HTMLMediaElement* mediaElement = m_parent->m_mediaElement.get(); + if (!mediaElement) + return; + + WKCACFLayer* videoLayer = mediaElement->platformLayer(); + if (!videoLayer || videoLayer->superlayer() != layer) + return; + + FloatRect layerBounds = layer->bounds(); + + FloatSize videoSize = mediaElement->player()->naturalSize(); + float scaleFactor; + if (videoSize.aspectRatio() > layerBounds.size().aspectRatio()) + scaleFactor = layerBounds.width() / videoSize.width(); + else + scaleFactor = layerBounds.height() / videoSize.height(); + videoSize.scale(scaleFactor); + + // Calculate the centered position based on the videoBounds and layerBounds: + FloatPoint videoPosition; + FloatPoint videoOrigin; + videoOrigin.setX((layerBounds.width() - videoSize.width()) * 0.5); + videoOrigin.setY((layerBounds.height() - videoSize.height()) * 0.5); + videoLayer->setFrame(FloatRect(videoOrigin, videoSize)); +} +#endif + 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)) @@ -183,25 +231,22 @@ FullscreenVideoController::FullscreenVideoController() , m_hitWidget(0) , m_movingWindow(false) , m_timer(this, &FullscreenVideoController::timerFired) +#if USE(ACCELERATED_COMPOSITING) + , m_rootChild(WKCACFLayer::create(WKCACFLayer::Layer)) + , m_layoutClient(new LayoutClient(this)) +#endif + , m_fullscreenWindow(new MediaPlayerPrivateFullscreenWindow(this)) { +#if USE(ACCELERATED_COMPOSITING) + m_rootChild->setLayoutClient(m_layoutClient.get()); +#endif } FullscreenVideoController::~FullscreenVideoController() { - if (movie()) - movie()->exitFullscreen(); -} - -QTMovieGWorld* FullscreenVideoController::movie() const -{ - if (!m_mediaElement) - return 0; - - PlatformMedia platformMedia = m_mediaElement->platformMedia(); - if (platformMedia.type != PlatformMedia::QTMovieGWorldType) - return 0; - - return platformMedia.media.qtMovieGWorld; +#if USE(ACCELERATED_COMPOSITING) + m_rootChild->setLayoutClient(0); +#endif } void FullscreenVideoController::setMediaElement(HTMLMediaElement* mediaElement) @@ -218,13 +263,23 @@ void FullscreenVideoController::setMediaElement(HTMLMediaElement* mediaElement) void FullscreenVideoController::enterFullscreen() { - if (!movie()) + if (!m_mediaElement) return; - m_videoWindow = movie()->enterFullscreen(this); + WebView* webView = kit(m_mediaElement->document()->page()); + HWND parentHwnd = webView ? webView->viewWindow() : 0; + + m_fullscreenWindow->createWindow(parentHwnd); +#if USE(ACCELERATED_COMPOSITING) + m_fullscreenWindow->setRootChildLayer(m_rootChild); + + WKCACFLayer* videoLayer = m_mediaElement->player()->platformLayer(); + m_rootChild->addSublayer(videoLayer); + m_rootChild->setNeedsLayout(); +#endif RECT windowRect; - GetClientRect(m_videoWindow, &windowRect); + GetClientRect(m_fullscreenWindow->hwnd(), &windowRect); m_fullscreenSize.setWidth(windowRect.right - windowRect.left); m_fullscreenSize.setHeight(windowRect.bottom - windowRect.top); @@ -234,12 +289,23 @@ void FullscreenVideoController::enterFullscreen() void FullscreenVideoController::exitFullscreen() { SetWindowLongPtr(m_hudWindow, 0, 0); - if (movie()) - movie()->exitFullscreen(); + + if (m_fullscreenWindow) + m_fullscreenWindow = 0; ASSERT(!IsWindow(m_hudWindow)); - m_videoWindow = 0; m_hudWindow = 0; + + // We previously ripped the mediaElement's platform layer out + // of its orginial layer tree to display it in our fullscreen + // window. Now, we need to get the layer back in its original + // tree. + // + // As a side effect of setting the player to invisible/visible, + // the player's layer will be recreated, and will be picked up + // the next time the layer tree is synched. + m_mediaElement->player()->setVisible(0); + m_mediaElement->player()->setVisible(1); } bool FullscreenVideoController::canPlay() const @@ -308,6 +374,9 @@ LRESULT FullscreenVideoController::fullscreenClientWndProc(HWND wnd, UINT messag case WM_CHAR: onChar(wParam); break; + case WM_KEYDOWN: + onKeyDown(wParam); + break; case WM_LBUTTONDOWN: onMouseDown(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); break; @@ -364,7 +433,7 @@ void FullscreenVideoController::createHUDWindow() // 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); + InvalidateRect(m_fullscreenWindow->hwnd(), &clearRect, true); m_playPauseButton.setShowAltButton(!canPlay()); m_volumeSlider.setValue(volume()); @@ -377,7 +446,7 @@ void FullscreenVideoController::createHUDWindow() m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW, fullscreenVideeoHUDWindowClassName, 0, WS_POPUP | WS_VISIBLE, - m_hudPosition.x(), m_hudPosition.y(), 0, 0, m_videoWindow, 0, gInstance, 0); + m_hudPosition.x(), m_hudPosition.y(), 0, 0, m_fullscreenWindow->hwnd(), 0, gInstance, 0); ASSERT(::IsWindow(m_hudWindow)); SetWindowLongPtr(m_hudWindow, 0, reinterpret_cast<LONG_PTR>(this)); @@ -488,6 +557,9 @@ LRESULT FullscreenVideoController::hudWndProc(HWND wnd, UINT message, WPARAM wPa case WM_CHAR: controller->onChar(wParam); break; + case WM_KEYDOWN: + controller->onKeyDown(wParam); + break; case WM_LBUTTONDOWN: controller->onMouseDown(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); break; @@ -511,6 +583,14 @@ void FullscreenVideoController::onChar(int c) togglePlay(); } +void FullscreenVideoController::onKeyDown(int virtualKey) +{ + if (virtualKey == VK_ESCAPE) { + if (m_mediaElement) + m_mediaElement->exitFullscreen(); + } +} + void FullscreenVideoController::timerFired(Timer<FullscreenVideoController>*) { // Update the time slider diff --git a/WebKit/win/FullscreenVideoController.h b/WebKit/win/FullscreenVideoController.h index 31acc63..9ac8c69 100644 --- a/WebKit/win/FullscreenVideoController.h +++ b/WebKit/win/FullscreenVideoController.h @@ -28,7 +28,7 @@ #if ENABLE(VIDEO) -#include "QTMovieGWorld.h" +#include "MediaPlayerPrivateFullscreenWindow.h" #include <WebCore/HTMLMediaElement.h> #include <WebCore/Image.h> @@ -38,6 +38,9 @@ namespace WebCore { class GraphicsContext; +#if USE(ACCELERATED_COMPOSITING) +class WKCACFLayer; +#endif } class HUDWidget { @@ -99,7 +102,7 @@ private: int m_dragStartOffset; }; -class FullscreenVideoController : QTMovieGWorldFullscreenClient, public Noncopyable { +class FullscreenVideoController : WebCore::MediaPlayerPrivateFullscreenClient, public Noncopyable { public: FullscreenVideoController(); virtual ~FullscreenVideoController(); @@ -111,12 +114,11 @@ public: void exitFullscreen(); private: - // QTMovieGWorldFullscreenClient + // MediaPlayerPrivateFullscreenWindowClient virtual LRESULT fullscreenClientWndProc(HWND, UINT message, WPARAM, LPARAM); - + void ensureWindow(); - QTMovieGWorld* movie() const; - + bool canPlay() const; void play(); void pause(); @@ -145,13 +147,21 @@ private: void onMouseDown(const WebCore::IntPoint&); void onMouseMove(const WebCore::IntPoint&); void onMouseUp(const WebCore::IntPoint&); + void onKeyDown(int virtualKey); RefPtr<WebCore::HTMLMediaElement> m_mediaElement; - HWND m_hudWindow, m_videoWindow; + HWND m_hudWindow; OwnPtr<HBITMAP> m_bitmap; WebCore::IntSize m_fullscreenSize; WebCore::IntPoint m_hudPosition; + OwnPtr<WebCore::MediaPlayerPrivateFullscreenWindow> m_fullscreenWindow; +#if USE(ACCELERATED_COMPOSITING) + RefPtr<WebCore::WKCACFLayer> m_rootChild; + class LayoutClient; + friend class LayoutClient; + OwnPtr<LayoutClient> m_layoutClient; +#endif HUDButton m_playPauseButton; HUDButton m_timeSliderButton; diff --git a/WebKit/win/WebDatabaseManager.cpp b/WebKit/win/WebDatabaseManager.cpp index 989f33c..238aa61 100644 --- a/WebKit/win/WebDatabaseManager.cpp +++ b/WebKit/win/WebDatabaseManager.cpp @@ -370,16 +370,16 @@ void WebDatabaseManager::dispatchDidModifyDatabase(SecurityOrigin* origin, const notifyCenter->postNotificationName(databaseDidModifyOriginName, securityOrigin.get(), userInfoBag.get()); } -void WebKitSetWebDatabasesPathIfNecessary() +void WebKitInitializeWebDatabasesIfNecessary() { - static bool pathSet = false; - if (pathSet) + static bool initialized = false; + if (initialized) return; WebCore::String databasesDirectory = WebCore::pathByAppendingComponent(WebCore::localUserSpecificStorageDirectory(), "Databases"); - WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(databasesDirectory); + WebCore::DatabaseTracker::initializeTracker(databasesDirectory); - pathSet = true; + initialized = true; } #endif diff --git a/WebKit/win/WebDatabaseManager.h b/WebKit/win/WebDatabaseManager.h index c932986..405c916 100644 --- a/WebKit/win/WebDatabaseManager.h +++ b/WebKit/win/WebDatabaseManager.h @@ -88,7 +88,7 @@ private: ULONG m_refCount; }; -void WebKitSetWebDatabasesPathIfNecessary(); +void WebKitInitializeWebDatabasesIfNecessary(); #endif diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp index 319fbbc..22bd339 100644 --- a/WebKit/win/WebFrame.cpp +++ b/WebKit/win/WebFrame.cpp @@ -83,7 +83,7 @@ #include <WebCore/NotImplemented.h> #include <WebCore/Page.h> #include <WebCore/PlatformKeyboardEvent.h> -#include <WebCore/PluginInfoStore.h> +#include <WebCore/PluginData.h> #include <WebCore/PluginDatabase.h> #include <WebCore/PluginView.h> #include <WebCore/PrintContext.h> @@ -1103,7 +1103,9 @@ void WebFrame::setTextSizeMultiplier(float multiplier) { Frame* coreFrame = core(this); ASSERT(coreFrame); - coreFrame->setZoomFactor(multiplier, ZoomTextOnly); + + if (FrameView* view = coreFrame->view()) + view->setZoomFactor(multiplier, ZoomTextOnly); } HRESULT WebFrame::inViewSourceMode(BOOL* flag) @@ -1140,7 +1142,7 @@ HRESULT WebFrame::elementWithName(BSTR name, IDOMElement* form, IDOMElement** el HTMLFormElement *formElement = formElementFromDOMElement(form); if (formElement) { - Vector<HTMLFormControlElement*>& elements = formElement->formElements; + const Vector<HTMLFormControlElement*>& elements = formElement->associatedElements(); AtomicString targetName((UChar*)name, SysStringLen(name)); for (unsigned int i = 0; i < elements.size(); i++) { HTMLFormControlElement *elt = elements[i]; @@ -1338,7 +1340,7 @@ HRESULT WebFrame::controlsInForm(IDOMElement* form, IDOMElement** controls, int* return E_FAIL; int inCount = *cControls; - int count = (int) formElement->formElements.size(); + int count = (int) formElement->associatedElements().size(); *cControls = count; if (!controls) return S_OK; @@ -1346,7 +1348,7 @@ HRESULT WebFrame::controlsInForm(IDOMElement* form, IDOMElement** controls, int* return E_FAIL; *cControls = 0; - Vector<HTMLFormControlElement*>& elements = formElement->formElements; + const Vector<HTMLFormControlElement*>& elements = formElement->associatedElements(); for (int i = 0; i < count; i++) { if (elements.at(i)->isEnumeratable()) { // Skip option elements, other duds controls[*cControls] = DOMElement::createInstance(elements.at(i)); diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index 20f0f06..525108f 100644 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -105,8 +105,8 @@ #include <WebCore/PlatformKeyboardEvent.h> #include <WebCore/PlatformMouseEvent.h> #include <WebCore/PlatformWheelEvent.h> +#include <WebCore/PluginData.h> #include <WebCore/PluginDatabase.h> -#include <WebCore/PluginInfoStore.h> #include <WebCore/PluginView.h> #include <WebCore/PopupMenu.h> #include <WebCore/ProgressTracker.h> @@ -330,7 +330,7 @@ WebView::WebView() , m_didClose(false) , m_inIMEComposition(0) , m_toolTipHwnd(0) - , m_closeWindowTimer(this, &WebView::closeWindowTimerFired) + , m_closeWindowTimer(0) , m_topLevelParent(0) , m_deleteBackingStoreTimerActive(false) , m_transparent(false) @@ -1079,13 +1079,67 @@ void WebView::frameRect(RECT* rect) ::GetWindowRect(m_viewWindow, rect); } +class WindowCloseTimer : public WebCore::SuspendableTimer { +public: + static WindowCloseTimer* create(WebView*); + +private: + WindowCloseTimer(ScriptExecutionContext*, WebView*); + virtual void contextDestroyed(); + virtual void fired(); + + WebView* m_webView; +}; + +WindowCloseTimer* WindowCloseTimer::create(WebView* webView) +{ + ASSERT_ARG(webView, webView); + Frame* frame = core(webView->topLevelFrame()); + ASSERT(frame); + if (!frame) + return 0; + + Document* document = frame->document(); + ASSERT(document); + if (!document) + return 0; + + return new WindowCloseTimer(document, webView); +} + +WindowCloseTimer::WindowCloseTimer(ScriptExecutionContext* context, WebView* webView) + : SuspendableTimer(context) + , m_webView(webView) +{ + ASSERT_ARG(context, context); + ASSERT_ARG(webView, webView); +} + +void WindowCloseTimer::contextDestroyed() +{ + SuspendableTimer::contextDestroyed(); + delete this; +} + +void WindowCloseTimer::fired() +{ + m_webView->closeWindowTimerFired(); +} + void WebView::closeWindowSoon() { - m_closeWindowTimer.startOneShot(0); + if (m_closeWindowTimer) + return; + + m_closeWindowTimer = WindowCloseTimer::create(this); + if (!m_closeWindowTimer) + return; + m_closeWindowTimer->startOneShot(0); + AddRef(); } -void WebView::closeWindowTimerFired(WebCore::Timer<WebView>*) +void WebView::closeWindowTimerFired() { closeWindow(); Release(); @@ -2425,7 +2479,7 @@ HRESULT STDMETHODCALLTYPE WebView::canShowMIMEType( *canShow = MIMETypeRegistry::isSupportedImageMIMEType(mimeTypeStr) || MIMETypeRegistry::isSupportedNonImageMIMEType(mimeTypeStr) || - PluginInfoStore::supportsMIMEType(mimeTypeStr) || + (m_page && m_page->pluginData()->supportsMimeType(mimeTypeStr)) || shouldUseEmbeddedView(mimeTypeStr); return S_OK; @@ -2546,7 +2600,7 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame( InitializeLoggingChannelsIfNecessary(); #if ENABLE(DATABASE) - WebKitSetWebDatabasesPathIfNecessary(); + WebKitInitializeWebDatabasesIfNecessary(); #endif WebKitSetApplicationCachePathIfNecessary(); @@ -2912,8 +2966,10 @@ void WebView::setZoomMultiplier(float multiplier, bool isTextOnly) { m_zoomMultiplier = multiplier; m_page->settings()->setZoomMode(isTextOnly ? ZoomTextOnly : ZoomPage); - if (Frame* coreFrame = core(m_mainFrame)) - coreFrame->setZoomFactor(multiplier, isTextOnly ? ZoomTextOnly : ZoomPage); + if (Frame* coreFrame = core(m_mainFrame)) { + if (FrameView* view = coreFrame->view()) + view->setZoomFactor(multiplier, isTextOnly ? ZoomTextOnly : ZoomPage); + } } HRESULT STDMETHODCALLTYPE WebView::textSizeMultiplier( @@ -4735,7 +4791,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) settings->setWebGLEnabled(true); #endif // ENABLE(3D_CANVAS) - if (!m_closeWindowTimer.isActive()) + if (!m_closeWindowTimer) m_mainFrame->invalidate(); // FIXME hr = updateSharedSettingsFromPreferencesIfNeeded(preferences.get()); diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h index 752c16d..d44e6c6 100644 --- a/WebKit/win/WebView.h +++ b/WebKit/win/WebView.h @@ -33,7 +33,7 @@ #include <WebCore/DragActions.h> #include <WebCore/IntRect.h> #include <WebCore/RefCountedGDIHandle.h> -#include <WebCore/Timer.h> +#include <WebCore/SuspendableTimer.h> #include <WebCore/WindowMessageListener.h> #include <WebCore/WKCACFLayer.h> #include <WebCore/WKCACFLayerRenderer.h> @@ -832,6 +832,7 @@ public: void frameRect(RECT* rect); void closeWindow(); void closeWindowSoon(); + void closeWindowTimerFired(); bool didClose() const { return m_didClose; } bool transparent() const { return m_transparent; } @@ -885,6 +886,7 @@ public: void cancelDeleteBackingStoreSoon(); HWND topLevelParent() const { return m_topLevelParent; } + HWND viewWindow() const { return m_viewWindow; } void updateActiveState(); @@ -939,7 +941,6 @@ protected: void preflightSpellChecker(); bool continuousCheckingAllowed(); void initializeToolTipWindow(); - void closeWindowTimerFired(WebCore::Timer<WebView>*); void prepareCandidateWindow(WebCore::Frame*, HIMC); void updateSelectionForIME(); LRESULT onIMERequestCharPosition(WebCore::Frame*, IMECHARPOSITION*); @@ -1011,7 +1012,7 @@ protected: static bool s_allowSiteSpecificHacks; - WebCore::Timer<WebView> m_closeWindowTimer; + WebCore::SuspendableTimer* m_closeWindowTimer; OwnPtr<TRACKMOUSEEVENT> m_mouseOutTracker; HWND m_topLevelParent; |