Commit b2aa0fc0 authored by ap's avatar ap

2006-11-16 Don Gibson <dgibson77@gmail.com>

        Reviewed and landed by ap.

        http://bugs.webkit.org/show_bug.cgi?id=11509:
        Windows build bustage.

        Also reorganizes WebCore.vcproj to add files whose absence wasn't
        causing compile errors, but which should have been there, and to
        make the include directory ordering (and contents) sane.
        Also reorganizes TemporaryLinkStubs.cpp to put headers and
        function groups in alphabetical order, and ensure that all functions
        in the file call notImplemented().

WebCore:
        * WebCore.vcproj/WebCore/WebCore.vcproj:
        * bridge/win/ChromeClientWin.h:
        (WebCore::ChromeClientWin::ref):
        (WebCore::ChromeClientWin::deref):
        * bridge/win/ContextMenuClientWin.h: Added.
        (WebCore::ContextMenuClientWin::~ContextMenuClientWin):
        (WebCore::ContextMenuClientWin::ref):
        (WebCore::ContextMenuClientWin::deref):
        * bridge/win/EditorClientWin.h:
        * bridge/win/FrameWin.cpp:
        (WebCore::FrameWin::~FrameWin):
        (WebCore::FrameWin::keyPress):
        * bridge/win/FrameWin.h:
        * bridge/win/PageWin.cpp: Removed.
        * editing/EditCommand.h:
        * loader/FormState.h:
        * loader/FrameLoader.h:
        * page/EventHandler.cpp:
        * platform/MimeTypeRegistry.cpp:
        (WebCore::initialiseSupportedImageMIMETypes):
        * platform/graphics/win/ImageWin.cpp:
        * platform/network/ResourceError.cpp:
        * platform/network/ResourceHandleInternal.h:
        * platform/network/win/ResourceHandleWin.cpp:
        (WebCore::ResourceHandle::onHandleCreated):
        (WebCore::ResourceHandle::onRequestRedirected):
        (WebCore::ResourceHandle::start):
        (WebCore::ResourceHandle::cancel):
        * platform/win/ScreenWin.cpp:
        (WebCore::monitorInfo):
        (WebCore::screenRect):
        (WebCore::screenAvailableRect):
        (WebCore::screenDepth):
        * platform/win/SoundWin.cpp: Added.
        (WebCore::systemBeep):
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::CacheObjectExpiresTime):
        (WebCore::CheckCacheObjectStatus):
        (WebCore::CheckIfReloading):
        (WebCore::defaultLanguage):
        (WebCore::fileButtonChooseFileLabel):
        (WebCore::fileButtonNoFileSelectedLabel):
        (WebCore::findNextSentenceFromIndex):
        (WebCore::findNextWordFromIndex):
        (WebCore::findSentenceBoundary):
        (WebCore::findWordBoundary):
        (WebCore::focusRingColor):
        (WebCore::historyContains):
        (WebCore::inputElementAltText):
        (WebCore::IsResponseURLEqualToURL):
        (WebCore::cellCursor):
        (WebCore::contextMenuCursor):
        (WebCore::moveCursor):
        (WebCore::verticalTextCursor):
        (WebCore::refreshPlugins):
        (WebCore::resetButtonDefaultLabel):
        (WebCore::ResponseIsMultipart):
        (WebCore::ResponseMIMEType):
        (WebCore::ResponseURL):
        (WebCore::screenDepthPerComponent):
        (WebCore::screenIsMonochrome):
        (WebCore::searchableIndexIntroduction):
        (WebCore::ServeSynchronousRequest):
        (WebCore::setFocusRingColorChangeFunction):
        (WebCore::submitButtonDefaultLabel):
        (WebCore::CachedResource::setPlatformResponse):
        (WebCore::CachedResource::setAllData):
        (WebCore::ChromeClientWin::setWindowRect):
        (WebCore::ChromeClientWin::windowRect):
        (WebCore::ChromeClientWin::pageRect):
        (WebCore::ChromeClientWin::scaleFactor):
        (WebCore::ChromeClientWin::focus):
        (WebCore::ChromeClientWin::unfocus):
        (WebCore::ChromeClientWin::createWindow):
        (WebCore::ChromeClientWin::createModalDialog):
        (WebCore::ChromeClientWin::show):
        (WebCore::ChromeClientWin::canRunModal):
        (WebCore::ChromeClientWin::runModal):
        (WebCore::ChromeClientWin::setToolbarsVisible):
        (WebCore::ChromeClientWin::toolbarsVisible):
        (WebCore::ChromeClientWin::setStatusbarVisible):
        (WebCore::ChromeClientWin::statusbarVisible):
        (WebCore::ChromeClientWin::setScrollbarsVisible):
        (WebCore::ChromeClientWin::scrollbarsVisible):
        (WebCore::ChromeClientWin::setMenubarVisible):
        (WebCore::ChromeClientWin::menubarVisible):
        (WebCore::ChromeClientWin::setResizable):
        (WebCore::ContextMenu::appendItem):
        (WebCore::ContextMenuClientWin::addCustomContextMenuItems):
        (WebCore::DocumentLoader::setFrame):
        (WebCore::DocumentLoader::frameLoader):
        (WebCore::DocumentLoader::URL):
        (WebCore::DocumentLoader::isStopping):
        (WebCore::DocumentLoader::stopLoading):
        (WebCore::DocumentLoader::setLoading):
        (WebCore::DocumentLoader::updateLoading):
        (WebCore::DocumentLoader::setupForReplaceByMIMEType):
        (WebCore::DocumentLoader::isLoadingInAPISense):
        (WebCore::DocumentLoader::stopRecordingResponses):
        (WebCore::EditorClientWin::shouldDeleteRange):
        (WebCore::EditorClientWin::shouldShowDeleteInterface):
        (WebCore::EditorClientWin::isContinuousSpellCheckingEnabled):
        (WebCore::EditorClientWin::isGrammarCheckingEnabled):
        (WebCore::EditorClientWin::spellCheckerDocumentTag):
        (WebCore::EventHandler::focusDocumentView):
        (WebCore::EventHandler::handleDrag):
        (WebCore::EventHandler::handleMouseUp):
        (WebCore::EventHandler::lastEventIsMouseUp):
        (WebCore::EventHandler::passMousePressEventToSubframe):
        (WebCore::EventHandler::passMouseMoveEventToSubframe):
        (WebCore::EventHandler::passMouseReleaseEventToSubframe):
        (WebCore::EventHandler::passWheelEventToSubframe):
        (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
        (WebCore::EventHandler::passMousePressEventToScrollbar):
        (WebCore::EventHandler::shouldDragAutoNode):
        (WebCore::EventHandler::tabsToAllControls):
        (WebCore::EventHandler::tabsToLinks):
        (WebCore::Frame::setNeedsReapplyStyles):
        (WebCore::FrameLoader::didFirstLayout):
        (WebCore::FrameLoader::overrideMediaType):
        (WebCore::FrameLoader::createJavaAppletWidget):
        (WebCore::FrameLoader::redirectDataToPlugin):
        (WebCore::FrameLoader::getHistoryLength):
        (WebCore::FrameLoader::setTitle):
        (WebCore::FrameLoader::referrer):
        (WebCore::FrameLoader::saveDocumentState):
        (WebCore::FrameLoader::restoreDocumentState):
        (WebCore::FrameLoader::goBackOrForward):
        (WebCore::FrameLoader::historyURL):
        (WebCore::FrameLoader::urlSelected):
        (WebCore::FrameLoader::createFrame):
        (WebCore::FrameLoader::submitForm):
        (WebCore::FrameLoader::partClearedInBegin):
        (WebCore::FrameLoader::originalRequestURL):
        (WebCore::FrameLoader::canGoBackOrForward):
        (WebCore::FrameLoader::objectContentType):
        (WebCore::FrameLoader::createPlugin):
        (WebCore::FrameLoader::detachFromParent):
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
        (WebCore::FrameView::updateBorder):
        (WebCore::FrameWin::bindingRootObject):
        (WebCore::FrameWin::canPaste):
        (WebCore::FrameWin::issuePasteAndMatchStyleCommand):
        (WebCore::FrameWin::markedTextRange):
        (WebCore::FrameWin::passSubframeEventToSubframe):
        (WebCore::FrameWin::lastEventIsMouseUp):
        (WebCore::FrameWin::addMessageToConsole):
        (WebCore::FrameWin::shouldChangeSelection):
        (WebCore::FrameWin::respondToChangedSelection):
        (WebCore::FrameWin::clearUndoRedoOperations):
        (WebCore::FrameWin::markMisspellingsInAdjacentWords):
        (WebCore::FrameWin::respondToChangedContents):
        (WebCore::GraphicsContext::addRoundedRectClip):
        (WebCore::GraphicsContext::setShadow):
        (WebCore::GraphicsContext::clearShadow):
        (WebCore::GraphicsContext::beginTransparencyLayer):
        (WebCore::GraphicsContext::endTransparencyLayer):
        (WebCore::GraphicsContext::clearRect):
        (WebCore::GraphicsContext::strokeRect):
        (WebCore::GraphicsContext::setLineWidth):
        (WebCore::GraphicsContext::setLineCap):
        (WebCore::GraphicsContext::setLineJoin):
        (WebCore::GraphicsContext::setMiterLimit):
        (WebCore::GraphicsContext::setAlpha):
        (WebCore::GraphicsContext::setCompositeOperation):
        (WebCore::GraphicsContext::clip):
        (WebCore::GraphicsContext::rotate):
        (WebCore::GraphicsContext::scale):
        (WebCore::Icon::Icon):
        (WebCore::Icon::~Icon):
        (WebCore::Icon::newIconForFile):
        (WebCore::Icon::paint):
        (WebCore::IconDatabase::isIconExpiredForIconURL):
        (WebCore::IconDatabase::hasEntryForIconURL):
        (WebCore::IconDatabase::sharedIconDatabase):
        (WebCore::IconDatabase::setIconURLForPageURL):
        (WebCore::IconDatabase::setIconDataForIconURL):
        (WebCore::Image::drawTiled):
        (WebCore::Image::getHBITMAP):
        (WebCore::Path::Path):
        (WebCore::Path::~Path):
        (WebCore::Path::contains):
        (WebCore::Path::translate):
        (WebCore::Path::boundingRect):
        (WebCore::Path::operator=):
        (WebCore::Path::clear):
        (WebCore::Path::moveTo):
        (WebCore::Path::addLineTo):
        (WebCore::Path::addQuadCurveTo):
        (WebCore::Path::addBezierCurveTo):
        (WebCore::Path::addArcTo):
        (WebCore::Path::closeSubpath):
        (WebCore::Path::addArc):
        (WebCore::Path::addRect):
        (WebCore::Path::addEllipse):
        (WebCore::Path::transform):
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        (WebCore::PlatformScrollbar::PlatformScrollbar):
        (WebCore::PlatformScrollbar::~PlatformScrollbar):
        (WebCore::PlatformScrollbar::width):
        (WebCore::PlatformScrollbar::height):
        (WebCore::PlatformScrollbar::setEnabled):
        (WebCore::PlatformScrollbar::paint):
        (WebCore::PlatformScrollbar::updateThumbPosition):
        (WebCore::PlatformScrollbar::updateThumbProportion):
        (WebCore::PlatformScrollbar::setRect):
        (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
        (WebCore::PlugInInfoStore::pluginCount):
        (WebCore::PlugInInfoStore::supportsMIMEType):
        (WebCore::PolicyCheck::PolicyCheck):
        (WebCore::PolicyCheck::clear):
        (WebCore::PolicyCheck::clearRequest):
        (WebCore::PolicyCheck::call):
        (WebCore::RenderThemeWin::systemFont):
        (WebCore::RenderThemeWin::paintMenuList):
        (WebCore::RenderThemeWin::adjustMenuListStyle):
        (WebCore::ResourceLoader::cancel):
        (WebCore::ScrollView::addChild):
        (WebCore::ScrollView::removeChild):
        (WebCore::ScrollView::scrollPointRecursively):
        (WebCore::ScrollView::inWindow):
        (WebCore::ScrollView::paint):
        (WebCore::ScrollView::wheelEvent):
        (WebCore::ScrollView::themeChanged):
        (WebCore::ScrollView::convertChildToSelf):
        (WebCore::ScrollView::convertSelfToChild):
        (WebCore::ScrollView::geometryChanged):
        (WebCore::ScrollView::scrollbarUnderMouse):
        (WebCore::ScrollView::setFrameGeometry):
        (WebCore::ScrollView::windowResizerRect):
        (WebCore::ScrollView::resizerOverlapsContent):
        (WebCore::TextField::selectAll):
        (WebCore::TextField::addSearchResult):
        (WebCore::TextField::selectionStart):
        (WebCore::TextField::hasSelectedText):
        (WebCore::TextField::selectedText):
        (WebCore::TextField::setAutoSaveName):
        (WebCore::TextField::checksDescendantsForFocus):
        (WebCore::TextField::setSelection):
        (WebCore::TextField::setMaxResults):
        (WebCore::TextField::edited):
        (WebCore::TextField::focusPolicy):
        (WebCore::TextField::TextField):
        (WebCore::TextField::~TextField):
        (WebCore::TextField::setFont):
        (WebCore::TextField::setAlignment):
        (WebCore::TextField::setWritingDirection):
        (WebCore::TextField::maxLength):
        (WebCore::TextField::setMaxLength):
        (WebCore::TextField::text):
        (WebCore::TextField::setText):
        (WebCore::TextField::cursorPosition):
        (WebCore::TextField::setCursorPosition):
        (WebCore::TextField::setEdited):
        (WebCore::TextField::setReadOnly):
        (WebCore::TextField::setPlaceholderString):
        (WebCore::TextField::setColors):
        (WebCore::TextField::sizeForCharacterWidth):
        (WebCore::TextField::baselinePosition):
        (WebCore::TextField::setLiveSearch):
        (WebCore::Widget::enableFlushDrawing):
        (WebCore::Widget::isEnabled):
        (WebCore::Widget::focusPolicy):
        (WebCore::Widget::disableFlushDrawing):
        (WebCore::Widget::removeFromParent):
        (WebCore::Widget::lockDrawingFocus):
        (WebCore::Widget::unlockDrawingFocus):
        (WebCore::Widget::capturingMouse):
        (WebCore::Widget::setCapturingMouse):
        (WebCore::Widget::capturingTarget):
        (WebCore::Widget::capturingChild):
        (WebCore::Widget::setCapturingChild):
        (WebCore::Widget::convertChildToSelf):
        (WebCore::Widget::convertSelfToChild):
        (WebCore::Widget::setParent):
        (WebCore::Widget::parent):
        (WebCore::Widget::setEnabled):
        (WebCore::Widget::paint):
        (WebCore::Widget::setIsSelected):
        (WebCore::Widget::invalidate):
        (WebCore::Widget::invalidateRect):
        * platform/win/WidgetWin.cpp:
        (WebCore::Widget::clearFocus):

WebKit:
        * COM/WebFrame.cpp:
        (WebFrame::initWithName):
        (WebFrame::loadHTMLString):
        (WebFrame::stopLoading):
        (WebFrame::reload):
        (WebFrame::loadDataSource):
        (WebFrame::didReceiveData):
        (WebFrame::receivedResponse):
        (WebFrame::receivedAllData):
        * COM/WebFrame.h:
        * COM/WebView.cpp:
        (WebView::mouseMoved):
        (WebView::mouseDown):
        (WebView::mouseUp):
        (WebView::mouseDoubleClick):
        * WebKit.vcproj/WebKit.vcproj:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 26684cf2
This diff is collapsed.
/*
* Copyright (C) 2006 Don Gibson <dgibson77@gmail.com>
* Copyright (C) 2006 Apple Computer, Inc.
*
* All rights reserved.
*
......@@ -33,12 +32,43 @@
namespace WebCore {
class ChromeClientWin : public ChromeClient {
class ChromeClientWin : public ChromeClient, public Shared<ChromeClientWin> {
public:
virtual ~ChromeClientWin() { }
virtual void ref() { Shared<ChromeClientWin>::ref(); }
virtual void deref() { Shared<ChromeClientWin>::deref(); }
virtual void setWindowRect(const FloatRect&);
virtual FloatRect windowRect();
virtual FloatRect pageRect();
virtual float scaleFactor();
virtual void focus();
virtual void unfocus();
virtual Page* createWindow(const FrameLoadRequest&);
virtual Page* createModalDialog(const FrameLoadRequest&);
virtual void show();
virtual bool canRunModal();
virtual void runModal();
virtual void setToolbarsVisible(bool);
virtual bool toolbarsVisible();
virtual void setStatusbarVisible(bool);
virtual bool statusbarVisible();
virtual void setScrollbarsVisible(bool);
virtual bool scrollbarsVisible();
virtual void setMenubarVisible(bool);
virtual bool menubarVisible();
virtual void setResizable(bool);
};
}
......
/*
* Copyright (C) 2006 Don Gibson <dgibson77@gmail.com>
*
* 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 ContextMenuClientWin_H
#define ContextMenuClientWin_H
#include "ContextMenuClient.h"
namespace WebCore {
class ContextMenuClientWin : public ContextMenuClient, public Shared<ContextMenuClientWin> {
public:
virtual ~ContextMenuClientWin() { }
virtual void ref() { Shared<ContextMenuClientWin>::ref(); }
virtual void deref() { Shared<ContextMenuClientWin>::deref(); }
virtual void addCustomContextMenuItems(ContextMenu*);
};
}
#endif // ContextMenuClientWin_H
/*
* Copyright (C) 2006 Don Gibson <dgibson77@gmail.com>
* Copyright (C) 2006 Apple Computer, Inc.
*
* All rights reserved.
*
......
......@@ -29,8 +29,11 @@
#include "TextResourceDecoder.h"
#include "Document.h"
#include "EditorClient.h"
#include "FrameLoader.h"
#include "FrameLoadRequest.h"
#include "FramePrivate.h"
#include "FrameView.h"
#include "Settings.h"
#include "PlatformKeyboardEvent.h"
#include "Plugin.h"
......@@ -59,32 +62,7 @@ FrameWin::FrameWin(Page* page, Element* ownerElement, PassRefPtr<EditorClient>
FrameWin::~FrameWin()
{
setView(0);
clearRecordedFormValues();
}
void FrameWin::urlSelected(const FrameLoadRequest& request, Event* /*triggeringEvent*/)
{
if (m_client)
m_client->openURL(request.resourceRequest().url().url(), request.lockHistory());
}
void FrameWin::submitForm(const FrameLoadRequest& request, Event*)
{
// FIXME: this is a hack inherited from FrameMac, and should be pushed into Frame
const ResourceRequest& resourceRequest = request.resourceRequest();
if (d->m_submittedFormURL == resourceRequest.url())
return;
d->m_submittedFormURL = resourceRequest.url();
if (m_client)
m_client->submitForm(resourceRequest.httpMethod(), resourceRequest.url(), &resourceRequest.httpBody());
clearRecordedFormValues();
}
String FrameWin::userAgent() const
{
return "Mozilla/5.0 (PC; U; Intel; Windows; en) AppleWebKit/420+ (KHTML, like Gecko)";
loader()->clearRecordedFormValues();
}
void FrameWin::runJavaScriptAlert(String const& message)
......@@ -125,7 +103,7 @@ bool FrameWin::keyPress(const PlatformKeyboardEvent& keyEvent)
}
if (!keyEvent.isKeyUp())
prepareForUserAction();
loader()->resetMultipleFormSubmissionProtection();
result = !EventTargetNodeCast(node)->dispatchKeyEvent(keyEvent);
......@@ -134,22 +112,6 @@ bool FrameWin::keyPress(const PlatformKeyboardEvent& keyEvent)
return result;
}
void FrameWin::setTitle(const String &title)
{
String text = title;
text.replace('\\', backslashAsCurrencySymbol());
m_client->setTitle(text);
}
void FrameWin::setStatusBarText(const String& status)
{
String text = status;
text.replace('\\', backslashAsCurrencySymbol());
m_client->setStatusText(text);
}
void FrameWin::createNewWindow(const FrameLoadRequest& request, const WindowFeatures& features, Frame*& newFrame)
{
m_client->createNewWindow(request.resourceRequest(), features, newFrame);
......
......@@ -31,7 +31,9 @@
namespace WebCore {
class FormData;
class FrameLoadRequest;
class ResourceRequest;
struct WindowFeatures;
class FrameWinClient {
......@@ -45,48 +47,31 @@ public:
class FrameWin : public Frame {
public:
FrameWin(Page*, Element*, PassRefPtr<EditorClient>, FrameWinClient*);
~FrameWin();
FrameWin(Page*, Element*, PassRefPtr<EditorClient>, FrameWinClient*);
virtual ~FrameWin();
virtual void createNewWindow(const FrameLoadRequest&, const WindowFeatures&, Frame*& part);
virtual void submitForm(const FrameLoadRequest&, Event*);
virtual void urlSelected(const FrameLoadRequest&, Event*);
virtual void setTitle(const String&);
virtual void setStatusBarText(const String&);
virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
virtual Plugin* createPlugin(Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType);
virtual Frame* createFrame(const KURL&, const String& name, Element* ownerElement, const String& referrer);
virtual Widget* createJavaAppletWidget(const IntSize&, Element*, const HashMap<String, String>& args);
virtual void scheduleClose();
virtual void focusWindow();
virtual void unfocusWindow();
virtual void saveDocumentState();
virtual void restoreDocumentState();
virtual void addMessageToConsole(const String& message, unsigned int lineNumber, const String& sourceID);
virtual void runJavaScriptAlert(const String& message);
virtual bool runJavaScriptConfirm(const String& message);
virtual bool runJavaScriptPrompt(const String& message, const String& defaultValue, String& result);
virtual bool shouldInterruptJavaScript();
virtual bool locationbarVisible();
virtual bool menubarVisible();
virtual bool personalbarVisible();
virtual bool statusbarVisible();
virtual bool toolbarVisible();
virtual void createEmptyDocument();
virtual Range* markedTextRange() const;
virtual String incomingReferrer() const;
virtual String userAgent() const;
virtual String mimeTypeForFileName(const String&) const;
virtual void markMisspellingsInAdjacentWords(const VisiblePosition&);
......@@ -96,14 +81,12 @@ public:
virtual bool passSubframeEventToSubframe(MouseEventWithHitTestResults &, Frame* subframePart = 0);
virtual bool passWheelEventToChildWidget(Node*);
virtual String overrideMediaType() const;
virtual KJS::Bindings::Instance* getEmbedInstanceForWidget(Widget*);
virtual KJS::Bindings::Instance* getObjectInstanceForWidget(Widget*);
virtual KJS::Bindings::Instance* getAppletInstanceForWidget(Widget*);
virtual KJS::Bindings::RootObject* bindingRootObject();
virtual void registerCommandForUndo(PassRefPtr<EditCommand>);
virtual void registerCommandForRedo(PassRefPtr<EditCommand>);
virtual void clearUndoRedoOperations();
......@@ -115,25 +98,16 @@ public:
virtual void issuePasteAndMatchStyleCommand();
virtual void issueTransposeCommand();
virtual void respondToChangedSelection(const Selection& oldSelection, bool closeTyping);
void FrameWin::respondToChangedContents(const Selection& endingSelection);
virtual void respondToChangedContents(const Selection& endingSelection);
virtual bool shouldChangeSelection(const Selection& oldSelection, const Selection& newSelection, EAffinity affinity, bool stillSelecting) const;
virtual void partClearedInBegin();
virtual bool canGoBackOrForward(int distance) const;
virtual void goBackOrForward(int distance);
virtual int getHistoryLength();
virtual KURL historyURL(int distance);
virtual void handledOnloadEvents();
virtual bool canPaste() const;
virtual bool canRedo() const;
virtual bool canUndo() const;
virtual void print();
bool keyPress(const PlatformKeyboardEvent&);
virtual KURL originalRequestURL() const;
virtual IntRect windowResizerRect() const;
virtual bool keyPress(const PlatformKeyboardEvent&);
protected:
virtual bool isLoadTypeReload();
......
......@@ -27,6 +27,7 @@
#define EditCommand_h
#include "EditAction.h"
#include "Element.h"
#include "Selection.h"
namespace WebCore {
......
......@@ -26,6 +26,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef FormState_h
#define FormState_h
#include "Shared.h"
#include "StringHash.h"
#include <wtf/HashMap.h>
......@@ -52,3 +55,5 @@ namespace WebCore {
};
}
#endif // FormState_h
......@@ -29,6 +29,7 @@
#define FrameLoader_h
#include "CachePolicy.h"
#include "FormState.h"
#include "FrameLoaderTypes.h"
#include "KURL.h"
#include "StringHash.h"
......@@ -81,7 +82,6 @@ namespace WebCore {
class Element;
class Event;
class FormData;
class FormState;
class Frame;
class FrameLoaderClient;
class HTMLFormElement;
......
......@@ -40,6 +40,7 @@
#include "HTMLFrameElementBase.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "Image.h"
#include "KeyboardEvent.h"
#include "MouseEvent.h"
#include "MouseEventWithHitTestResults.h"
......
......@@ -76,7 +76,6 @@ static void initialiseSupportedImageMIMETypes()
#else
//assume that all implementations at least support
supportedImageMIMETypes->add("image/jpeg");
supportedImageMIMETypes->add("image/jpeg");
supportedImageMIMETypes->add("image/png");
supportedImageMIMETypes->add("image/gif");
supportedImageMIMETypes->add("image/bmp");
......
......@@ -59,10 +59,4 @@ Image* Image::loadPlatformResource(const char *name)
return img;
}
bool Image::supportsType(const String& type)
{
// FIXME: Implement.
return false;
}
}
......@@ -24,6 +24,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import "config.h"
#import "ResourceError.h"
#include "config.h"
#include "ResourceError.h"
......@@ -36,6 +36,7 @@
#if USE(WININET)
#include <winsock2.h>
#include <windows.h>
#include "Timer.h"
#endif
#if USE(CURL)
......
......@@ -32,7 +32,9 @@
#include "DocLoader.h"
#include "Document.h"
#include "Frame.h"
#include "FrameLoader.h"
#include "Page.h"
#include "ResourceError.h"
#include "Timer.h"
#include <windows.h>
#include <wininet.h>
......@@ -172,7 +174,7 @@ void ResourceHandle::onHandleCreated(LPARAM lParam)
headers += d->m_postReferrer;
headers += "\n";
const CString& headersLatin1 = headers.latin1();
String formData = postData().flattenToString();
String formData = postData()->flattenToString();
INTERNET_BUFFERSA buffers;
memset(&buffers, 0, sizeof(buffers));
buffers.dwStructSize = sizeof(INTERNET_BUFFERSA);
......@@ -196,8 +198,9 @@ void ResourceHandle::onRequestRedirected(LPARAM lParam)
if (d->status != 0)
return;
KURL url(String((StringImpl*) lParam).deprecatedString());
client()->receivedRedirect(this, url);
ResourceRequest request((StringImpl*) lParam);
ResourceResponse redirectResponse;
client()->willSendRequest(this, request, redirectResponse);
}
void ResourceHandle::onRequestComplete(LPARAM lParam)
......@@ -342,7 +345,7 @@ bool ResourceHandle::start(DocLoader* docLoader)
} else {
static HINTERNET internetHandle = 0;
if (!internetHandle) {
String userAgentStr = docLoader->frame()->userAgent() + String("", 1);
String userAgentStr = docLoader->frame()->loader()->userAgent() + String("", 1);
LPCWSTR userAgent = reinterpret_cast<const WCHAR*>(userAgentStr.characters());
// leak the Internet for now
internetHandle = InternetOpen(userAgent, INTERNET_OPEN_TYPE_PRECONFIG, 0, 0, INTERNET_FLAG_ASYNC);
......@@ -365,13 +368,13 @@ bool ResourceHandle::start(DocLoader* docLoader)
// For form posting, we can't use InternetOpenURL. We have to use
// InternetConnect followed by HttpSendRequest.
HINTERNET urlHandle;
String referrer = docLoader->frame()->referrer();
String referrer = docLoader->frame()->loader()->referrer();
if (method() == "POST") {
d->m_postReferrer = referrer;
DeprecatedString host = url().host();
host += "\0";
urlHandle = InternetConnectA(internetHandle, host.ascii(),
d->URL.port(),
url().port(),
NULL, // no username
NULL, // no password
INTERNET_SERVICE_HTTP,
......@@ -447,7 +450,8 @@ void ResourceHandle::cancel()
if (!d->m_resourceHandle)
// Async load canceled before we have a handle -- mark ourselves as in error, to be deleted later.
setError(1);
// FIXME: need real cancel error
client()->didFailWithError(this, ResourceError());
}
void ResourceHandle::setHasReceivedResponse(bool b)
......
......@@ -44,22 +44,28 @@ FloatRect scalePageRectToScreenCoordinates(const FloatRect& rect, const Page*)
{
return rect;
}
static MONITORINFOEX monitorInfo(const Page* page)
static MONITORINFOEX monitorInfo(Widget* widget)
{
HMONITOR monitor = MonitorFromWindow(page->mainFrame()->view()->containingWindow(), MONITOR_DEFAULTTOPRIMARY);
HMONITOR monitor = MonitorFromWindow(widget->containingWindow(), MONITOR_DEFAULTTOPRIMARY);
MONITORINFOEX info;
info.cbSize = sizeof(MONITORINFOEX);
GetMonitorInfo(monitor, &info);
return info;
}
FloatRect screenRect(const Page* page)
FloatRect screenRect(Widget* widget)
{
return monitorInfo(page).rcMonitor;
return monitorInfo(widget).rcMonitor;
}
int screenDepth(const Page*)
FloatRect screenAvailableRect(Widget* widget)
{
// FIXME: I have no idea if this is correct
return monitorInfo(widget).rcWork;
}
int screenDepth(Widget*)
{
DEVMODE deviceInfo;
deviceInfo.dmSize = sizeof(DEVMODE);
......@@ -68,14 +74,4 @@ int screenDepth(const Page*)
return deviceInfo.dmBitsPerPel;
}
FloatRect usableScreenRect(const Page* page)
{
return monitorInfo(page).rcWork;
}
float scaleFactor(const Page* page)
{
return 1.0f;
}
} // namespace WebCore
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006 Don Gibson <dgibson77@gmail.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -20,47 +22,21 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "Page.h"
#include "Frame.h"
#include "FloatRect.h"
#include "Sound.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
namespace WebCore {
static HWND rootWindowForFrame(const Frame* frame)
{
if (!frame)
return 0;
FrameView* frameView = frame->view();
if (!frameView)
return 0;
HWND frameWnd = frameView->containingWindow();
if (!frameWnd)
return 0;
return GetAncestor(frameWnd, GA_ROOT);
}
FloatRect Page::windowRect() const
{
HWND windowHandle = rootWindowForFrame(mainFrame());
if (!windowHandle)
return IntRect();
RECT rect;
GetWindowRect(windowHandle, &rect);
return rect;
}
void Page::setWindowRect(const FloatRect& r)
void systemBeep()
{
HWND windowHandle = rootWindowForFrame(mainFrame());
if (!windowHandle)
return;
MoveWindow(windowHandle, r.x(), r.y(), r.width(), r.height(), true);
MessageBeep(-1);
}
}
This diff is collapsed.
......@@ -99,8 +99,7 @@ void Widget::setFocus()
void Widget::clearFocus()
{
FrameWin::clearDocumentFocus(this);
SetFocus(0);
SetFocus(NULL);
}
const Font& Widget::font() const
......
......@@ -37,7 +37,9 @@
#pragma warning( push, 0 )
#include "Cache.h"
#include "ChromeClientWin.h"
#include "ContextMenuClientWin.h"
#include "Document.h"
#include "FrameLoader.h"
#include "FrameView.h"
#include "FrameWin.h"
#include "GraphicsContext.h"
......@@ -47,6 +49,7 @@
#include "cairo-win32.h"
#include "ResourceHandle.h"
#include "ResourceHandleWin.h"
#include "ResourceRequest.h"
#include "EditorClient.h"
#pragma warning(pop)
......@@ -136,7 +139,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::initWithName(
if (FAILED(hr))
return hr;
Page* page = new Page(new ChromeClientWin());
Page* page = new Page(new ChromeClientWin(), new ContextMenuClientWin());
Frame* frame = new FrameWin(page, 0, 0, this);
// FIXME: This is one-time initialization, but it gets the value of the setting from the
......@@ -227,12 +230,12 @@ HRESULT STDMETHODCALLTYPE WebFrame::loadHTMLString(
if (baseURL) {
DeprecatedString baseURLString((DeprecatedChar*)baseURL, SysStringLen(baseURL));
d->frame->begin(KURL(baseURLString));
d->frame->loader()->begin(KURL(baseURLString));
}
else
d->frame->begin();
d->frame->write(htmlString);
d->frame->end();
d->frame->loader()->begin();
d->frame->loader()->write(htmlString);
d->frame->loader()->end();
return S_OK;
}
......@@ -275,14 +278,14 @@ HRESULT STDMETHODCALLTYPE WebFrame::provisionalDataSource(
HRESULT STDMETHODCALLTYPE WebFrame::stopLoading( void)
{
d->frame->stopLoading(false);
d->frame->loader()->stopLoading(false);
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE WebFrame::reload( void)
{
if (!d->frame->url().url().startsWith("javascript:", false))
d->frame->scheduleLocationChange(d->frame->url().url(), d->frame->referrer(), true/*lock history*/, true/*userGesture*/);
if (!d->frame->loader()->url().url().startsWith("javascript:", false))
d->frame->loader()->scheduleLocationChange(d->frame->loader()->url().url(), d->frame->loader()->outgoingReferrer(), true/*lock history*/, true/*userGesture*/);
return S_OK;
}
......@@ -372,7 +375,7 @@ HRESULT WebFrame::loadDataSource(WebDataSource* dataSource)
hr = request->HTTPMethod(&method);
if (SUCCEEDED(hr)) {
KURL kurl(DeprecatedString((DeprecatedChar*)url, SysStringLen(url)));
d->frame->didOpenURL(kurl);
d->frame->loader()->didOpenURL(kurl);
String methodString(method, SysStringLen(method));
const FormData* formData = 0;
if (wcscmp(method, TEXT("GET"))) {
......@@ -462,27 +465,12 @@ int WebFrame::getObjectCacheSize()
// ResourceHandleClient
void WebFrame::receivedRedirect(ResourceHandle*, const KURL& url)
void WebFrame::didReceiveData(WebCore::ResourceHandle*, const char* data, int length)
{
DeprecatedString urlStr(url.url());
urlStr.append('\0');
// FIXME: is this the correct way to handle a redirect?
IWebMutableURLRequest* request = WebMutableURLRequest::createInstance();
BSTR urlBStr = SysAllocString((LPCTSTR)urlStr.unicode());
if (SUCCEEDED(request->initWithURL(urlBStr, WebURLRequestUseProtocolCachePolicy, 0))) {
_ASSERT(m_provisionalDataSource);
static_cast<WebDataSource*>(m_provisionalDataSource)->replaceRequest(request);
}
SysFreeString(urlBStr);
request->Release();
// Ensure that WebFrame::receivedResponse was called.
_ASSERT(m_dataSource && !m_provisionalDataSource);
IWebFrameLoadDelegate* frameLoadDelegate;
if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) {
frameLoadDelegate->didReceiveS