+2007-11-08 Kevin Ollivier <kevino@theolliviers.com>
+
+ Bakefiles for building JavaScriptCore, needed by wx port.
+
+ Reviewed by Mark Rowe.
+
+ * JavaScriptCoreSources.bkl: Added.
+ * jscore.bkl: Added.
+
2007-11-08 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej.
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+Copyright (C) 2006, 2007 Kevin Ollivier. 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 Computer, 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.
+
+Source files for JSCore.
+-->
+<makefile>
+ <set append="1" var="JSCORE_SOURCES_API">
+
+ API/JSBase.cpp
+ API/JSCallbackConstructor.cpp
+ API/JSCallbackFunction.cpp
+ API/JSCallbackObject.cpp
+ API/JSClassRef.cpp
+ API/JSContextRef.cpp
+ API/JSObjectRef.cpp
+ API/JSStringRef.cpp
+ API/JSValueRef.cpp
+
+ </set>
+
+ <set append="1" var="JSCORE_SOURCES_BINDINGS">
+
+ bindings/c/c_class.cpp
+ bindings/c/c_instance.cpp
+ bindings/c/c_runtime.cpp
+ bindings/c/c_utility.cpp
+ bindings/NP_jsobject.cpp
+ bindings/npruntime.cpp
+ bindings/runtime.cpp
+ bindings/runtime_array.cpp
+ bindings/runtime_method.cpp
+ bindings/runtime_object.cpp
+ bindings/runtime_root.cpp
+
+ </set>
+
+ <set append="1" var="JSCORE_SOURCES_KJS">
+ DerivedSources/JavaScriptCore/grammar.cpp
+ kjs/array_instance.cpp
+ kjs/array_object.cpp
+ kjs/bool_object.cpp
+ kjs/collector.cpp
+ kjs/CommonIdentifiers.cpp
+ kjs/date_object.cpp
+ kjs/DateMath.cpp
+ kjs/debugger.cpp
+ kjs/dtoa.cpp
+ kjs/error_object.cpp
+ kjs/ExecState.cpp
+ kjs/fpconst.cpp
+ kjs/function.cpp
+ kjs/function_object.cpp
+ kjs/identifier.cpp
+ kjs/internal.cpp
+ kjs/interpreter.cpp
+ kjs/JSImmediate.cpp
+ kjs/JSLock.cpp
+ kjs/JSWrapperObject.cpp
+ kjs/lexer.cpp
+ kjs/list.cpp
+ kjs/lookup.cpp
+ kjs/math_object.cpp
+ kjs/nodes.cpp
+ kjs/nodes2string.cpp
+ kjs/number_object.cpp
+ kjs/object.cpp
+ kjs/object_object.cpp
+ kjs/operations.cpp
+ kjs/Parser.cpp
+ kjs/property_map.cpp
+ kjs/property_slot.cpp
+ kjs/PropertyNameArray.cpp
+ kjs/regexp.cpp
+ kjs/regexp_object.cpp
+ kjs/scope_chain.cpp
+ kjs/string_object.cpp
+ kjs/ustring.cpp
+ kjs/value.cpp
+
+ </set>
+ <set append="1" var="JSCORE_SOURCES_PCRE">
+ pcre/pcre_compile.c
+ pcre/pcre_exec.c
+ pcre/pcre_ord2utf8.c
+ pcre/pcre_tables.c
+ pcre/pcre_ucp_searchfuncs.c
+ pcre/pcre_xclass.c
+ </set>
+
+ <set append="1" var="WTF_SOURCES">
+ wtf/Assertions.cpp
+ wtf/FastMalloc.cpp
+ wtf/FastMallocPCRE.cpp
+ wtf/HashTable.cpp
+ wtf/TCSystemAlloc.cpp
+ </set>
+
+</makefile>
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+Copyright (C) 2007 Kevin Ollivier. 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 Computer, 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.
+
+JavaScriptCore Bakefile project file.
+-->
+
+<makefile>
+ <set var="SRCDIR">.</set>
+
+ <include file="../WebKit/wx/wxwk-settings.bkl"/>
+ <include file="JavaScriptCoreSources.bkl"/>
+
+ <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define
+ it in case the presets/wx.bkl doesn't define it for us. -->
+ <if cond="not isdefined('WX_PYTHON')">
+ <set var="WX_PYTHON">0</set>
+ </if>
+
+ <set var="BUILDDIR">obj-$(FORMAT)</set>
+
+ <template id="jscore_base" template="icu,pthreads,wxwk_build_settings">
+ <sources>
+ $(JSCORE_SOURCES_API)
+ $(JSCORE_SOURCES_BINDINGS)
+ $(JSCORE_SOURCES_KJS)
+ $(JSCORE_SOURCES_PCRE)
+ $(WTF_SOURCES)
+ </sources>
+ <install-to>$(WKOUTPUTDIR)</install-to>
+ <pic>on</pic>
+ <threading>multi</threading>
+
+ <include>$(SRCDIR)</include>
+ <include>$(SRCDIR)/..</include>
+ <include>$(SRCDIR)/DerivedSources/JavaScriptCore</include>
+ <include>$(SRCDIR)/ForwardingHeaders</include>
+ <include>$(SRCDIR)/bindings/c</include>
+ <include>$(SRCDIR)/bindings/jni</include>
+ <include>$(SRCDIR)/bindings</include>
+ <include>$(SRCDIR)/kjs</include>
+ <include>$(SRCDIR)/pcre</include>
+ <include>$(SRCDIR)/wtf</include>
+
+ <define>ENABLE_XSLT=1</define>
+
+ <if cond="FORMAT=='gnu'">
+ <!-- FIXME: we need proper configure checks -->
+ <define>HAVE_FUNC_ISNAN</define>
+ <!-- check for undefined symbols for debugging reasons -->
+ <ldflags>-Wl,--no-undefined</ldflags>
+ </if>
+
+ <if cond="PLATFORM_WIN32=='1'">
+ <include>$(SRCDIR)/os-win32</include>
+ <define>HAVE_SYS_TIMEB_H=1</define>
+ <define>HAVE_FLOAT_H=1</define>
+ <define>HAVE_FUNC__FINITE=1</define>
+ </if>
+
+ </template>
+
+ <exe id="testkjs" template="icu,jscore,pthreads">
+ <cxx-rtti>off</cxx-rtti>
+ <cxx-exceptions>off</cxx-exceptions>
+ <debug-info>on</debug-info>
+ <depends>jscore</depends>
+ <include>$(SRCDIR)</include>
+ <dirname>$(WKOUTPUTDIR)</dirname>
+ <sources>$(SRCDIR)/kjs/testkjs.cpp</sources>
+ <if cond="FORMAT=='gnu'">
+ <ldflags>$(WKOUTPUTDIR)/libjscore.a</ldflags>
+ </if>
+ <if cond="FORMAT in ['msvc','msvs2005prj']">
+ <sys-lib>jscore</sys-lib>
+ <sys-lib>winmm</sys-lib> <!-- for timeGetTime -->
+ <lib-path>$(WKOUTPUTDIR)</lib-path>
+ </if>
+
+ </exe>
+
+ <exe id="dftables">
+ <dirname>$(SRCDIR)</dirname>
+ <include>$(SRCDIR)/wtf</include>
+ <sources>$(SRCDIR)/pcre/dftables.c</sources>
+ </exe>
+
+ <action id="DerivedSources">
+ <is-phony />
+ <command>bash make-generated-sources.sh</command>
+ </action>
+
+ <lib id="jscore" template="jscore_base">
+
+ </lib>
+</makefile>
+2007-11-08 Kevin Ollivier <kevino@theolliviers.com>
+
+ Bakefiles for building WebCore, needed by wx port.
+
+ Reviewed by Mark Rowe.
+
+ * WebCoreSources.bkl: Added.
+ * webcore-base.bkl: Added.
+ * webcore-wx.bkl: Added.
+
2007-11-08 Justin Haygood <jhaygood@reaktix.com>
Reviewed by Mark Rowe.
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+
+Copyright (C) 2007 Kevin Ollivier. 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 Computer, 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.
+
+This file contains the list of files needed to build WebCore.
+
+-->
+
+<makefile>
+
+ <set append="1" var="WEBCORE_SOURCES_JS">
+ bindings/js/GCController.cpp
+ bindings/js/JSAttrCustom.cpp
+ bindings/js/JSCanvasRenderingContext2DCustom.cpp
+ bindings/js/JSCSSRuleCustom.cpp
+ bindings/js/JSCSSStyleDeclarationCustom.cpp
+ bindings/js/JSCSSValueCustom.cpp
+ bindings/js/JSCustomSQLCallback.cpp
+ bindings/js/JSCustomVersionChangeCallback.cpp
+ bindings/js/JSCustomXPathNSResolver.cpp
+ bindings/js/JSDatabaseCustom.cpp
+ bindings/js/JSDOMExceptionConstructor.cpp
+ bindings/js/JSDOMWindowCustom.cpp
+ bindings/js/JSDocumentCustom.cpp
+ bindings/js/JSElementCustom.cpp
+ bindings/js/JSEventCustom.cpp
+ bindings/js/JSEventTargetNode.cpp
+ bindings/js/JSHTMLAppletElementCustom.cpp
+ bindings/js/JSHTMLCollectionCustom.cpp
+ bindings/js/JSHTMLDocumentCustom.cpp
+ bindings/js/JSHTMLElementCustom.cpp
+ bindings/js/JSHTMLElementWrapperFactory.cpp
+ bindings/js/JSHTMLEmbedElementCustom.cpp
+ bindings/js/JSHTMLFormElementCustom.cpp
+ bindings/js/JSHTMLFrameElementCustom.cpp
+ bindings/js/JSHTMLFrameSetElementCustom.cpp
+ bindings/js/JSHTMLIFrameElementCustom.cpp
+ bindings/js/JSHTMLInputElementBase.cpp
+ bindings/js/JSHTMLObjectElementCustom.cpp
+ bindings/js/JSHTMLOptionElementConstructor.cpp
+ bindings/js/JSHTMLOptionsCollectionCustom.cpp
+ bindings/js/JSHTMLSelectElementCustom.cpp
+ bindings/js/JSNamedNodeMapCustom.cpp
+ bindings/js/JSNamedNodesCollection.cpp
+ bindings/js/JSNodeCustom.cpp
+ bindings/js/JSNodeFilterCondition.cpp
+ bindings/js/JSNodeFilterCustom.cpp
+ bindings/js/JSNodeIteratorCustom.cpp
+ bindings/js/JSNodeListCustom.cpp
+ bindings/js/JSSQLResultSetRowListCustom.cpp
+ bindings/js/JSStyleSheetCustom.cpp
+ bindings/js/JSStyleSheetListCustom.cpp
+ bindings/js/JSTreeWalkerCustom.cpp
+ bindings/js/JSXMLHttpRequest.cpp
+ bindings/js/JSXSLTProcessor.cpp
+ bindings/js/kjs_binding.cpp
+ bindings/js/kjs_css.cpp
+ bindings/js/kjs_dom.cpp
+ bindings/js/kjs_events.cpp
+ bindings/js/kjs_html.cpp
+ bindings/js/kjs_navigator.cpp
+ bindings/js/kjs_proxy.cpp
+ bindings/js/kjs_window.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_CSS">
+ css/CSSBorderImageValue.cpp
+ css/CSSCharsetRule.cpp
+ css/CSSComputedStyleDeclaration.cpp
+ css/CSSCursorImageValue.cpp
+ css/CSSFontFace.cpp
+ css/CSSFontFaceRule.cpp
+ css/CSSFontFaceSource.cpp
+ css/CSSFontFaceSrcValue.cpp
+ css/CSSFontSelector.cpp
+ css/CSSImageValue.cpp
+ css/CSSImportRule.cpp
+ css/CSSInheritedValue.cpp
+ css/CSSInitialValue.cpp
+ css/CSSMediaRule.cpp
+ css/CSSMutableStyleDeclaration.cpp
+ css/CSSPageRule.cpp
+ css/CSSPrimitiveValue.cpp
+ css/CSSProperty.cpp
+ css/CSSRule.cpp
+ css/CSSRuleList.cpp
+ css/CSSSelector.cpp
+ css/CSSStyleDeclaration.cpp
+ css/CSSStyleRule.cpp
+ css/CSSStyleSheet.cpp
+ css/CSSTransformValue.cpp
+ css/CSSTimingFunctionValue.cpp
+ css/CSSValueList.cpp
+ css/FontFamilyValue.cpp
+ css/FontValue.cpp
+ css/MediaFeatureNames.cpp
+ css/MediaList.cpp
+ css/MediaQuery.cpp
+ css/MediaQueryEvaluator.cpp
+ css/MediaQueryExp.cpp
+ css/ShadowValue.cpp
+ css/StyleBase.cpp
+ css/StyleList.cpp
+ css/StyleSheet.cpp
+ css/StyleSheetList.cpp
+ css/csshelper.cpp
+ css/cssparser.cpp
+ css/cssstyleselector.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_DERIVEDSOURCES">
+ DerivedSources/WebCore/CSSGrammar.cpp
+ DerivedSources/WebCore/ColorData.c
+ DerivedSources/WebCore/HTMLEntityNames.c
+ DerivedSources/WebCore/HTMLNames.cpp
+ DerivedSources/WebCore/JSAttr.cpp
+ DerivedSources/WebCore/JSBarInfo.cpp
+ DerivedSources/WebCore/JSCDATASection.cpp
+ DerivedSources/WebCore/JSCSSCharsetRule.cpp
+ DerivedSources/WebCore/JSCSSFontFaceRule.cpp
+ DerivedSources/WebCore/JSCSSImportRule.cpp
+ DerivedSources/WebCore/JSCSSMediaRule.cpp
+ DerivedSources/WebCore/JSCSSPageRule.cpp
+ DerivedSources/WebCore/JSCSSPrimitiveValue.cpp
+ DerivedSources/WebCore/JSCSSRule.cpp
+ DerivedSources/WebCore/JSCSSRuleList.cpp
+ DerivedSources/WebCore/JSCSSStyleDeclaration.cpp
+ DerivedSources/WebCore/JSCSSStyleRule.cpp
+ DerivedSources/WebCore/JSCSSStyleSheet.cpp
+ DerivedSources/WebCore/JSCSSValue.cpp
+ DerivedSources/WebCore/JSCSSValueList.cpp
+ DerivedSources/WebCore/JSCanvasGradient.cpp
+ DerivedSources/WebCore/JSCanvasPattern.cpp
+ DerivedSources/WebCore/JSCanvasRenderingContext2D.cpp
+ DerivedSources/WebCore/JSCharacterData.cpp
+ DerivedSources/WebCore/JSComment.cpp
+ DerivedSources/WebCore/JSConsole.cpp
+ DerivedSources/WebCore/JSCounter.cpp
+ DerivedSources/WebCore/JSDatabase.cpp
+ DerivedSources/WebCore/JSDocument.cpp
+ DerivedSources/WebCore/JSDocumentFragment.cpp
+ DerivedSources/WebCore/JSDocumentType.cpp
+ DerivedSources/WebCore/JSDOMImplementation.cpp
+ DerivedSources/WebCore/JSDOMParser.cpp
+ DerivedSources/WebCore/JSDOMSelection.cpp
+ DerivedSources/WebCore/JSDOMWindow.cpp
+ DerivedSources/WebCore/JSElement.cpp
+ DerivedSources/WebCore/JSEntity.cpp
+ DerivedSources/WebCore/JSEntityReference.cpp
+ DerivedSources/WebCore/JSEvent.cpp
+ DerivedSources/WebCore/JSHTMLAnchorElement.cpp
+ DerivedSources/WebCore/JSHTMLAppletElement.cpp
+ DerivedSources/WebCore/JSHTMLAreaElement.cpp
+ DerivedSources/WebCore/JSHTMLBRElement.cpp
+ DerivedSources/WebCore/JSHTMLBaseElement.cpp
+ DerivedSources/WebCore/JSHTMLBaseFontElement.cpp
+ DerivedSources/WebCore/JSHTMLBlockquoteElement.cpp
+ DerivedSources/WebCore/JSHTMLBodyElement.cpp
+ DerivedSources/WebCore/JSHTMLButtonElement.cpp
+ DerivedSources/WebCore/JSHTMLCanvasElement.cpp
+ DerivedSources/WebCore/JSHTMLCollection.cpp
+ DerivedSources/WebCore/JSHTMLDListElement.cpp
+ DerivedSources/WebCore/JSHTMLDirectoryElement.cpp
+ DerivedSources/WebCore/JSHTMLDivElement.cpp
+ DerivedSources/WebCore/JSHTMLDocument.cpp
+ DerivedSources/WebCore/JSHTMLElement.cpp
+ DerivedSources/WebCore/JSHTMLEmbedElement.cpp
+ DerivedSources/WebCore/JSHTMLFieldSetElement.cpp
+ DerivedSources/WebCore/JSHTMLFontElement.cpp
+ DerivedSources/WebCore/JSHTMLFormElement.cpp
+ DerivedSources/WebCore/JSHTMLFrameElement.cpp
+ DerivedSources/WebCore/JSHTMLFrameSetElement.cpp
+ DerivedSources/WebCore/JSHTMLHRElement.cpp
+ DerivedSources/WebCore/JSHTMLHeadElement.cpp
+ DerivedSources/WebCore/JSHTMLHeadingElement.cpp
+ DerivedSources/WebCore/JSHTMLHtmlElement.cpp
+ DerivedSources/WebCore/JSHTMLIFrameElement.cpp
+ DerivedSources/WebCore/JSHTMLImageElement.cpp
+ DerivedSources/WebCore/JSHTMLInputElement.cpp
+ DerivedSources/WebCore/JSHTMLIsIndexElement.cpp
+ DerivedSources/WebCore/JSHTMLLIElement.cpp
+ DerivedSources/WebCore/JSHTMLLabelElement.cpp
+ DerivedSources/WebCore/JSHTMLLegendElement.cpp
+ DerivedSources/WebCore/JSHTMLLinkElement.cpp
+ DerivedSources/WebCore/JSHTMLMapElement.cpp
+ DerivedSources/WebCore/JSHTMLMarqueeElement.cpp
+ DerivedSources/WebCore/JSHTMLMenuElement.cpp
+ DerivedSources/WebCore/JSHTMLMetaElement.cpp
+ DerivedSources/WebCore/JSHTMLModElement.cpp
+ DerivedSources/WebCore/JSHTMLObjectElement.cpp
+ DerivedSources/WebCore/JSHTMLOListElement.cpp
+ DerivedSources/WebCore/JSHTMLOptGroupElement.cpp
+ DerivedSources/WebCore/JSHTMLOptionElement.cpp
+ DerivedSources/WebCore/JSHTMLOptionsCollection.cpp
+ DerivedSources/WebCore/JSHTMLParagraphElement.cpp
+ DerivedSources/WebCore/JSHTMLParamElement.cpp
+ DerivedSources/WebCore/JSHTMLPreElement.cpp
+ DerivedSources/WebCore/JSHTMLQuoteElement.cpp
+ DerivedSources/WebCore/JSHTMLScriptElement.cpp
+ DerivedSources/WebCore/JSHTMLSelectElement.cpp
+ DerivedSources/WebCore/JSHTMLStyleElement.cpp
+ DerivedSources/WebCore/JSHTMLTableCaptionElement.cpp
+ DerivedSources/WebCore/JSHTMLTableCellElement.cpp
+ DerivedSources/WebCore/JSHTMLTableColElement.cpp
+ DerivedSources/WebCore/JSHTMLTableElement.cpp
+ DerivedSources/WebCore/JSHTMLTableRowElement.cpp
+ DerivedSources/WebCore/JSHTMLTableSectionElement.cpp
+ DerivedSources/WebCore/JSHTMLTextAreaElement.cpp
+ DerivedSources/WebCore/JSHTMLTitleElement.cpp
+ DerivedSources/WebCore/JSHTMLUListElement.cpp
+ DerivedSources/WebCore/JSHistory.cpp
+ DerivedSources/WebCore/JSKeyboardEvent.cpp
+ DerivedSources/WebCore/JSMediaList.cpp
+ DerivedSources/WebCore/JSMouseEvent.cpp
+ DerivedSources/WebCore/JSMutationEvent.cpp
+ DerivedSources/WebCore/JSNamedNodeMap.cpp
+ DerivedSources/WebCore/JSNode.cpp
+ DerivedSources/WebCore/JSNodeFilter.cpp
+ DerivedSources/WebCore/JSNodeIterator.cpp
+ DerivedSources/WebCore/JSNodeList.cpp
+ DerivedSources/WebCore/JSNotation.cpp
+ DerivedSources/WebCore/JSOverflowEvent.cpp
+ DerivedSources/WebCore/JSProcessingInstruction.cpp
+ DerivedSources/WebCore/JSProgressEvent.cpp
+ DerivedSources/WebCore/JSRange.cpp
+ DerivedSources/WebCore/JSRangeException.cpp
+ DerivedSources/WebCore/JSRect.cpp
+ DerivedSources/WebCore/JSScreen.cpp
+ DerivedSources/WebCore/JSSQLCallback.cpp
+ DerivedSources/WebCore/JSSQLResultSet.cpp
+ DerivedSources/WebCore/JSSQLResultSetRowList.cpp
+ DerivedSources/WebCore/JSStyleSheet.cpp
+ DerivedSources/WebCore/JSStyleSheetList.cpp
+ DerivedSources/WebCore/JSText.cpp
+ DerivedSources/WebCore/JSTextEvent.cpp
+ DerivedSources/WebCore/JSTreeWalker.cpp
+ DerivedSources/WebCore/JSUIEvent.cpp
+ DerivedSources/WebCore/JSWheelEvent.cpp
+ DerivedSources/WebCore/JSXMLSerializer.cpp
+ DerivedSources/WebCore/JSXPathEvaluator.cpp
+ DerivedSources/WebCore/JSXPathExpression.cpp
+ DerivedSources/WebCore/JSXPathNSResolver.cpp
+ DerivedSources/WebCore/JSXPathResult.cpp
+ DerivedSources/WebCore/UserAgentStyleSheetsData.cpp
+ DerivedSources/WebCore/XLinkNames.cpp
+ DerivedSources/WebCore/XMLNames.cpp
+ DerivedSources/WebCore/XPathGrammar.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_DOM">
+ dom/Attr.cpp
+ dom/Attribute.cpp
+ dom/BeforeTextInsertedEvent.cpp
+ dom/BeforeUnloadEvent.cpp
+ dom/CDATASection.cpp
+ dom/CSSMappedAttributeDeclaration.cpp
+ dom/CharacterData.cpp
+ dom/ChildNodeList.cpp
+ dom/Clipboard.cpp
+ dom/ClipboardEvent.cpp
+ dom/Comment.cpp
+ dom/ContainerNode.cpp
+ dom/DOMImplementation.cpp
+ dom/Document.cpp
+ dom/DocumentFragment.cpp
+ dom/DocumentType.cpp
+ dom/EditingText.cpp
+ dom/Element.cpp
+ dom/Entity.cpp
+ dom/EntityReference.cpp
+ dom/Event.cpp
+ dom/EventNames.cpp
+ dom/EventTarget.cpp
+ dom/EventTargetNode.cpp
+ dom/KeyboardEvent.cpp
+ dom/MappedAttribute.cpp
+ dom/MouseEvent.cpp
+ dom/MouseRelatedEvent.cpp
+ dom/MutationEvent.cpp
+ dom/NameNodeList.cpp
+ dom/NamedAttrMap.cpp
+ dom/NamedMappedAttrMap.cpp
+ dom/Node.cpp
+ dom/NodeFilter.cpp
+ dom/NodeFilterCondition.cpp
+ dom/NodeIterator.cpp
+ dom/NodeList.cpp
+ dom/Notation.cpp
+ dom/OverflowEvent.cpp
+ dom/Position.cpp
+ dom/PositionIterator.cpp
+ dom/ProcessingInstruction.cpp
+ dom/ProgressEvent.cpp
+ dom/QualifiedName.cpp
+ dom/Range.cpp
+ dom/RegisteredEventListener.cpp
+ dom/StyleElement.cpp
+ dom/StyledElement.cpp
+ dom/Text.cpp
+ dom/TextEvent.cpp
+ dom/Traversal.cpp
+ dom/TreeWalker.cpp
+ dom/UIEvent.cpp
+ dom/UIEventWithKeyState.cpp
+ dom/WheelEvent.cpp
+ dom/XMLTokenizer.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_EDITING">
+ editing/AppendNodeCommand.cpp
+ editing/ApplyStyleCommand.cpp
+ editing/BreakBlockquoteCommand.cpp
+ editing/CompositeEditCommand.cpp
+ editing/CreateLinkCommand.cpp
+ editing/DeleteButton.cpp
+ editing/DeleteButtonController.cpp
+ editing/DeleteFromTextNodeCommand.cpp
+ editing/DeleteSelectionCommand.cpp
+ editing/EditCommand.cpp
+ editing/Editor.cpp
+ editing/FormatBlockCommand.cpp
+ editing/HTMLInterchange.cpp
+ editing/IndentOutdentCommand.cpp
+ editing/InsertIntoTextNodeCommand.cpp
+ editing/InsertLineBreakCommand.cpp
+ editing/InsertListCommand.cpp
+ editing/InsertNodeBeforeCommand.cpp
+ editing/InsertParagraphSeparatorCommand.cpp
+ editing/InsertTextCommand.cpp
+ editing/JSEditor.cpp
+ editing/JoinTextNodesCommand.cpp
+ editing/MergeIdenticalElementsCommand.cpp
+ editing/ModifySelectionListLevel.cpp
+ editing/MoveSelectionCommand.cpp
+ editing/RemoveCSSPropertyCommand.cpp
+ editing/RemoveNodeAttributeCommand.cpp
+ editing/RemoveNodeCommand.cpp
+ editing/RemoveNodePreservingChildrenCommand.cpp
+ editing/ReplaceSelectionCommand.cpp
+ editing/Selection.cpp
+ editing/SelectionController.cpp
+ editing/SmartReplace.cpp
+ editing/SetNodeAttributeCommand.cpp
+ editing/SplitElementCommand.cpp
+ editing/SplitTextNodeCommand.cpp
+ editing/SplitTextNodeContainingElementCommand.cpp
+ editing/TextIterator.cpp
+ editing/TypingCommand.cpp
+ editing/UnlinkCommand.cpp
+ editing/VisiblePosition.cpp
+ editing/WrapContentsInDummySpanCommand.cpp
+ editing/htmlediting.cpp
+ editing/markup.cpp
+ editing/visible_units.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_HISTORY">
+ history/BackForwardList.cpp
+ history/CachedPage.cpp
+ history/PageCache.cpp
+ history/HistoryItem.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_HTML">
+ html/CanvasGradient.cpp
+ html/CanvasPattern.cpp
+ html/CanvasRenderingContext2D.cpp
+ html/CanvasStyle.cpp
+ html/FormDataList.cpp
+ html/HTMLAnchorElement.cpp
+ html/HTMLAppletElement.cpp
+ html/HTMLAreaElement.cpp
+ html/HTMLBRElement.cpp
+ html/HTMLBaseElement.cpp
+ html/HTMLBaseFontElement.cpp
+ html/HTMLBlockquoteElement.cpp
+ html/HTMLBodyElement.cpp
+ html/HTMLButtonElement.cpp
+ html/HTMLCanvasElement.cpp
+ html/HTMLCollection.cpp
+ html/HTMLDListElement.cpp
+ html/HTMLDirectoryElement.cpp
+ html/HTMLDivElement.cpp
+ html/HTMLDocument.cpp
+ html/HTMLElement.cpp
+ html/HTMLElementFactory.cpp
+ html/HTMLEmbedElement.cpp
+ html/HTMLFieldSetElement.cpp
+ html/HTMLFontElement.cpp
+ html/HTMLFormCollection.cpp
+ html/HTMLFormElement.cpp
+ html/HTMLFrameElement.cpp
+ html/HTMLFrameElementBase.cpp
+ html/HTMLFrameOwnerElement.cpp
+ html/HTMLFrameSetElement.cpp
+ html/HTMLGenericFormElement.cpp
+ html/HTMLHRElement.cpp
+ html/HTMLHeadElement.cpp
+ html/HTMLHeadingElement.cpp
+ html/HTMLHtmlElement.cpp
+ html/HTMLIFrameElement.cpp
+ html/HTMLImageElement.cpp
+ html/HTMLImageLoader.cpp
+ html/HTMLInputElement.cpp
+ html/HTMLIsIndexElement.cpp
+ html/HTMLKeygenElement.cpp
+ html/HTMLLIElement.cpp
+ html/HTMLLabelElement.cpp
+ html/HTMLLegendElement.cpp
+ html/HTMLLinkElement.cpp
+ html/HTMLMapElement.cpp
+ html/HTMLMarqueeElement.cpp
+ html/HTMLMenuElement.cpp
+ html/HTMLMetaElement.cpp
+ html/HTMLModElement.cpp
+ html/HTMLNameCollection.cpp
+ html/HTMLOListElement.cpp
+ html/HTMLObjectElement.cpp
+ html/HTMLOptGroupElement.cpp
+ html/HTMLOptionElement.cpp
+ html/HTMLOptionsCollection.cpp
+ html/HTMLParagraphElement.cpp
+ html/HTMLParamElement.cpp
+ html/HTMLParser.cpp
+ html/HTMLParserErrorCodes.cpp
+ html/HTMLPlugInElement.cpp
+ html/HTMLPreElement.cpp
+ html/HTMLQuoteElement.cpp
+ html/HTMLScriptElement.cpp
+ html/HTMLSelectElement.cpp
+ html/HTMLStyleElement.cpp
+ html/HTMLTableCaptionElement.cpp
+ html/HTMLTableCellElement.cpp
+ html/HTMLTableColElement.cpp
+ html/HTMLTableElement.cpp
+ html/HTMLTablePartElement.cpp
+ html/HTMLTableRowElement.cpp
+ html/HTMLTableSectionElement.cpp
+ html/HTMLTextAreaElement.cpp
+ html/HTMLTextFieldInnerElement.cpp
+ html/HTMLTitleElement.cpp
+ html/HTMLTokenizer.cpp
+ html/HTMLUListElement.cpp
+ html/HTMLViewSourceDocument.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_LOADER">
+ loader/Cache.cpp
+ loader/CachedCSSStyleSheet.cpp
+ loader/CachedFont.cpp
+ loader/CachedImage.cpp
+ loader/CachedResource.cpp
+ loader/CachedResourceClientWalker.cpp
+ loader/CachedScript.cpp
+ loader/CachedXSLStyleSheet.cpp
+ loader/DocLoader.cpp
+ loader/DocumentLoader.cpp
+ loader/FormState.cpp
+ loader/FrameLoader.cpp
+ loader/FTPDirectoryDocument.cpp
+ loader/FTPDirectoryParser.cpp
+ loader/ImageDocument.cpp
+ loader/MainResourceLoader.cpp
+ loader/NavigationAction.cpp
+ loader/NetscapePlugInStreamLoader.cpp
+ loader/PluginDocument.cpp
+ loader/ProgressTracker.cpp
+ loader/Request.cpp
+ loader/ResourceLoader.cpp
+ loader/SubresourceLoader.cpp
+ loader/TextDocument.cpp
+ loader/TextResourceDecoder.cpp
+ loader/loader.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_ICON">
+ loader/icon/IconDatabase.cpp
+ loader/icon/IconLoader.cpp
+ loader/icon/IconRecord.cpp
+ loader/icon/PageURLRecord.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_PAGE">
+ page/AnimationController.cpp
+ page/BarInfo.cpp
+ page/Chrome.cpp
+ page/Console.cpp
+ page/ContextMenuController.cpp
+ page/DOMSelection.cpp
+ page/DOMWindow.cpp
+ page/DragController.cpp
+ page/EventHandler.cpp
+ page/FocusController.cpp
+ page/Frame.cpp
+ page/FrameTree.cpp
+ page/FrameView.cpp
+ page/History.cpp
+ page/InspectorController.cpp
+ page/MouseEventWithHitTestResults.cpp
+ page/Page.cpp
+ page/Screen.cpp
+ page/Settings.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_PLATFORM">
+ platform/Arena.cpp
+ platform/ArrayImpl.cpp
+ platform/AtomicString.cpp
+ platform/Base64.cpp
+ platform/BidiContext.cpp
+ platform/CString.cpp
+ platform/ContextMenu.cpp
+ platform/DeprecatedCString.cpp
+ platform/DeprecatedPtrListImpl.cpp
+ platform/DeprecatedString.cpp
+ platform/DeprecatedStringList.cpp
+ platform/DeprecatedValueListImpl.cpp
+ platform/DragImage.cpp
+ platform/FileChooser.cpp
+ platform/Font.cpp
+ platform/FontCache.cpp
+ platform/FontData.cpp
+ platform/FontFallbackList.cpp
+ platform/FontFamily.cpp
+ platform/GlyphPageTreeNode.cpp
+ platform/GlyphWidthMap.cpp
+ platform/KURL.cpp
+ platform/Logging.cpp
+ platform/MimeTypeRegistry.cpp
+ platform/RegularExpression.cpp
+ platform/ScrollBar.cpp
+ platform/SecurityOrigin.cpp
+ platform/SegmentedString.cpp
+ platform/SharedBuffer.cpp
+ platform/String.cpp
+ platform/StringImpl.cpp
+ platform/TextBreakIteratorICU.cpp
+ platform/TextCodec.cpp
+ platform/TextCodecICU.cpp
+ platform/TextCodecLatin1.cpp
+ platform/TextCodecUTF16.cpp
+ platform/TextCodecUserDefined.cpp
+ platform/TextDecoder.cpp
+ platform/TextEncoding.cpp
+ platform/TextEncodingRegistry.cpp
+ platform/TextStream.cpp
+ platform/ThreadingNone.cpp
+ platform/Timer.cpp
+ platform/Widget.cpp
+ platform/graphics/AffineTransform.cpp
+ platform/graphics/BitmapImage.cpp
+ platform/graphics/Color.cpp
+ platform/graphics/FloatPoint.cpp
+ platform/graphics/FloatRect.cpp
+ platform/graphics/FloatSize.cpp
+ platform/graphics/GraphicsContext.cpp
+ platform/graphics/GraphicsTypes.cpp
+ platform/graphics/Image.cpp
+ platform/graphics/IntRect.cpp
+ platform/graphics/Path.cpp
+ platform/graphics/PathTraversalState.cpp
+ platform/graphics/Pen.cpp
+ platform/network/AuthenticationChallenge.cpp
+ platform/network/Credential.cpp
+ platform/network/HTTPParsers.cpp
+ platform/network/FormData.cpp
+ platform/network/ProtectionSpace.cpp
+ platform/network/ResourceHandle.cpp
+ platform/network/ResourceRequestBase.cpp
+ platform/network/ResourceResponse.cpp
+ platform/sql/SQLiteAuthorizer.cpp
+ platform/sql/SQLiteDatabase.cpp
+ platform/sql/SQLiteStatement.cpp
+ platform/sql/SQLiteTransaction.cpp
+ platform/sql/SQLValue.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_STORAGE">
+ storage/Database.cpp
+ storage/DatabaseAuthorizer.cpp
+ storage/DatabaseCallback.cpp
+ storage/DatabaseTask.cpp
+ storage/DatabaseThread.cpp
+ storage/DatabaseTracker.cpp
+ storage/SQLResultSet.cpp
+ storage/SQLResultSetRowList.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_GIF">
+ platform/image-decoders/gif/GIFImageDecoder.cpp
+ platform/image-decoders/gif/GIFImageReader.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_PNG">
+ platform/image-decoders/png/PNGImageDecoder.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_ZLIB">
+ platform/image-decoders/zlib/adler32.c
+ platform/image-decoders/zlib/compress.c
+ platform/image-decoders/zlib/crc32.c
+ platform/image-decoders/zlib/deflate.c
+ platform/image-decoders/zlib/gzio.c
+ platform/image-decoders/zlib/infback.c
+ platform/image-decoders/zlib/inffast.c
+ platform/image-decoders/zlib/inflate.c
+ platform/image-decoders/zlib/inftrees.c
+ platform/image-decoders/zlib/trees.c
+ platform/image-decoders/zlib/uncompr.c
+ platform/image-decoders/zlib/zutil.c
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_JPEG">
+ platform/image-decoders/jpeg/JPEGImageDecoder.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_BMP">
+ platform/image-decoders/bmp/BMPImageDecoder.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_ICO">
+ platform/image-decoders/ico/ICOImageDecoder.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_XBM">
+ platform/image-decoders/xbm/XBMImageDecoder.cpp
+ </set>
+
+
+ <set append="1" var="WEBCORE_SOURCES_RENDERING">
+ rendering/AutoTableLayout.cpp
+ rendering/CounterNode.cpp
+ rendering/EllipsisBox.cpp
+ rendering/FixedTableLayout.cpp
+ rendering/HitTestResult.cpp
+ rendering/InlineBox.cpp
+ rendering/InlineFlowBox.cpp
+ rendering/InlineTextBox.cpp
+ rendering/LayoutState.cpp
+ rendering/ListMarkerBox.cpp
+ rendering/RenderApplet.cpp
+ rendering/RenderArena.cpp
+ rendering/RenderBR.cpp
+ rendering/RenderBlock.cpp
+ rendering/RenderBox.cpp
+ rendering/RenderButton.cpp
+ rendering/RenderContainer.cpp
+ rendering/RenderCounter.cpp
+ rendering/RenderFieldset.cpp
+ rendering/RenderFileUploadControl.cpp
+ rendering/RenderFlexibleBox.cpp
+ rendering/RenderFlow.cpp
+ rendering/RenderFrame.cpp
+ rendering/RenderFrameSet.cpp
+ rendering/RenderHTMLCanvas.cpp
+ rendering/RenderImage.cpp
+ rendering/RenderInline.cpp
+ rendering/RenderLayer.cpp
+ rendering/RenderLegend.cpp
+ rendering/RenderListBox.cpp
+ rendering/RenderListItem.cpp
+ rendering/RenderListMarker.cpp
+ rendering/RenderMenuList.cpp
+ rendering/RenderObject.cpp
+ rendering/RenderPart.cpp
+ rendering/RenderPartObject.cpp
+ rendering/RenderReplaced.cpp
+ rendering/RenderSlider.cpp
+ rendering/RenderStyle.cpp
+ rendering/RenderTable.cpp
+ rendering/RenderTableCell.cpp
+ rendering/RenderTableCol.cpp
+ rendering/RenderTableRow.cpp
+ rendering/RenderTableSection.cpp
+ rendering/RenderText.cpp
+ rendering/RenderTextControl.cpp
+ rendering/RenderTextFragment.cpp
+ rendering/RenderTheme.cpp
+ rendering/RenderTreeAsText.cpp
+ rendering/RenderView.cpp
+ rendering/RenderWidget.cpp
+ rendering/RenderWordBreak.cpp
+ rendering/RootInlineBox.cpp
+ rendering/bidi.cpp
+ rendering/break_lines.cpp
+ </set>
+
+ <set append="1" var="WEBCORE_SOURCES_XML">
+ xml/DOMParser.cpp
+ xml/NativeXPathNSResolver.cpp
+ xml/XMLSerializer.cpp
+ xml/XPathEvaluator.cpp
+ xml/XPathExpression.cpp
+ xml/XPathExpressionNode.cpp
+ xml/XPathFunctions.cpp
+ xml/XPathNamespace.cpp
+ xml/XPathNodeSet.cpp
+ xml/XPathNSResolver.cpp
+ xml/XPathParser.cpp
+ xml/XPathPath.cpp
+ xml/XPathPredicate.cpp
+ xml/XPathResult.cpp
+ xml/XPathStep.cpp
+ xml/XPathUtil.cpp
+ xml/XPathValue.cpp
+ xml/XPathVariableReference.cpp
+ xml/XSLImportRule.cpp
+ xml/XSLStyleSheet.cpp
+ xml/XSLTExtensions.cpp
+ xml/XSLTProcessor.cpp
+ xml/xmlhttprequest.cpp
+ </set>
+
+</makefile>
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com>
+
+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 Computer, 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.
+
+wxWebCore port Bakefile project file.
+-->
+
+<makefile>
+ <include file="../WebKit/wx/wxwk-settings.bkl" />
+ <include file="WebCoreSources.bkl" />
+
+ <set var="WEBCORE_BASE_SOURCES">
+ $(WEBCORE_SOURCES_BMP)
+ $(WEBCORE_SOURCES_CSS)
+ $(WEBCORE_SOURCES_DERIVEDSOURCES)
+ $(WEBCORE_SOURCES_DOM)
+ $(WEBCORE_SOURCES_EDITING)
+ $(WEBCORE_SOURCES_GIF)
+ $(WEBCORE_SOURCES_HTML)
+ $(WEBCORE_SOURCES_ICO)
+ $(WEBCORE_SOURCES_ICON)
+ $(WEBCORE_SOURCES_JS)
+ $(WEBCORE_SOURCES_LOADER)
+ $(WEBCORE_SOURCES_PAGE)
+ $(WEBCORE_SOURCES_HISTORY)
+ $(WEBCORE_SOURCES_PLATFORM)
+ $(WEBCORE_SOURCES_RENDERING)
+ $(WEBCORE_SOURCES_STORAGE)
+ $(WEBCORE_SOURCES_XBM)
+ $(WEBCORE_SOURCES_XML)
+ $(WEBCORE_SOURCES_ZLIB)
+ $(WEBCORE_SOURCES_PNG)
+ $(WEBCORE_SOURCES_JPEG)
+ </set>
+
+ <set var="BUILDDIR">obj-$(FORMAT)</set>
+
+ <template id="webcore_base" template="xml2,iconv,xslt,icu,jscore,curl,sqlite3">
+ <include>$(SRCDIR)</include>
+ <include>$(SRCDIR)/bindings/js</include>
+ <include>$(SRCDIR)/bridge</include>
+ <include>$(SRCDIR)/css</include>
+ <include>$(SRCDIR)/DerivedSources/WebCore</include>
+ <include>$(SRCDIR)/dom</include>
+ <include>$(SRCDIR)/editing</include>
+ <include>$(SRCDIR)/ForwardingHeaders/kjs</include>
+ <include>$(SRCDIR)/history</include>
+ <include>$(SRCDIR)/html</include>
+ <include>$(SRCDIR)/ForwardingHeaders/wtf</include>
+ <include>$(SRCDIR)/ForwardingHeaders/kjs</include>
+ <include>$(SRCDIR)/ForwardingHeaders/bindings</include>
+ <include>$(SRCDIR)/ForwardingHeaders/pcre</include>
+ <include>$(SRCDIR)/include</include>
+ <include>$(SRCDIR)/loader</include>
+ <include>$(SRCDIR)/loader/gdk</include>
+ <include>$(SRCDIR)/loader/icon</include>
+ <include>$(SRCDIR)/page</include>
+ <include>$(SRCDIR)/platform</include>
+ <include>$(SRCDIR)/platform/graphics</include>
+ <include>$(SRCDIR)/platform/graphics/gdk</include>
+ <include>$(SRCDIR)/platform/image-decoders</include>
+ <include>$(SRCDIR)/platform/image-decoders/bmp</include>
+ <include>$(SRCDIR)/platform/image-decoders/gif</include>
+ <include>$(SRCDIR)/platform/image-decoders/ico</include>
+ <include>$(SRCDIR)/platform/image-decoders/jpeg</include>
+ <include>$(SRCDIR)/platform/image-decoders/png</include>
+ <include>$(SRCDIR)/platform/image-decoders/xbm</include>
+ <include>$(SRCDIR)/platform/image-decoders/zlib</include>
+ <include>$(SRCDIR)/platform/network</include>
+ <include>$(SRCDIR)/platform/network/curl</include>
+ <include>$(SRCDIR)/platform/sql</include>
+ <include>$(SRCDIR)/rendering</include>
+ <include>$(SRCDIR)/storage</include>
+ <include>$(SRCDIR)/xml</include>
+
+ <sources>$(WEBCORE_BASE_SOURCES)</sources>
+
+ <define>ENABLE_XSLT=1</define>
+
+ <if cond="FORMAT=='gnu'">
+ <!-- FIXME: we need proper configure checks -->
+ <define>HAVE_FUNC_ISNAN</define>
+ </if>
+
+ <if cond="PLATFORM_WIN32=='1'">
+ <include>win32</include>
+ <define>HAVE_SYS_TIMEB_H=1</define>
+ <define>HAVE_FLOAT_H=1</define>
+ <define>HAVE_FUNC__FINITE=1</define>
+ </if>
+ </template>
+</makefile>
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com>
+
+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 Computer, 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.
+
+wxWebCore port Bakefile project file.
+-->
+
+
+
+<makefile>
+ <!-- eventually we should make these options -->
+ <set var="WX_UNICODE">1</set>
+ <set var="WX_SHARED">1</set>
+
+ <include file="webcore-base.bkl"/>
+
+ <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define
+ it in case the presets/wx.bkl doesn't define it for us. -->
+ <if cond="not isdefined('WX_PYTHON')">
+ <set var="WX_PYTHON">0</set>
+ </if>
+
+ <action id="DerivedSources">
+ <is-phony/>
+ <command>cd $(SRCDIR);bash move-js-headers.sh; bash make-generated-sources.sh platform/wx/wx-encodings.txt;cd Projects/wx</command>
+ </action>
+
+ <template id="webcore-wx" template="webcore_base,wxwk_build_settings,curl,gtk,pthreads">
+ <pic>on</pic>
+ <threading>multi</threading>
+
+ <define>WTF_USE_ICU_UNICODE=1</define>
+ <define>UNICODE=1</define>
+
+ <dirname>.</dirname>
+ <include>$(SRCDIR)/platform/wx</include>
+ <include>$(SRCDIR)/platform/wx/wxcode</include>
+ <include>$(SRCDIR)/bridge/wx</include>
+ <include>$(SRCDIR)/page/wx</include>
+ <include>$(WK_ROOT)/libpng</include>
+ <include>$(WK_ROOT)/libjpeg</include>
+
+ <sources>
+ editing/wx/EditorWx.cpp
+
+ page/wx/DragControllerWx.cpp
+ page/wx/EventHandlerWx.cpp
+
+ platform/graphics/wx/AffineTransformWx.cpp
+ platform/graphics/wx/ColorWx.cpp
+ platform/graphics/wx/FloatRectWx.cpp
+ platform/graphics/wx/GraphicsContextWx.cpp
+ platform/graphics/wx/ImageBufferWx.cpp
+ platform/graphics/wx/ImageSourceWx.cpp
+ platform/graphics/wx/ImageWx.cpp
+ platform/graphics/wx/IntPointWx.cpp
+ platform/graphics/wx/IntRectWx.cpp
+ platform/graphics/wx/PathWx.cpp
+ platform/graphics/wx/PenWx.cpp
+
+ platform/wx/TemporaryLinkStubs.cpp
+ platform/wx/ClipboardWx.cpp
+ platform/wx/CursorWx.cpp
+ platform/wx/DragDataWx.cpp
+ platform/wx/DragImageWx.cpp
+ platform/wx/FileSystemWx.cpp
+ platform/wx/FontCacheWx.cpp
+ platform/wx/FontDataWx.cpp
+ platform/wx/FontPlatformDataWx.cpp
+ platform/wx/FontWx.cpp
+ platform/wx/GlyphMapWx.cpp
+ platform/wx/KeyboardEventWx.cpp
+ platform/wx/LocalizedStringsWx.cpp
+ platform/wx/LoggingWx.cpp
+ platform/wx/MimeTypeRegistryWx.cpp
+ platform/wx/MouseEventWx.cpp
+ platform/wx/MouseWheelEventWx.cpp
+ platform/wx/PasteboardWx.cpp
+ platform/wx/RenderThemeWx.cpp
+ platform/wx/ScreenWx.cpp
+ platform/wx/ScrollViewWx.cpp
+ platform/wx/SharedTimerWx.cpp
+ platform/wx/SoundWx.cpp
+ platform/wx/StringWx.cpp
+ platform/wx/SystemTimeWx.cpp
+ platform/wx/ThreadingWx.cpp
+ platform/wx/WidgetWx.cpp
+
+ <!-- files from other ports we currently rely on -->
+ platform/network/curl/ResourceHandleCurl.cpp
+ platform/network/curl/ResourceHandleManager.cpp
+
+ </sources>
+
+ <!-- extensions that hopefully will make it to wx -->
+ <set var="EXT_SOURCES">
+ <if cond="WX_PORT=='gtk2'">
+ platform/wx/wxcode/gtk/fontprops.cpp
+ </if>
+ <if cond="WX_PORT=='mac'">
+ platform/wx/wxcode/mac/carbon/fontprops.cpp
+ </if>
+ <if cond="WX_PORT=='msw'">
+ platform/wx/wxcode/win/fontprops.cpp
+ </if>
+ </set>
+
+ <sources>
+ $(EXT_SOURCES)
+ </sources>
+
+ </template>
+
+ <lib id="wx-webcore-static" template="webcore-wx,wx-lib">
+ <libname>webcore-wx</libname>
+ <dirname>$(WKOUTPUTDIR)</dirname>
+ <if cond="PLATFORM_WIN32=='1'">
+ <define>WXUSINGDLL=1</define>
+ </if>
+ </lib>
+
+</makefile>
+
+2007-11-08 Kevin Ollivier <kevino@theolliviers.com>
+
+ Adding the wx WebKit implementation.
+
+ Reviewed by Mark Rowe.
+
+ * wx: Added.
+
2007-11-07 Mark Rowe <mrowe@apple.com>
Reviewed by Kevin Decker.
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+Copyright (C) 2005, 2006, 2007 Apple Computer, 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 Computer, 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.
+
+Build configuration script for Bakefile.
+-->
+
+<bakefile-gen>
+
+ <input>
+ ../../JavaScriptCore/jscore.bkl
+ ../../WebCore/webcore-wx.bkl
+ wxwebkit.bkl
+ bindings/python/wxwebkit-py.bkl
+ ../../WebKitTools/wx/browser/browser.bkl
+ </input>
+
+ <!-- List of output formats to generate: -->
+ <add-formats>
+ gnu,msvs2005prj,msvc
+ </add-formats>
+
+ <!-- JSCore settings -->
+ <add-flags files="../../JavaScriptCore/jscore.bkl" formats="gnu">
+ -o../../JavaScriptCore/GNUmakefile
+ </add-flags>
+ <add-flags files="../../JavaScriptCore/jscore.bkl" formats="msvs2005prj">
+ -o../../JavaScriptCore/JavaScriptCore.sln
+ </add-flags>
+ <add-flags files="../../JavaScriptCore/jscore.bkl" formats="msvc">
+ -o../../JavaScriptCore/makefile.vc
+ </add-flags>
+ <!-- testing XCode backend
+ <add-flags files="jscore.bkl" formats="xcode2">
+ -o../WebCore/Projects/base/WebCoreBase.xcode
+ </add-flags>
+ -->
+
+ <!-- wx port settings -->
+ <add-flags files="../../WebCore/webcore-wx.bkl" formats="gnu">
+ -o../../WebCore/GNUmakefile
+ </add-flags>
+ <add-flags files="../../WebCore/webcore-wx.bkl" formats="msvs2005prj">
+ -o../../WebCore/webcore-wx.sln
+ </add-flags>
+ <add-flags files="../../WebCore/webcore-wx.bkl" formats="msvc">
+ -o../../WebCore/makefile.vc
+ </add-flags>
+
+ <add-flags files="wxwebkit.bkl" formats="gnu">
+ -oGNUmakefile
+ </add-flags>
+ <add-flags files="wxwebkit.bkl" formats="msvs2005prj">
+ -owxWebKit.sln
+ </add-flags>
+ <add-flags files="wxwebkit.bkl" formats="msvc">
+ -omakefile.vc
+ </add-flags>
+
+ <add-flags files="bindings/python/wxwebkit-py.bkl" formats="gnu">
+ -obindings/python/GNUmakefile
+ </add-flags>
+ <add-flags files="bindings/python/wxwebkit-py.bkl" formats="msvs2005prj">
+ -obindings/python/wxWebKit.sln
+ </add-flags>
+ <add-flags files="bindings/python/wxwebkit-py.bkl" formats="msvc">
+ -obindings/python/makefile.vc
+ </add-flags>
+
+ <add-flags files="../../WebKitTools/wx/browser/browser.bkl" formats="gnu">
+ -o../../WebKitTools/wx/browser/GNUmakefile
+ </add-flags>
+ <add-flags files="../../WebKitTools/wx/browser/browser.bkl" formats="msvs2005prj">
+ -o../../WebKitTools/wx/browser/webcore-wx.sln
+ </add-flags>
+ <add-flags files="../../WebKitTools/wx/browser/browser.bkl" formats="msvc">
+ -o../../WebKitTools/wx/browser/makefile.vc
+ </add-flags>
+ <!-- testing XCode backend
+ <add-flags files="webcore-wx.bkl" formats="xcode2">
+ -o../WebCore/Projects/wx/wxWebCore.xcode
+ </add-flags>
+ -->
+
+ <!-- Personal customizations (not in SVN): -->
+ <include file="Bakefiles.local.bkgen" ignore_missing="1"/>
+
+</bakefile-gen>
--- /dev/null
+2007-11-08 Kevin Ollivier <kevino@theolliviers.com>
+
+ Initial commit of wx implementation of WebKit. This includes
+ the wxWebFrame and wxWebView wx front end classes, the
+ WebKitSupport directory containing implementations of interfaces
+ used by WebCore to talk with the wxWebKit front end, and the
+ language bindings for wxWebKit (bindings dir), currently
+ only containing bindings and a sample app for wxPython.
+
+ Reviewed by Mark Rowe.
+
+ * Bakefiles.bkgen: Added.
+ * WebFrame.cpp: Added.
+ * WebFrame.h: Added.
+ * WebKitSupport: Added.
+ * WebKitSupport/ChromeClientWx.cpp: Added.
+ * WebKitSupport/ChromeClientWx.h: Added.
+ * WebKitSupport/ContextMenuClientWx.cpp: Added.
+ * WebKitSupport/ContextMenuClientWx.h: Added.
+ * WebKitSupport/DragClientWx.cpp: Added.
+ * WebKitSupport/DragClientWx.h: Added.
+ * WebKitSupport/EditorClientWx.cpp: Added.
+ * WebKitSupport/EditorClientWx.h: Added.
+ * WebKitSupport/FrameLoaderClientWx.cpp: Added.
+ * WebKitSupport/FrameLoaderClientWx.h: Added.
+ * WebKitSupport/InspectorClientWx.cpp: Added.
+ * WebKitSupport/InspectorClientWx.h: Added.
+ * WebView.cpp: Added.
+ * WebView.h: Added.
+ * WebViewPrivate.h: Added.
+ * bindings: Added.
+ * bindings/python: Added.
+ * bindings/python/samples: Added.
+ * bindings/python/samples/simple.py: Added.
+ * bindings/python/webview.i: Added.
+ * bindings/python/wxwebkit-py.bkl: Added.
+ * dependencies.bkl: Added.
+ * presets: Added.
+ * presets/wxwebkit.bkl: Added.
+ * wxwebkit.bkl: Added.
+ * wxwk-settings.bkl: Added.
+
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier 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.
+ *
+ * This class provides a default new window implementation for wxWebView clients
+ * who don't want/need to roll their own browser frame UI.
+ */
+
+#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+ #include "wx/wx.h"
+#endif
+
+#include "WebView.h"
+#include "WebFrame.h"
+#include "WebViewPrivate.h"
+
+#include "wx/artprov.h"
+
+wxPageSourceViewFrame::wxPageSourceViewFrame(const wxString& source)
+ : wxFrame(NULL, wxID_ANY, _("Page Source View"), wxDefaultPosition, wxSize(600, 500))
+{
+ wxTextCtrl* control = new wxTextCtrl(this, -1, source, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
+}
+
+enum {
+ ID_LOADFILE = wxID_HIGHEST + 1,
+ ID_TEXTCTRL = wxID_HIGHEST + 2,
+ ID_BACK = wxID_HIGHEST + 3,
+ ID_FORWARD = wxID_HIGHEST + 4,
+ ID_TOGGLE_BEFORE_LOAD = wxID_HIGHEST + 5,
+ ID_MAKE_TEXT_LARGER = wxID_HIGHEST + 6,
+ ID_MAKE_TEXT_SMALLER = wxID_HIGHEST + 7,
+ ID_STOP = wxID_HIGHEST + 8,
+ ID_RELOAD = wxID_HIGHEST + 9,
+ ID_GET_SOURCE = wxID_HIGHEST + 10,
+ ID_SET_SOURCE = wxID_HIGHEST + 11,
+ ID_SEARCHCTRL = wxID_HIGHEST + 12,
+ ID_LOADURL = wxID_HIGHEST + 13,
+ ID_NEW_WINDOW = wxID_HIGHEST + 14,
+ ID_BROWSE = wxID_HIGHEST + 15,
+ ID_EDIT = wxID_HIGHEST + 16,
+ ID_RUN_SCRIPT = wxID_HIGHEST + 17
+};
+
+BEGIN_EVENT_TABLE(wxWebFrame, wxFrame)
+ EVT_MENU(wxID_EXIT, wxWebFrame::OnQuit)
+ EVT_MENU(wxID_ABOUT, wxWebFrame::OnAbout)
+ EVT_MENU(ID_LOADFILE, wxWebFrame::OnLoadFile)
+ EVT_TEXT_ENTER(ID_TEXTCTRL, wxWebFrame::OnAddressBarEnter)
+ EVT_TEXT_ENTER(ID_SEARCHCTRL, wxWebFrame::OnSearchCtrlEnter)
+ EVT_WEBVIEW_STATE_CHANGED(wxWebFrame::OnStateChangedEvent)
+ EVT_WEBVIEW_BEFORE_LOAD(wxWebFrame::OnBeforeLoad)
+ EVT_MENU(ID_BACK, wxWebFrame::OnBack)
+ EVT_MENU(ID_FORWARD, wxWebFrame::OnForward)
+ EVT_MENU(ID_STOP, wxWebFrame::OnStop)
+ EVT_MENU(ID_RELOAD, wxWebFrame::OnReload)
+ EVT_MENU(ID_MAKE_TEXT_LARGER, wxWebFrame::OnMakeTextLarger)
+ EVT_MENU(ID_MAKE_TEXT_SMALLER, wxWebFrame::OnMakeTextSmaller)
+ EVT_MENU(ID_GET_SOURCE, wxWebFrame::OnGetSource)
+ EVT_MENU(ID_SET_SOURCE, wxWebFrame::OnSetSource)
+ EVT_MENU(ID_BROWSE, wxWebFrame::OnBrowse)
+ EVT_MENU(ID_EDIT, wxWebFrame::OnEdit)
+ EVT_MENU(ID_RUN_SCRIPT, wxWebFrame::OnRunScript)
+END_EVENT_TABLE()
+
+
+wxWebFrame::wxWebFrame(const wxString& title) :
+ wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(600, 500)),
+ m_checkBeforeLoad(false)
+{
+
+ // create a menu bar
+ wxMenu *fileMenu = new wxMenu;
+ fileMenu->Append(ID_NEW_WINDOW, _T("New Window\tCTRL+N"));
+ fileMenu->Append(ID_LOADFILE, _T("Open File...\tCTRL+O"));
+ fileMenu->Append(ID_LOADURL, _("Open Location...\tCTRL+L"));
+ fileMenu->Append(wxID_EXIT, _T("E&xit\tAlt-X"), _T("Quit this program"));
+
+ wxMenu *editMenu = new wxMenu;
+ editMenu->Append(wxID_CUT, _T("Cut\tCTRL+X"));
+ editMenu->Append(wxID_COPY, _T("Copy\tCTRL+C"));
+ editMenu->Append(wxID_PASTE, _T("Paste\tCTRL+V"));
+
+ wxMenu* viewMenu = new wxMenu;
+ viewMenu->AppendRadioItem(ID_BROWSE, _("Browse"));
+ viewMenu->AppendRadioItem(ID_EDIT, _("Edit"));
+ viewMenu->AppendSeparator();
+ viewMenu->Append(ID_STOP, _("Stop"));
+ viewMenu->Append(ID_RELOAD, _("Reload Page"));
+ viewMenu->Append(ID_MAKE_TEXT_SMALLER, _("Make Text Smaller\tCTRL+-"));
+ viewMenu->Append(ID_MAKE_TEXT_LARGER, _("Make Text Bigger\tCTRL++"));
+ viewMenu->AppendSeparator();
+ viewMenu->Append(ID_GET_SOURCE, _("View Page Source"));
+ viewMenu->AppendSeparator();
+
+ m_debugMenu = new wxMenu;
+ m_debugMenu->Append(ID_SET_SOURCE, _("Test SetPageSource"));
+ m_debugMenu->Append(ID_RUN_SCRIPT, _("Test RunScript"));
+
+ // the "About" item should be in the help menu
+ wxMenu *helpMenu = new wxMenu;
+ helpMenu->Append(wxID_ABOUT, _T("&About...\tF1"), _T("Show about dialog"));
+
+ // now append the freshly created menu to the menu bar...
+ wxMenuBar *menuBar = new wxMenuBar();
+ menuBar->Append(fileMenu, _T("&File"));
+ menuBar->Append(editMenu, _T("&Edit"));
+ menuBar->Append(viewMenu, _T("&View"));
+ menuBar->Append(helpMenu, _T("&Help"));
+
+ // ... and attach this menu bar to the frame
+ SetMenuBar(menuBar);
+/*
+ wxToolBar* toolbar = CreateToolBar();
+ toolbar->SetToolBitmapSize(wxSize(32, 32));
+
+ wxBitmap back = wxArtProvider::GetBitmap(wxART_GO_BACK, wxART_TOOLBAR, wxSize(32,32));
+ toolbar->AddTool(ID_BACK, back, wxT("Back"));
+
+ wxBitmap forward = wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_TOOLBAR, wxSize(32,32));
+ toolbar->AddTool(ID_FORWARD, forward, wxT("Next"));
+
+ addressBar = new wxTextCtrl(toolbar, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxSize(400, -1), wxTE_PROCESS_ENTER);
+ toolbar->AddControl(addressBar);
+
+ searchCtrl = new wxSearchCtrl(toolbar, ID_SEARCHCTRL, _("Search"), wxDefaultPosition, wxSize(200, -1), wxTE_PROCESS_ENTER);
+ toolbar->AddControl(searchCtrl);
+ toolbar->Realize();
+
+ SetToolBar(toolbar);
+*/
+ // Create the wxWebView Window
+ webview = new wxWebView((wxWindow*)this, 1001, wxDefaultPosition, wxSize(200, 200));
+ webview->SetBackgroundColour(*wxWHITE);
+
+ // create a status bar just for fun (by default with 1 pane only)
+ CreateStatusBar(2);
+}
+
+wxWebFrame::~wxWebFrame()
+{
+ if (m_debugMenu && GetMenuBar()->FindMenu(_("&Debug")) == wxNOT_FOUND)
+ delete m_debugMenu;
+}
+
+void wxWebFrame::ShowDebugMenu(bool show)
+{
+ int debugMenu = GetMenuBar()->FindMenu(_("&Debug"));
+ if (show && debugMenu == wxNOT_FOUND) {
+ int prevMenu = GetMenuBar()->FindMenu(_("&View"));
+ if (prevMenu != wxNOT_FOUND)
+ GetMenuBar()->Insert((size_t)prevMenu+1, m_debugMenu, _("&Debug"));
+ }
+ else if (!show && debugMenu != wxNOT_FOUND) {
+ GetMenuBar()->Remove(debugMenu);
+ }
+}
+
+// event handlers
+
+void wxWebFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
+{
+ // true is to force the frame to close
+ Close(true);
+}
+
+void wxWebFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
+{
+ wxString msg;
+ msg.Printf(_T("This is the About dialog of the wxWebKit sample.\n")
+ _T("Welcome to %s"), wxVERSION_STRING);
+
+ wxMessageBox(msg, _T("About wxWebKit Sample"), wxOK | wxICON_INFORMATION, this);
+
+}
+
+void wxWebFrame::OnLoadFile(wxCommandEvent& WXUNUSED(event))
+{
+ wxFileDialog* dialog = new wxFileDialog(this, wxT("Choose a file"));
+ if (dialog->ShowModal() == wxID_OK) {
+ wxString path = dialog->GetPath().Prepend(wxT("file://"));
+
+ if (webview)
+ webview->LoadURL(path);
+ }
+}
+
+void wxWebFrame::OnStateChangedEvent(wxWebViewStateChangedEvent& event)
+{
+ if (GetStatusBar() != NULL){
+ if (event.GetState() == wxWEBVIEW_STATE_NEGOTIATING) {
+ GetStatusBar()->SetStatusText(_("Contacting ") + event.GetURL());
+ }
+ else if (event.GetState() == wxWEBVIEW_STATE_TRANSFERRING) {
+ GetStatusBar()->SetStatusText(_("Loading ") + event.GetURL());
+ }
+ else if (event.GetState() == wxWEBVIEW_STATE_STOP) {
+ GetStatusBar()->SetStatusText(_("Load complete."));
+ addressBar->SetValue(event.GetURL());
+ SetTitle(webview->GetPageTitle());
+ }
+ else if (event.GetState() == wxWEBVIEW_STATE_FAILED) {
+ GetStatusBar()->SetStatusText(_("Failed to load ") + event.GetURL());
+ }
+ }
+}
+
+void wxWebFrame::OnBeforeLoad(wxWebViewBeforeLoadEvent& myEvent)
+{
+ if (m_checkBeforeLoad) {
+ int reply = wxMessageBox(_("Would you like to continue loading ") + myEvent.GetURL() + wxT("?"), _("Continue Loading?"), wxYES_NO);
+ if (reply == wxNO) {
+ myEvent.Cancel();
+ }
+ }
+}
+
+void wxWebFrame::OnAddressBarEnter(wxCommandEvent& event)
+{
+ if (webview)
+ webview->LoadURL(addressBar->GetValue());
+}
+
+void wxWebFrame::OnSearchCtrlEnter(wxCommandEvent& event)
+{
+ if (webview) {
+ webview->LoadURL(wxString::Format(wxT("http://www.google.com/search?rls=en&q=%s&ie=UTF-8&oe=UTF-8"), searchCtrl->GetValue().wc_str()));
+ }
+}
+
+void wxWebFrame::OnBack(wxCommandEvent& event)
+{
+ if (webview)
+ webview->GoBack();
+}
+
+void wxWebFrame::OnForward(wxCommandEvent& event)
+{
+ if (webview)
+ webview->GoForward();
+}
+
+void wxWebFrame::OnStop(wxCommandEvent& myEvent)
+{
+ if (webview)
+ webview->Stop();
+}
+
+void wxWebFrame::OnReload(wxCommandEvent& myEvent)
+{
+ if (webview)
+ webview->Reload();
+}
+
+void wxWebFrame::OnMakeTextLarger(wxCommandEvent& myEvent)
+{
+ if (webview) {
+ if (webview->CanIncreaseTextSize())
+ webview->IncreaseTextSize();
+ }
+}
+
+void wxWebFrame::OnMakeTextSmaller(wxCommandEvent& myEvent)
+{
+ if (webview) {
+ if (webview->CanDecreaseTextSize())
+ webview->DecreaseTextSize();
+ }
+}
+
+void wxWebFrame::OnGetSource(wxCommandEvent& myEvent)
+{
+ if (webview) {
+ wxPageSourceViewFrame* wxWebFrame = new wxPageSourceViewFrame(webview->GetPageSource());
+ wxWebFrame->Show();
+ }
+}
+
+void wxWebFrame::OnSetSource(wxCommandEvent& event)
+{
+ if (webview)
+ webview->SetPageSource(wxString(wxT("<p>Hello World!</p>")));
+}
+
+void wxWebFrame::OnBrowse(wxCommandEvent& event)
+{
+ if (webview)
+ webview->MakeEditable(!event.IsChecked());
+}
+
+void wxWebFrame::OnEdit(wxCommandEvent& event)
+{
+ if (webview)
+ webview->MakeEditable(event.IsChecked());
+}
+
+void wxWebFrame::OnRunScript(wxCommandEvent& myEvent){
+ if (webview) {
+ wxTextEntryDialog* dialog = new wxTextEntryDialog(this, _("Type in a JavaScript to exectute."));
+ if (dialog->ShowModal() == wxID_OK)
+ wxMessageBox(wxT("Result is: ") + webview->RunScript(dialog->GetValue()));
+
+ dialog->Destroy();
+ }
+}
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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 WXWEBFRAME_H
+#define WXWEBFRAME_H
+
+#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+ #include "wx/wx.h"
+#endif
+
+#include "WebView.h"
+#include <wx/srchctrl.h>
+
+class WXDLLIMPEXP_WEBKIT wxWebFrame : public wxFrame
+{
+public:
+ // ctor(s)
+#if SWIG
+ %pythonAppend wxWebFrame "self._setOORInfo(self)"
+#endif
+ wxWebFrame(const wxString& title);
+
+#ifndef SWIG
+ ~wxWebFrame();
+#endif
+
+ void ShowDebugMenu(bool show = true);
+ wxWebView* webview;
+
+protected:
+
+ // event handlers (these functions should _not_ be virtual)
+ void OnQuit(wxCommandEvent& event);
+ void OnAbout(wxCommandEvent& event);
+ void OnLoadFile(wxCommandEvent& event);
+ void OnAddressBarEnter(wxCommandEvent& event);
+ void OnSearchCtrlEnter(wxCommandEvent& event);
+ void OnStateChangedEvent(wxWebViewStateChangedEvent& event);
+ void OnBeforeLoad(wxWebViewBeforeLoadEvent& event);
+ void OnBack(wxCommandEvent& event);
+ void OnForward(wxCommandEvent& event);
+ void OnStop(wxCommandEvent& event);
+ void OnReload(wxCommandEvent& event);
+ void OnBrowse(wxCommandEvent& event);
+ void OnEdit(wxCommandEvent& event);
+
+ void OnMakeTextLarger(wxCommandEvent& event);
+ void OnMakeTextSmaller(wxCommandEvent& event);
+ void OnGetSource(wxCommandEvent& event);
+
+ // debug menu items
+ void OnSetSource(wxCommandEvent& event);
+ void OnRunScript(wxCommandEvent& myEvent);
+
+private:
+ wxTextCtrl* addressBar;
+ wxSearchCtrl* searchCtrl;
+
+ bool m_checkBeforeLoad;
+ wxMenu* m_debugMenu;
+ // any class wishing to process wxWindows events must use this macro
+#ifndef SWIG
+ DECLARE_EVENT_TABLE()
+#endif
+};
+
+class WXDLLIMPEXP_WEBKIT wxPageSourceViewFrame : public wxFrame
+{
+public:
+ wxPageSourceViewFrame(const wxString& source);
+};
+
+#endif // ifndef WXWEBFRAME_H
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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.
+ */
+
+#include "config.h"
+#include "ChromeClientWx.h"
+#include "FloatRect.h"
+#include "FrameLoadRequest.h"
+#include "NotImplemented.h"
+#include "PlatformString.h"
+
+#include <stdio.h>
+
+#include <wx/wxprec.h>
+#ifndef WX_PRECOMP
+ #include <wx/wx.h>
+#endif
+#include <wx/textdlg.h>
+
+#include "WebFrame.h"
+#include "WebView.h"
+#include "WebViewPrivate.h"
+
+namespace WebCore {
+
+ChromeClientWx::~ChromeClientWx()
+{
+}
+
+void ChromeClientWx::chromeDestroyed()
+{
+ notImplemented();
+}
+
+void ChromeClientWx::setWindowRect(const FloatRect&)
+{
+ notImplemented();
+}
+
+FloatRect ChromeClientWx::windowRect()
+{
+ notImplemented();
+ return FloatRect();
+}
+
+FloatRect ChromeClientWx::pageRect()
+{
+ notImplemented();
+ return FloatRect();
+}
+
+float ChromeClientWx::scaleFactor()
+{
+ notImplemented();
+ return 0.0;
+}
+
+void ChromeClientWx::focus()
+{
+ notImplemented();
+}
+
+void ChromeClientWx::unfocus()
+{
+ notImplemented();
+}
+
+bool ChromeClientWx::canTakeFocus(FocusDirection)
+{
+ notImplemented();
+ return false;
+}
+
+void ChromeClientWx::takeFocus(FocusDirection)
+{
+ notImplemented();
+}
+
+
+Page* ChromeClientWx::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures&)
+{
+
+ // FIXME: Create a EVT_WEBKIT_NEW_WINDOW event, and only run this code
+ // when that event is not handled.
+
+ Page* myPage = 0;
+ wxWebFrame* newFrame = new wxWebFrame(wxTheApp->GetAppName());
+
+ if (newFrame->webview) {
+ newFrame->webview->LoadURL(request.resourceRequest().url().url());
+ newFrame->Show(true);
+
+ WebViewPrivate* impl = newFrame->webview->m_impl;
+ if (impl)
+ myPage = impl->frame->page();
+ }
+
+ return myPage;
+}
+
+Page* ChromeClientWx::createModalDialog(Frame*, const FrameLoadRequest&)
+{
+ notImplemented();
+ return 0;
+}
+
+void ChromeClientWx::show()
+{
+ notImplemented();
+}
+
+bool ChromeClientWx::canRunModal()
+{
+ notImplemented();
+ return false;
+}
+
+void ChromeClientWx::runModal()
+{
+ notImplemented();
+}
+
+void ChromeClientWx::setToolbarsVisible(bool)
+{
+ notImplemented();
+}
+
+bool ChromeClientWx::toolbarsVisible()
+{
+ notImplemented();
+ return false;
+}
+
+void ChromeClientWx::setStatusbarVisible(bool)
+{
+ notImplemented();
+}
+
+bool ChromeClientWx::statusbarVisible()
+{
+ notImplemented();
+ return false;
+}
+
+void ChromeClientWx::setScrollbarsVisible(bool)
+{
+ notImplemented();
+}
+
+bool ChromeClientWx::scrollbarsVisible()
+{
+ notImplemented();
+ return false;
+}
+
+void ChromeClientWx::setMenubarVisible(bool)
+{
+ notImplemented();
+}
+
+bool ChromeClientWx::menubarVisible()
+{
+ notImplemented();
+ return false;
+}
+
+void ChromeClientWx::setResizable(bool)
+{
+ notImplemented();
+}
+
+void ChromeClientWx::addMessageToConsole(const String&,
+ unsigned int,
+ const String&)
+{
+ notImplemented();
+}
+
+bool ChromeClientWx::canRunBeforeUnloadConfirmPanel()
+{
+ notImplemented();
+ return true;
+}
+
+bool ChromeClientWx::runBeforeUnloadConfirmPanel(const String& string,
+ Frame* frame)
+{
+ wxMessageDialog dialog(NULL, string, wxT("Confirm Action?"), wxYES_NO);
+ return dialog.ShowModal() == wxYES;
+}
+
+void ChromeClientWx::closeWindowSoon()
+{
+ notImplemented();
+}
+
+/*
+ Sites for testing prompts:
+ Alert - just type in a bad web address or http://www.htmlite.com/JS002.php
+ Prompt - http://www.htmlite.com/JS007.php
+ Confirm - http://www.htmlite.com/JS006.php
+*/
+
+void ChromeClientWx::runJavaScriptAlert(Frame* frame, const String& string)
+{
+ wxMessageBox(string, wxT("JavaScript Alert"), wxOK);
+}
+
+bool ChromeClientWx::runJavaScriptConfirm(Frame* frame, const String& string)
+{
+ wxMessageDialog dialog(NULL, string, wxT("JavaScript Confirm"), wxYES_NO);
+ dialog.Centre();
+ return (dialog.ShowModal() == wxID_YES);
+}
+
+bool ChromeClientWx::runJavaScriptPrompt(Frame* frame, const String& message, const String& defaultValue, String& result)
+{
+ wxTextEntryDialog dialog(NULL, message, wxT("JavaScript Prompt"), wxEmptyString, wxOK | wxCANCEL);
+ dialog.Centre();
+ if (dialog.ShowModal() == wxID_OK) {
+ result = dialog.GetValue();
+ return true;
+ }
+
+ return false;
+}
+
+void ChromeClientWx::setStatusbarText(const String&)
+{
+ notImplemented();
+}
+
+bool ChromeClientWx::shouldInterruptJavaScript()
+{
+ notImplemented();
+ return false;
+}
+
+bool ChromeClientWx::tabsToLinks() const
+{
+ notImplemented();
+ return false;
+}
+
+IntRect ChromeClientWx::windowResizerRect() const
+{
+ notImplemented();
+ return IntRect();
+}
+
+void ChromeClientWx::addToDirtyRegion(const IntRect&)
+{
+ notImplemented();
+}
+
+void ChromeClientWx::scrollBackingStore(int dx, int dy,
+ const IntRect& scrollViewRect,
+ const IntRect& clipRect)
+{
+ notImplemented();
+}
+
+void ChromeClientWx::updateBackingStore()
+{
+ notImplemented();
+}
+
+void ChromeClientWx::mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags)
+{
+ notImplemented();
+}
+
+void ChromeClientWx::setToolTip(const String&)
+{
+ notImplemented();
+}
+void ChromeClientWx::print(Frame*)
+{
+ notImplemented();
+}
+
+bool ChromeClientWx::runDatabaseSizeLimitPrompt(Frame*, const String& origin)
+{
+ notImplemented();
+ return false;
+}
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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 ChromeClientWx_H
+#define ChromeClientWx_H
+
+#include "ChromeClient.h"
+#include "FocusDirection.h"
+#include "IntRect.h"
+#include "WebView.h"
+
+namespace WebCore {
+
+class ChromeClientWx : public ChromeClient {
+public:
+ virtual ~ChromeClientWx();
+ virtual void chromeDestroyed();
+
+ virtual void setWindowRect(const FloatRect&);
+ virtual FloatRect windowRect();
+
+ virtual FloatRect pageRect();
+
+ virtual float scaleFactor();
+
+ virtual void focus();
+ virtual void unfocus();
+
+ virtual bool canTakeFocus(FocusDirection);
+ virtual void takeFocus(FocusDirection);
+
+ virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&);
+ virtual Page* createModalDialog(Frame*, 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);
+
+ virtual void addMessageToConsole(const String& message,
+ unsigned int lineNumber,
+ const String& sourceID);
+
+ virtual bool canRunBeforeUnloadConfirmPanel();
+ virtual bool runBeforeUnloadConfirmPanel(const String& message,
+ Frame* frame);
+
+ virtual void closeWindowSoon();
+
+ virtual void runJavaScriptAlert(Frame*, const String&);
+ virtual bool runJavaScriptConfirm(Frame*, const String&);
+ virtual bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result);
+ virtual void setStatusbarText(const String&);
+ virtual bool shouldInterruptJavaScript();
+
+ virtual bool tabsToLinks() const;
+
+ virtual IntRect windowResizerRect() const;
+ virtual void addToDirtyRegion(const IntRect&);
+ virtual void scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect);
+ virtual void updateBackingStore();
+
+ virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
+
+ virtual void setToolTip(const String&);
+
+ virtual void print(Frame*);
+
+ virtual bool runDatabaseSizeLimitPrompt(Frame*, const String& origin);
+};
+
+}
+#endif // ChromeClientWx_H
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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.
+ */
+
+#include "config.h"
+#include "ContextMenuClientWx.h"
+#include "NotImplemented.h"
+#include <stdio.h>
+
+namespace WebCore {
+
+ContextMenuClientWx::~ContextMenuClientWx()
+{
+}
+
+void ContextMenuClientWx::contextMenuDestroyed()
+{
+ notImplemented();
+}
+
+PlatformMenuDescription ContextMenuClientWx::getCustomMenuFromDefaultItems(ContextMenu*)
+{
+ notImplemented();
+ return 0;
+}
+
+void ContextMenuClientWx::contextMenuItemSelected(ContextMenuItem*,
+ const ContextMenu*)
+{
+ notImplemented();
+}
+
+void ContextMenuClientWx::downloadURL(const KURL&)
+{
+ notImplemented();
+}
+
+void ContextMenuClientWx::copyImageToClipboard(const HitTestResult&)
+{
+ notImplemented();
+}
+
+void ContextMenuClientWx::searchWithGoogle(const Frame*)
+{
+ notImplemented();
+}
+
+void ContextMenuClientWx::lookUpInDictionary(Frame*)
+{
+ notImplemented();
+}
+
+void ContextMenuClientWx::speak(const String&)
+{
+ notImplemented();
+}
+
+void ContextMenuClientWx::stopSpeaking()
+{
+ notImplemented();
+}
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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 ContextMenuClientWx_h
+#define ContextMenuClientWx_h
+
+#include "ContextMenuClient.h"
+#include "PlatformMenuDescription.h"
+
+namespace WebCore {
+
+class ContextMenuClientWx : public ContextMenuClient {
+public:
+ virtual ~ContextMenuClientWx();
+ virtual void contextMenuDestroyed();
+
+ virtual PlatformMenuDescription getCustomMenuFromDefaultItems(ContextMenu*);
+ virtual void contextMenuItemSelected(ContextMenuItem*,
+ const ContextMenu*);
+
+ virtual void downloadURL(const KURL&);
+ virtual void copyImageToClipboard(const HitTestResult&);
+ virtual void searchWithGoogle(const Frame*);
+ virtual void lookUpInDictionary(Frame*);
+ virtual void speak(const String&);
+ virtual void stopSpeaking();
+};
+
+}
+
+#endif // ContextMenuClientWx_h
--- /dev/null
+/*
+ * 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.
+ *
+ * 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 "DragClientWx.h"
+#include "NotImplemented.h"
+
+#include <stdio.h>
+
+namespace WebCore {
+
+DragDestinationAction DragClientWx::actionMaskForDrag(DragData*)
+{
+ notImplemented();
+ return DragDestinationActionAny;
+}
+
+void DragClientWx::willPerformDragDestinationAction(DragDestinationAction,
+ DragData*)
+{
+ notImplemented();
+}
+
+void DragClientWx::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*)
+{
+ notImplemented();
+}
+
+void DragClientWx::dragControllerDestroyed()
+{
+ notImplemented();
+}
+
+DragSourceAction DragClientWx::dragSourceActionMaskForPoint(const IntPoint&)
+{
+ notImplemented();
+ return DragSourceActionAny;
+}
+
+void DragClientWx::startDrag(DragImageRef dragImage,
+ const IntPoint& dragImageOrigin,
+ const IntPoint& eventPos, Clipboard*,
+ Frame*, bool linkDrag)
+{
+ notImplemented();
+}
+
+DragImageRef DragClientWx::createDragImageForLink(KURL&, const String& label, Frame*)
+{
+ notImplemented();
+ return 0;
+}
+
+}
--- /dev/null
+/*
+ * 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.
+ *
+ * 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 "DragClient.h"
+#include "DragData.h"
+
+namespace WebCore {
+
+class DragClientWx : public WebCore::DragClient {
+public:
+ virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction,
+ WebCore::DragData*);
+ virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*);
+
+ virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData*);
+ virtual void dragControllerDestroyed();
+ virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&);
+
+ virtual void startDrag(WebCore::DragImageRef dragImage, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, WebCore::Clipboard*, WebCore::Frame*, bool linkDrag = false);
+ virtual WebCore::DragImageRef createDragImageForLink(WebCore::KURL&, const WebCore::String& label, WebCore::Frame*);
+};
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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.
+ */
+#include "config.h"
+#include "EditorClientWx.h"
+
+#include "EditCommand.h"
+#include "Editor.h"
+#include "FocusController.h"
+#include "Frame.h"
+#include "FrameView.h"
+#include "KeyboardEvent.h"
+#include "KeyboardCodes.h"
+#include "NotImplemented.h"
+#include "Page.h"
+#include "PlatformKeyboardEvent.h"
+#include "PlatformString.h"
+#include "SelectionController.h"
+#include "WebView.h"
+
+#include <stdio.h>
+
+namespace WebCore {
+
+EditorClientWx::~EditorClientWx()
+{
+ m_page = NULL;
+}
+
+void EditorClientWx::setPage(Page* page)
+{
+ m_page = page;
+}
+
+void EditorClientWx::pageDestroyed()
+{
+ notImplemented();
+}
+
+bool EditorClientWx::shouldDeleteRange(Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClientWx::shouldShowDeleteInterface(HTMLElement*)
+{
+ notImplemented();
+ return false;
+}
+
+bool EditorClientWx::smartInsertDeleteEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+bool EditorClientWx::isContinuousSpellCheckingEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClientWx::toggleContinuousSpellChecking()
+{
+ notImplemented();
+}
+
+bool EditorClientWx::isGrammarCheckingEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClientWx::toggleGrammarChecking()
+{
+ notImplemented();
+}
+
+int EditorClientWx::spellCheckerDocumentTag()
+{
+ notImplemented();
+ return 0;
+}
+
+bool EditorClientWx::selectWordBeforeMenuEvent()
+{
+ notImplemented();
+ return false;
+}
+
+bool EditorClientWx::isEditable()
+{
+ Frame* frame = m_page->focusController()->focusedOrMainFrame();
+
+ if (frame) {
+ wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->nativeWindow());
+ if (webKitWin)
+ return webKitWin->IsEditable();
+ }
+ return false;
+}
+
+bool EditorClientWx::shouldBeginEditing(Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClientWx::shouldEndEditing(Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClientWx::shouldInsertNode(Node*, Range*,
+ EditorInsertAction)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClientWx::shouldInsertText(String, Range*,
+ EditorInsertAction)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClientWx::shouldApplyStyle(CSSStyleDeclaration*,
+ Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClientWx::shouldMoveRangeAfterDelete(Range*, Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClientWx::shouldChangeSelectedRange(Range* fromRange, Range* toRange,
+ EAffinity, bool stillSelecting)
+{
+ notImplemented();
+ return true;
+}
+
+void EditorClientWx::didBeginEditing()
+{
+ notImplemented();
+}
+
+void EditorClientWx::respondToChangedContents()
+{
+ notImplemented();
+}
+
+void EditorClientWx::didEndEditing()
+{
+ notImplemented();
+}
+
+void EditorClientWx::didWriteSelectionToPasteboard()
+{
+ notImplemented();
+}
+
+void EditorClientWx::didSetSelectionTypesForPasteboard()
+{
+ notImplemented();
+}
+
+void EditorClientWx::registerCommandForUndo(PassRefPtr<EditCommand>)
+{
+ notImplemented();
+}
+
+void EditorClientWx::registerCommandForRedo(PassRefPtr<EditCommand>)
+{
+ notImplemented();
+}
+
+void EditorClientWx::clearUndoRedoOperations()
+{
+ notImplemented();
+}
+
+bool EditorClientWx::canUndo() const
+{
+ notImplemented();
+ return false;
+}
+
+bool EditorClientWx::canRedo() const
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClientWx::undo()
+{
+ notImplemented();
+}
+
+void EditorClientWx::redo()
+{
+ notImplemented();
+}
+
+void EditorClientWx::handleInputMethodKeypress(KeyboardEvent* event)
+{
+// NOTE: we don't currently need to handle this. When key events occur,
+// both this method and handleKeypress get a chance at handling them.
+// We might use this method later on for IME-specific handling.
+}
+
+void EditorClientWx::handleKeypress(KeyboardEvent* event)
+{
+ Frame* frame = m_page->focusController()->focusedOrMainFrame();
+ if (!frame)
+ return;
+
+ const PlatformKeyboardEvent* kevent = event->keyEvent();
+ if (!kevent->isKeyUp()) {
+ Node* start = frame->selectionController()->start().node();
+ if (!start || !start->isContentEditable())
+ return;
+
+ if (kevent->isWxCharEvent() && !kevent->ctrlKey() && !kevent->altKey()) {
+ switch(kevent->WindowsKeyCode()) {
+ // we handled these on key down, ignore them for char events
+ case VK_BACK:
+ case VK_DELETE:
+ case VK_LEFT:
+ case VK_RIGHT:
+ case VK_UP:
+ case VK_DOWN:
+ case VK_RETURN:
+ break;
+ default:
+ frame->editor()->insertText(kevent->text(), event);
+ }
+ event->setDefaultHandled();
+ return;
+ }
+
+ switch(kevent->WindowsKeyCode()) {
+ case VK_BACK:
+ frame->editor()->deleteWithDirection(SelectionController::BACKWARD,
+ CharacterGranularity, false, true);
+ break;
+ case VK_DELETE:
+ frame->editor()->deleteWithDirection(SelectionController::FORWARD,
+ CharacterGranularity, false, true);
+ break;
+ case VK_LEFT:
+ frame->editor()->execCommand("MoveLeft");
+ break;
+ case VK_RIGHT:
+ frame->editor()->execCommand("MoveRight");
+ break;
+ case VK_UP:
+ frame->editor()->execCommand("MoveUp");
+ break;
+ case VK_DOWN:
+ frame->editor()->execCommand("MoveDown");
+ break;
+ case VK_RETURN:
+ frame->editor()->execCommand("InsertLineBreak");
+ default:
+ break;
+ }
+
+ event->setDefaultHandled();
+ }
+}
+
+void EditorClientWx::textFieldDidBeginEditing(Element*)
+{
+ notImplemented();
+}
+
+void EditorClientWx::textFieldDidEndEditing(Element*)
+{
+ notImplemented();
+}
+
+void EditorClientWx::textDidChangeInTextField(Element*)
+{
+ notImplemented();
+}
+
+bool EditorClientWx::doTextFieldCommandFromEvent(Element*, KeyboardEvent*)
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClientWx::textWillBeDeletedInTextField(Element*)
+{
+ notImplemented();
+}
+
+void EditorClientWx::textDidChangeInTextArea(Element*)
+{
+ notImplemented();
+}
+
+void EditorClientWx::respondToChangedSelection()
+{
+ notImplemented();
+}
+
+void EditorClientWx::ignoreWordInSpellDocument(const String&)
+{
+ notImplemented();
+}
+
+void EditorClientWx::learnWord(const String&)
+{
+ notImplemented();
+}
+
+void EditorClientWx::checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength)
+{
+ notImplemented();
+}
+
+void EditorClientWx::checkGrammarOfString(const UChar*, int length, Vector<GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength)
+{
+ notImplemented();
+}
+
+void EditorClientWx::updateSpellingUIWithGrammarString(const String&, const GrammarDetail& detail)
+{
+ notImplemented();
+}
+
+void EditorClientWx::updateSpellingUIWithMisspelledWord(const String&)
+{
+ notImplemented();
+}
+
+void EditorClientWx::showSpellingUI(bool show)
+{
+ notImplemented();
+}
+
+bool EditorClientWx::spellingUIIsShowing()
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClientWx::getGuessesForWord(const String&, Vector<String>& guesses)
+{
+ notImplemented();
+}
+
+void EditorClientWx::setInputMethodState(bool enabled)
+{
+ notImplemented();
+}
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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 EditorClientWx_h
+#define EditorClientWx_h
+
+#include "EditorClient.h"
+#include "Page.h"
+
+namespace WebCore {
+
+class EditorClientWx : public EditorClient {
+public:
+ virtual ~EditorClientWx();
+ void setPage(Page*);
+ virtual void pageDestroyed();
+
+ virtual bool shouldDeleteRange(Range*);
+ virtual bool shouldShowDeleteInterface(HTMLElement*);
+ virtual bool smartInsertDeleteEnabled();
+ virtual bool isContinuousSpellCheckingEnabled();
+ virtual void toggleContinuousSpellChecking();
+ virtual bool isGrammarCheckingEnabled();
+ virtual void toggleGrammarChecking();
+ virtual int spellCheckerDocumentTag();
+
+ virtual bool selectWordBeforeMenuEvent();
+ virtual bool isEditable();
+
+ virtual bool shouldBeginEditing(Range*);
+ virtual bool shouldEndEditing(Range*);
+ virtual bool shouldInsertNode(Node*, Range*,
+ EditorInsertAction);
+ virtual bool shouldInsertText(String, Range*,
+ EditorInsertAction);
+ virtual bool shouldApplyStyle(CSSStyleDeclaration*,
+ Range*);
+ virtual bool shouldMoveRangeAfterDelete(Range*, Range*);
+ virtual bool shouldChangeSelectedRange(Range* fromRange, Range* toRange,
+ EAffinity, bool stillSelecting);
+
+ virtual void didBeginEditing();
+ virtual void respondToChangedContents();
+ virtual void respondToChangedSelection();
+ virtual void didEndEditing();
+ virtual void didWriteSelectionToPasteboard();
+ virtual void didSetSelectionTypesForPasteboard();
+
+ virtual void registerCommandForUndo(PassRefPtr<EditCommand>);
+ virtual void registerCommandForRedo(PassRefPtr<EditCommand>);
+ virtual void clearUndoRedoOperations();
+
+ virtual bool canUndo() const;
+ virtual bool canRedo() const;
+
+ virtual void undo();
+ virtual void redo();
+
+ virtual void handleKeypress(KeyboardEvent*);
+ virtual void handleInputMethodKeypress(KeyboardEvent*);
+
+ virtual void textFieldDidBeginEditing(Element*);
+ virtual void textFieldDidEndEditing(Element*);
+ virtual void textDidChangeInTextField(Element*);
+ virtual bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*);
+ virtual void textWillBeDeletedInTextField(Element*);
+ virtual void textDidChangeInTextArea(Element*);
+
+ virtual void ignoreWordInSpellDocument(const String&);
+ virtual void learnWord(const String&);
+ virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength);
+ virtual void checkGrammarOfString(const UChar*, int length, Vector<GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength);
+ virtual void updateSpellingUIWithGrammarString(const String&, const GrammarDetail& detail);
+ virtual void updateSpellingUIWithMisspelledWord(const String&);
+ virtual void showSpellingUI(bool show);
+ virtual bool spellingUIIsShowing();
+ virtual void getGuessesForWord(const String&, Vector<String>& guesses);
+ virtual void setInputMethodState(bool enabled);
+
+private:
+ Page* m_page;
+};
+
+}
+
+#endif // EditorClientWx_h
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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.
+ */
+
+#include "config.h"
+#include "FrameLoaderClientWx.h"
+
+#include "DocumentLoader.h"
+#include "Frame.h"
+#include "FrameLoaderTypes.h"
+#include "FrameView.h"
+#include "FrameTree.h"
+#include "HTMLFormElement.h"
+#include "NotImplemented.h"
+#include "Page.h"
+#include "PlatformString.h"
+#include "ProgressTracker.h"
+#include "ResourceError.h"
+#include "ResourceResponse.h"
+
+#include <stdio.h>
+
+#include "WebView.h"
+#include "WebViewPrivate.h"
+
+namespace WebCore {
+
+inline int wxNavTypeFromWebNavType(NavigationType type){
+ if (type == NavigationTypeLinkClicked)
+ return wxWEBVIEW_NAV_LINK_CLICKED;
+
+ if (type == NavigationTypeFormSubmitted)
+ return wxWEBVIEW_NAV_FORM_SUBMITTED;
+
+ if (type == NavigationTypeBackForward)
+ return wxWEBVIEW_NAV_BACK_NEXT;
+
+ if (type == NavigationTypeReload)
+ return wxWEBVIEW_NAV_RELOAD;
+
+ if (type == NavigationTypeFormResubmitted)
+ return wxWEBVIEW_NAV_FORM_RESUBMITTED;
+
+ return wxWEBVIEW_NAV_OTHER;
+}
+
+FrameLoaderClientWx::FrameLoaderClientWx()
+ : m_frame(0)
+{
+}
+
+
+FrameLoaderClientWx::~FrameLoaderClientWx()
+{
+}
+
+void FrameLoaderClientWx::setFrame(Frame *frame)
+{
+ m_frame = frame;
+}
+
+void FrameLoaderClientWx::detachFrameLoader()
+{
+ m_frame = 0;
+}
+
+void FrameLoaderClientWx::ref()
+{
+ Shared<FrameLoaderClientWx>::ref();
+}
+
+void FrameLoaderClientWx::deref()
+{
+ Shared<FrameLoaderClientWx>::deref();
+}
+
+bool FrameLoaderClientWx::hasWebView() const
+{
+ notImplemented();
+ return true;
+}
+
+
+bool FrameLoaderClientWx::hasFrameView() const
+{
+ notImplemented();
+ return true;
+}
+
+
+bool FrameLoaderClientWx::hasBackForwardList() const
+{
+ notImplemented();
+ return true;
+}
+
+
+void FrameLoaderClientWx::resetBackForwardList()
+{
+ notImplemented();
+}
+
+
+bool FrameLoaderClientWx::provisionalItemIsTarget() const
+{
+ notImplemented();
+ return false;
+}
+
+
+bool FrameLoaderClientWx::privateBrowsingEnabled() const
+{
+ notImplemented();
+ return false;
+}
+
+
+void FrameLoaderClientWx::makeDocumentView()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::makeRepresentation(DocumentLoader*)
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::forceLayout()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::forceLayoutForNonHTML()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::updateHistoryForCommit()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::updateHistoryForBackForwardNavigation()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::updateHistoryForReload()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::updateHistoryForStandardLoad()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::updateHistoryForInternalLoad()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::updateHistoryAfterClientRedirect()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::setCopiesOnScroll()
+{
+ // apparently mac specific
+ notImplemented();
+}
+
+
+LoadErrorResetToken* FrameLoaderClientWx::tokenForLoadErrorReset()
+{
+ notImplemented();
+ return 0;
+}
+
+
+void FrameLoaderClientWx::resetAfterLoadError(LoadErrorResetToken*)
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::doNotResetAfterLoadError(LoadErrorResetToken*)
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::willCloseDocument()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::detachedFromParent1()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::detachedFromParent2()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::detachedFromParent3()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::detachedFromParent4()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::loadedFromCachedPage()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::dispatchDidHandleOnloadEvents()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::dispatchDidReceiveServerRedirectForProvisionalLoad()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::dispatchDidCancelClientRedirect()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::dispatchWillPerformClientRedirect(const KURL&,
+ double interval,
+ double fireDate)
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::dispatchDidChangeLocationWithinPage()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::dispatchWillClose()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::dispatchDidStartProvisionalLoad()
+{
+ wxWindow* target = m_frame->view()->nativeWindow();
+ if (target) {
+ wxWebViewStateChangedEvent wkEvent(target);
+ wkEvent.SetState(wxWEBVIEW_STATE_NEGOTIATING);
+ wkEvent.SetURL(m_frame->loader()->provisionalDocumentLoader()->request().url().url());
+ target->GetEventHandler()->ProcessEvent(wkEvent);
+ }
+}
+
+
+void FrameLoaderClientWx::dispatchDidReceiveTitle(const String& title)
+{
+ wxWebView* target = static_cast<wxWebView*>(m_frame->view()->nativeWindow());
+ if (target)
+ target->SetPageTitle(title);
+}
+
+
+void FrameLoaderClientWx::dispatchDidCommitLoad()
+{
+ wxWindow* target = m_frame->view()->nativeWindow();
+ if (target) {
+ wxWebViewStateChangedEvent wkEvent(target);
+ wkEvent.SetState(wxWEBVIEW_STATE_TRANSFERRING);
+ wkEvent.SetURL(m_frame->loader()->documentLoader()->request().url().url());
+ target->GetEventHandler()->ProcessEvent(wkEvent);
+ }
+}
+
+void FrameLoaderClientWx::dispatchDidFinishDocumentLoad()
+{
+ wxWindow* target = m_frame->view()->nativeWindow();
+ if (target) {
+ wxWebViewStateChangedEvent wkEvent(target);
+ wkEvent.SetState(wxWEBVIEW_STATE_STOP);
+ wkEvent.SetURL(m_frame->loader()->URL().url());
+ target->GetEventHandler()->ProcessEvent(wkEvent);
+ }
+}
+
+void FrameLoaderClientWx::dispatchDidFinishLoad()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::dispatchDidFirstLayout()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::dispatchShow()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::cancelPolicyCheck()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::dispatchWillSubmitForm(FramePolicyFunction function,
+ PassRefPtr<FormState>)
+{
+ // FIXME: Send an event to allow for alerts and cancellation
+ if (!m_frame)
+ return;
+ (m_frame->loader()->*function)(PolicyUse);
+}
+
+
+void FrameLoaderClientWx::dispatchDidLoadMainResource(DocumentLoader*)
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::revertToProvisionalState(DocumentLoader*)
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::clearUnarchivingState(DocumentLoader*)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::postProgressStartedNotification()
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::postProgressEstimateChangedNotification()
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::postProgressFinishedNotification()
+{
+ wxWindow* target = m_frame->view()->nativeWindow();
+ if (target) {
+ wxWebViewStateChangedEvent wkEvent(target);
+ wkEvent.SetState(wxWEBVIEW_STATE_STOP);
+ wkEvent.SetURL(m_frame->loader()->url().url());
+ target->GetEventHandler()->ProcessEvent(wkEvent);
+ }
+}
+
+void FrameLoaderClientWx::progressStarted()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::progressCompleted()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::setMainFrameDocumentReady(bool b)
+{
+ notImplemented();
+ // this is only interesting once we provide an external API for the DOM
+}
+
+
+void FrameLoaderClientWx::willChangeTitle(DocumentLoader*)
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::didChangeTitle(DocumentLoader *l)
+{
+ setTitle(l->title(), l->URL());
+}
+
+
+void FrameLoaderClientWx::finishedLoading(DocumentLoader*)
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::finalSetupForReplace(DocumentLoader*)
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::setDefersLoading(bool)
+{
+ notImplemented();
+}
+
+
+bool FrameLoaderClientWx::isArchiveLoadPending(ResourceLoader*) const
+{
+ notImplemented();
+ return false;
+}
+
+
+void FrameLoaderClientWx::cancelPendingArchiveLoad(ResourceLoader*)
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::clearArchivedResources()
+{
+ notImplemented();
+}
+
+
+bool FrameLoaderClientWx::canShowMIMEType(const String& MIMEType) const
+{
+ notImplemented();
+ return true;
+}
+
+
+bool FrameLoaderClientWx::representationExistsForURLScheme(const String& URLScheme) const
+{
+ notImplemented();
+ return false;
+}
+
+
+String FrameLoaderClientWx::generatedMIMETypeForURLScheme(const String& URLScheme) const
+{
+ notImplemented();
+ return String();
+}
+
+
+void FrameLoaderClientWx::frameLoadCompleted()
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::saveViewStateToItem(HistoryItem*)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::restoreViewState()
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::restoreScrollPositionAndViewState()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::provisionalLoadStarted()
+{
+ notImplemented();
+}
+
+
+bool FrameLoaderClientWx::shouldTreatURLAsSameAsCurrent(const KURL&) const
+{
+ notImplemented();
+ return false;
+}
+
+
+void FrameLoaderClientWx::addHistoryItemForFragmentScroll()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::didFinishLoad()
+{
+ notImplemented();
+}
+
+
+void FrameLoaderClientWx::prepareForDataSourceReplacement()
+{
+ if (m_frame && m_frame->loader())
+ m_frame->loader()->detachChildren();
+}
+
+
+void FrameLoaderClientWx::setTitle(const String& title, const KURL&)
+{
+ notImplemented();
+}
+
+
+String FrameLoaderClientWx::userAgent(const KURL&)
+{
+ // FIXME: Use the new APIs introduced by the GTK port to fill in these values.
+ return String("Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3");
+}
+
+void FrameLoaderClientWx::dispatchDidReceiveIcon()
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::frameLoaderDestroyed()
+{
+ m_frame = 0;
+ delete this;
+}
+
+bool FrameLoaderClientWx::canHandleRequest(const WebCore::ResourceRequest&) const
+{
+ notImplemented();
+ return true;
+}
+
+void FrameLoaderClientWx::partClearedInBegin()
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::setDocumentViewFromCachedPage(WebCore::CachedPage*)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::updateGlobalHistoryForStandardLoad(const WebCore::KURL&)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::updateGlobalHistoryForReload(const WebCore::KURL&)
+{
+ notImplemented();
+}
+
+bool FrameLoaderClientWx::shouldGoToHistoryItem(WebCore::HistoryItem*) const
+{
+ notImplemented();
+ return true;
+}
+
+void FrameLoaderClientWx::saveScrollPositionAndViewStateToItem(WebCore::HistoryItem*)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::saveDocumentViewToCachedPage(WebCore::CachedPage*)
+{
+ notImplemented();
+}
+
+bool FrameLoaderClientWx::canCachePage() const
+{
+ return false;
+}
+
+void FrameLoaderClientWx::setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length)
+{
+ if (!m_frame)
+ return;
+ FrameLoader* fl = loader->frameLoader();
+ fl->setEncoding(m_response.textEncodingName(), false);
+ fl->addData(data, length);
+}
+
+WebCore::ResourceError FrameLoaderClientWx::cancelledError(const WebCore::ResourceRequest&)
+{
+ notImplemented();
+ return ResourceError();
+}
+
+WebCore::ResourceError FrameLoaderClientWx::blockedError(const ResourceRequest&)
+{
+ notImplemented();
+ return ResourceError();
+}
+
+WebCore::ResourceError FrameLoaderClientWx::cannotShowURLError(const WebCore::ResourceRequest&)
+{
+ notImplemented();
+ return ResourceError();
+}
+
+WebCore::ResourceError FrameLoaderClientWx::interruptForPolicyChangeError(const WebCore::ResourceRequest&)
+{
+ notImplemented();
+ return ResourceError();
+}
+
+WebCore::ResourceError FrameLoaderClientWx::cannotShowMIMETypeError(const WebCore::ResourceResponse&)
+{
+ notImplemented();
+ return ResourceError();
+}
+
+WebCore::ResourceError FrameLoaderClientWx::fileDoesNotExistError(const WebCore::ResourceResponse&)
+{
+ notImplemented();
+ return ResourceError();
+}
+
+bool FrameLoaderClientWx::shouldFallBack(const WebCore::ResourceError& error)
+{
+ notImplemented();
+ return false;
+}
+
+WTF::PassRefPtr<DocumentLoader> FrameLoaderClientWx::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
+{
+ RefPtr<DocumentLoader> loader = new DocumentLoader(request, substituteData);
+ return loader.release();
+}
+
+void FrameLoaderClientWx::download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest& request, const ResourceResponse& response)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long, const AuthenticationChallenge&)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::dispatchDidCancelAuthenticationChallenge(DocumentLoader*, unsigned long, const AuthenticationChallenge&)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long id, const ResourceResponse& response)
+{
+ notImplemented();
+ m_response = response;
+ m_firstData = true;
+}
+
+void FrameLoaderClientWx::dispatchDidReceiveContentLength(DocumentLoader* loader, unsigned long id, int length)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::dispatchDidFinishLoading(DocumentLoader*, unsigned long)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::dispatchDidFailLoading(DocumentLoader*, unsigned long, const ResourceError&)
+{
+ notImplemented();
+}
+
+bool FrameLoaderClientWx::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int)
+{
+ notImplemented();
+ return false;
+}
+
+void FrameLoaderClientWx::dispatchDidFailProvisionalLoad(const ResourceError&)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::dispatchDidFailLoad(const ResourceError&)
+{
+ notImplemented();
+}
+
+Frame* FrameLoaderClientWx::dispatchCreatePage()
+{
+ notImplemented();
+ return false;
+}
+
+void FrameLoaderClientWx::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const String& mimetype, const ResourceRequest& request)
+{
+ if (!m_frame)
+ return;
+
+ notImplemented();
+ (m_frame->loader()->*function)(PolicyUse);
+}
+
+void FrameLoaderClientWx::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const NavigationAction&, const ResourceRequest&, const String&)
+{
+ if (!m_frame)
+ return;
+
+ notImplemented();
+ (m_frame->loader()->*function)(PolicyUse);
+}
+
+void FrameLoaderClientWx::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& request)
+{
+ if (!m_frame)
+ return;
+
+ wxWindow* target = m_frame->view()->nativeWindow();
+ if (target) {
+ wxWebViewBeforeLoadEvent wkEvent(target);
+ wkEvent.SetNavigationType(wxNavTypeFromWebNavType(action.type()));
+ wkEvent.SetURL(request.url().url());
+
+ target->GetEventHandler()->ProcessEvent(wkEvent);
+ if (wkEvent.IsCancelled())
+ (m_frame->loader()->*function)(PolicyIgnore);
+ else
+ (m_frame->loader()->*function)(PolicyUse);
+
+ }
+}
+
+void FrameLoaderClientWx::dispatchUnableToImplementPolicy(const ResourceError&)
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::startDownload(const ResourceRequest&)
+{
+ notImplemented();
+}
+
+bool FrameLoaderClientWx::willUseArchive(ResourceLoader*, const ResourceRequest&, const KURL&) const
+{
+ notImplemented();
+ return false;
+}
+
+PassRefPtr<Frame> FrameLoaderClientWx::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
+ const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
+{
+/*
+ FIXME: Temporarily disabling code for loading subframes. While most
+ (i)frames load and are destroyed properly, the iframe created by
+ google.com in its new homepage does not get destroyed when
+ document()->detach() is called, as other (i)frames do. It is destroyed on
+ app shutdown, but until that point, this 'in limbo' frame will do things
+ like steal keyboard focus and crash when clicked on. (On some platforms,
+ it is actually a visible object, even though it's not in a valid state.)
+
+ Since just about every user is probably going to test against Google at
+ some point, I'm disabling this functionality until I have time to track down
+ why it is not being destroyed.
+*/
+
+/*
+ wxWindow* parent = m_frame->view()->nativeWindow();
+
+ WebViewFrameData* data = new WebViewFrameData();
+ data->name = name;
+ data->ownerElement = ownerElement;
+ data->url = url;
+ data->referrer = referrer;
+ data->marginWidth = marginWidth;
+ data->marginHeight = marginHeight;
+
+ wxWebView* newWin = new wxWebView(parent, -1, wxDefaultPosition, wxDefaultSize, data);
+
+ RefPtr<Frame> childFrame = newWin->m_impl->frame;
+
+ // FIXME: All of the below should probably be moved over into WebCore
+ childFrame->tree()->setName(name);
+ m_frame->tree()->appendChild(childFrame);
+ // ### set override encoding if we have one
+
+ FrameLoadType loadType = m_frame->loader()->loadType();
+ FrameLoadType childLoadType = FrameLoadTypeInternal;
+
+ childFrame->loader()->load(url, referrer, childLoadType,
+ String(), 0, 0);
+
+ // The frame's onload handler may have removed it from the document.
+ if (!childFrame->tree()->parent())
+ return 0;
+
+ delete data;
+
+ return childFrame.get();
+*/
+ notImplemented();
+ return 0;
+}
+
+ObjectContentType FrameLoaderClientWx::objectContentType(const KURL& url, const String& mimeType)
+{
+ notImplemented();
+ return ObjectContentType();
+}
+
+Widget* FrameLoaderClientWx::createPlugin(const IntSize&, Element*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually)
+{
+ notImplemented();
+ return 0;
+}
+
+void FrameLoaderClientWx::redirectDataToPlugin(Widget* pluginWidget)
+{
+ notImplemented();
+ return;
+}
+
+Widget* FrameLoaderClientWx::createJavaAppletWidget(const IntSize&, Element*, const KURL& baseURL,
+ const Vector<String>& paramNames, const Vector<String>& paramValues)
+{
+ notImplemented();
+ return 0;
+}
+
+String FrameLoaderClientWx::overrideMediaType() const
+{
+ notImplemented();
+ return String();
+}
+
+void FrameLoaderClientWx::windowObjectCleared()
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::didPerformFirstNavigation() const
+{
+ notImplemented();
+}
+
+void FrameLoaderClientWx::registerForIconNotification(bool listen)
+{
+ notImplemented();
+}
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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 FrameLoaderClientWx_H
+#define FrameLoaderClientWx_H
+
+#include "FrameLoaderClient.h"
+#include "FrameLoader.h"
+#include "KURL.h"
+#include "ResourceResponse.h"
+#include "Shared.h"
+
+
+namespace WebCore {
+
+ class AuthenticationChallenge;
+ class DocumentLoader;
+ class Element;
+ class FormState;
+ class NavigationAction;
+ class String;
+ class ResourceLoader;
+
+ struct LoadErrorResetToken;
+
+ class FrameLoaderClientWx : public FrameLoaderClient, public Shared<FrameLoaderClientWx> {
+ public:
+ FrameLoaderClientWx();
+ ~FrameLoaderClientWx();
+ void setFrame(Frame *frame);
+ virtual void detachFrameLoader();
+
+ virtual void ref();
+ virtual void deref();
+
+ virtual bool hasWebView() const; // mainly for assertions
+ virtual bool hasFrameView() const; // ditto
+
+ virtual bool hasBackForwardList() const;
+ virtual void resetBackForwardList();
+
+ virtual bool provisionalItemIsTarget() const;
+
+ virtual bool privateBrowsingEnabled() const;
+
+ virtual void makeDocumentView();
+ virtual void makeRepresentation(DocumentLoader*);
+ virtual void forceLayout();
+ virtual void forceLayoutForNonHTML();
+
+ virtual void updateHistoryForCommit();
+
+ virtual void updateHistoryForBackForwardNavigation();
+ virtual void updateHistoryForReload();
+ virtual void updateHistoryForStandardLoad();
+ virtual void updateHistoryForInternalLoad();
+
+ virtual void updateHistoryAfterClientRedirect();
+
+ virtual void setCopiesOnScroll();
+
+ virtual LoadErrorResetToken* tokenForLoadErrorReset();
+ virtual void resetAfterLoadError(LoadErrorResetToken*);
+ virtual void doNotResetAfterLoadError(LoadErrorResetToken*);
+
+ virtual void willCloseDocument();
+
+ virtual void detachedFromParent1();
+ virtual void detachedFromParent2();
+ virtual void detachedFromParent3();
+ virtual void detachedFromParent4();
+
+ virtual void loadedFromCachedPage();
+
+ virtual void frameLoaderDestroyed();
+ virtual bool canHandleRequest(const ResourceRequest&) const;
+
+ virtual void dispatchDidHandleOnloadEvents();
+ virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
+ virtual void dispatchDidCancelClientRedirect();
+ virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate);
+ virtual void dispatchDidChangeLocationWithinPage();
+ virtual void dispatchWillClose();
+ virtual void dispatchDidReceiveIcon();
+ virtual void dispatchDidStartProvisionalLoad();
+ virtual void dispatchDidReceiveTitle(const String& title);
+ virtual void dispatchDidCommitLoad();
+ virtual void dispatchDidFinishDocumentLoad();
+ virtual void dispatchDidFinishLoad();
+ virtual void dispatchDidFirstLayout();
+
+ virtual void dispatchShow();
+ virtual void cancelPolicyCheck();
+
+ virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
+
+ virtual void dispatchDidLoadMainResource(DocumentLoader*);
+ virtual void revertToProvisionalState(DocumentLoader*);
+ virtual void clearUnarchivingState(DocumentLoader*);
+
+ virtual void postProgressStartedNotification();
+ virtual void postProgressEstimateChangedNotification();
+ virtual void postProgressFinishedNotification();
+
+ virtual void progressStarted();
+ virtual void progressCompleted();
+ virtual void setMainFrameDocumentReady(bool);
+ virtual void willChangeTitle(DocumentLoader*);
+ virtual void didChangeTitle(DocumentLoader*);
+ virtual void finishedLoading(DocumentLoader*);
+ virtual void finalSetupForReplace(DocumentLoader*);
+
+ virtual void setDefersLoading(bool);
+ virtual bool isArchiveLoadPending(ResourceLoader*) const;
+ virtual void cancelPendingArchiveLoad(ResourceLoader*);
+ virtual void clearArchivedResources();
+ virtual bool canShowMIMEType(const String& MIMEType) const;
+ virtual bool representationExistsForURLScheme(const String& URLScheme) const;
+ virtual String generatedMIMETypeForURLScheme(const String& URLScheme) const;
+
+ virtual void frameLoadCompleted();
+ virtual void saveViewStateToItem(HistoryItem*);
+ virtual void restoreViewState();
+ virtual void restoreScrollPositionAndViewState();
+ virtual void provisionalLoadStarted();
+ virtual bool shouldTreatURLAsSameAsCurrent(const KURL&) const;
+ virtual void addHistoryItemForFragmentScroll();
+ virtual void didFinishLoad();
+ virtual void prepareForDataSourceReplacement();
+ virtual void setTitle(const String& title, const KURL&);
+
+ virtual String userAgent(const KURL&);
+
+
+ virtual void setDocumentViewFromCachedPage(CachedPage*);
+ virtual void updateGlobalHistoryForStandardLoad(const KURL&);
+ virtual void updateGlobalHistoryForReload(const KURL&);
+ virtual bool shouldGoToHistoryItem(HistoryItem*) const;
+ virtual void saveScrollPositionAndViewStateToItem(HistoryItem*);
+ virtual void saveDocumentViewToCachedPage(CachedPage*);
+ virtual bool canCachePage() const;
+
+ virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
+ virtual void committedLoad(DocumentLoader*, const char*, int);
+ virtual ResourceError cancelledError(const ResourceRequest&);
+ virtual ResourceError blockedError(const ResourceRequest&);
+ virtual ResourceError cannotShowURLError(const ResourceRequest&);
+ virtual ResourceError interruptForPolicyChangeError(const ResourceRequest&);
+ virtual ResourceError cannotShowMIMETypeError(const ResourceResponse&);
+ virtual ResourceError fileDoesNotExistError(const ResourceResponse&);
+ virtual bool shouldFallBack(const ResourceError&);
+ virtual WTF::PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&);
+ virtual void download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&);
+
+ virtual void assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&);
+
+ virtual void dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest&, const ResourceResponse&);
+ virtual void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&);
+ virtual void dispatchDidCancelAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&);
+ virtual void dispatchDidReceiveResponse(DocumentLoader*, unsigned long, const ResourceResponse&);
+ virtual void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long, int);
+ virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long);
+ virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long, const ResourceError&);
+
+ virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int);
+ virtual void dispatchDidFailProvisionalLoad(const ResourceError&);
+ virtual void dispatchDidFailLoad(const ResourceError&);
+ virtual Frame* dispatchCreatePage();
+ virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const String&, const ResourceRequest&);
+ virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const NavigationAction&, const ResourceRequest&, const String&);
+ virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const NavigationAction&, const ResourceRequest&);
+ virtual void dispatchUnableToImplementPolicy(const ResourceError&);
+
+ virtual void startDownload(const ResourceRequest&);
+ virtual bool willUseArchive(ResourceLoader*, const ResourceRequest&, const KURL&) const;
+
+ // FIXME: This should probably not be here, but it's needed for the tests currently
+ virtual void partClearedInBegin();
+
+ virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
+ const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
+ virtual Widget* createPlugin(const IntSize&, Element*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) ;
+ virtual void redirectDataToPlugin(Widget* pluginWidget);
+
+ virtual Widget* createJavaAppletWidget(const IntSize&, Element*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
+
+ virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
+ virtual String overrideMediaType() const;
+
+ virtual void windowObjectCleared();
+
+ virtual void didPerformFirstNavigation() const;
+
+ virtual void registerForIconNotification(bool listen = true);
+
+ private:
+ Frame *m_frame;
+ ResourceResponse m_response;
+ bool m_firstData;
+ };
+
+}
+
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier 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"
+#include "InspectorClientWx.h"
+
+#include "NotImplemented.h"
+#include "Page.h"
+
+namespace WebCore {
+
+InspectorClientWx::InspectorClientWx()
+{
+ notImplemented();
+}
+
+InspectorClientWx::~InspectorClientWx()
+{
+ notImplemented();
+}
+
+void InspectorClientWx::inspectorDestroyed()
+{
+ notImplemented();
+}
+
+Page* InspectorClientWx::createPage()
+{
+ notImplemented();
+ return 0;
+}
+
+void InspectorClientWx::showWindow()
+{
+ notImplemented();
+}
+
+void InspectorClientWx::closeWindow()
+{
+ notImplemented();
+}
+
+void InspectorClientWx::attachWindow()
+{
+ notImplemented();
+}
+
+void InspectorClientWx::detachWindow()
+{
+ notImplemented();
+}
+
+void InspectorClientWx::highlight(Node*)
+{
+ notImplemented();
+}
+
+void InspectorClientWx::hideHighlight()
+{
+ notImplemented();
+}
+
+void InspectorClientWx::inspectedURLChanged(const String& newURL)
+{
+ notImplemented();
+}
+
+};
--- /dev/null
+/*
+ * Copyright (C) Kevin Ollivier 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 InspectorClientWx_h
+#define InspectorClientWx_h
+
+#include "InspectorClient.h"
+
+namespace WebCore {
+
+class Node;
+class Page;
+class String;
+
+class InspectorClientWx : public InspectorClient {
+public:
+ InspectorClientWx();
+ ~InspectorClientWx();
+
+ virtual void inspectorDestroyed();
+
+ virtual Page* createPage();
+
+ virtual void showWindow();
+ virtual void closeWindow();
+
+ virtual void attachWindow();
+ virtual void detachWindow();
+
+ virtual void highlight(Node*);
+ virtual void hideHighlight();
+
+ virtual void inspectedURLChanged(const String& newURL);
+};
+
+} // namespace WebCore
+
+#endif // !defined(InspectorClient_h)
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier 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 "wx/wxprec.h"
+#ifndef WX_PRECOMP
+ #include "wx/wx.h"
+#endif
+
+#include "config.h"
+#include "DeprecatedString.h"
+#include "Document.h"
+#include "Editor.h"
+#include "EventHandler.h"
+#include "Frame.h"
+#include "FrameLoader.h"
+#include "FrameView.h"
+#include "GraphicsContext.h"
+#include "HTMLFrameOwnerElement.h"
+#include "Logging.h"
+#include "Page.h"
+#include "PlatformKeyboardEvent.h"
+#include "PlatformMouseEvent.h"
+#include "PlatformString.h"
+#include "PlatformWheelEvent.h"
+#include "RenderObject.h"
+#include "Settings.h"
+
+#include "ChromeClientWx.h"
+#include "ContextMenuClientWx.h"
+#include "DragClientWx.h"
+#include "EditorClientWx.h"
+#include "FrameLoaderClientWx.h"
+#include "InspectorClientWx.h"
+
+#include "kjs_proxy.h"
+#include "kjs_binding.h"
+#include <kjs/value.h>
+#include <kjs/ustring.h>
+
+#include "WebView.h"
+#include "WebViewPrivate.h"
+
+#include <wx/defs.h>
+#include <wx/dcbuffer.h>
+
+// Match Safari's min/max zoom sizes by default
+#define MinimumTextSizeMultiplier 0.5f
+#define MaximumTextSizeMultiplier 3.0f
+#define TextSizeMultiplierRatio 1.2f
+
+
+#if defined(_MSC_VER)
+int rint(double val)
+{
+ return (int)(val < 0 ? val - 0.5 : val + 0.5);
+}
+#endif
+
+// ----------------------------------------------------------------------------
+// wxWebView Events
+// ----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxWebViewStateChangedEvent, wxCommandEvent)
+
+DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_STATE_CHANGED)
+
+wxWebViewStateChangedEvent::wxWebViewStateChangedEvent(wxWindow* win)
+{
+ SetEventType( wxEVT_WEBVIEW_STATE_CHANGED);
+ SetEventObject( win );
+ SetId(win->GetId());
+}
+
+IMPLEMENT_DYNAMIC_CLASS(wxWebViewBeforeLoadEvent, wxCommandEvent)
+
+DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_BEFORE_LOAD)
+
+wxWebViewBeforeLoadEvent::wxWebViewBeforeLoadEvent(wxWindow* win)
+{
+ m_cancelled = false;
+ SetEventType(wxEVT_WEBVIEW_BEFORE_LOAD);
+ SetEventObject(win);
+ SetId(win->GetId());
+}
+
+IMPLEMENT_DYNAMIC_CLASS(wxWebViewNewWindowEvent, wxCommandEvent)
+
+DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_NEW_WINDOW)
+
+wxWebViewNewWindowEvent::wxWebViewNewWindowEvent(wxWindow* win)
+{
+ SetEventType(wxEVT_WEBVIEW_NEW_WINDOW);
+ SetEventObject(win);
+ SetId(win->GetId());
+}
+
+IMPLEMENT_DYNAMIC_CLASS(wxWebViewRightClickEvent, wxCommandEvent)
+
+DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_RIGHT_CLICK)
+
+wxWebViewRightClickEvent::wxWebViewRightClickEvent(wxWindow* win)
+{
+ SetEventType(wxEVT_WEBVIEW_RIGHT_CLICK);
+ SetEventObject(win);
+ SetId(win->GetId());
+}
+
+//---------------------------------------------------------
+// DOM Element info data type
+//---------------------------------------------------------
+
+wxWebViewDOMElementInfo::wxWebViewDOMElementInfo() :
+ m_domElement(NULL),
+ m_isSelected(false),
+ m_text(wxEmptyString),
+ m_imageSrc(wxEmptyString),
+ m_link(wxEmptyString)
+{
+}
+
+BEGIN_EVENT_TABLE(wxWebView, wxScrolledWindow)
+ EVT_PAINT(wxWebView::OnPaint)
+ EVT_SIZE(wxWebView::OnSize)
+ EVT_MOUSE_EVENTS(wxWebView::OnMouseEvents)
+ EVT_KEY_DOWN(wxWebView::OnKeyEvents)
+ EVT_KEY_UP(wxWebView::OnKeyEvents)
+ EVT_CHAR(wxWebView::OnKeyEvents)
+ EVT_SET_FOCUS(wxWebView::OnSetFocus)
+ EVT_KILL_FOCUS(wxWebView::OnKillFocus)
+ EVT_ACTIVATE(wxWebView::OnActivate)
+END_EVENT_TABLE()
+
+wxWebView::wxWebView(wxWindow* parent, int id, const wxPoint& position,
+ const wxSize& size, WebViewFrameData* data) :
+ m_textMagnifier(1.0),
+ m_isEditable(false),
+ m_isInitialized(false),
+ m_beingDestroyed(false),
+ m_title(wxEmptyString)
+{
+ if (!wxScrolledWindow::Create(parent, id, position, size))
+ return;
+
+ // this helps reduce flicker on platforms like MSW
+ SetBackgroundStyle(wxBG_STYLE_CUSTOM);
+
+ m_impl = new WebViewPrivate();
+
+ WebCore::InitializeLoggingChannelsIfNecessary();
+ WebCore::HTMLFrameOwnerElement* parentFrame = 0;
+ WebCore::Page* page = 0;
+
+ // FIXME: This cast is obviously not as safe as a dynamic
+ // cast, but this allows us to get around requiring RTTI
+ // support for the moment. This is only used for subframes
+ // in any case, which aren't currently supported.
+ wxWebView* parentWebView = static_cast<wxWebView*>(parent);
+
+ if (data) {
+ parentFrame = data->ownerElement;
+ page = parentWebView->m_impl->frame->page();
+ }
+ else {
+ WebCore::EditorClientWx* editorClient = new WebCore::EditorClientWx();
+ page = new WebCore::Page(new WebCore::ChromeClientWx(), new WebCore::ContextMenuClientWx(), editorClient, new WebCore::DragClientWx(), new WebCore::InspectorClientWx());
+ editorClient->setPage(page);
+ }
+
+ WebCore::FrameLoaderClientWx* loaderClient = new WebCore::FrameLoaderClientWx();
+
+ m_impl->frame = new WebCore::Frame(page, parentFrame, loaderClient);
+ m_impl->frame->deref();
+ m_impl->frameView = new WebCore::FrameView(m_impl->frame.get());
+ m_impl->frameView->deref();
+
+ m_impl->frame->setView(m_impl->frameView.get());
+ m_impl->frame->init();
+
+ m_impl->frameView->setNativeWindow(this);
+ loaderClient->setFrame(m_impl->frame.get());
+
+ // Default settings - we should have wxWebViewSettings class for this
+ // eventually
+ WebCore::Settings* settings = page->settings();
+ settings->setLoadsImagesAutomatically(true);
+ settings->setDefaultFixedFontSize(13);
+ settings->setDefaultFontSize(16);
+ settings->setSerifFontFamily("Times New Roman");
+ settings->setFixedFontFamily("Courier New");
+ settings->setSansSerifFontFamily("Arial");
+ settings->setStandardFontFamily("Times New Roman");
+ settings->setJavaScriptEnabled(true);
+
+ m_isInitialized = true;
+}
+
+wxWebView::~wxWebView()
+{
+ m_beingDestroyed = true;
+
+ m_impl->frame->loader()->detachFromParent();
+
+ // This test determines whether or not the frame is a subframe
+ // or the main (top level) frame. If it's the main frame, then
+ // delete its page to keep leaks from occurring
+ if (!m_impl->frame->ownerElement()) {
+ delete m_impl->frame->page();
+ }
+ m_impl->frameView = 0;
+ m_impl->frame = 0;
+
+ delete m_impl;
+}
+
+void wxWebView::Stop()
+{
+ if (m_impl->frame && m_impl->frame->loader())
+ m_impl->frame->loader()->stop();
+}
+
+void wxWebView::Reload()
+{
+ if (m_impl->frame && m_impl->frame->loader())
+ m_impl->frame->loader()->reload();
+}
+
+wxString wxWebView::GetPageSource()
+{
+ if (m_impl->frame) {
+ WebCore::Document* doc = m_impl->frame->document();
+
+ if (doc) {
+ wxString source = doc->toString();
+ return source;
+ }
+ }
+ return wxEmptyString;
+}
+
+void wxWebView::SetPageSource(const wxString& source, const wxString& baseUrl)
+{
+ if (m_impl->frame && m_impl->frame->loader()) {
+ WebCore::FrameLoader* loader = m_impl->frame->loader();
+ loader->begin(WebCore::KURL(static_cast<const char*>(baseUrl.mb_str(wxConvUTF8))));
+ loader->write(source);
+ loader->end();
+ }
+}
+
+wxString wxWebView::RunScript(const wxString& javascript)
+{
+ wxString returnValue = wxEmptyString;
+ if (m_impl->frame) {
+ KJS::JSValue* result = m_impl->frame->loader()->executeScript(javascript, true);
+ if (result)
+ returnValue = wxString(result->toString(m_impl->frame->scriptProxy()->interpreter()->globalExec()).UTF8String().c_str(), wxConvUTF8);
+ }
+ return returnValue;
+}
+
+void wxWebView::LoadURL(wxString url)
+{
+ if (m_impl->frame && m_impl->frame->loader()) {
+ WebCore::KURL kurl = WebCore::KURL(static_cast<const char*>(url.mb_str(wxConvUTF8)));
+ // NB: This is an ugly fix, but CURL won't load sub-resources if the
+ // protocol is omitted; sadly, it will not emit an error, either, so
+ // there's no way for us to catch this problem the correct way yet.
+ if (kurl.protocol().isEmpty()) {
+ // is it a file on disk?
+ if (wxFileExists(url)) {
+ kurl.setProtocol("file");
+ kurl.setPath("//" + kurl.path());
+ }
+ else {
+ kurl.setProtocol("http");
+ kurl.setPath("//" + kurl.path());
+ }
+ }
+ m_impl->frame->loader()->load(kurl);
+ }
+}
+
+bool wxWebView::GoBack()
+{
+ if (m_impl->frame && m_impl->frame->page()) {
+ return m_impl->frame->page()->goBack();
+ }
+}
+
+bool wxWebView::GoForward()
+{
+ if (m_impl->frame && m_impl->frame->page())
+ return m_impl->frame->page()->goForward();
+}
+
+bool wxWebView::CanIncreaseTextSize() const
+{
+ if (m_impl->frame) {
+ if (m_textMagnifier*TextSizeMultiplierRatio <= MaximumTextSizeMultiplier)
+ return true;
+ }
+ return false;
+}
+
+void wxWebView::IncreaseTextSize()
+{
+ if (CanIncreaseTextSize()) {
+ m_textMagnifier = m_textMagnifier*TextSizeMultiplierRatio;
+ m_impl->frame->setZoomFactor((int)rint(m_textMagnifier*100));
+ }
+}
+
+bool wxWebView::CanDecreaseTextSize() const
+{
+ if (m_impl->frame) {
+ if (m_textMagnifier/TextSizeMultiplierRatio >= MinimumTextSizeMultiplier)
+ return true;
+ }
+ return false;
+}
+
+void wxWebView::DecreaseTextSize()
+{
+ if (CanDecreaseTextSize()) {
+ m_textMagnifier = m_textMagnifier/TextSizeMultiplierRatio;
+ m_impl->frame->setZoomFactor( (int)rint(m_textMagnifier*100));
+ }
+}
+
+void wxWebView::MakeEditable(bool enable)
+{
+ m_isEditable = enable;
+}
+
+
+/*
+ * Event forwarding functions to send events down to WebCore.
+ */
+
+void wxWebView::OnPaint(wxPaintEvent& event)
+{
+ if (m_beingDestroyed || !m_impl->frameView || !m_impl->frame)
+ return;
+
+ wxAutoBufferedPaintDC dc(this);
+ DoPrepareDC(dc);
+
+ if (IsShown() && m_impl->frame && m_impl->frame->document()) {
+#if USE(WXGC)
+ wxGCDC gcdc(dc);
+#endif
+
+ if (dc.IsOk()) {
+ wxRect paintRect = GetUpdateRegion().GetBox();
+ int x = 0;
+ int y = 0;
+ GetViewStart(&x, &y);
+ int unitX = 1;
+ int unitY = 1;
+ GetScrollPixelsPerUnit(&unitX, &unitY);
+ paintRect.Offset(x * unitX, y * unitY);
+
+#if USE(WXGC)
+ WebCore::GraphicsContext* gc = new WebCore::GraphicsContext(&gcdc);
+#else
+ WebCore::GraphicsContext* gc = new WebCore::GraphicsContext((wxWindowDC*)&dc);
+#endif
+ if (gc && m_impl->frame->renderer()) {
+ // FIXME: Replace this with layoutIfNeededRecursive
+ if (m_impl->frameView->needsLayout())
+ m_impl->frameView->layout();
+
+ m_impl->frame->paint(gc, paintRect);
+ }
+ }
+ }
+}
+
+void wxWebView::OnSize(wxSizeEvent& event)
+{
+ // NOTE: this call can be expensive on heavy pages, particularly on Mac,
+ // so we probably should set a timer not put x ms between layouts.
+
+ if (m_isInitialized && m_impl->frame && m_impl->frameView) {
+ m_impl->frameView->layout();
+ }
+
+ event.Skip();
+
+}
+
+void wxWebView::OnMouseEvents(wxMouseEvent& event)
+{
+ event.Skip();
+
+ if (!m_impl->frame && m_impl->frameView)
+ return;
+
+ wxPoint globalPoint = ClientToScreen(event.GetPosition());
+
+ wxEventType type = event.GetEventType();
+
+ if (type == wxEVT_MOUSEWHEEL) {
+ WebCore::PlatformWheelEvent wkEvent(event, globalPoint);
+ m_impl->frame->eventHandler()->handleWheelEvent(wkEvent);
+ return;
+ }
+
+ WebCore::PlatformMouseEvent wkEvent(event, globalPoint);
+
+ if (type == wxEVT_LEFT_DOWN || type == wxEVT_MIDDLE_DOWN || type == wxEVT_RIGHT_DOWN)
+ m_impl->frame->eventHandler()->handleMousePressEvent(wkEvent);
+
+ else if (type == wxEVT_LEFT_UP || type == wxEVT_MIDDLE_UP || type == wxEVT_RIGHT_UP ||
+ type == wxEVT_LEFT_DCLICK || type == wxEVT_MIDDLE_DCLICK || type == wxEVT_RIGHT_DCLICK)
+ m_impl->frame->eventHandler()->handleMouseReleaseEvent(wkEvent);
+
+ else if (type == wxEVT_MOTION)
+ m_impl->frame->eventHandler()->handleMouseMoveEvent(wkEvent);
+}
+
+bool wxWebView::CanCopy()
+{
+ if (m_impl->frame && m_impl->frameView) {
+ return (m_impl->frame->editor()->canCopy() || m_impl->frame->editor()->canDHTMLCopy());
+ }
+ return false;
+}
+
+void wxWebView::Copy()
+{
+ if (CanCopy()) {
+ m_impl->frame->editor()->copy();
+ }
+}
+
+bool wxWebView::CanCut()
+{
+ if (m_impl->frame && m_impl->frameView) {
+ return (m_impl->frame->editor()->canCut() || m_impl->frame->editor()->canDHTMLCut());
+ }
+ return false;
+}
+
+void wxWebView::Cut()
+{
+ if (CanCut()) {
+ m_impl->frame->editor()->cut();
+ }
+}
+
+bool wxWebView::CanPaste()
+{
+ if (m_impl->frame && m_impl->frameView) {
+ return (m_impl->frame->editor()->canPaste() || m_impl->frame->editor()->canDHTMLPaste());
+ }
+ return false;
+}
+
+void wxWebView::Paste()
+{
+ if (CanPaste()) {
+ m_impl->frame->editor()->paste();
+ }
+}
+
+void wxWebView::OnKeyEvents(wxKeyEvent& event)
+{
+ if (m_impl->frame && m_impl->frameView) {
+ // WebCore doesn't handle these events itself, so we need to do
+ // it and not send the event down or else CTRL+C will erase the text
+ // and replace it with c.
+ if (event.CmdDown() && event.GetKeyCode() == static_cast<int>('C')) {
+ Copy();
+ }
+ else if (event.CmdDown() && event.GetKeyCode() == static_cast<int>('X')) {
+ Cut();
+ }
+ else if (event.CmdDown() && event.GetKeyCode() == static_cast<int>('V')) {
+ Paste();
+ }
+ else {
+ WebCore::PlatformKeyboardEvent wkEvent(event);
+ m_impl->frame->eventHandler()->keyEvent(wkEvent);
+ }
+ }
+
+ // make sure we get the character event.
+ if (event.GetEventType() != wxEVT_CHAR)
+ event.Skip();
+}
+
+void wxWebView::OnSetFocus(wxFocusEvent& event)
+{
+ if (m_impl->frame) {
+ m_impl->frame->setWindowHasFocus(true);
+ }
+ event.Skip();
+}
+
+void wxWebView::OnKillFocus(wxFocusEvent& event)
+{
+ if (m_impl->frame) {
+ m_impl->frame->setWindowHasFocus(false);
+ }
+ event.Skip();
+}
+
+void wxWebView::OnActivate(wxActivateEvent& event)
+{
+ if (m_impl->frame) {
+ m_impl->frame->setIsActive(event.GetActive());
+ }
+ event.Skip();
+}
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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 WXWEBVIEW_H
+#define WXWEBVIEW_H
+
+#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+ #include "wx/wx.h"
+#endif
+
+class WebViewPrivate;
+class WebViewFrameData;
+
+namespace WebCore {
+ class ChromeClientWx;
+}
+
+#ifndef SWIG
+
+#if WXMAKINGDLL_WEBKIT
+#define WXDLLIMPEXP_WEBKIT WXEXPORT
+#elif defined(WXUSINGDLL_WEBKIT)
+#define WXDLLIMPEXP_WEBKIT WXIMPORT
+#else
+#define WXDLLIMPEXP_WEBKIT
+#endif
+
+#else
+#define WXDLLIMPEXP_WEBKIT
+#endif // SWIG
+
+class WXDLLIMPEXP_WEBKIT wxWebView : public wxScrolledWindow
+{
+ // ChromeClientWx needs to get the Page* stored by the wxWebView
+ // for the createWindow function.
+ friend class WebCore::ChromeClientWx;
+
+public:
+ // ctor(s)
+#if SWIG
+ %pythonAppend wxWebView "self._setOORInfo(self)"
+#endif
+ wxWebView(wxWindow* parent, int id = wxID_ANY,
+ const wxPoint& point = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ WebViewFrameData* data = NULL); // For wxWebView internal data passing
+
+#ifndef SWIG
+ ~wxWebView();
+#endif
+
+ void LoadURL(wxString url);
+ bool GoBack();
+ bool GoForward();
+ void Stop();
+ void Reload();
+
+ bool CanCut();
+ bool CanCopy();
+ bool CanPaste();
+
+ void Cut();
+ void Copy();
+ void Paste();
+
+ //bool CanGetPageSource();
+ wxString GetPageSource();
+ void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString);
+
+ wxString RunScript(const wxString& javascript);
+
+ bool CanIncreaseTextSize() const;
+ void IncreaseTextSize();
+ bool CanDecreaseTextSize() const;
+ void DecreaseTextSize();
+ void MakeEditable(bool enable);
+ bool IsEditable() const { return m_isEditable; }
+
+ wxString GetPageTitle() const { return m_title; }
+ void SetPageTitle(const wxString& title) { m_title = title; }
+
+protected:
+
+ // event handlers (these functions should _not_ be virtual)
+ void OnPaint(wxPaintEvent& event);
+ void OnSize(wxSizeEvent& event);
+ void OnMouseEvents(wxMouseEvent& event);
+ void OnKeyEvents(wxKeyEvent& event);
+ void OnSetFocus(wxFocusEvent& event);
+ void OnKillFocus(wxFocusEvent& event);
+ void OnActivate(wxActivateEvent& event);
+
+private:
+ // any class wishing to process wxWindows events must use this macro
+#ifndef SWIG
+ DECLARE_EVENT_TABLE()
+#endif
+ float m_textMagnifier;
+ bool m_isEditable;
+ bool m_isInitialized;
+ bool m_beingDestroyed;
+ WebViewPrivate* m_impl;
+ wxString m_title;
+
+};
+
+// ----------------------------------------------------------------------------
+// Web Kit Events
+// ----------------------------------------------------------------------------
+
+enum {
+ wxWEBVIEW_STATE_START = 1,
+ wxWEBVIEW_STATE_NEGOTIATING = 2,
+ wxWEBVIEW_STATE_REDIRECTING = 4,
+ wxWEBVIEW_STATE_TRANSFERRING = 8,
+ wxWEBVIEW_STATE_STOP = 16,
+ wxWEBVIEW_STATE_FAILED = 32
+};
+
+enum {
+ wxWEBVIEW_NAV_LINK_CLICKED = 1,
+ wxWEBVIEW_NAV_BACK_NEXT = 2,
+ wxWEBVIEW_NAV_FORM_SUBMITTED = 4,
+ wxWEBVIEW_NAV_RELOAD = 8,
+ wxWEBVIEW_NAV_FORM_RESUBMITTED = 16,
+ wxWEBVIEW_NAV_OTHER = 32
+};
+
+class WXDLLIMPEXP_WEBKIT wxWebViewDOMElementInfo
+{
+public:
+ wxWebViewDOMElementInfo();
+
+ ~wxWebViewDOMElementInfo() { }
+
+ wxString GetTagName() const { return m_tagName; }
+ void SetTagName(const wxString& name) { m_tagName = name; }
+
+ bool IsSelected() const { return m_isSelected; }
+ void SetSelected(bool sel) { m_isSelected = sel; }
+
+ wxString GetText() const { return m_text; }
+ void SetText(const wxString& text) { m_text = text; }
+
+ wxString GetImageSrc() const { return m_imageSrc; }
+ void SetImageSrc(const wxString& src) { m_imageSrc = src; }
+
+ wxString GetLink() const { return m_link; }
+ void SetLink(const wxString& link) { m_link = link; }
+
+private:
+ void* m_domElement;
+ bool m_isSelected;
+ wxString m_tagName;
+ wxString m_text;
+ wxString m_imageSrc;
+ wxString m_link;
+};
+
+class WXDLLIMPEXP_WEBKIT wxWebViewBeforeLoadEvent : public wxCommandEvent
+{
+#ifndef SWIG
+ DECLARE_DYNAMIC_CLASS( wxWebViewBeforeLoadEvent )
+#endif
+
+public:
+ bool IsCancelled() const { return m_cancelled; }
+ void Cancel(bool cancel = true) { m_cancelled = cancel; }
+ wxString GetURL() const { return m_url; }
+ void SetURL(const wxString& url) { m_url = url; }
+ void SetNavigationType(int navType) { m_navType = navType; }
+ int GetNavigationType() const { return m_navType; }
+
+ wxWebViewBeforeLoadEvent( wxWindow* win = (wxWindow*) NULL );
+ wxEvent *Clone(void) const { return new wxWebViewBeforeLoadEvent(*this); }
+
+private:
+ bool m_cancelled;
+ wxString m_url;
+ int m_navType;
+};
+
+class WXDLLIMPEXP_WEBKIT wxWebViewStateChangedEvent : public wxCommandEvent
+{
+#ifndef SWIG
+ DECLARE_DYNAMIC_CLASS( wxWebViewStateChangedEvent )
+#endif
+
+public:
+ int GetState() const { return m_state; }
+ void SetState(const int state) { m_state = state; }
+ wxString GetURL() const { return m_url; }
+ void SetURL(const wxString& url) { m_url = url; }
+
+ wxWebViewStateChangedEvent( wxWindow* win = (wxWindow*) NULL );
+ wxEvent *Clone(void) const { return new wxWebViewStateChangedEvent(*this); }
+
+private:
+ int m_state;
+ wxString m_url;
+};
+
+class WXDLLIMPEXP_WEBKIT wxWebViewNewWindowEvent : public wxCommandEvent
+{
+#ifndef SWIG
+ DECLARE_DYNAMIC_CLASS( wxWebViewNewWindowEvent )
+#endif
+
+public:
+ wxString GetURL() const { return m_url; }
+ void SetURL(const wxString& url) { m_url = url; }
+
+ wxWebViewNewWindowEvent( wxWindow* win = static_cast<wxWindow*>(NULL));
+ wxEvent *Clone(void) const { return new wxWebViewNewWindowEvent(*this); }
+
+private:
+ wxString m_url;
+};
+
+class WXDLLIMPEXP_WEBKIT wxWebViewRightClickEvent : public wxCommandEvent
+{
+#ifndef SWIG
+ DECLARE_DYNAMIC_CLASS( wxWebViewRightClickEvent )
+#endif
+
+public:
+ wxWebViewRightClickEvent( wxWindow* win = static_cast<wxWindow*>(NULL));
+ wxEvent *Clone(void) const { return new wxWebViewRightClickEvent(*this); }
+
+ wxWebViewDOMElementInfo GetInfo() const { return m_info; }
+ void SetInfo(wxWebViewDOMElementInfo info) { m_info = info; }
+
+ wxPoint GetPosition() const { return m_position; }
+ void SetPosition(wxPoint pos) { m_position = pos; }
+
+private:
+ wxWebViewDOMElementInfo m_info;
+ wxPoint m_position;
+};
+
+typedef void (wxEvtHandler::*wxWebViewStateChangedEventFunction)(wxWebViewStateChangedEvent&);
+typedef void (wxEvtHandler::*wxWebViewBeforeLoadEventFunction)(wxWebViewBeforeLoadEvent&);
+typedef void (wxEvtHandler::*wxWebViewNewWindowEventFunction)(wxWebViewNewWindowEvent&);
+typedef void (wxEvtHandler::*wxWebViewRightClickEventFunction)(wxWebViewRightClickEvent&);
+
+#ifndef SWIG
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_BEFORE_LOAD, wxID_ANY)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_STATE_CHANGED, wxID_ANY)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_NEW_WINDOW, wxID_ANY)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_RIGHT_CLICK, wxID_ANY)
+END_DECLARE_EVENT_TYPES()
+#endif
+
+#define EVT_WEBVIEW_STATE_CHANGED(func) \
+ DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_STATE_CHANGED, \
+ wxID_ANY, \
+ wxID_ANY, \
+ (wxObjectEventFunction) \
+ (wxWebViewStateChangedEventFunction) & func, \
+ static_cast<wxObject*>(NULL)),
+
+#define EVT_WEBVIEW_BEFORE_LOAD(func) \
+ DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_BEFORE_LOAD, \
+ wxID_ANY, \
+ wxID_ANY, \
+ (wxObjectEventFunction) \
+ (wxWebViewBeforeLoadEventFunction) & func, \
+ static_cast<wxObject*>(NULL)),
+
+#define EVT_WEBVIEW_NEW_WINDOW(func) \
+ DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_BEFORE_LOAD, \
+ wxID_ANY, \
+ wxID_ANY, \
+ (wxObjectEventFunction) \
+ (wxWebViewBeforeLoadEventFunction) & func, \
+ static_cast<wxObject*>(NULL)),
+
+#define EVT_WEBVIEW_RIGHT_CLICK(func) \
+ DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_RIGHT_CLICK, \
+ wxID_ANY, \
+ wxID_ANY, \
+ (wxObjectEventFunction) \
+ (wxWebViewRightClickEventFunction) & func, \
+ static_cast<wxObject*>(NULL)),
+
+#endif // ifndef WXWEBVIEW_H
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier. 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 Computer, 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.
+ */
+
+#ifndef WXWEBVIEWPRIVATE_H
+#define WXWEBVIEWPRIVATE_H
+
+
+#include "config.h"
+#include "Frame.h"
+#include "FrameView.h"
+#include "wtf/RefPtr.h"
+#include "KURL.h"
+
+class WebViewPrivate
+{
+public:
+ WebViewPrivate() :
+ frame(0),
+ frameView(0)
+ {}
+
+ WTF::RefPtr<WebCore::Frame> frame;
+ WTF::RefPtr<WebCore::FrameView> frameView;
+};
+
+class WebViewFrameData
+{
+public:
+ WebCore::KURL url;
+ WebCore::String name;
+ WebCore::HTMLFrameOwnerElement* ownerElement;
+
+ WebCore::String referrer;
+ bool allowsScrolling;
+ int marginWidth;
+ int marginHeight;
+};
+
+#endif
--- /dev/null
+#!/usr/bin/python
+
+# Copyright (C) 2007 Kevin Ollivier 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.
+
+
+import wx
+import wx.webview
+
+class TestPanel(wx.Panel):
+ def __init__(self, parent, log, frame=None):
+ wx.Panel.__init__(
+ self, parent, -1,
+ style=wx.TAB_TRAVERSAL|wx.CLIP_CHILDREN|wx.NO_FULL_REPAINT_ON_RESIZE
+ )
+
+ self.log = log
+ self.current = "http://wxPython.org/"
+ self.frame = frame
+
+ if frame:
+ self.titleBase = frame.GetTitle()
+
+ sizer = wx.BoxSizer(wx.VERTICAL)
+ btnSizer = wx.BoxSizer(wx.HORIZONTAL)
+
+ self.webview = wx.webview.WebView(self, -1)
+
+
+ btn = wx.Button(self, -1, "Open", style=wx.BU_EXACTFIT)
+ self.Bind(wx.EVT_BUTTON, self.OnOpenButton, btn)
+ btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2)
+
+ btn = wx.Button(self, -1, "<--", style=wx.BU_EXACTFIT)
+ self.Bind(wx.EVT_BUTTON, self.OnPrevPageButton, btn)
+ btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2)
+
+ btn = wx.Button(self, -1, "-->", style=wx.BU_EXACTFIT)
+ self.Bind(wx.EVT_BUTTON, self.OnNextPageButton, btn)
+ btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2)
+
+ btn = wx.Button(self, -1, "Stop", style=wx.BU_EXACTFIT)
+ self.Bind(wx.EVT_BUTTON, self.OnStopButton, btn)
+ btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2)
+
+ btn = wx.Button(self, -1, "Refresh", style=wx.BU_EXACTFIT)
+ self.Bind(wx.EVT_BUTTON, self.OnRefreshPageButton, btn)
+ btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2)
+
+ txt = wx.StaticText(self, -1, "Location:")
+ btnSizer.Add(txt, 0, wx.CENTER|wx.ALL, 2)
+
+ self.location = wx.ComboBox(
+ self, -1, "", style=wx.CB_DROPDOWN|wx.PROCESS_ENTER
+ )
+
+ self.Bind(wx.EVT_COMBOBOX, self.OnLocationSelect, self.location)
+ self.location.Bind(wx.EVT_KEY_UP, self.OnLocationKey)
+ self.location.Bind(wx.EVT_CHAR, self.IgnoreReturn)
+ btnSizer.Add(self.location, 1, wx.EXPAND|wx.ALL, 2)
+
+ sizer.Add(btnSizer, 0, wx.EXPAND)
+ sizer.Add(self.webview, 1, wx.EXPAND)
+
+ self.webview.LoadURL(self.current)
+ self.location.Append(self.current)
+
+ self.webview.Bind(wx.webview.EVT_WEBVIEW_STATE_CHANGED, self.OnStateChanged)
+
+ self.SetSizer(sizer)
+
+ def OnStateChanged(self, event):
+ statusbar = self.GetParent().GetStatusBar()
+ if statusbar:
+ if event.GetState() == wx.webview.WEBVIEW_STATE_NEGOTIATING:
+ statusbar.SetStatusText("Contacting " + event.GetURL())
+ elif event.GetState() == wx.webview.WEBVIEW_STATE_TRANSFERRING:
+ statusbar.SetStatusText("Loading " + event.GetURL())
+ elif event.GetState() == wx.webview.WEBVIEW_STATE_STOP:
+ statusbar.SetStatusText("")
+ self.location.SetValue(event.GetURL())
+ self.GetParent().SetTitle("wxWebView - " + self.webview.GetPageTitle())
+
+ def OnLocationKey(self, evt):
+ if evt.GetKeyCode() == wx.WXK_RETURN:
+ URL = self.location.GetValue()
+ self.location.Append(URL)
+ self.webview.LoadURL(URL)
+ else:
+ evt.Skip()
+
+ def IgnoreReturn(self, evt):
+ if evt.GetKeyCode() != wx.WXK_RETURN:
+ evt.Skip()
+
+ def OnLocationSelect(self, evt):
+ url = self.location.GetStringSelection()
+ self.webview.LoadURL(url)
+
+ def OnOpenButton(self, event):
+ dlg = wx.TextEntryDialog(self, "Open Location",
+ "Enter a full URL or local path",
+ self.current, wx.OK|wx.CANCEL)
+ dlg.CentreOnParent()
+
+ if dlg.ShowModal() == wx.ID_OK:
+ self.current = dlg.GetValue()
+ self.webview.LoadURL(self.current)
+
+ dlg.Destroy()
+
+ def OnPrevPageButton(self, event):
+ self.webview.GoBack()
+
+ def OnNextPageButton(self, event):
+ self.webview.GoForward()
+
+ def OnStopButton(self, evt):
+ self.webview.Stop()
+
+ def OnRefreshPageButton(self, evt):
+ self.webview.Reload()
+
+
+class wkFrame(wx.Frame):
+ def __init__(self):
+ wx.Frame.__init__(self, None, -1, "WebKit in wxPython!")
+
+ self.panel = TestPanel(self, -1)
+ self.panel.webview.LoadURL("http://www.wxwidgets.org/")
+ self.CreateStatusBar()
+
+class wkApp(wx.App):
+ def OnInit(self):
+ self.webFrame = wkFrame()
+ self.SetTopWindow(self.webFrame)
+ self.webFrame.Show()
+
+ return True
+
+app = wkApp(redirect=False)
+app.MainLoop()
--- /dev/null
+/*
+ * Copyright (C) 2007 Kevin Ollivier 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.
+ */
+
+%module(package="wx") webview
+
+%{
+#include "wx/wxPython/wxPython.h"
+#include "wx/wxPython/pyclasses.h"
+#include "WebView.h"
+#include "WebFrame.h"
+%}
+
+//---------------------------------------------------------------------------
+
+%import core.i
+%import windows.i
+
+MustHaveApp(wxWebView);
+MustHaveApp(wxWebFrame);
+
+%include WebView.h
+%include WebFrame.h
+
+%pythoncode { wx = _core }
+%pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
+
+%constant wxEventType wxEVT_WEBVIEW_BEFORE_LOAD;
+%constant wxEventType wxEVT_WEBVIEW_STATE_CHANGED;
+%constant wxEventType wxEVT_WEBVIEW_NEW_WINDOW;
+%constant wxEventType wxEVT_WEBVIEW_RIGHT_CLICK;
+
+%pythoncode {
+EVT_WEBVIEW_BEFORE_LOAD = wx.PyEventBinder( wxEVT_WEBVIEW_BEFORE_LOAD )
+EVT_WEBVIEW_STATE_CHANGED = wx.PyEventBinder( wxEVT_WEBVIEW_STATE_CHANGED )
+EVT_WEBVIEW_NEW_WINDOW = wx.PyEventBinder( wxEVT_WEBVIEW_NEW_WINDOW )
+EVT_WEBVIEW_RIGHT_CLICK = wx.PyEventBinder( wxEVT_WEBVIEW_RIGHT_CLICK )
+}
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com>
+
+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 Computer, 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.
+
+Bakefile for wxWebKit Python bindings.
+-->
+
+<makefile>
+ <set var="WX_UNICODE">1</set>
+ <set var="WX_SHARED">1</set>
+ <include file="../../wxwk-settings.bkl"/>
+
+ <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define
+ it in case the presets/wx.bkl doesn't define it for us. -->
+ <if cond="not isdefined('WX_PYTHON')">
+ <set var="WX_PYTHON">1</set>
+ </if>
+
+ <if cond="not isdefined('PYTHON_VERSION')">
+ <option name="PYTHON_VERSION">
+ <values>24,25</values>
+ <default-value>25</default-value>
+ <description>
+ Python version we're building against.
+ </description>
+ </option>
+ </if>
+
+ <if cond="not isdefined('PYTHON_LIBDIR')">
+ <option name="PYTHON_LIBDIR" category="path">
+ <default-value>C:/Python25/Libs</default-value>
+ <description>
+ The directory containing the Python library to link against.
+ </description>
+ </option>
+ </if>
+
+ <module id="wxwebkit-python" template="wx,webcore,wxwk_build_settings,xml2,iconv,xslt,icu,jscore,curl,sqlite3,gtk,pthreads">
+ <!-- make sure we relink wxwebkit if either webcore or jscore change -->
+ <if cond="FORMAT=='gnu'">
+ <depends-on-file>$(WKOUTPUTDIR)/libjscore.a</depends-on-file>
+ <depends-on-file>$(WKOUTPUTDIR)/libwebcore-wx.a</depends-on-file>
+ </if>
+ <if cond="FORMAT=='msvc'">
+ <depends-on-file>$(WKOUTPUTDIR)/jscore.lib</depends-on-file>
+ <depends-on-file>$(WKOUTPUTDIR)/webcore-wx.lib</depends-on-file>
+ </if>
+ <runtime-libs>dynamic</runtime-libs>
+ <dllname>_webview</dllname>
+
+ <set var="BUILDDIR">obj-$(FORMAT)</set>
+
+ <include>$(WK_ROOT)/WebCore/platform/wx</include>
+ <include>$(WK_ROOT)/WebCore/bridge/wx</include>
+ <include>$(WK_ROOT)/WebCore/page/wx</include>
+ <include>$(WK_ROOT)/WebKit/wx</include>
+ <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include>
+
+ <if cond="FORMAT=='gnu'">
+ <sys-lib>png</sys-lib>
+ <set var="MAC_FLAGS">
+ <if cond="WX_PORT=='mac'">-bundle</if>
+ </set>
+
+ <ldflags>$(MAC_FLAGS) -undefined dynamic_lookup</ldflags>
+ </if>
+ <if cond="FORMAT in ['msvc','msvs2005prj']">
+ <set var="PY_LIBNAME">
+ <if cond="PYTHON_VERSION=='24'">
+ python24
+ </if>
+ <if cond="PYTHON_VERSION=='25'">
+ python25
+ </if>
+ </set>
+ <sys-lib>libpng</sys-lib>
+ <sys-lib>$(PY_LIBNAME)</sys-lib>
+ <lib-path>$(WK_ROOT)/libpng</lib-path>
+ <lib-path>$(PYTHON_LIBDIR)</lib-path>
+ </if>
+
+ <sys-lib>wxwebkit</sys-lib>
+ <lib-path>$(WKOUTPUTDIR)</lib-path>
+
+ <define>BUILDING_WX__=1</define>
+ <define>SWIG_TYPE_TABLE=_wxPython_table</define>
+ <define>WXP_USE_THREAD=1</define>
+ <define>SWIG_PYTHON_OUTPUT_TUPLE</define>
+
+ <sources>
+ webview.cpp
+ </sources>
+ </module>
+
+</makefile>
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+
+Copyright (C) 2005, 2006 Apple Computer, 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 Computer, 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.
+
+This file contains templates with settings for components used by JavaScriptCore
+and WebCore. Include this file to use these settings.
+
+-->
+
+
+<makefile>
+
+ <option name="SQLITE3_LIBS">
+ <default-value>$(DOLLAR)(shell pkg-config --libs sqlite3)</default-value>
+ </option>
+
+ <option name="SQLITE3_CFLAGS">
+ <default-value>$(DOLLAR)(shell pkg-config --cflags sqlite3)</default-value>
+ </option>
+
+ <template id="sqlite3">
+ <sys-lib>sqlite3</sys-lib>
+ <if cond="FORMAT=='gnu'">
+ <ldflags>$(SQLITE3_LIBS)</ldflags>
+ <cxxflags>$(SQLITE3_CFLAGS)</cxxflags>
+ </if>
+ <if cond="FORMAT in ['msvc','msvs2005prj']">
+ <include>$(WK_ROOT)/WebKitLibraries/win/include/SQLite</include>
+ </if>
+ </template>
+
+ <option name="CURL_LIBS">
+ <default-value>$(DOLLAR)(shell curl-config --libs)</default-value>
+ </option>
+
+ <option name="CURL_CFLAGS">
+ <default-value>$(DOLLAR)(shell curl-config --cflags)</default-value>
+ </option>
+
+ <template id="curl">
+ <if cond="FORMAT not in ['msvc', 'msvc2005prj']">
+ <ldflags>$(CURL_LIBS)</ldflags>
+ <cxxflags>$(CURL_CFLAGS)</cxxflags>
+ </if>
+ <if cond="FORMAT in ['msvc', 'msvs2005prj']">
+ <sys-lib>libcurl</sys-lib>
+ </if>
+ </template>
+
+ <option name="GTK_LIBS">
+ <default-value>$(DOLLAR)(shell pkg-config --libs gtk+-2.0)</default-value>
+ </option>
+
+ <option name="GTK_CFLAGS">
+ <default-value>$(DOLLAR)(shell pkg-config --cflags gtk+-2.0)</default-value>
+ </option>
+
+ <!-- GTK settings, for GTK ports - wx doesn't use these -->
+ <template id="gtk">
+ <if cond="FORMAT=='gnu'">
+ <ldflags>$(GTK_LIBS)</ldflags>
+ <cxxflags>$(GTK_CFLAGS)</cxxflags>
+ </if>
+
+ <!-- TODO: non-Cygwin Windows support for this? :) -->
+ </template>
+
+
+ <option name="XML2_LIBS">
+ <default-value>$(DOLLAR)(shell xml2-config --libs)</default-value>
+ </option>
+
+ <option name="XML2_CFLAGS">
+ <default-value>$(DOLLAR)(shell xml2-config --cflags)</default-value>
+ </option>
+
+ <!-- XML2 library settings -->
+ <template id="xml2">
+ <if cond="FORMAT=='gnu'">
+ <ldflags>$(XML2_LIBS)</ldflags>
+ <cxxflags>$(XML2_CFLAGS)</cxxflags>
+ </if>
+
+ <if cond="PLATFORM_WIN32=='1'">
+ <include>$(WK_ROOT)/WebKitLibraries/win/include/libxml</include>
+ <sys-lib>libxml2</sys-lib>
+ </if>
+ </template>
+
+
+ <option name="XSLT_LIBS">
+ <default-value>$(os.popen("xslt-config --libs").read())</default-value>
+ </option>
+
+ <option name="XSLT_CFLAGS">
+ <default-value>$(os.popen("xslt-config --cflags").read())</default-value>
+ </option>
+
+ <!-- XSLT library settings -->
+ <template id="xslt" template="xml2">
+ <if cond="FORMAT=='gnu'">
+ <ldflags>$(XSLT_LIBS)</ldflags>
+ <cxxflags>$(XSLT_CFLAGS)</cxxflags>
+ </if>
+
+ <if cond="PLATFORM_WIN32=='1'">
+ <include>$(WK_ROOT)/WebKitLibraries/win/include/libxslt</include>
+ <sys-lib>libxslt</sys-lib>
+ </if>
+ </template>
+
+
+ <option name="ICU_LIBS">
+ <default-value>$(DOLLAR)(shell icu-config --ldflags)</default-value>
+ </option>
+
+ <option name="ICU_CFLAGS">
+ <default-value>$(DOLLAR)(shell icu-config --cppflags)</default-value>
+ </option>
+
+ <!-- IBM ICU settings -->
+ <template id="icu">
+ <if cond="FORMAT=='gnu'">
+ <ldflags>$(ICU_LIBS)</ldflags>
+ <cxxflags>$(ICU_CFLAGS)</cxxflags>
+ </if>
+
+ <if cond="PLATFORM_WIN32=='1'">
+ <sys-lib>icuuc</sys-lib>
+ <sys-lib>icuin</sys-lib>
+ </if>
+ </template>
+
+
+ <template id="iconv">
+ </template>
+
+
+ <template id="pthreads">
+ <if cond="PLATFORM_WIN32=='1'">
+ <include>$(WK_ROOT)/WebKitLibraries/win/include/pthreads</include>
+ <sys-lib>pthreadVC2</sys-lib>
+ </if>
+ </template>
+
+</makefile>
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+
+Copyright (C) 2007 Kevin Ollivier. 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 Computer, 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.
+
+This file contains templates with settings for components used by JavaScriptCore
+and WebCore. Include this file to use these settings.
+
+-->
+
+
+<makefile>
+ <if cond="not isdefined('WK_ROOT')">
+ <option name="WK_ROOT" category="path">
+ <default-value>$(DOLLAR)(WEBKIT_ROOT)</default-value>
+ <description>
+ The root directory containing WebKit sources
+ </description>
+ </option>
+ </if>
+ <if cond="not isdefined('WKOUTPUTDIR')">
+ <option name="WKOUTPUTDIR" category="path">
+ <default-value>$(DOLLAR)(WEBKITOUTPUTDIR)</default-value>
+ <description>
+ The root directory containing WebKit products
+ </description>
+ </option>
+ </if>
+
+ <if cond="not isdefined('WX_PORT')">
+ <if cond="FORMAT in ['msvc','msvs2005prj']">
+ <set var="WX_PORT_DEFAULT" overwrite="0">
+ msw
+ </set>
+ </if>
+ <if cond="not FORMAT in ['msvc','msvs2005prj']">
+ <set var="WX_PORT_DEFAULT" overwrite="0">
+ $(DOLLAR)(shell $(WX_CONFIG) --selected-config | cut -d '-' -f 1)
+ </set>
+ </if>
+ <option name="WX_PORT">
+ <values>gtk2,msw,mac</values>
+ <default-value force="1">$(WX_PORT_DEFAULT)</default-value>
+ <description>
+ Port of the wx library to build against
+ </description>
+ </option>
+ </if>
+
+ <template id="jscore">
+ <include>$(WK_ROOT)/JavaScriptCore</include>
+ <include>$(WK_ROOT)</include>
+ <include>$(WK_ROOT)/JavaScriptCore/kjs</include>
+ <include>$(WK_ROOT)/JavaScriptCore/wtf</include>
+ <include>$(WK_ROOT)/WebKitLibraries/unix/include</include>
+ <if cond="FORMAT in ['msvc', 'msvs2005prj']">
+ <!-- MSVC chokes on #import, so don't use ForwardingHeaders... -->
+ <include>$(WK_ROOT)/JavaScriptCore/os-win32</include><!-- stdint.h is here -->
+ </if>
+ </template>
+
+ <template id="webcore">
+ <if cond="FORMAT=='gnu'">
+ <!-- FIXME: we need proper configure checks -->
+ <define>HAVE_FUNC_ISNAN</define>
+ </if>
+
+ <if cond="PLATFORM_WIN32=='1'">
+ <include>$(WK_ROOT)/os-win32</include>
+ <define>HAVE_SYS_TIMEB_H=1</define>
+ <define>HAVE_FLOAT_H=1</define>
+ <define>HAVE_FUNC__FINITE=1</define>
+ </if>
+
+ <include>$(WK_ROOT)/WebCore/.</include>
+ <include>$(WK_ROOT)/WebCore/include</include>
+ <include>$(WK_ROOT)/WebCore/DerivedSources/WebCore</include>
+ <include>$(WK_ROOT)/WebCore/bindings/js</include>
+ <include>$(WK_ROOT)/WebCore/bridge</include>
+ <include>$(WK_ROOT)/WebCore/editing</include>
+ <include>$(WK_ROOT)/WebCore/history</include>
+ <include>$(WK_ROOT)/WebCore/html</include>
+ <include>$(WK_ROOT)/WebCore/css</include>
+ <include>$(WK_ROOT)/WebCore/dom</include>
+ <include>$(WK_ROOT)/WebCore/kwq</include>
+ <include>$(WK_ROOT)/WebCore/loader</include>
+ <include>$(WK_ROOT)/WebCore/loader/icon</include>
+ <include>$(WK_ROOT)/WebCore/page</include>
+ <include>$(WK_ROOT)/WebCore/platform</include>
+ <include>$(WK_ROOT)/WebCore/platform/graphics</include>
+ <include>$(WK_ROOT)/WebCore/platform/image-decoders</include>
+ <include>$(WK_ROOT)/WebCore/platform/image-decoders/gif</include>
+ <include>$(WK_ROOT)/WebCore/platform/image-decoders/jpeg</include>
+ <include>$(WK_ROOT)/WebCore/platform/image-decoders/png</include>
+ <include>$(WK_ROOT)/WebCore/platform/image-decoders/zlib</include>
+ <include>$(WK_ROOT)/WebCore/platform/network</include>
+ <include>$(WK_ROOT)/WebCore/platform/network/curl</include>
+ <include>$(WK_ROOT)/WebCore/platform/sql</include>
+ <include>$(WK_ROOT)/WebCore/rendering</include>
+ <include>$(WK_ROOT)/WebCore/storage</include>
+ <include>$(WK_ROOT)/WebCore/xml</include>
+
+ <include>$(WK_ROOT)/WebKitLibraries/unix/include</include>
+ <lib-path>$(WK_ROOT)/WebKitLibraries/unix/lib</lib-path>
+ </template>
+
+</makefile>
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+
+Copyright (C) 2007 Kevin Ollivier. 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 Computer, 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.
+
+This file builds the wxWebKit library.
+
+-->
+
+<makefile>
+ <set var="WX_UNICODE">1</set>
+ <set var="WX_SHARED">1</set>
+ <include file="wxwk-settings.bkl"/>
+
+ <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define
+ it in case the presets/wx.bkl doesn't define it for us. -->
+ <if cond="not isdefined('WX_PYTHON')">
+ <set var="WX_PYTHON">0</set>
+ </if>
+
+ <set var="BUILDDIR">obj-$(FORMAT)</set>
+
+ <dll id="wxwebkit-dynamic" template="wxwk,jscore,webcore,xml2,iconv,xslt,icu,curl,sqlite3,gtk,pthreads">
+ <!-- make sure we relink wxwebkit if either webcore or jscore change -->
+ <if cond="FORMAT=='gnu'">
+ <depends-on-file>$(WKOUTPUTDIR)/libjscore.a</depends-on-file>
+ <depends-on-file>$(WKOUTPUTDIR)/libwebcore-wx.a</depends-on-file>
+ </if>
+ <if cond="FORMAT=='msvc'">
+ <depends-on-file>$(WKOUTPUTDIR)/jscore.lib</depends-on-file>
+ <depends-on-file>$(WKOUTPUTDIR)/webcore-wx.lib</depends-on-file>
+ </if>
+ <runtime-libs>dynamic</runtime-libs>
+ <dllname>wxwebkit</dllname>
+ <libname>wxwebkit</libname>
+
+ <if cond="FORMAT=='gnu'">
+ <ldflags>$(WKOUTPUTDIR)/libjscore.a</ldflags>
+ </if>
+ <if cond="FORMAT in ['msvc','msvs2005prj']">
+ <sys-lib>jscore</sys-lib>
+ <sys-lib>winmm</sys-lib> <!-- for timeGetTime -->
+ <lib-path>$(WKOUTPUTDIR)</lib-path>
+ </if>
+
+ <set var="BUILDDIR">obj-$(FORMAT)</set>
+
+ <include>$(WK_ROOT)/WebCore/platform/wx</include>
+ <include>$(WK_ROOT)/WebCore/bridge/wx</include>
+ <include>$(WK_ROOT)/WebCore/page/wx</include>
+ <include>$(WK_ROOT)/WebKit/wx</include>
+ <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include>
+
+ <if cond="FORMAT=='gnu'">
+ <sys-lib>png</sys-lib>
+ <ldflags>$(WKOUTPUTDIR)/libwebcore-wx.a</ldflags>
+ </if>
+ <if cond="FORMAT in ['msvc','msvs2005prj']">
+ <sys-lib>webcore-wx</sys-lib>
+ <sys-lib>libpng</sys-lib>
+ <sys-lib>libjpeg</sys-lib>
+ <lib-path>$(WKOUTPUTDIR)</lib-path>
+ <lib-path>$(WK_ROOT)/libpng</lib-path>
+ <lib-path>$(WK_ROOT)/libjpeg</lib-path>
+ </if>
+
+ <sources>
+ WebKitSupport/ChromeClientWx.cpp
+ WebKitSupport/ContextMenuClientWx.cpp
+ WebKitSupport/DragClientWx.cpp
+ WebKitSupport/EditorClientWx.cpp
+ WebKitSupport/FrameLoaderClientWx.cpp
+ WebKitSupport/InspectorClientWx.cpp
+
+ WebView.cpp
+ WebFrame.cpp
+ </sources>
+ </dll>
+
+</makefile>
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+Copyright (C) 2007 Kevin Ollivier 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 Computer, 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.
+
+JavaScriptCore Bakefile project file.
+-->
+
+<makefile>
+ <include file="presets/wx.bkl"/>
+ <include file="presets/wxwebkit.bkl"/>
+ <include file="dependencies.bkl"/>
+
+ <template id="wxwk_build_settings">
+ <dirname>$(WKOUTPUTDIR)</dirname>
+ <warnings>default</warnings>
+ <cxx-rtti>on</cxx-rtti>
+ <cxx-exceptions>on</cxx-exceptions>
+ <define>BUILDING_WX__=1</define>
+ <debug-info>on</debug-info>
+ <if cond="FORMAT in ['msvc', 'msvs2005prj']">
+ <set var="DEBUG_RUNTIME">
+ <if cond="WX_PYTHON=='1' and WX_DEBUG=='0'">off</if>
+ <if cond="WX_PYTHON=='0' and WX_DEBUG=='0'">off</if>
+ <if cond="WX_PYTHON=='1' and WX_DEBUG=='1'">off</if>
+ <if cond="WX_PYTHON=='0' and WX_DEBUG=='1'">on</if>
+ </set>
+ <debug-runtime-libs>
+ $(DEBUG_RUNTIME)
+ </debug-runtime-libs>
+ </if>
+ <if cond="FORMAT=='gnu'">
+ <include>$(WK_ROOT)/WebKitLibraries/unix/include</include>
+ <lib-path>$(WK_ROOT)/WebKitLibraries/unix/lib</lib-path>
+ </if>
+ <if cond="FORMAT in ['msvc', 'msvs2005prj']">
+ <include>$(WK_ROOT)/WebKitLibraries/win/include</include>
+ <lib-path>$(WK_ROOT)/WebKitLibraries/win/lib</lib-path>
+ </if>
+ </template>
+ <template id="wxwk" template="wxwk_build_settings,wx">
+ <wx-lib>core</wx-lib>
+ <wx-lib>base</wx-lib>
+ <if cond="PLATFORM_WIN32=='1'">
+ <define>WXUSINGDLL=1</define>
+ </if>
+ </template>
+
+</makefile>