summaryrefslogtreecommitdiffstats
path: root/WebCore/page/win
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /WebCore/page/win
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/page/win')
-rw-r--r--WebCore/page/win/DragControllerWin.cpp3
-rw-r--r--WebCore/page/win/EventHandlerWin.cpp5
-rw-r--r--WebCore/page/win/FrameCGWin.cpp3
-rw-r--r--WebCore/page/win/FrameWin.cpp2
-rw-r--r--WebCore/page/win/FrameWin.h2
-rw-r--r--WebCore/page/win/PageWin.cpp24
6 files changed, 35 insertions, 4 deletions
diff --git a/WebCore/page/win/DragControllerWin.cpp b/WebCore/page/win/DragControllerWin.cpp
index dca8ea2..f0404ff 100644
--- a/WebCore/page/win/DragControllerWin.cpp
+++ b/WebCore/page/win/DragControllerWin.cpp
@@ -50,7 +50,8 @@ DragOperation DragController::dragOperation(DragData* dragData)
return dragData->containsURL() && !m_didInitiateDrag ? DragOperationCopy : DragOperationNone;
}
-bool DragController::isCopyKeyDown() {
+bool DragController::isCopyKeyDown()
+{
return ::GetAsyncKeyState(VK_CONTROL);
}
diff --git a/WebCore/page/win/EventHandlerWin.cpp b/WebCore/page/win/EventHandlerWin.cpp
index 88bc373..50e50fb 100644
--- a/WebCore/page/win/EventHandlerWin.cpp
+++ b/WebCore/page/win/EventHandlerWin.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -87,9 +88,13 @@ bool EventHandler::eventActivatedView(const PlatformMouseEvent& event) const
PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
{
+#if PLATFORM(WINCE)
+ return 0;
+#else
COMPtr<WCDataObject> dataObject;
WCDataObject::createInstance(&dataObject);
return ClipboardWin::create(true, dataObject.get(), ClipboardWritable);
+#endif
}
void EventHandler::focusDocumentView()
diff --git a/WebCore/page/win/FrameCGWin.cpp b/WebCore/page/win/FrameCGWin.cpp
index 8b0408d..7483627 100644
--- a/WebCore/page/win/FrameCGWin.cpp
+++ b/WebCore/page/win/FrameCGWin.cpp
@@ -28,6 +28,7 @@
#include <windows.h>
+#include "BitmapInfo.h"
#include "FrameView.h"
#include "GraphicsContext.h"
#include "Settings.h"
@@ -55,7 +56,7 @@ static HBITMAP imageFromRect(const Frame* frame, IntRect& ir)
HDC hdc = CreateCompatibleDC(0);
int w = ir.width();
int h = ir.height();
- BITMAPINFO bmp = { { sizeof(BITMAPINFOHEADER), w, h, 1, 32 } };
+ BitmapInfo bmp = BitmapInfo::create(IntSize(w, h));
HBITMAP hbmp = CreateDIBSection(0, &bmp, DIB_RGB_COLORS, static_cast<void**>(&bits), 0, 0);
HBITMAP hbmpOld = static_cast<HBITMAP>(SelectObject(hdc, hbmp));
diff --git a/WebCore/page/win/FrameWin.cpp b/WebCore/page/win/FrameWin.cpp
index 0c1c5b1..1e480fb 100644
--- a/WebCore/page/win/FrameWin.cpp
+++ b/WebCore/page/win/FrameWin.cpp
@@ -47,7 +47,7 @@ void computePageRectsForFrame(Frame* frame, const IntRect& printRect, float head
if (!frame->document() || !frame->view() || !frame->document()->renderer())
return;
- RenderView* root = static_cast<RenderView*>(frame->document()->renderer());
+ RenderView* root = toRenderView(frame->document()->renderer());
if (!root) {
LOG_ERROR("document to be printed has no renderer");
diff --git a/WebCore/page/win/FrameWin.h b/WebCore/page/win/FrameWin.h
index 405c7b2..2924291 100644
--- a/WebCore/page/win/FrameWin.h
+++ b/WebCore/page/win/FrameWin.h
@@ -34,7 +34,7 @@ typedef struct HBITMAP__* HBITMAP;
namespace WebCore {
HBITMAP imageFromSelection(Frame* frame, bool forceWhiteText);
- void computePageRectsForFrame(Frame*, const IntRect& printRect, float headerHeight, float footerHeight, float userScaleFactor,Vector<IntRect>& pages, int& pageHeight);
+ void computePageRectsForFrame(Frame*, const IntRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, Vector<IntRect>& pages, int& pageHeight);
}
diff --git a/WebCore/page/win/PageWin.cpp b/WebCore/page/win/PageWin.cpp
index f4c744a..5d7450c 100644
--- a/WebCore/page/win/PageWin.cpp
+++ b/WebCore/page/win/PageWin.cpp
@@ -27,12 +27,36 @@
#include "Page.h"
#include "Frame.h"
+#include "FrameLoaderClient.h"
#include "FrameView.h"
#include "FloatRect.h"
+#include "PluginView.h"
#include <windows.h>
namespace WebCore {
HINSTANCE Page::s_instanceHandle = 0;
+void Page::setCanStartPlugins(bool canStartPlugins)
+{
+ if (m_canStartPlugins == canStartPlugins)
+ return;
+
+ m_canStartPlugins = canStartPlugins;
+
+ if (!m_canStartPlugins || m_unstartedPlugins.isEmpty())
+ return;
+
+ Vector<PluginView*> unstartedPlugins;
+ copyToVector(m_unstartedPlugins, unstartedPlugins);
+ m_unstartedPlugins.clear();
+
+ for (size_t i = 0; i < unstartedPlugins.size(); ++i) {
+ if (unstartedPlugins[i]->start())
+ continue;
+ unstartedPlugins[i]->parentFrame()->loader()->client()->dispatchDidFailToStartPlugin(unstartedPlugins[i]);
+ }
+}
+
} // namespace WebCore
+