diff --git a/.gitignore b/.gitignore index a84999ab..d7e65d71 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,8 @@ *.user *.ncb *.suo +/build/ +*.ipch +*.sdf +*.opensdf +*.cache diff --git a/ChangeLog.md b/ChangeLog.md new file mode 100644 index 00000000..6c5837d8 --- /dev/null +++ b/ChangeLog.md @@ -0,0 +1,478 @@ +#### 2018-05-25 00:27 修正 skeSetFileSystem 失效问题。 +* 更新 libcurl 为 7.50.1 版本。同时也修正了因 libcurl 原因 wkeSetFileSystem 失效的问题(貌似之前修正过一次。。。)。 +* 修正 wkeLoadHtml(W) 加载页面内容时,wkeSetFileSystem 回调失效的问题。 +* 修改 libcurl 相关的 vsprops。 + +#### 2016-11-09 10:53 修正更新 libcurl 之后 wkeSetFileSystem 无效的问题。 +* 修正更新 libcurl 之后 wkeSetFileSystem 无效的问题,失效是因为 libcurl 的函数没有替换为 wkeSetFileSystem 设置的。 +* wkexe.exe 增加 --useragent 参数设置 UserAgent。 + +#### 2016-08-03 12:28 readme.md 中去掉 vs2015 工程相关描述,现在还没有 vs2015 工程。 +* readme.md 中去掉 vs2015,现在还没有 vs2015 工程。 + +#### 2016-08-03 12:07 readme.md 细节调整。 +* readme.md 细节调整。 + +#### 2016-08-03 11:59 readme.md 中增加了使用 git 同步更新代码的方法说明。 +* 中增加了使用 git 同步更新代码的方法说明。 + +#### 2016-08-03 11:03 版本 1.2.1.3 处理 WM_SETCURSOR 消息,修正编辑框当中光标闪烁的问题。 +* 处理 WM_SETCURSOR 消息,修正编辑框当中光标闪烁的问题。 +* 修改版本号为 1.2.1.3。 + +#### 2016-08-01 13:23 版本 1.2.1.2 使用 libcurl 7.50,修正 HTTPS 问题。 +* 使用最新的 libcurl 7.50 源码,LIB Release - DLL Windows SSPI + MT 生成新的 libcurl_imp.lib,修正了有时 HTTPS 失败的问题(例如 https://wx.qq.com 无法打开的问题)。 +* 修改版本号为 1.2.1.2。 + +#### 2016-07-29 22:47 在 readme.md 中添加编译指南、一条 FAQ。 +* 在 readme.md 中,将编译指南从 FAQ 中单独提出来。 +* 增加一条 FAQ:`FAQ1. wke 对 HTML5 的支持如何?`。 + +#### 2016-07-28 01:57 修改 readme.md 一些语法问题。 +* 修改 readme.md 一些语法问题。 + +#### 2016-07-28 01:48 readme.md 中增加贡献者名单。 +* readme.md 中增加贡献者名单。 + +#### 2016-07-28 00:23 修正 readme.md 中 FAQ 的链接问题。 +* 修正 readme.md 中 FAQ 的链接问题。 + +#### 2016-07-28 00:18 修改 readme.md 排版。 +* 修改 readme.md 排版。 + +#### 2016-07-28 00:04 将 FAQ 直接放到 readme.md 当中。 +* 将 FAQ 直接放到 readme.md 当中。 + +#### 2016-07-28 23:37 项目根目录增加 FAQ 文档。 +* 项目根目录增加 FAQ 文档,记录一下经常被问到的问题。 + +#### 2016-06-24 12:05 规范JS接口,增加 wkeJSAddRef、wkeJSReleaseRef 。 +* 所有JS接口上,添加 wkeJSState* 参数。 +* 添加 wkeJSAddRef、wkeJSReleaseRef 函数,显式地引用变量,避免被 GC。 + +改动如下: +- wkeWebView -> wkeWebView * +- wkeString -> wkeString * +- jsExecState -> wkeJSState * +- jsValue -> wkeJSValue +- .... +- jsCall -> wkeJSCall +- jsGet -> wkeJSGet +- ... + +* 修改版本号为 1.2.2.0 + +#### 2016-06-24 12:05 规范命名、类型定义。 +* wke有几个命名,我想调整一下,问一下大家的意见,主要是基于两点原因 + 1.现在句柄类型(wkeWebView、wkeString等)、指针类型(wkeSettings*、wkeConsoleMessaget*等)都在用,比较混乱。 + 2.JS函数族,命名上加上wke。 + +改动如下: +- wkeWebView -> wkeWebView * +- wkeString -> wkeString * +- jsExecState -> wkeJSState * +- jsValue -> wkeJSValue +- .... +- jsCall -> wkeJSCall +- jsGet -> wkeJSGet +- ... + +* 修改版本号为 1.2.2.0 + +#### 2016-06-23 17:55 修改版本号为 1.2.1.1。 +* 修改版本号为 1.2.1.1 + +#### 2016-06-23 17:46 使用群里蚂蚁的方法优化了绘制,妈妈再也不用担心 wke 绘制卡顿了。 +* 使用群里蚂蚁的方法优化了绘制,妈妈再也不用担心 wke 绘制卡顿了。 +* 增加了以下函数: + - wkeSetRepaintInterval 设置 wkeRepaintIfNeededAfterInterval 调用 wkeRepaintIfNeed 的时间间隔。 + - wkeGetRepaintInterfal 获取 wkeRepaintIfNeededAfterInterval 调用 wkeRepaintIfNeed 的时间间隔。 + - wkeRepaintIfNeededAfterInterval 根据指定的时间间隔调用 wkeRepaintIfNeed。 + - wkeRepaintAllNeeded 调用所有 wkeWebView 的 wkeRepaintIfNeededAfterInterval。 + - wkeRunMessageLoop 消息循环 + wkeRepaintAllNeeded 的调用。 + +优化原理:以前的绘制是使用WM_TIMER定时器来重绘,当消息队列很忙的时候有可能不能及时绘制,造成卡顿,优化方法是在消息循环当中直接绘制,使绘制优先于消息处理。 + +#### 2016-06-23 12:13 修正调用 WebCore::DatabaseTracker::setDatabaseDirectoryPath 发生断言失败的问题。 +* 修正调用 WebCore::DatabaseTracker::setDatabaseDirectoryPath 发生断言失败的问题,改为在 wkeInitialize 时调用 WebCore::DatabaseTracker::initializeTracker。 + +#### 2016-06-22 20:15 使用蚂蚁实现的 websocket 。 +* 使用蚂蚁实现的 websocket,当前一个连接一个线程,有待优化。 + +#### 2016-06-22 17:40 实现默认 window.prompt。 +* 实现默认 window.prompt 函数。 +* 修改版本号为 1.2.1.0。 +* 修改资源中相关网站地址为 www.github.com/cexer/wke。 +* 取消 wke 对 WebCore 项目的依赖,防止每次从 WebCore 编译。 + +#### 2016-06-22 14:16 修正 CWebWindow::resize、CWebWindow::moveToCenter 的 WS_CHILD 属性判断 BUG。 +* 修正 CWebWindow::resize、CWebWindow::moveToCenter 的 WS_CHILD 属性判断不正确,导致以控件形式创建时位置不正确的问题。 + +#### 2016-03-10 23:29 优化 wkexe、增加命令行直接加载 HTML 文本支持。 +* 重构 wkexe 中一部分代码。 +* 修改 wkexe 行为,若未在命令行指定参数,使用默认参数启动 about:blank 页面。 +* 修改 wkexe 对于`html`参数的理解,现在可支持直接传递 html 内容,如: +```html +wkexe --html="" +wkexe --html="Hello World!" +``` +* 增加 wkexe 对于 cookie 文件路径的自定义支持,使用参数`cookie`设置路径。 +* 修改 wkeLoadW、wkeLoad 以支持`about:blank`地址。 + +#### 2016-03-10 22:14 增加 cookie 操作接口。 +* 增加 wkeSetCookie 设置指定 wkeWebView 的 cookie。 +* 修改 wkeConfigure、wkeInitializeEx 的参数结构体 wkeSettings,增加指定全局 cookie 文件路径的成员。 + +#### 2016-03-10 21:24 增加查找插件时同时在工作目录的 plugins 目录下查找。 +* 增加查找插件时同时在工作目录的 plugins 目录下查找,之前只在程序所在目录查找。 + +#### 2016-03-09 09:09 增加 Document/todo.md 记录平时积累的需求、问题。 +* 增加 Document/todo.md 记录平时积累的需求、问题。 + +#### 2015-12-30 00:23 修正 wkeWebWindow 网页中编辑框输入法不跟随光标的问题。 +* 在 WM_IME_STARTCOMPOSITION 添加 ImmSetCompositionWindow 调用,以修正 wkeWebWindow 网页中编辑框输入法不跟随光标的问题。 + +#### 2015-12-25 23:44 增加 wkeOnDocumentReady 回调参数,以区分 iframe 的加载成功事件。 +* 增加 FrameLoaderClient::dispatchDidFinishDocumentLoad 参数,使 wkeOnDocumentReady 有回调参数,以区分 iframe 的加载成功事件。 + +#### 2015-12-25 23:44 实现几个底层回调,使 window.close、window.blur、window.focus 生效。 +* 实现 ChromeClient::unfocus、ChromeClient::focus、ChromeClient::closeWindowSoon,使 window.close、window.blur、window.focus 生效。 + +#### 2015-12-25 20:59 修正 wkeBrowser 中拦截 _blank 导致无法打开链接的问题。 +* 修正 wkeBrowser 中拦截 _blank 导致无法打开链接的问题。 + +#### 2015-12-24 20:27 临时解决 wke 的 vs2010 工程 Debug 模式链接失败的问题。 +* 修改 vs2010 工程文件,调度模式时忽略默认库 msvcrt.lib;LIBCMT.lib。这只是临时解决问题,应该工程配置某个地方直接或间接引入了这两个 release 模式下的库。 + +#### 2015-12-23 12:47 修改插件查找机制支持非 np 开头的插件。 +* 修改 PluginDatabaseWin.cpp::PluginDatabase::getPluginPathsInDirectories,以支持加载 plugins 目录下非 np 开头的插件。 + +#### 2015-12-20 19:10 修改 wkeOnCreateView 函数。 +* 修改 wkeOnCreateView 函数参数,使用结构体 wkeNewViewInfo 传递,并增加 target 信息。 +* 修改 wkeOnCreateView 函数行为,若返回 NULL,则不继续浏览该地址。、 +* 在 wkeBrowser 当中增加 wkeOnCreateView 测试。 + +#### 2015-12-20 15:37 去掉 wke 接口定义的平台依赖。 +* 去掉 wke.h 当中对 、HWND、HDC 等的直接引用,接口上去掉平台依赖。 + +#### 2015-12-20 15:37 明确定义 wke 接口的调用约定为 cdecl。 +* 定义调用约定 WKE_CALL = cdecl。 +* 每个函数声明前明确加上调用约定,以防止当使用不同的调用约定时出现错误。 + +#### 2015-12-19 23:03 修正 wke 无法正确加载 windowed 插件的问题。 +* 增加 wkeSetHostWindow,若使用 windowed 插件,必须先调用此函数,以免插件找不到容器容器。 +* 增加 wkeSetHostWindow,若使用 windowed 插件,必须先调用此函数,以免插件找不到容器容器。 +* 修改 WebCore::PluginView::platformStart 函数,若找不到插件容器窗口,则使用桌面为容器。 +* 在 wkeBrowser 当中增加 wkeSetHostWindow 调用,以支持 windowed 插件,使用 VLC 插件测试通过。 +* 在 使用 wkeCreateWindow 返回的 webView 增加自动的 wkeSetHostWindow 调用,以支持 windowed 插件。 + +#### 2015-12-19 17:58 wkeBrowser 中增加使用 jsFunction 绑定函数的示例。 +* wkeBrowser 中增加使用 jsFunction 绑定函数的示例。 + +#### 2015-12-16 16:38 增加控制台消息回调。 +* 增加控制台消息回调功能,通过 wkeOnConsoleMessage 设置回调函数。 +* wkeBrowser 当中增加控制台消息回调功能测试。 + +#### 2015-11-27 21:56 提交编译好的二进制文件。 +* 提交编译好的二进制文件。 + +#### 2015-11-26 20:23 修正 wke 中 wkeSimpleStringT 拷贝宽字符串只拷一半的问题。 +* 之前 wke 中的 wkeSimpleStringT 有拷贝宽字符串只拷一半的问题,导致 wkeToTempStringW 不正常。 + +#### 2015-11-26 10:26 增加 vs2010.bat 等批处理用于打开工程,避免找不到 nmake 的情况。 +* 在使用 vs2010 或 vs2013 编译时可能会出现找不到 namke 的情况,因此增加 vs2010.bat 等批处理,其会先设置环境变量再打开工程。 + +#### 2015-11-26 10:07 修正 wkeBrowser 的 _WIN32_WINNT 导致找不到符号的问题。 +* 修正 wkeBrowser 的 _WIN32_WINNT 导致找不到 IDC_HAND 宏的问题,将其设置为最低 0x501(Windows XP)即可。 + +#### 2015-11-25 22:28 增加基于 vs2008 工程文件 的 vs2005 工程文件。 +* 增加基于 vs2008 工程文件 的 vs2005 工程文件。 +* 修改 wkeBrowser 中 _WIN32_WINNT 定义,以支持 vs2005 编译。 +* 去掉 wkeBrowser 当中对 Direct3D 的引用,以支持 vs2005 编译。 + +#### 2015-11-25 21:20 增加基于 BrentHuang 完成的 vs2013 工程文件。 +* 增加基于 BrentHuang(群里光 光)完成的 vs2013 工程文件,感谢 BrentHuang 的贡献。 +* 使用 BrentHuang 提供的修改过的几个源代码以支持 vs2013 中编译,我另外修改了几处以兼容 vs2008 和 vs2010。 + +#### 2015-11-25 13:03 增加 wkeLoad/wkeLoadW 智能加载接口。 +* 增加 wkeLoad/wkeLoadW 智能加载接口,可分析出参数的类型是 URL 、HTML 或 文件路径,判断顺序如下: + - 若参数中明确指定了 https://、http://、file:///,则按 URL 加载。 + - 若参数中包含 “<” 和 “>” 两个 HTML 中的特殊字符(同时这两个字符不可能是路径字符),按照 HTML 加载。 + - 若参数中不包含 “:” 字符则按照相对路径处理,依次在当前工作目录、EXE所在目录查找将其补全为完整路径。 + - 若完整路径指向的文件确实存在,则将其按照文件执行加载。 + - 若以上判断全部失败,则当作 URL 加载。 +* 在 wkeBrowser 中将加载函数改为 wkeLoadW,可通过运行 wkeBrowser [加载参数] 直接进行测试。 + +#### 2015-11-24 23:51 修改 ChangeLog 更新日志的路径。 +* 去掉 ChangeLog.txt。 +* 将 Document/history.md 移至根目录下 ChangeLog.md。 + +#### 2015-11-24 23:38 去掉 wke 中对 std::string 的引用。 +* 去掉 wke 中 jsBind.cpp 对 std::string 的引用,自己实现了一个简单的字符串缓存对象。 + +#### 2015-11-24 23:35 修正 wkeBrowser 无法访问百度的问题。 +* 修正 wkeBrowser 中因在 wkeOnNavigation 中禁用百度,导致无法访问百度的问题。 + +#### 2015-11-24 23:31 增加 BrentHuang 完成的 vs2010 的工程文件。 +* 增加 BrentHuang(群里光 光)完成的 vs2010 的工程文件,感谢 BrentHuang 的贡献。 + +#### 2015-10-06 14:18 增加基于 wkeWebView 的带窗口、消息处理、绘制的窗口/控件接口。 +* 增加基于 wkeWebView 的带窗口、消息处理、绘制的窗口/控件,接口: + - 使用 wkeCreateWindow 创建窗口或控件,当前支持普通弹出窗口、分层窗口(用于透明)、控件。 + - 使用 wkeShowWindow 显示、隐藏窗口或控件。 + - 使用 wkeEnableWindow 禁用、启用窗口或控件。 + - 使用 wkeMoveWindow/wkeMoveToCenter 移动窗口或控件。 + - 使用 wkeResizeWindow 设置窗口或控件的大小。 + - 使用 wkeSetWindowTitle 设置窗口标题。 + +* 增加了一个新的项目 wkexe,作为三个新项目(wkeClient、wkeSample)中第一个。此项目的功能: + - 创建类似于 cmd.exe 之于 cmd、bat 文件的 WebApp 的执行器,加载不同的 html 文件执行任务。 + - 演示项目,用于演示 wke 接口的作用。 + +* 为了与 wkeCreateWindow 等一系列针对窗口的操作进行区分,修改新页面回调接口名称: + - 更名 wkeOnNewWindow 为 wkeOnCreateView + - 更名 wkeNewWindowCallback 为 wkeCreateViewCallback + +* 去掉了在 wkeCreateWebView、wkeDestroyWebView 中 s_webViews 相关的东西。 +* 修改 alert、confirm 弹出框的默认标题为 "wke" 。 + +#### 2015-10-05 01:30 增加地址加载、文档解析状态的回调接口。 +* 增加地址加载、文档解析状态的回调接口: + - wkeOnLoadingFinish 设置地址加载成功、失败、取消状态的回调函数。 + - wkeOnDocumentReady 设置文档解析成功的回调函数。 + +#### 2015-10-05 00:56 修正 wkeNavigationType 的值。 +* 在 wke 中将 WebCore::NavigationType 转换为 wkeNavigationType 时使用了直接强制转换,因此需要保证两个 enum 定义的值完全一致。 + +#### 2015-10-04 22:27 实现打开新窗口的控制回调 。 +* 实现打开新窗口的控制回调,使用 wkeOnNewWindow 设置回调函数。 +* 在 demo/bin/file.html 当中增加 wkeOnNewWindow 的测试数据(wkeBrowser中暂未增加)。 + +#### 2015-10-04 17:11 修改实现代码中所有成员变量以 `m_` 开头 。 +* 修改实现代码中所有成员变量的命令以 `m_` 开头(与 WebKit 内核保持一致)。 + +#### 2015-10-04 16:11 实现打开链接的控制回调。 +* 实现打开链接的控制回调,使用 wkeOnNavigation 设置回调函数。 +* 在 wkeBrowser 当中增加 wkeOnNavigation 的测试。 + +#### 2015-09-30 17:21 实现 alert、confirm、prompt 回调。 +* 实现 alert、confirm、prompt 回调,并支持自定义实现,接口: + - wkeOnAlertBox + - wkeOnConfirmBox + - wkeOnPromptBox + +* 修正 wkeGetStringW 复制字符串截断的问题。 +* wkeBrowser 中增加 wkeOnTitleChanged 和 wkeOnURLChanged 回调的测试。 + +#### 2015-09-30 16:36 规范 wke 回调接口。 +* 修改所有回调函数类型名称为 `事件名称 + Callback` 的形式: + - 更名 wkeOnTitleChanged 为 wkeTitleChangedCallback + - 更名 wkeOnURLChanged 为 wkeURLChangedCallback + - 更名 wkeOnPaintUpdated 为 wkePaintUpdatedCallback + +* 去掉 wkeSetHandler、wkeGetHandler,所有回调定义单独的 wkeOn + 事件名称 形式的设置函数: + - wkeOnTitleChanged + - wkeOnURLChanged + - wkeOnPaintUpdated + +* 修改所有回调函数的回调参数,去掉 wkeClientHandler,增加 void* param。 +* 去掉 wkeClientHandler 结构。 + + +#### 2015-09-29 23:07 修正去掉 StringTable 依赖之后的编译问题。 +* 修正去掉 StringTable 依赖之后的编译问题。 + +#### 2015-09-29 15:32 去掉 wke 项目中的 StringTable 依赖。 +* 去掉 wke 项目中的 StringTable 依赖,因 StringTable 实际上全局字符串池,且只在 wkeFinalize 时才释放,若字符串函数(比如jsToString)调用过多,会导致内存只增不减。 +* 修改 jsToString 和 jsToStringW 的实现,不依赖 StringTable,返回 static 字符串,因此其返回值会被下次调用冲掉,在使用不能保存字符串指针,应该立即保存到字符串数组或 std::string、std::wstring 当中再使用。 +* 更名 jsToString 为 jsToTempString,更名 jsToStringW 为 jsToTempStringW,因其返回值会被下次调用冲掉。 + +#### 2015-09-29 09:10 增加两个 C 导出函数 wkeRepaintIfNeed 和 wkeGetViewDC 。 +* 增加两个 C 导出函数 wkeRepaintIfNeed 和 wkeGetViewDC 。 +* 修正 wkeSetHandler 和 wkeGetHandler 的 const 问题。 + +#### 2015-09-29 02:20 去掉 IWebView 接口。 +* 因 IWebView* 纯虚函数的调用方式,与 C 接口没有大的区别,择其一即可。而 C 接口可兼容大多数的开发语言,所以保留 C 接口。不再支持 IWebView* 接口。 +* 在 C++ 模式下导出符号增加 extern "C" 。 + +#### 2015-09-29 01:58 修改 wkeString 字符串相关接口。 +* 修改 wkeString 的类型定义,使在 C 下更安全,在 C++ 下更方便。 +* 更名 wkeToString 为 wkeGetString,更名 wkeToStringW 为 wkeGetStringW,使其符合 wke 的命令习惯 。 +* 增加 wkeSetString 和 wkeSetStringW 。 + +#### 2015-09-29 01:39 整理 wke 内部结构。 +* 整理 wke 内部的结构,将所有的 *.inl 文件使用 .h 和 .cpp 进行分离。 +* 在 wke.h 当中包含上 windows.h,因其需要 HDC 的定义。 + +#### 2015-09-29 22:17 提交 Release 版的目标文件。 +* 上次提交误提交了 Debug 版的 wke.dll,改为提交 Release 版的。 + +#### 2015-09-29 22:10 修改 wkeBrowser 对 wke 的调用为 C 接口调用。 +* 修改 wkeBrowser 对 wke 的调用为 C 接口调用,因 IWebView* 纯虚函数的调用方式,与 C 接口没有大的区别,择其一即可。而容 C 接口可兼容大多数的开发语言,所以保留 C 接口,为抛弃 C++ 接口做准备。 +* 修正 wkeGetCookie、wkeGetCookieW 函数没有 wkeWebView 参数的 BUG。 +* 更名 wkeGetCaret 为 wkeGetCaretRect 。 +* 修改 wkeBrowser,默认关闭代理(取消定义宏 WKE_BROWSER_USE_LOCAL_PROXY)。 + +#### 2015-09-29 22:01 修改 wke 实现中用到的 IWebView 为 CWebView。 +* 修改实现中(如 wkeChromeClient、wkeFrameLoaderClient 等)用到的 IWebView 为 CWebView,因为实现需要知道 IWebView 之外的、具体实现相关的信息,用 IWebView 不合适。 +* 此修改为后续的实现作准备。 + +#### 2015-09-29 21:06 合并 zhanjx1314 实现的设置 UserAgent 的功能。 +* 合并 zhanjx1314(群里(__少) 实现的设置 UserAgent 的功能。 +* 在 webBrowser 当中测试了设置 UserAgent 的功能。 + +#### 2015-09-23 02:02 修正 JavaScriptCore 当中脚本错误导致后面调用逻辑异常。 +JSValueToXXXXX 和 JSObjectXXXX 函数族中的某些函数在转换/构造变量之后,会判断当前若有JS错误,则返回非法值。但这个错误有可能不是本次转换/构造中发生的,是由前次不相干的操作,比如某次脚本调用中的语法错误,此时返回非法值,则是不正确的。而且返回值不应该在调用完来修正,应该由被调用者来修正。 + +#### 2015-09-18 20:28 增加代理类型 socks4、socks4a、socks5、socks5h 的支持。 +* 增加代理类型 socks4、socks4a、socks5、socks5 h的支持,接口不用修改。 + +#### 2015-09-18 20:01 增加全局配置函数,当前只支持代理配置。 +* 增加全局配置函数 wkeConfigure,可在初始化之后执行全局性的配置操作。 +* 修改 wkeBrowser 使用 wkeConfigure 进行全局性配置。 + +#### 2015-09-17 01:28 增加初始化时的全局配置功能,当前只支持代理配置。 +* 增加初始化函数 wkeInitializeEx,可在初始化时同时进行一些全局性地配置 。 +* 通过 wkeInitializeEx 增加代理配置功能,目前仅支持 HTTP 代理。 +* 修改 wkeBrowser 使用 wkeInitializeEx 进行初始化,并增加代理测试。 + +#### 2015-09-07 00:23 两处小调整。 +* 修改 readme.md 。 +* 提交 release 版本的 demo/bin/wke.dll 。 + +#### 2015-09-04 20:40 修改项目 readme 文件。 +* 增加文件 readme.md 描述项目相关信息,并在末尾附原项目 readme.txt 的内容。 +* 删除原项目 readme.txt 。 + +#### 2015-09-04 19:56 实现 文件选择功能。 +* 实现 ChromeClient::runOpenPanel 函数,打开文件对话框,支持 multipe 属性多选文件。可通过 demo/bin/file.html 和 Document/demo/file.asp 测试。 + +#### 2015-09-04 19:53 增加从命令行提供的URL进行加载的功能。 +* webBrowser 增加命令行支持,若有命令行参数,则将其作为URL加载。 + +#### 2015-09-03 10:37 增加项目规范、根据规范调整命名。 +* 编写项目规范,位于 Document/rules.md,合作提交的朋友请按规范编写文档和代码。目前此规范还不完善,后续继续添加。 +* 根据 Document/rules.md 中的命名规范,以及使语法更正确、含义更清晰,作了以下命名调整: + - 更名 wkeClientHandler 为 wkeViewHandler(因这里的 "Client" 一词实际上是 WebKit 内部实现相关的东西,在接口中不需要)。 + - 更名 wkeSetClientHandler 为 wkeSetHandler (去掉 Client)。 + - 更名 IWebView::setClientHandler 为 IWebView::setHandler (去掉 Client)。 + - 更名 IWebView::getClientHandler 为 IWebView::handler (去掉 Client、成员函数获取属性不加 get)。 + - 更名 IWebView::cookieEnabled 为 IWebView::isCookieEnabled (获取是否属性前面加 is)。 + - 更名 IWebView::getCaret 为 IWebView::caretRect (成员函数获取属性不加 get、使含义更明确)。 + - 更名 IWebView::getViewDC 为 IWebView::viewDC (成员函数获取属性不加 get)。 + - 更名 IWebView::transparent 为 IWebView::isTransparent (获取是否属性前面加 is)。 + - 更名 IWebView::awaken 为 IWebView::wake(执行操作的函数使用动词)。 + - 更名 IWebView::contentsHeight 为 IWebView::contentHeight(content 即可代表所有内容,无需复数)。 + - 更名 IWebView::contentsWidth 为 IWebView::contentWidth(content 即可代表所有内容,无需复数)。 + - 更名 IWebView::contextMenuEvent 为 IWebView::fireContextMenuEvent(使含义更准确)。 + - 更名 IWebView::copy 为 IWebView::editorCopy (使含义更准确)。 + - 更名 IWebView::cut 为 IWebView::editorCut (使含义更准确)。 + - 更名 IWebView::delete_ 为 IWebView::editorDelete (使含义更准确)。 + - 更名 IWebView::focus 为 IWebView::setFocus (使含义更准确)。 + - 更名 IWebView::isLoadComplete 为 isLoadingCompleted (语法更准确、统一)。 + - 更名 IWebView::isLoaded 为 isLoadingSucceeded (语法更准确、统一)。 + - 更名 IWebView::isLoadFailed 为 isLoadingFailed (语法更准确、统一)。 + - 更名 IWebView::keyDown 为 IWebView::fireKeyDownEvent(使含义更准确)。 + - 更名 IWebView::keyPress 为 IWebView::fireKeyPressEvent(使含义更准确)。 + - 更名 IWebView::keyUp 为 IWebView::fireKeyUpEvent(使含义更准确)。 + - 更名 IWebView::mouseEvent 为 IWebView::fireMouseEvent(使含义更准确)。 + - 更名 IWebView::mouseWheel 为 IWebView::fireMouseWheelEvent(使含义更准确)。 + - 更名 IWebView::paste 为 IWebView::editorPaste (使含义更准确)。 + - 更名 IWebView::selectAll 为 IWebView::editorSelectAll (使含义更准确)。 + - 更名 IWebView::tick 为 IWebView::IWebView::repaintIfNeeded(使含义更准确)。 + - 更名 IWebView::unfocus 为 IWebView::killFocus(使含义更准确) 。 + - 更名 jsObjectData 为 jsData(Object 函数统一不加 Object)。 + - 更名 jsObjectGetData 为 jsGetData(Object 函数统一不加 Object)。 + - 更名 ON_PAINT_UPDATED 为 wkeOnPaintUpdated(类型用大驼峰命名法)。 + - 更名 ON_TITLE_CHANGED 为 wkeOnTitleChanged(类型用大驼峰命名法)。 + - 更名 ON_URL_CHANGED 为 wkeOnUrlChanged(类型用大驼峰命名法)。 + - 更名 wkeInit 为 wkeInitialize (使含义更准确)。 + - 更名 wkeShutdown 为 wkeFinalize (使含义更准确)。 + - 更名 wkeVersion 为 wkeGetVersion(非成员函数获取数据加 get)。 + - 更名 wkeVersionString 为 wkeGetVersionString(非成员函数获取数据加 get)。 + - 更名 wkeTitle 为 wkeGetTitle,wkeTitleW 为 wkeGetTitleW(非成员函数获取数据加 get)。 + - 更名 wkeWidth 为 wkdGetWidth(非成员函数获取数据加 get)。 + - 更名 wkeHeight 为 wkdGetHeight(非成员函数获取数据加 get)。 + - 更名 wkeWebViewName 为 wkeGetName(非成员函数获取数据加 get、WebView 相关操作函数命名统一不加 WebView)。 + - 更名 wkeZoomFactor 为 wkeGetZoomFactor(非成员函数获取数据加 get)。 + - 更名 wkeAwaken 为 wkeWake(wake 动词含义更准确)。 + - 更名 wkeContentsWidth 为 wkdGetContentWidth(content 即可代表所有内容无需复数、非成员函数获取数据加 get)。 + - 更名 wkeContentsHeight 为 wkeGetContentHeight(content 即可代表所有内容无需复数、非成员函数获取数据加 get)。 + - 更名 wkeSelectAll 为 wkeEditorSelectAll (使含义更准确)。 + - 更名 wkeCopy 为 wkeEditorCopy (使含义更准确)。 + - 更名 wkeCut 为 wkeEditorCut (使含义更准确)。 + - 更名 wkePaste 为 wkeEditorPaste (使含义更准确)。 + - 更名 wkeFocus 为 wkeSetFocus(使含义更准确)。 + - 更名 wkeUnfocus 为 wkeKillFocus(使含义更准确)。 + - 更名 wkeGlobalExec 为 wkeGetGlobalExec(非成员函数获取数据加 get)。 + - 更名 wkeIsLoadComplete 为 wkeIsLoadingCompleted (语法更准确、统一)。 + - 更名 wkeIsLoaded 为 wkeIsLoadingSucceeded (语法更准确、统一)。 + - 更名 wkeIsLoadFailed 为 wkeIsLoadingFailed (语法更准确、统一)。 + - 更名 wkeMediaVolume 为 wkeGetMediaVolume(非成员函数获取数据加 get)。 + - 更名 wkeSetWebViewName 为 wkeSetName(WebView 相关操作函数命名统一不加 WebView)。 + - 更名 wkeCookieEnabled 为 wkeIsCookieEnabled(获取是否数据是前面加 is)。 + - 更名 wkeGetCaret 为 wkeGetCaretRect (使含义更明确)。 + +#### 2015-09-03 10:17 将回调全部集中到接口 wkeClientHandler 当中。 +* 去掉 wkeBufHandler,将功能合并到 wkeClientHandler 当中。 +* wkeClientHandler 中增加一个回调参数,以传递自定义参数。 +* 去掉 wkeClientHandler 的 const 属性,避免在回调处理中要需要非 const 访问时导致问题。 + + +#### 2015-08-31 02:13 修改 Document/history.md 的标题级别。 … +每条记录的标题修改为四级标题,因三级在浏览器中查看太大。 + + +#### 2015-08-31 02:13 修改 Document/history.md 的记录格式。 … +每条记录不再使用严格的 markdown 格式,改为直接使用提交日志的文本,但增加 markdown 三级标题。 + + +#### 2015-08-30 23:24 合并 zhanjx1314 实现的 POST 方式加载页面的功能。 … +合并 zhanjx1314 实现的 wkePostURL 函数,该函数可以 POST 方式加载页面。 + + +#### 2015-08-30 22:59 合并 zhanjx1314 实现的获取 cookie 的功能。 … +合并 zhanjx1314 实现的获取 cookie 的功能(wchar_t* 版本),并在其基础上增加了一个 utf8* 版本的重载,另外在 webBrowser 中增加一个菜单项测试此功能。 + + +#### 2015-08-30 02:00 调整 Document/history.md 标题级别(之前太大)。 + + +#### 2015-08-30 01:40 修正 wkeLoadURL 加载中文路径 HTML 文件失败的问题。 … +wkeLoadURL 调用 `KURL::KURL(const KURL& base, const String& relative, const TextEncoding&)` 构造 KURL ,第二个参数传入的是 const char* 类型的 UTF-8 字符串以构造一个 WTF::String 对象,然而 WTF::String::String(const char*) 是把字符串按照 latin1 处理的,正确应该使用 WTF::String::fromUTF8 显式从 UTF-8 构造。可以用 wkeBrowser 加载 demo/bin/中文.html 测试。 + + +#### 2015-08-30 01:36 增加 Document/utility.md 记录一些零碎信息。 + + +#### 2015-08-30 01:23 修正 HTML 中图片地址包含中文时无法显示的问题。 … +WebCore::Document::completeURL 当中构造 KURL 对象时,会调用 encodeRelativeString 将所有 URL(包括本地路径)转换为 UTF-8 编码,导致文件打开失败,显然在 Windows 上路径应该是 GBK。可用 wkeBrowser 加载 demo/bin/english.html 测试。 + + +#### 2015-08-30 01:26 调整 Document/history.md 记录日志的顺序,按时间从新到旧。 + + +#### 2015-08-30 01:19 增加 webBrowser 拖放加载 HTML 文件的功能。 + + +#### 2015-08-29 23:56 修正 jsSet、jsGet 始终访问的是第一次调用时的属性的问题。 … +JSC::Identifier 内部以 JSC::UString 保存属性名称,而 JSC::UString 内部把 char* 类型字符串的指针值作为其 hash 值,虽然在一个字符串内存上设置了与前次不同的字符串内容,但因为使用了同一内存地址(指针相同), hash 值相同,会认为是同一个字符串。 + + +#### 2015-08-29 22:14 修改 Javascript 绑定相关的接口。 … +* 修改 jsObject、jsArray 函数名为 jsEmptyObject、jsEmptyArray,使其名称更符合实际功能。 +* 去掉 jsFunction 函数。 +* 增加新的 jsObject、jsFunction 函数用于实现对象和函数的绑定,针对单独页面的绑定。 +* 增加 Document 目录,用于存放一些说明性的东西。 + + +#### 2015-08-29 21:22 合并从 SOUI 仓库获取的修改。 … +感谢 SOUI 的作者,其主要增加了两个功能: +* wkePaint 拷贝页面的内容图像到指定内存。 +* wkeBufHandler 当页面的内容图像更新时回调通知。 + + +#### 2015-08-29 21:16:57 忽略 build 目录(中间目录)。 + +2011-09-07 + version 1.00 released \ No newline at end of file diff --git a/ChangeLog.txt b/ChangeLog.txt deleted file mode 100644 index 44657e29..00000000 --- a/ChangeLog.txt +++ /dev/null @@ -1,2 +0,0 @@ -2011-09-07 - version 1.00 released \ No newline at end of file diff --git a/Document/One Day at WebUI Group in year 2018.md b/Document/One Day at WebUI Group in year 2018.md new file mode 100644 index 00000000..fb93fced --- /dev/null +++ b/Document/One Day at WebUI Group in year 2018.md @@ -0,0 +1,24 @@ +WebUI 群2018年的普通一天 +================ + +2018年的普普通通的一天的早上,天气不冷不热,空气不好不坏,黄历所载,这一天也没有什么特别的吉凶趋避,日月星辰各安其份。WebUI群里已有不少人,聊着明星八卦,经济股市。 + +中午时分,夏老师来到群里。夏老师是经过人生跌宕、遍尝过世间甘苦的老司机,其人生阅历极其丰富,而家庭势力十分庞大,遍布了共产主义和资本主义国家的各个阶层。再加上其小到婚姻情感、大到国际政治、闲谈扯谈的明星八卦、学术探讨如物理化学都能侃侃而谈,对百姓民生、国家发展也有深刻的见解,群员们一度怀疑他有可能是个间谍。今天他来到群里也不说话,先发了一张十分暴露的性感美女图片,斜靠在自家产的紫檀红木椅上,左手搭着龙头扶手,右手食指轻轻弹掉烟头的灰烬,看着群里的愣头年轻们对着美女图片发出饥渴地嗷叫,只是呵呵地微笑着。 + +这时候群主忙过了他的事,也来到群里。群主是一名一事无成的中年人,网传他是70后,可是他身上却缺少那种经历过红尘坎坷的成熟稳重,反而有些不切实际的理想主义、完美主义、浪漫主义,喜欢看书、看电影,甚至喜欢海绵宝宝这样童真的东西。群主进到群里,在攒动的人头中一眼就看到了那张暴露的美女图片,赶紧冲过去一把扯下来,抹一抹脑门上的汗,一边责怪道:“你们又在偷偷害我!”,夏老师叭了一口烟回道:”我就知道群主不喜欢女的“,群里的人发出一阵哄笑。群主也不争辩,面对那些饥渴的愣头年轻们义正严辞地批评道:“还能不能追求点更高的人生价值了?”,说完转身舔了舔口水,小心地把美女图片卷起来揣进怀里,用手轻轻拍拍确定放好了,又转过身说道:“你们呀,一个个的工作不饱和。我去工作了”,然后带着掩饰不住的满足的微笑出去了。 + +群主出去不久,又有一个人也来了。此人一只脚刚踏进门,群里所有人都觉得哪里不对了。喝茶打牌的、聊天扯谈的,都突然感觉群里的空气中弥漫着一种说不清楚的压力,众人也不知道发生了什么,好似有灭顶之灾将至,都停着手上的动作,僵在那里也不敢作声。有大胆一点的人,额头冒着汗,吞一吞口水,侧着眼睛硬着头皮慢慢地转头往门口看。这人往门口一看,紧绷的神经一下子放松下来,颤抖着声音大声道:”哈哈!没事了没事了!是扫地!“,虽是哈哈地说着,但是表情狰狞,余悸未消,好像刚从噩梦惊醒一般。大家好一会儿才平复了情绪,群里才又恢复了喧闹。扫地进到群里,推一推鼻上的眼镜,照常和大家谈笑风声起来。原来此人江湖人称扫地,是WebUI圈的知名的高手,其年少即以逆向功力扬名看雪,近几年来潜心修炼mb神功,已经隐隐然有开宗立派之象,其mb神功精纯,已经到天人一体的境界,因此他一只脚踏进门,大家就感觉到了他不经意间的气场压迫。 + +扫地进群的时候,众人都在气场压迫之下如临大敌,角落里却有一个人看书的人始终自顾地执卷轻笑,丝毫不受影响。此人坐在角落里,白衣白裙,脸戴面纱,齐肩秀发,头发上束了条银带,身型婀娜,一看就是位女子,发上银带被窗外照进的阳光一映,更是熠熠生光。从身形和装束上看,这位女子方当妙龄,最多十七八岁,年纪虽轻,却又在举手投足间又透着端丽秀雅,有一种说不清楚的庄重感。她虽是WebUI群的常客,但极少与人说话,每次都在角落里独坐看书,所以也没人和她搭讪,都不敢唐突打扰,更没人见过她的面纱之后的真容,只知道她叫 Pamela。只有扫地和群主偶尔唤她萌弟,与她谈笑。 + +慢慢地人们都去假装工作了,群里人渐渐少了,显得有点冷静。沉寂了一会儿,突然出现一声惊呼,“那么多公司裁员我才知道,为什么裁员好奇怪的事情”,只见这人整个呈土豆的形状,只有一条眉毛,眼睛很随意地长在额头两边,因吃惊而张大的嘴巴周围有些稀疏的胡渣子,他紧皱着眉头,像是遇到了什么吃惊又难以理解的事情。他左手掐着一支烟,那烟刚被抽过一口,两缕白丝从烟头缓缓上升。等了好一会儿,也没人回应他。此人是群主施展十级甄嬛技能,把他从隔壁群挖过来的,人称Hello帝,是以一己之力撑起一个群的人,无数次拯救Thinking in ReDUI群于冷清将死之境。见无人回应,他继续长大嘴巴吃惊道:“永无止境我觉得很好看为什么不拍了好奇怪的事情”,“银行为什么不用nodejs好奇怪的事情”……,在他的一声声惊呼下,群里终于又热闹起来,那些打瞌睡的、装死的、假装工作很忙的,都又进来高谈阔论起来。 + +大家胡乱地闲扯哄笑,扯着扯着渐渐地都被吸引到了一个人身边,大家都伸头探脑地围着他听他说着什么。这人叫做兴国软件网,一身黑衣,劲装结扎,身形瘦削,眼以下都蒙着面,但是左脸上有一道粗厉的刀疤,从嘴角直到眼角,即使蒙面也遮掩不住。整个人一副精悍之气,一看就是飞檐走壁,吃江湖饭的好汉。他侧身坐着,右脚踏在旁边的一只凳子上,拎着酒壶仰头畅饮一口,一手指点着面前众人,一边说着自己从前行走江湖见过的奇人异事。Hello帝不时发出“怎么会这样好奇怪的事情”、“感觉很牛B的感叹。 + +这边大家成群结党地扯谈哄笑,却有一人站在墙边仰头仔细看着墙上的人画,完全不为吵闹所动。只见他约莫二十岁年纪,头戴伦巾,手上拿着一卷书,背在身后,身披一件蓝色长衫,虽然穿着素简,却透出一份俊雅。他正是闻名江湖的 Redrains 少侠,他年纪虽轻但却言行稳重,虽然年少扬名,但却仍然谦虚向学,虽然常在群里,也是极少说话,从不和人谈笑,只偶尔在有人遇到难题的时候出来,帮人指点解惑。 + +左墙上挂着一列人画,从左至右,一共有七八副。最左边一副人画似乎被人破坏过,画上的人像和文字都模糊不清,但是既然排最左边,想必是来历不凡。第二副画,人物也很模糊,但文字很清晰,Redrains 仔细看那画上文字,“BlzFans。BlzFans 是 wke 项目的奠基者。此位大侠功力深不可测然而为人极低调,将 wke 项目甩给开源界之后,从容离开去实现自己更高的人生价值了,挥一挥衣袖,不带走一声膜拜。感谢他的努力,如今我们除了在他开凿的道路上逶迤前进,也希望有一天他能够再次回到 WebUI 的队伍中来,带我们直接飞往 WebUI 技术的巅峰。”,Redrains 知道 wke 的份量,忍不住点头赞叹。 + +他又跳到第三副人画,画上却是一只巨大的蚂蚁长着人头。文字写着“蚂蚁大师。蚂蚁大师是曾经 WebUI 群的中坚技术力量,久经杀场,经验丰富,上能架构集群,下能逆向驱动。蚂蚁大师不仅解决了困扰我们已久的 wke 绘制慢的问题,还在 wke 上实现了人民呼声很高的 websocket 功能,还身怀 ewe 神功,其真实功力深不可测。只可惜,2018 年蚂蚁大师已久无音讯。今年国家动荡,数次扫黄打非、打击传销,江湖险恶,蚂蚁大师可能已遭不测”。看到这里,Redrains 只得摇头感叹。 + +Redrains 少侠看了好一阵墙上的人画了,时而点头赞叹,时而颌首深思,时而又对着人画作揖致敬。 \ No newline at end of file diff --git a/Document/One Day at WebUI Group in year 2018.txt b/Document/One Day at WebUI Group in year 2018.txt new file mode 100644 index 00000000..8b440ca8 --- /dev/null +++ b/Document/One Day at WebUI Group in year 2018.txt @@ -0,0 +1,16 @@ +2018年的普普通通的一天的早上,天气不冷不热,空气不好不坏,黄历所载,这一天也没有什么特别的吉凶趋避,日月星辰各安其份。WebUI群里已有不少人,聊着明星八卦,经济股市。 + +中午时分,夏老师来到群里。夏老师是经过人生跌宕、遍尝过世间甘苦的老司机,其人生阅历极其丰富,而家庭势力十分庞大,遍布了共产主义和资本主义国家的各个阶层。再加上其小到婚姻情感、大到国际政治、闲谈扯谈的明星八卦、学术探讨如物理化学都能侃侃而谈,对百姓民生、国家发展也有深刻的见解,群员们一度怀疑他有可能是个间谍。今天他来到群里也不说话,先发了一张十分暴露的性感美女图片,斜靠在自家产的紫檀红木椅上,左手搭着龙头扶手,右手食指轻轻弹掉烟头的灰烬,看着群里的愣头年轻们对着美女图片发出饥渴地嗷叫,只是呵呵地微笑着。 + +这时候群主忙过了他的事,也来到群里。群主是一名一事无成的中年人,网传他是70后,可是他身上却缺少那种经历过红尘坎坷的成熟稳重,反而有些不切实际的理想主义、完美主义、浪漫主义,喜欢看书、看电影,甚至喜欢海绵宝宝这样童真的东西。群主进到群里,在攒动的人头中一眼就看到了那张暴露的美女图片,赶紧冲过去一把扯下来,抹一抹脑门上的汗,一边责怪道:“你们又在偷偷害我!”,夏老师叭了一口烟回道:”我就知道群主不喜欢女的“,群里的人发出一阵哄笑。群主也不争辩,面对那些饥渴的愣头年轻们义正严辞地批评道:“还能不能追求点更高的人生价值了?”,说完转身舔了舔口水,小心地把美女图片卷起来揣进怀里,用手轻轻拍拍确定放好了,又转过身说道:“你们呀,一个个的工作不饱和。我去工作了”,然后带着掩饰不住的满足的微笑出去了。 + +群主出去不久,又有一个人也来了。此人一只脚刚踏进门,群里所有人都觉得哪里不对了。喝茶打牌的、聊天扯谈的,都突然感觉群里的空气中弥漫着一种说不清楚的压力,众人也不知道发生了什么,好似有灭顶之灾将至,都停着手上的动作,僵在那里也不敢作声。有大胆一点的人,额头冒着汗,吞一吞口水,侧着眼睛硬着头皮慢慢地转头往门口看。这人往门口一看,紧绷的神经一下子放松下来,颤抖着声音大声道:”哈哈!没事了没事了!是扫地!“,虽是哈哈地说着,但是表情狰狞,余悸未消,好像刚从噩梦惊醒一般。大家好一会儿才平复了情绪,群里才又恢复了喧闹。扫地进到群里,推一推鼻上的眼镜,照常和大家谈笑风声起来。原来此人江湖人称扫地,是WebUI圈的知名的高手,其年少即以逆向功力扬名看雪,近几年来潜心修炼mb神功,已经隐隐然有开宗立派之象,其mb神功精纯,已经到天人一体的境界,因此他一只脚踏进门,大家就感觉到了他不经意间的气场压迫。 + +扫地进群的时候,众人都在气场压迫之下如临大敌,角落里却有一个人看书的人始终自顾地执卷轻笑,丝毫不受影响。此人坐在角落里,白衣白裙,脸戴面纱,齐肩秀发,头发上束了条银带,身型婀娜,一看就是位女子,发上银带被窗外照进的阳光一映,更是熠熠生光。从身形和装束上看,这位女子方当妙龄,最多十七八岁,年纪虽轻,却又在举手投足间又透着端丽秀雅,有一种说不清楚的庄重感。她虽是WebUI群的常客,但极少与人说话,每次都在角落里独坐看书,所以也没人和她搭讪,都不敢唐突打扰,更没人见过她的面纱之后的真容,只知道她叫 Pamela。只有扫地和群主偶尔唤她萌弟,与她谈笑。 + +慢慢地人们都去假装工作了,群里人渐渐少了,显得有点冷静。沉寂了一会儿,突然出现一声惊呼,“那么多公司裁员我才知道,为什么裁员好奇怪的事情”,只见这人整个呈土豆的形状,只有一条眉毛,眼睛很随意地长在额头两边,因吃惊而张大的嘴巴周围有些稀疏的胡渣子,他紧皱着眉头,像是遇到了什么吃惊又难以理解的事情。他左手掐着一支烟,那烟刚被抽过一口,两缕白丝从烟头缓缓上升。等了好一会儿,也没人回应他。此人是群主施展十级甄嬛技能,把他从隔壁群挖过来的,人称Hello帝,是以一己之力撑起一个群的人,无数次拯救Thinking in ReDUI群于冷清将死之境。见无人回应,他继续长大嘴巴吃惊道:“永无止境我觉得很好看为什么不拍了好奇怪的事情”,“银行为什么不用nodejs好奇怪的事情”……,在他的一声声惊呼下,群里终于又热闹起来,那些打瞌睡的、装死的、假装工作很忙的,都又进来高谈阔论起来。 + +大家胡乱地闲扯哄笑,扯着扯着渐渐地都被吸引到了一个人身边,大家都伸头探脑地围着他听他说着什么。这人叫做兴国软件网,一身黑衣,劲装结扎,身形瘦削,眼以下都蒙着面,但是左脸上有一道粗厉的刀疤,从嘴角直到眼角,即使蒙面也遮掩不住。整个人一副精悍之气,一看就是飞檐走壁,吃江湖饭的好汉。他侧身坐着,右脚踏在旁边的一只凳子上,拎着酒壶仰头畅饮一口,一手指点着面前众人,一边说着自己从前行走江湖见过的奇人异事。Hello帝不时发出“怎么会这样好奇怪的事情”、“感觉很牛B的感叹。 + + + diff --git a/Document/rules.md b/Document/rules.md new file mode 100644 index 00000000..d9447136 --- /dev/null +++ b/Document/rules.md @@ -0,0 +1,135 @@ +wke 项目规范 +=========================== + +目的 +---- + +wke 对于研究 WebKit 是一个很好的项目,同时也可以作为网页的渲染引擎用于实际工程。目前原作者已经停止维护此项目,我个人 fork 出来自行维护,但希望有更多的人来参与研究、维护。为了此项目的长期良好地发展,有必要编写一份规范文档,以后的所有代码、文档、提交都应该按照此规范进行。 + +目录 +---- + +- [文档规范](#document-rules) +- [代码规范](#coding-rules) + - [命名规范](#code-naming) + - [总体规范](#code-naming-summary) + - [类型(类、结构体等)](#code-naming-type) + - [变量(变量、函数等)](#code-naming-variable) + - [常量(常量、宏等)](#code-naming-constant) + - [排版规范](#code-formating) + - [缩进](#code-formating-indent) + - [换行](#code-formating-newline) + - [空格](#code-formating-whitespace) + +---- + +### 文档规范 + +中文文档中的描述部分涉及的标点,应该使用中文全角。 + +### 代码规范: + +#### 命名规范 + +##### 总体规范 + +代码命名中应该尽量包含被命名实体的的功能性说明,不必包含它的类型信息,因为前者更能帮助阅读者理解整体代码。禁止使用匈牙利命名法。举例: +正确的命名: + +``` +class Student; +void study(Student* student); +void doHomeWork(Student* student); +``` +错误的命名: + +``` +class ClassStudent; //不需要包含类型信息。 +void functionStudy(ClassStudent* pClassStudent); //不需要包含类型信息。。 +void functionDoWork(ClassStudent* pClassStudent); //不需要包含类型信息。 +``` + +代码命名中涉及的单词应该避免缩写,除非名字包含的单词太多、某个单词特别长,或者该缩写是行业或团队通用的、常用的缩写,举例: +正确的命名: + +``` +class Student; +void study(Student* student); +void doHomeWork(Student* student); +double cpuUseage(); +``` + +错误的命名: + +``` +class Stu; //不必要的缩写。 +void study(Stu* s); //参数命名太简单,没有任何说明意义。 +void work(Stu* student); //函数命名意义不明确。 +double centralProcessingUnitUsage(); //应该使用公用的缩写。 +``` + + +##### 类型(类、结构体、枚举、函数指针类型等)命名 + +类型(类类型、结构体类型、枚举类型、函数指针类型等)的命名,使用大驼峰命名法(little camel-case),即:命名中的所有单词(或单词缩写,后面统称单词)第一个字母大写,单词之间紧靠排列(不用间隔符,如下划线)例如: + +``` +class SomeClass; +class SomeLongNameClass; +enum SomeEnum; +typedef void (*SomeFuncPointer)(); +``` + +##### 变量、函数命名 + +变量、函数的命名,使用小驼峰命名法(little camel-case),即:命名中的第一个单词全部小写,后续单词第一字母大写开始单词中的其余字母小写,单词之间紧靠排列(不用间隔符,如下划线)例如: + + +``` +void someFunction(); +void someLongNameFunction(); +int someVariable; +int someLongNameVariable; +``` + +根据函数的作用,函数命名应该进一步规范: + +- 若函数(包括成员函数和非成员函数)是执行操作,则直接以动作、功能的单词命名,如`doHomeWork`、`reportGrade`。 +- 若函数(包括成员函数和非成员函数)的功能是设置数据,则以`set`开头,并紧根要设置数据的名称,如`setNickName`。 +- 若成员函数的功能是获取成员数据,则直接以要获取的实体名称命名,如`Student::nickName`、`Student::grade`。 +- 若非成员函数的功能是获取数据,则使用`get`开头,并紧跟要获取数据的名称,如`getNickName`。 +- 若非成员函数的功能是获取 是/否 数据,则使用`is`开始,并紧跟要获取数据的名称,如`isEnglishPassed` + + +##### 宏、常量、枚等命名 + +宏、常量 、枚举的命名,使用全大写单词加下划线相连,如: + +``` +#define SOME_CONST_VALUE 123 +const int SOME_CONST_VALUE = 123; +enum SomeEnum +{ + SOME_VALUE_1, + SOME_VALUE_2 +}; +``` + +#### 排版规范 + +##### 缩进规范 + +缩进应该使用4个空格,以避免使用 TAB 时在不同编辑器中缩进混乱。 + +##### 换行规范 + +起始大括号应该换行再写。 + +##### 空格规范 + +- `if`、`while`、`for`之类的关键字之后空格再跟括号,如`if (...)`、`for (...)`、`while (...)`。 +- 标点之后加一个空格分隔实体,如`a, b, c`、`for (...; ...; ...)`、`a || b && c`。 +- 括号内第一个字符之前,最后一个字符之后不需要空格,如`(a)`,`(a, b, c)`。 + + +**待补充** \ No newline at end of file diff --git a/Document/tips.md b/Document/tips.md new file mode 100644 index 00000000..af08aa00 --- /dev/null +++ b/Document/tips.md @@ -0,0 +1,4 @@ +## 测试绑定对象功能 +运行wkeWebBrowser.exe,在地址栏输入`inject`回车,即可注册JS对象`test`,注册后就JS中可访问`test`对象的成员变量`value`和成员函数`msgbox`了。 +在地址栏输入`javascript:test.msgbox('1')`测试调用成员函数。 +在地址栏输入`javascript:document.write(test.value)`测试访问成员变量。 \ No newline at end of file diff --git a/Document/todo.md b/Document/todo.md new file mode 100644 index 00000000..05318d7d --- /dev/null +++ b/Document/todo.md @@ -0,0 +1,5 @@ +### HTTP_PROXY 的问题 +牧草(920370262) 提出的问题:wke 默认使用使用 HTTP_PROXY 环境变量设置的代理服务器连接,但现在使用 HTTP_PROXY 指定的 socks5 代理连接有问题。 + +### Cookie相关问题 +wke 目前 cookie 只能获取手动保存。需要增加自动保存到文件、并自动从文件恢复的功能。 \ No newline at end of file diff --git a/Document/utility.md b/Document/utility.md new file mode 100644 index 00000000..b96d088d --- /dev/null +++ b/Document/utility.md @@ -0,0 +1,51 @@ +### URL中文编码转换流程 + KURL::KURI + KURL::init + KURL.cpp::encodeRelativeString + TextEncoding::encode + TextEncodingICU::encode + +### 解析HTML、生成tag、处理tag属性、处理URL编码的调用堆栈。 + + wke.dll!WebCore::TextCodecUTF8::encode(const wchar_t * characters=0x0028e05c, unsigned int length=6, WebCore::UnencodableHandling __formal=URLEncodedEntitiesForUnencodables) 行309 C++ + wke.dll!WebCore::TextEncoding::encode(const wchar_t * characters=0x0028e05c, unsigned int length=6, WebCore::UnencodableHandling handling=URLEncodedEntitiesForUnencodables) 行107 + 0x39 字节 C++ + wke.dll!WebCore::encodeRelativeString(const WTF::String & rel={...}, const WebCore::TextEncoding & encoding={...}, WTF::Vector & output={...}) 行1686 C++ + wke.dll!WebCore::KURL::init(const WebCore::KURL & base={...}, const WTF::String & relative={...}, const WebCore::TextEncoding & encoding={...}) 行393 + 0x14 字节 C++ + wke.dll!WebCore::KURL::KURL(const WebCore::KURL & base={...}, const WTF::String & relative={...}, const WebCore::TextEncoding & encoding={...}) 行353 C++ + wke.dll!WebCore::Document::completeURL(const WTF::String & url={...}) 行3754 + 0x26 字节 C++ + wke.dll!WebCore::ImageLoader::updateFromElement() 行167 + 0x31 字节 C++ + wke.dll!WebCore::ImageLoader::updateFromElementIgnoringPreviousError() 行228 C++ + wke.dll!WebCore::HTMLImageElement::parseMappedAttribute(WebCore::Attribute * attr=0x02328558) 行107 + 0xb 字节 C++ + wke.dll!WebCore::StyledElement::attributeChanged(WebCore::Attribute * attr=0x02328558, bool preserveDecls=false) 行189 + 0x16 字节 C++ + wke.dll!WebCore::Element::setAttributeMap(WTF::PassRefPtr list={...}, WebCore::FragmentScriptingPermission scriptingPermission=FragmentScriptingAllowed) 行834 + 0x1d 字节 C++ + wke.dll!WebCore::HTMLConstructionSite::createHTMLElement(WebCore::AtomicHTMLToken & token={...}) 行384 C++ + wke.dll!WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement(WebCore::AtomicHTMLToken & token={...}) 行299 + 0x10 字节 C++ + wke.dll!WebCore::HTMLTreeBuilder::processStartTagForInBody(WebCore::AtomicHTMLToken & token={...}) 行911 C++ + wke.dll!WebCore::HTMLTreeBuilder::processStartTag(WebCore::AtomicHTMLToken & token={...}) 行1231 C++ + wke.dll!WebCore::HTMLTreeBuilder::processToken(WebCore::AtomicHTMLToken & token={...}) 行482 C++ + wke.dll!WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken(WebCore::AtomicHTMLToken & token={...}) 行467 C++ + wke.dll!WebCore::HTMLTreeBuilder::constructTreeFromToken(WebCore::HTMLToken & rawToken={...}) 行454 C++ + wke.dll!WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode mode=AllowYield) 行279 C++ + wke.dll!WebCore::HTMLDocumentParser::pumpTokenizerIfPossible(WebCore::HTMLDocumentParser::SynchronousMode mode=AllowYield) 行178 C++ + wke.dll!WebCore::HTMLDocumentParser::append(const WebCore::SegmentedString & source={...}) 行372 C++ + wke.dll!WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter * writer=0x0231f344, const char * data=0x023b0474, unsigned int length=174) 行50 + 0x1f 字节 C++ + wke.dll!WebCore::DocumentWriter::addData(const char * bytes=0x023b0474, unsigned int length=174) 行206 + 0x29 字节 C++ + wke.dll!WebCore::DocumentLoader::commitData(const char * bytes=0x023b0474, unsigned int length=174) 行318 C++ + wke.dll!wke::FrameLoaderClient::committedLoad(WebCore::DocumentLoader * loader=0x0231f278, const char * data=0x023b0474, int length=174) 行335 C++ + wke.dll!WebCore::DocumentLoader::commitLoad(const char * data=0x023b0474, int length=174) 行303 + 0x29 字节 C++ + wke.dll!WebCore::DocumentLoader::receivedData(const char * data=0x023b0474, int length=174) 行330 C++ + wke.dll!WebCore::MainResourceLoader::addData(const char * data=0x023b0474, int length=174, bool allAtOnce=false) 行169 C++ + wke.dll!WebCore::ResourceLoader::didReceiveData(const char * data=0x023b0474, int length=174, __int64 encodedDataLength=0, bool allAtOnce=false) 行287 + 0x1c 字节 C++ + wke.dll!WebCore::MainResourceLoader::didReceiveData(const char * data=0x023b0474, int length=174, __int64 encodedDataLength=0, bool allAtOnce=false) 行468 C++ + wke.dll!WebCore::ResourceLoader::didReceiveData(WebCore::ResourceHandle * __formal=0x0236ba78, const char * data=0x023b0474, int length=174, int encodedDataLength=0) 行441 + 0x1f 字节 C++ + wke.dll!WebCore::writeCallback(void * ptr=0x023b0474, unsigned int size=1, unsigned int nmemb=174, void * data=0x0236ba78) 行212 + 0x28 字节 C++ + wke.dll!_Curl_client_write() + 0xbb 字节 C + wke.dll!_libcurl_set_file_system() + 0x6f4 字节 C + wke.dll!_Curl_do() + 0x2f 字节 C + wke.dll!_curl_multi_remove_handle() + 0x76a 字节 C + wke.dll!_curl_multi_perform() + 0x92 字节 C + wke.dll!WebCore::ResourceHandleManager::downloadTimerCallback(WebCore::Timer * timer=0x02368b70) 行371 + 0x13 字节 C++ + wke.dll!WebCore::Timer::fired() 行100 + 0x23 字节 C++ + wke.dll!WebCore::ThreadTimers::sharedTimerFiredInternal() 行115 + 0xf 字节 C++ + wke.dll!WebCore::ThreadTimers::sharedTimerFired() 行94 C++ + wke.dll!WebCore::TimerWindowWndProc(HWND__ * hWnd=0x003c1ab0, unsigned int message=50733, unsigned int wParam=0, long lParam=0) 行103 + 0x8 字节 C++ diff --git a/Source/JavaScriptCore/API/JSObjectRef.cpp b/Source/JavaScriptCore/API/JSObjectRef.cpp index 5b97fbf4..39d7ef5f 100644 --- a/Source/JavaScriptCore/API/JSObjectRef.cpp +++ b/Source/JavaScriptCore/API/JSObjectRef.cpp @@ -129,7 +129,8 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - result = 0; + //cexer ǷֵӦڱɴʱͷأӦɵɡ + //result = 0; } return toRef(result); } @@ -153,7 +154,8 @@ JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSVa if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - result = 0; + //cexer ǷֵӦڱɴʱͷأӦɵɡ + //result = 0; } return toRef(result); @@ -173,7 +175,8 @@ JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSVal if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - result = 0; + //cexer ǷֵӦڱɴʱͷأӦɵɡ + //result = 0; } return toRef(result); @@ -192,7 +195,8 @@ JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSVa if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - result = 0; + //cexer ǷֵӦڱɴʱͷأӦɵɡ + //result = 0; } return toRef(result); @@ -212,7 +216,8 @@ JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSV if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - result = 0; + //cexer ǷֵӦڱɴʱͷأӦɵɡ + //result = 0; } return toRef(result); @@ -445,7 +450,8 @@ JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObject if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - result = 0; + //cexer ǷֵӦڱɴʱͷأӦɵɡ + //result = 0; } return result; } @@ -477,7 +483,8 @@ JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - result = 0; + //cexer ǷֵӦڱɴʱͷأӦɵɡ + //result = 0; } return result; } diff --git a/Source/JavaScriptCore/API/JSValueRef.cpp b/Source/JavaScriptCore/API/JSValueRef.cpp index 95116d77..6e482648 100644 --- a/Source/JavaScriptCore/API/JSValueRef.cpp +++ b/Source/JavaScriptCore/API/JSValueRef.cpp @@ -251,7 +251,8 @@ JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef apiValue, unsig if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - return 0; + //cexer ǷֵӦڱɴʱɣӦɵɡ + //return 0; } return OpaqueJSString::create(result).leakRef(); } @@ -277,7 +278,8 @@ double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - number = std::numeric_limits::quiet_NaN(); + //cexer ǷֵӦڱɴʱɣӦɵɡ + //number = std::numeric_limits::quiet_NaN(); } return number; } @@ -294,7 +296,8 @@ JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - stringRef.clear(); + //cexer ǷֵӦڱɴʱɣӦɵɡ + //stringRef.clear(); } return stringRef.release().leakRef(); } @@ -311,7 +314,8 @@ JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exce if (exception) *exception = toRef(exec, exec->exception()); exec->clearException(); - objectRef = 0; + //cexer ǷֵӦڱɴʱɣӦɵɡ + //objectRef = 0; } return objectRef; } diff --git a/Source/JavaScriptCore/heap/AllocationSpace.h b/Source/JavaScriptCore/heap/AllocationSpace.h index 052c791c..94332c74 100644 --- a/Source/JavaScriptCore/heap/AllocationSpace.h +++ b/Source/JavaScriptCore/heap/AllocationSpace.h @@ -44,7 +44,7 @@ class AllocationSpace { { } - typedef HashSet::iterator BlockIterator; + typedef HashSet::const_iterator BlockIterator; MarkedBlockSet& blocks() { return m_blocks; } MarkedSpace::SizeClass& sizeClassFor(size_t bytes) { return m_markedSpace.sizeClassFor(bytes); } diff --git a/Source/JavaScriptCore/parser/JSParser.cpp b/Source/JavaScriptCore/parser/JSParser.cpp index 59bff314..fa3c0fb0 100644 --- a/Source/JavaScriptCore/parser/JSParser.cpp +++ b/Source/JavaScriptCore/parser/JSParser.cpp @@ -739,8 +739,8 @@ class JSParser { void copyCapturedVariablesToVector(const IdentifierSet& capturedVariables, Vector >& vector) { - IdentifierSet::iterator end = capturedVariables.end(); - for (IdentifierSet::iterator it = capturedVariables.begin(); it != end; ++it) { + IdentifierSet::const_iterator end = capturedVariables.end(); + for (IdentifierSet::const_iterator it = capturedVariables.begin(); it != end; ++it) { if (m_declaredVariables.contains(*it)) continue; vector.append(*it); diff --git a/Source/JavaScriptCore/wtf/HashSet.h b/Source/JavaScriptCore/wtf/HashSet.h index 2b0c88f7..0b06dd7b 100644 --- a/Source/JavaScriptCore/wtf/HashSet.h +++ b/Source/JavaScriptCore/wtf/HashSet.h @@ -26,232 +26,259 @@ namespace WTF { - template class HashSet; - template - void deleteAllValues(const HashSet&); - template - void fastDeleteAllValues(const HashSet&); - - template struct IdentityExtractor; - - template::Hash, - typename TraitsArg = HashTraits > class HashSet { - WTF_MAKE_FAST_ALLOCATED; - private: - typedef HashArg HashFunctions; - typedef TraitsArg ValueTraits; - - public: - typedef typename ValueTraits::TraitType ValueType; - - private: - typedef HashTable, - HashFunctions, ValueTraits, ValueTraits> HashTableType; - - public: - typedef HashTableConstIteratorAdapter iterator; - typedef HashTableConstIteratorAdapter const_iterator; - - void swap(HashSet&); - - int size() const; - int capacity() const; - bool isEmpty() const; - - iterator begin() const; - iterator end() const; - - iterator find(const ValueType&) const; - bool contains(const ValueType&) const; - - // An alternate version of find() that finds the object by hashing and comparing - // with some other type, to avoid the cost of type conversion. HashTranslator - // must have the following function members: - // static unsigned hash(const T&); - // static bool equal(const ValueType&, const T&); - template iterator find(const T&) const; - template bool contains(const T&) const; - - // The return value is a pair of an interator to the new value's location, - // and a bool that is true if an new entry was added. - pair add(const ValueType&); - - // An alternate version of add() that finds the object by hashing and comparing - // with some other type, to avoid the cost of type conversion if the object is already - // in the table. HashTranslator must have the following function members: - // static unsigned hash(const T&); - // static bool equal(const ValueType&, const T&); - // static translate(ValueType&, const T&, unsigned hashCode); - template pair add(const T&); - - void remove(const ValueType&); - void remove(iterator); - void clear(); - - private: - friend void deleteAllValues<>(const HashSet&); - friend void fastDeleteAllValues<>(const HashSet&); - - HashTableType m_impl; - }; - - template struct IdentityExtractor { - static const T& extract(const T& t) { return t; } - }; - - template - struct HashSetTranslatorAdapter { - static unsigned hash(const T& key) { return Translator::hash(key); } - static bool equal(const ValueType& a, const T& b) { return Translator::equal(a, b); } - static void translate(ValueType& location, const T& key, const T&, unsigned hashCode) - { - Translator::translate(location, key, hashCode); - } - }; - - template - inline void HashSet::swap(HashSet& other) - { - m_impl.swap(other.m_impl); - } - - template - inline int HashSet::size() const - { - return m_impl.size(); - } - - template - inline int HashSet::capacity() const - { - return m_impl.capacity(); - } - - template - inline bool HashSet::isEmpty() const - { - return m_impl.isEmpty(); - } - - template - inline typename HashSet::iterator HashSet::begin() const - { - return m_impl.begin(); - } - - template - inline typename HashSet::iterator HashSet::end() const - { - return m_impl.end(); - } - - template - inline typename HashSet::iterator HashSet::find(const ValueType& value) const - { - return m_impl.find(value); - } - - template - inline bool HashSet::contains(const ValueType& value) const - { - return m_impl.contains(value); - } - - template - template - typename HashSet::iterator - inline HashSet::find(const T& value) const - { - typedef HashSetTranslatorAdapter Adapter; - return m_impl.template find(value); - } - - template - template - inline bool HashSet::contains(const T& value) const - { - typedef HashSetTranslatorAdapter Adapter; - return m_impl.template contains(value); - } - - template - inline pair::iterator, bool> HashSet::add(const ValueType& value) - { - return m_impl.add(value); - } - - template - template - inline pair::iterator, bool> - HashSet::add(const T& value) - { - typedef HashSetTranslatorAdapter Adapter; - return m_impl.template addPassingHashCode(value, value); - } - - template - inline void HashSet::remove(iterator it) - { - if (it.m_impl == m_impl.end()) - return; - m_impl.internalCheckTableConsistency(); - m_impl.removeWithoutEntryConsistencyCheck(it.m_impl); - } - - template - inline void HashSet::remove(const ValueType& value) - { - remove(find(value)); - } - - template - inline void HashSet::clear() - { - m_impl.clear(); - } - - template - void deleteAllValues(HashTableType& collection) - { - typedef typename HashTableType::const_iterator iterator; - iterator end = collection.end(); - for (iterator it = collection.begin(); it != end; ++it) - delete *it; - } - - template - inline void deleteAllValues(const HashSet& collection) - { - deleteAllValues::ValueType>(collection.m_impl); - } - - template - void fastDeleteAllValues(HashTableType& collection) - { - typedef typename HashTableType::const_iterator iterator; - iterator end = collection.end(); - for (iterator it = collection.begin(); it != end; ++it) - fastDelete(*it); - } - - template - inline void fastDeleteAllValues(const HashSet& collection) - { - fastDeleteAllValues::ValueType>(collection.m_impl); - } - - template - inline void copyToVector(const HashSet& collection, W& vector) - { - typedef typename HashSet::const_iterator iterator; - - vector.resize(collection.size()); - - iterator it = collection.begin(); - iterator end = collection.end(); - for (unsigned i = 0; it != end; ++it, ++i) - vector[i] = *it; - } + template class HashSet; + template + void deleteAllValues(const HashSet&); + template + void fastDeleteAllValues(const HashSet&); + + template struct IdentityExtractor; + + template::Hash, + typename TraitsArg = HashTraits > class HashSet { + WTF_MAKE_FAST_ALLOCATED; + private: + typedef HashArg HashFunctions; + typedef TraitsArg ValueTraits; + + public: + typedef typename ValueTraits::TraitType ValueType; + + private: + typedef HashTable, + HashFunctions, ValueTraits, ValueTraits> HashTableType; + + public: + typedef HashTableIteratorAdapter iterator; + typedef HashTableConstIteratorAdapter const_iterator; + + void swap(HashSet&); + + int size() const; + int capacity() const; + bool isEmpty() const; + + iterator begin(); + iterator end(); + const_iterator begin() const; + const_iterator end() const; + + iterator find(const ValueType&); + const_iterator find(const ValueType&) const; + bool contains(const ValueType&) const; + + // An alternate version of find() that finds the object by hashing and comparing + // with some other type, to avoid the cost of type conversion. HashTranslator + // must have the following function members: + // static unsigned hash(const T&); + // static bool equal(const ValueType&, const T&); + template iterator find(const T&); + template const_iterator find(const T&) const; + template bool contains(const T&) const; + + // The return value is a pair of an interator to the new value's location, + // and a bool that is true if an new entry was added. + pair add(const ValueType&); + + // An alternate version of add() that finds the object by hashing and comparing + // with some other type, to avoid the cost of type conversion if the object is already + // in the table. HashTranslator must have the following function members: + // static unsigned hash(const T&); + // static bool equal(const ValueType&, const T&); + // static translate(ValueType&, const T&, unsigned hashCode); + template pair add(const T&); + + void remove(const ValueType&); + void remove(iterator); + void clear(); + + private: + friend void deleteAllValues<>(const HashSet&); + friend void fastDeleteAllValues<>(const HashSet&); + + HashTableType m_impl; + }; + + template struct IdentityExtractor { + static const T& extract(const T& t) { return t; } + }; + + template + struct HashSetTranslatorAdapter { + static unsigned hash(const T& key) { return Translator::hash(key); } + static bool equal(const ValueType& a, const T& b) { return Translator::equal(a, b); } + static void translate(ValueType& location, const T& key, const T&, unsigned hashCode) + { + Translator::translate(location, key, hashCode); + } + }; + + template + inline void HashSet::swap(HashSet& other) + { + m_impl.swap(other.m_impl); + } + + template + inline int HashSet::size() const + { + return m_impl.size(); + } + + template + inline int HashSet::capacity() const + { + return m_impl.capacity(); + } + + template + inline bool HashSet::isEmpty() const + { + return m_impl.isEmpty(); + } + + template + inline typename HashSet::iterator HashSet::begin() + { + return m_impl.begin(); + } + + template + inline typename HashSet::iterator HashSet::end() + { + return m_impl.end(); + } + + template + inline typename HashSet::const_iterator HashSet::begin() const + { + return m_impl.begin(); + } + template + inline typename HashSet::const_iterator HashSet::end() const + { + return m_impl.end(); + } + template + inline typename HashSet::iterator HashSet::find(const ValueType& value) + { + return m_impl.find(value); + } + template + inline typename HashSet::const_iterator HashSet::find(const ValueType& value) const + { + return m_impl.find(value); + } + + template + inline bool HashSet::contains(const ValueType& value) const + { + return m_impl.contains(value); + } + + template + template + typename HashSet::iterator + inline HashSet::find(const T& value) + { + typedef HashSetTranslatorAdapter Adapter; + return m_impl.template find(value); + } + template + template + typename HashSet::const_iterator + inline HashSet::find(const T& value) const + { + typedef HashSetTranslatorAdapter Adapter; + return m_impl.template find(value); + } + + template + template + inline bool HashSet::contains(const T& value) const + { + typedef HashSetTranslatorAdapter Adapter; + return m_impl.template contains(value); + } + + template + pair::iterator, bool> HashSet::add(const ValueType& value) + { + return m_impl.add(value); + } + + template + template + inline pair::iterator, bool> + HashSet::add(const T& value) + { + typedef HashSetTranslatorAdapter Adapter; + return m_impl.template addPassingHashCode(value, value); + } + + template + inline void HashSet::remove(iterator it) + { + if (it.m_impl == m_impl.end()) + return; + m_impl.internalCheckTableConsistency(); + m_impl.removeWithoutEntryConsistencyCheck(it.m_impl); + } + + template + inline void HashSet::remove(const ValueType& value) + { + remove(find(value)); + } + + template + inline void HashSet::clear() + { + m_impl.clear(); + } + + template + void deleteAllValues(HashTableType& collection) + { + typedef typename HashTableType::const_iterator iterator; + iterator end = collection.end(); + for (iterator it = collection.begin(); it != end; ++it) + delete *it; + } + + template + inline void deleteAllValues(const HashSet& collection) + { + deleteAllValues::ValueType>(collection.m_impl); + } + + template + void fastDeleteAllValues(HashTableType& collection) + { + typedef typename HashTableType::const_iterator iterator; + iterator end = collection.end(); + for (iterator it = collection.begin(); it != end; ++it) + fastDelete(*it); + } + + template + inline void fastDeleteAllValues(const HashSet& collection) + { + fastDeleteAllValues::ValueType>(collection.m_impl); + } + + template + inline void copyToVector(const HashSet& collection, W& vector) + { + typedef typename HashSet::const_iterator iterator; + + vector.resize(collection.size()); + + iterator it = collection.begin(); + iterator end = collection.end(); + for (unsigned i = 0; it != end; ++it, ++i) + vector[i] = *it; + } } // namespace WTF diff --git a/Source/JavaScriptCore/wtf/MathExtras.h b/Source/JavaScriptCore/wtf/MathExtras.h index 0b454ce7..5e6b734c 100644 --- a/Source/JavaScriptCore/wtf/MathExtras.h +++ b/Source/JavaScriptCore/wtf/MathExtras.h @@ -141,7 +141,11 @@ inline long long abs(long long num) { return _abs64(num); } inline bool isinf(double num) { return !_finite(num) && !_isnan(num); } inline bool isnan(double num) { return !!_isnan(num); } + +// cexer vs2013ϵmath.hаЩ +#if defined(_MSC_VER) && (_MSC_VER < 1800) //< VS2013 inline bool signbit(double num) { return _copysign(1.0, num) < 0; } +#endif inline double nextafter(double x, double y) { return _nextafter(x, y); } inline float nextafterf(float x, float y) { return x > y ? x - FLT_EPSILON : x + FLT_EPSILON; } diff --git a/Source/WebCore/dom/ShadowInclusionSelector.h b/Source/WebCore/dom/ShadowInclusionSelector.h index 0310ab55..6aa27f75 100644 --- a/Source/WebCore/dom/ShadowInclusionSelector.h +++ b/Source/WebCore/dom/ShadowInclusionSelector.h @@ -119,7 +119,7 @@ class ShadowInclusionSet { inline ShadowInclusion* ShadowInclusionSet::find(Node* key) const { - PointerSet::iterator found = m_set.find(key); + PointerSet::const_iterator found = m_set.find(key); return found != m_set.end() ? *found : 0; } diff --git a/Source/WebCore/loader/EmptyClients.h b/Source/WebCore/loader/EmptyClients.h index 77128b73..6f346180 100644 --- a/Source/WebCore/loader/EmptyClients.h +++ b/Source/WebCore/loader/EmptyClients.h @@ -285,12 +285,12 @@ class EmptyFrameLoaderClient : public FrameLoaderClient { virtual void dispatchDidCommitLoad() { } virtual void dispatchDidFailProvisionalLoad(const ResourceError&) { } virtual void dispatchDidFailLoad(const ResourceError&) { } - virtual void dispatchDidFinishDocumentLoad() { } + virtual void dispatchDidFinishDocumentLoad(FrameLoader* loader) { } virtual void dispatchDidFinishLoad() { } virtual void dispatchDidFirstLayout() { } virtual void dispatchDidFirstVisuallyNonEmptyLayout() { } - virtual Frame* dispatchCreatePage(const NavigationAction&) { return 0; } + virtual Frame* dispatchCreatePage(const NavigationAction& action, const ResourceRequest& request, PassRefPtr formState, const String& frameName) { return 0; } virtual void dispatchShow() { } virtual void dispatchDecidePolicyForResponse(FramePolicyFunction, const ResourceResponse&, const ResourceRequest&) { } diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp index ea800115..493db48d 100644 --- a/Source/WebCore/loader/FrameLoader.cpp +++ b/Source/WebCore/loader/FrameLoader.cpp @@ -668,7 +668,7 @@ void FrameLoader::finishedParsing() // Null-checking the FrameView indicates whether or not we're in the destructor. RefPtr protector = m_frame->view() ? m_frame : 0; - m_client->dispatchDidFinishDocumentLoad(); + m_client->dispatchDidFinishDocumentLoad(this); checkCompleted(); @@ -2860,7 +2860,7 @@ void FrameLoader::continueLoadAfterNewWindowPolicy(const ResourceRequest& reques return; RefPtr frame = m_frame; - RefPtr mainFrame = m_client->dispatchCreatePage(action); + RefPtr mainFrame = m_client->dispatchCreatePage(action, request, formState, frameName); if (!mainFrame) return; diff --git a/Source/WebCore/loader/FrameLoaderClient.h b/Source/WebCore/loader/FrameLoaderClient.h index 0f884ae1..f1bfa3b8 100644 --- a/Source/WebCore/loader/FrameLoaderClient.h +++ b/Source/WebCore/loader/FrameLoaderClient.h @@ -152,14 +152,14 @@ namespace WebCore { virtual void dispatchDidCommitLoad() = 0; virtual void dispatchDidFailProvisionalLoad(const ResourceError&) = 0; virtual void dispatchDidFailLoad(const ResourceError&) = 0; - virtual void dispatchDidFinishDocumentLoad() = 0; + virtual void dispatchDidFinishDocumentLoad(FrameLoader* loader) = 0; virtual void dispatchDidFinishLoad() = 0; virtual void dispatchDidFirstLayout() = 0; virtual void dispatchDidFirstVisuallyNonEmptyLayout() = 0; virtual void dispatchDidLayout() { } - virtual Frame* dispatchCreatePage(const NavigationAction&) = 0; + virtual Frame* dispatchCreatePage(const NavigationAction& action, const ResourceRequest& request, PassRefPtr formState, const String& frameName) = 0; virtual void dispatchShow() = 0; virtual void dispatchDecidePolicyForResponse(FramePolicyFunction, const ResourceResponse&, const ResourceRequest&) = 0; diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp index 5fd3aafa..ac71bf7f 100644 --- a/Source/WebCore/page/FrameView.cpp +++ b/Source/WebCore/page/FrameView.cpp @@ -866,8 +866,8 @@ static inline void collectFrameViewChildren(FrameView* frameView, Vector >* viewChildren = frameView->children(); ASSERT(viewChildren); - const HashSet >::iterator end = viewChildren->end(); - for (HashSet >::iterator current = viewChildren->begin(); current != end; ++current) { + const HashSet >::const_iterator end = viewChildren->end(); + for (HashSet >::const_iterator current = viewChildren->begin(); current != end; ++current) { Widget* widget = (*current).get(); if (widget->isFrameView()) frameViews.append(static_cast(widget)); diff --git a/Source/WebCore/platform/KURL.cpp b/Source/WebCore/platform/KURL.cpp index 7cf9d958..f2fa35c1 100644 --- a/Source/WebCore/platform/KURL.cpp +++ b/Source/WebCore/platform/KURL.cpp @@ -1673,7 +1673,9 @@ static void encodeRelativeString(const String& rel, const TextEncoding& encoding UCharBuffer s; encodeHostnames(rel, s); - TextEncoding pathEncoding(UTF8Encoding()); // Path is always encoded as UTF-8; other parts may depend on the scheme. + //cexer Windows·ӦʹGBK + TextEncoding pathEncoding("GBK"); + //TextEncoding pathEncoding(UTF8Encoding()); // Path is always encoded as UTF-8; other parts may depend on the scheme. int pathEnd = -1; if (encoding != pathEncoding && encoding.isValid() && !protocolIs(rel, "mailto") && !protocolIs(rel, "data") && !protocolIsJavaScript(rel)) { diff --git a/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp b/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp index 1443198c..706a46c7 100644 --- a/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp +++ b/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp @@ -443,7 +443,7 @@ void ResourceHandleManager::setProxyInfo(const String& host, if (username.length() || password.length()) userPass = username + ":" + password + "@"; - m_proxy = String("http://") + userPass + host + ":" + String::number(port); + m_proxy = userPass + host + ":" + String::number(port); } } diff --git a/Source/WebCore/platform/network/curl/SocketStreamHandle.h b/Source/WebCore/platform/network/curl/SocketStreamHandle.h index d61404d4..7f5f2a8b 100644 --- a/Source/WebCore/platform/network/curl/SocketStreamHandle.h +++ b/Source/WebCore/platform/network/curl/SocketStreamHandle.h @@ -37,6 +37,8 @@ #include #include +typedef struct SocketInfo SocketInfo; + namespace WebCore { class AuthenticationChallenge; @@ -61,6 +63,12 @@ namespace WebCore { void receivedCredential(const AuthenticationChallenge&, const Credential&); void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&); void receivedCancellation(const AuthenticationChallenge&); + public: + SocketInfo* info; + USHORT HostPort(){ return m_url.port(); } + ULONG GetHostIp(); + void SetState_Opend(){ m_state = Open; } + void SetState_Closed(){ m_state = Closed; } }; } // namespace WebCore diff --git a/Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp b/Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp index 66576379..f1e68946 100644 --- a/Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp +++ b/Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp @@ -30,60 +30,375 @@ */ #include "config.h" + +#include #include "SocketStreamHandle.h" +#include "SocketStreamError.h" #include "KURL.h" #include "Logging.h" #include "NotImplemented.h" #include "SocketStreamHandleClient.h" +#include "wtf/text/cstring.h" +#include +#include + +#define SafeDeleteArray(p) {if(p){delete []((char*)p);p=0;}} + +#define IpAddrIsOk(ip) ((ip)!=0 && (ip)!=(~0)) +#define IpAddrIsBad(ip) ((ip)==0 || (ip)==(~0)) +#define SocketIsOk(s) ((s)!=0 && (s)!=(~0)) +#define SocketIsBad(s) ((s)==0 || (s)==(~0)) +#define IsSocketConnected( sock, nTimeout ) socket_select( sock, FALSE, nTimeout ) + +enum{ + ReasonForOnconnect, + ReasonForReceivedData, + ReasonForDisconnect, +}; + +enum WsConnectState{ + WsStateConnenting, + WsStateConnented, + WsStateDisconnected, + WsStateDestroying +}; + +typedef struct _DList { + struct _DList *next,*prev; +}DList,*LPDList; + +__forceinline void DListInit(DList& node){ node.next = &node; node.prev = &node; } + +__forceinline void DListRemove( LPDList pList ){ //ɾһڵ + if( pList->next ){ + pList->prev->next = pList->next; + pList->next->prev = pList->prev; + pList->next = 0; + pList->prev = 0; + } +} + +class CDList{ +public: + __forceinline CDList() { DListInit(node); } + __forceinline DList* Ptr() { return &node; } + __forceinline BOOL IsEmpty() { return node.next == &node; } + __forceinline LPDList FindFirst() { return node.next == &node ? 0 :node.next; } + __forceinline LPDList FindLast() { return node.prev == &node ? 0 :node.prev; } + __forceinline LPDList FindNext(LPDList pNode) { return pNode->next == &node ? 0 :pNode->next; } + __forceinline LPDList FindPrevious(LPDList pNode) { return pNode->prev == &node ? 0 :pNode->prev; } + __forceinline void RemoveSelf() { DListRemove( &node ); } // ԼжϿ + __forceinline void InsertHead(LPDList pNode){ //λһڵ + pNode->prev = &node; + pNode->next = node.next; + node.next = pNode; + pNode->next->prev = pNode; + } + __forceinline void InsertTail(LPDList pNode){ //βλһڵ + pNode->next = &node; + pNode->prev = node.prev; + pNode->prev->next = pNode; + node.prev = pNode; + } + + ULONG Count(){ //ýڵ + ULONG iCount = 0; + LPDList pNode = FindFirst(); + while( pNode ){ + iCount ++; + pNode = FindNext( pNode ); + } + return iCount; + } + ULONG GetTopCount(ULONG nTop){ //Сڵ + ULONG iCount = 0; + LPDList pNode = FindFirst(); + while( pNode ){ + iCount ++; if( iCount >= nTop )break; + pNode = FindNext( pNode ); + } + return iCount; + } +public: + DList node; +}; + +class CLockHandle{ +public: + CLockHandle( WTF::Mutex* lpCS){ + __try{ lpCS->lock(); lpcs = lpCS; mIsLocked = TRUE; } + __except(1){ lpcs = NULL; mIsLocked = FALSE; } + } + ~CLockHandle() { if( mIsLocked && lpcs ) { lpcs->unlock(); mIsLocked = FALSE; } } + void Unlock() { if( mIsLocked && lpcs ) { lpcs->unlock(); mIsLocked = FALSE; } } + void Lock() { if( !mIsLocked && lpcs ){ lpcs->lock(); mIsLocked = TRUE; } } + BOOL mIsLocked; + WTF::Mutex* lpcs; +}; + + +template +class CxQueue{ +public: + ~CxQueue() { Clear(); } + _Type* InsertTail(_Type* pData) { CLockHandle lock(&m_Lock);m_Qs.InsertTail(&pData->node); return pData; } + ULONG GetCount() { CLockHandle lock(&m_Lock);return m_Qs.Count(); } + ULONG GetTopCount(ULONG nTop) { CLockHandle lock(&m_Lock);return m_Qs.GetTopCount(nTop); } + BOOL IsEmpty() { CLockHandle lock(&m_Lock);return m_Qs.FindFirst() == 0; } + void Clear(){ + _Type* q; + //CLockHandle lock(&m_Lock); + while( (q = GetWithRemoveFromHead()) != NULL){delete q;} + } + _Type* GetWithRemoveFromHead(){ + CLockHandle lock(&m_Lock); + LPDList q = m_Qs.FindFirst(); + if( !q )return 0; + DListRemove( q ); + return CONTAINING_RECORD(q,_Type,node); + } +private: + Mutex m_Lock; + CDList m_Qs; +}; + +struct WS_SendInfo{ + DList node; + char* data; + int len; + WS_SendInfo( const char* buf, int buf_len) { data = new char[buf_len+1]; memcpy( data, buf, buf_len ); len = buf_len; data[buf_len] = 0; } + ~WS_SendInfo() { SafeDeleteArray( data ); } +}; +typedef CxQueue CSendInfo; + +struct SocketInfo{ + WebCore::SocketStreamHandle* ws; + int reason; + ULONG HostIp; + USHORT wPort; + WsConnectState wsState; + CSendInfo mQueue; + char data[1024]; + int dataLen; + SocketInfo( WebCore::SocketStreamHandle* p ){ ws = p; } +}; namespace WebCore { -SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client) - : SocketStreamHandleBase(url, client) -{ - LOG(Network, "SocketStreamHandle %p new client %p", this, m_client); - notImplemented(); +void MainThreadCallForWebSocket( void* invocation ){ + SocketInfo* info = ((SocketInfo*)invocation); + switch( info->reason ){ + case ReasonForOnconnect: + if( info->wsState != WsStateConnenting ){ return; } + info->wsState = WsStateConnented; + info->ws->SetState_Opend(); + info->ws->client()->didOpenSocketStream( info->ws ); + break; + case ReasonForReceivedData: + if( info->wsState != WsStateConnented ){ return; } + info->ws->client()->didReceiveSocketStreamData( info->ws, info->data, info->dataLen ); + break; + case ReasonForDisconnect: + if( info->wsState != WsStateConnented ){ return; } + info->wsState = WsStateDisconnected; + info->ws->SetState_Closed(); + info->ws->client()->didCloseSocketStream( info->ws ); + break; + } } -SocketStreamHandle::~SocketStreamHandle() -{ - LOG(Network, "SocketStreamHandle %p delete", this); - setClient(0); - notImplemented(); +__inline BOOL SetSocketNonBlock(SOCKET s,ULONG isTrue){ + return 0 == ioctlsocket(s, FIONBIO,&isTrue); } -int SocketStreamHandle::platformSend(const char*, int) -{ - LOG(Network, "SocketStreamHandle %p platformSend", this); - notImplemented(); - return 0; + +void FillSockAddr(void* p_sockaddr_in,ULONG ip,USHORT port,SHORT ifamily){ + sockaddr_in* remote=(sockaddr_in*)p_sockaddr_in; + memset(remote,0,sizeof(sockaddr_in)); + remote->sin_family = ifamily; + remote->sin_port = htons(port); + remote->sin_addr.S_un.S_addr = ip; + //remote->sin_addr.s_addr = ip; } -void SocketStreamHandle::platformClose() -{ - LOG(Network, "SocketStreamHandle %p platformClose", this); - notImplemented(); +void s_CloseSocket(SOCKET &s){ + if(SocketIsBad(s))return; + LINGER lingerStruct={1,0}; + setsockopt(s,SOL_SOCKET, SO_LINGER,(char*)&lingerStruct,sizeof(lingerStruct)); + closesocket( s ); + s = INVALID_SOCKET; +} + +BOOL socket_select( SOCKET s, BOOL isRead, LONG nTimeOut ){ + fd_set fd; + timeval timeout; + FD_ZERO(&fd); + FD_SET((ULONG)s, &fd); + timeout.tv_sec = 0; // + timeout.tv_usec = nTimeOut * 1000; // 1/1000 Ϊ 1/1000000 + return ( isRead ) ? 1 == select( 0, &fd, NULL, NULL, &timeout ) : 1 == select( 0, NULL, &fd, NULL, &timeout ); +} + +__forceinline ULONG GetSocketRecvBytes( SOCKET sk ){ + ULONG uCount; + return 0 == ioctlsocket( sk , FIONREAD , &uCount ) ? uCount : 0; +} + +SOCKET SocketConnect(DWORD ip,WORD wPort,DWORD ipLocal,LONG iTimeOut){ + SOCKET sockfd = INVALID_SOCKET; + do { + + if (IpAddrIsBad(ip))break; + sockfd = socket(AF_INET, SOCK_STREAM, 0); + if( sockfd == INVALID_SOCKET)break; + + sockaddr_in addr; + FillSockAddr( &addr, ipLocal, htons(0), AF_INET); + if (bind(sockfd, (struct sockaddr *)&addr, sizeof(addr)) == INVALID_SOCKET)break; + + addr.sin_port = htons(wPort); + addr.sin_addr.s_addr = ip; + if(!SetSocketNonBlock(sockfd,true))break;//Ϊģʽ + + //Blockģʽ᷵SOCKET_ERROR,Ҳȴ + if(connect(sockfd, (const sockaddr*) &addr, sizeof(addr)) == INVALID_SOCKET){ + if( !IsSocketConnected( sockfd, iTimeOut ) ){ + break;// ڹ涨ʱ connect ɹ + } + } + if( !SetSocketNonBlock( sockfd, false ) )break;// ģʽ + return sockfd; + } while(0); + if(sockfd != INVALID_SOCKET)closesocket(sockfd); + return INVALID_SOCKET; } -void SocketStreamHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge&) +ULONG GetIpaddr(const char *pszHost) { + hostent *lpHostent; + __try + { + lpHostent = gethostbyname(pszHost); + if(lpHostent==NULL)return 0; + return *(ULONG *)*(lpHostent->h_addr_list); + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + return 0; + } +} + + +unsigned __stdcall WebSocketThread( void* p ){ + SocketInfo* info = (SocketInfo*)p; + //Sleep(100); + + SOCKET sock = SocketConnect( info->HostIp, info->wPort, INADDR_ANY, 5000 ); + + // WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "-------->WebSocket BEGIN %d.%d.%d.%d:%d SOCKET=%d", ipfmt(info->HostIp), info->wPort, sock ); + + if( SocketIsOk(sock) ){ + info->reason = ReasonForOnconnect; + callOnMainThreadAndWait( MainThreadCallForWebSocket, info ); + + while( WsStateConnented == info->wsState && SocketIsOk(sock) ){ + ULONG bytes = GetSocketRecvBytes( sock ); + if( bytes ){ + // ݽվȽ + memset( info->data, 0, sizeof(info->data) ); + if( bytes >= sizeof(info->data) ){ + bytes = ( sizeof(info->data) - 1 ); + } + info->dataLen = recv( sock, info->data, bytes, 0 ); + if( info->dataLen > 0 ){ + info->data[info->dataLen] = 0; + info->reason = ReasonForReceivedData; + // WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "-------->R %d.%s", info->dataLen, info->data ); + callOnMainThreadAndWait( MainThreadCallForWebSocket, info ); + }else{ + s_CloseSocket( sock ); + } + }else{ + // ȡҪ͵ + int iCount = 0; + for( ;WsStateConnented == info->wsState; iCount++){ + WS_SendInfo* si = info->mQueue.GetWithRemoveFromHead(); + if( !si ){ break; } + BOOL isSendOK = si->len == send( sock, si->data, si->len, 0 ); + // WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "-------->S %d.%s SendOK=%d", si->len, si->data, isSendOK ); + delete si; + if( !isSendOK ){ + s_CloseSocket( sock ); + break; + } + } + if( !iCount ){ + Sleep(10); // ûнպͷ͵ݾSleep + } + } + } + } + + s_CloseSocket( sock ); + info->reason = ReasonForDisconnect; + callOnMainThreadAndWait( MainThreadCallForWebSocket, info ); + + // WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "-------->Websocket disconnected" ); + + while( WsStateDestroying != info->wsState ){ Sleep(10); } // ȴرձ־ + delete info; // ɾSocket + return 0; +} + +ULONG SocketStreamHandle::GetHostIp(){ + return GetIpaddr( m_url.host().utf8().data() ); +} + +SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client) : SocketStreamHandleBase(url, client), info(NULL) { + info = new SocketInfo( this ); + info->HostIp = GetHostIp(); + info->wPort = info->ws->HostPort() ? info->ws->HostPort() : 80; + info->wsState = WsStateConnenting; + CloseHandle( (HANDLE)_beginthreadex( 0, 0, WebSocketThread, info, 0, 0 ) ); +} + +void SocketStreamHandle::platformClose(){ + if( info ){ + info->wsState = WsStateDestroying; + SetState_Closed(); + info = NULL; + } +} + +SocketStreamHandle::~SocketStreamHandle(){ + platformClose(); +} + + +int SocketStreamHandle::platformSend(const char* data, int dataLen ){ + if( info && info->wsState == WsStateConnented ){ + info->mQueue.InsertTail( new WS_SendInfo(data,dataLen) ); + return dataLen; + } + return 0; +} + + +void SocketStreamHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge&){ notImplemented(); } -void SocketStreamHandle::receivedCredential(const AuthenticationChallenge&, const Credential&) -{ +void SocketStreamHandle::receivedCredential(const AuthenticationChallenge&, const Credential&){ notImplemented(); } -void SocketStreamHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&) -{ +void SocketStreamHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&){ notImplemented(); } -void SocketStreamHandle::receivedCancellation(const AuthenticationChallenge&) -{ +void SocketStreamHandle::receivedCancellation(const AuthenticationChallenge&){ notImplemented(); } -} // namespace WebCore +} // namespace WebCore diff --git a/Source/WebCore/plugins/win/PluginDatabaseWin.cpp b/Source/WebCore/plugins/win/PluginDatabaseWin.cpp index 3d173852..7fca221c 100644 --- a/Source/WebCore/plugins/win/PluginDatabaseWin.cpp +++ b/Source/WebCore/plugins/win/PluginDatabaseWin.cpp @@ -137,8 +137,10 @@ void PluginDatabase::getPluginPathsInDirectories(HashSet& paths) const continue; String filename = String(findFileData.cFileName, wcslen(findFileData.cFileName)); - if ((!filename.startsWith("np", false) || !filename.endsWith("dll", false)) && - (!equalIgnoringCase(filename, "Plugin.dll") || !it->endsWith("Shockwave 10", false))) + + //cexer npͷIJԶ + //if ((!filename.startsWith("np", false) || !filename.endsWith("dll", false)) && + if (!filename.endsWith("dll", false) && (!equalIgnoringCase(filename, "Plugin.dll") || !it->endsWith("Shockwave 10", false))) continue; String fullPath = *it + "\\" + filename; @@ -401,6 +403,26 @@ static inline String safariPluginsDirectory() return pluginsDirectory; } +static inline String safariWorkingPluginDirectory() +{ + WCHAR workingDir[_MAX_PATH]; + static String pluginsDirectory; + static bool cachedPluginDirectory = false; + + if (!cachedPluginDirectory) { + cachedPluginDirectory = true; + + int workingDirLen = GetCurrentDirectoryW(_MAX_PATH, workingDir); + + if (!workingDirLen || workingDirLen == _MAX_PATH) + goto exit; + + pluginsDirectory = String(workingDir) + "\\Plugins"; + } +exit: + return pluginsDirectory; +} + static inline void addMacromediaPluginDirectories(Vector& directories) { #if !OS(WINCE) @@ -426,6 +448,11 @@ Vector PluginDatabase::defaultPluginDirectories() if (!ourDirectory.isNull()) directories.append(ourDirectory); + + ourDirectory = safariWorkingPluginDirectory(); + if (!ourDirectory.isNull()) + directories.append(ourDirectory); + addQuickTimePluginDirectory(directories); addAdobeAcrobatPluginDirectory(directories); addMozillaPluginDirectories(directories); diff --git a/Source/WebCore/plugins/win/PluginViewWin.cpp b/Source/WebCore/plugins/win/PluginViewWin.cpp index cce09905..66538509 100644 --- a/Source/WebCore/plugins/win/PluginViewWin.cpp +++ b/Source/WebCore/plugins/win/PluginViewWin.cpp @@ -999,8 +999,16 @@ bool PluginView::platformStart() flags |= WS_VISIBLE; HWND parentWindowHandle = windowHandleForPageClient(m_parentFrame->view()->hostWindow()->platformPageClient()); + HINSTANCE module = WebCore::instanceHandle(); HWND window = ::CreateWindowEx(0, kWebPluginViewdowClassName, 0, flags, - 0, 0, 0, 0, parentWindowHandle, 0, WebCore::instanceHandle(), 0); + 0, 0, 0, 0, parentWindowHandle, 0, module, 0); + + if (!window) + { + parentWindowHandle = GetDesktopWindow(); + window = ::CreateWindowEx(0, kWebPluginViewdowClassName, 0, flags, + 0, 0, 0, 0, parentWindowHandle, 0, module, 0); + } #if OS(WINDOWS) && (PLATFORM(QT) || PLATFORM(WX)) m_window = window; diff --git a/WebKitLibraries/win/include/curl/curl.h b/WebKitLibraries/win/include/curl/curl.h index cadcdd8c..516ede6a 100644 --- a/WebKitLibraries/win/include/curl/curl.h +++ b/WebKitLibraries/win/include/curl/curl.h @@ -7,11 +7,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -20,19 +20,18 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: curl.h,v 1.383 2009-04-28 11:19:10 bagder Exp $ ***************************************************************************/ /* * If you have libcurl problems, all docs and details are found here: - * http://curl.haxx.se/libcurl/ + * https://curl.haxx.se/libcurl/ * * curl-library mailing list subscription and unsubscription web interface: - * http://cool.haxx.se/mailman/listinfo/curl-library/ + * https://cool.haxx.se/mailman/listinfo/curl-library/ */ #include "curlver.h" /* libcurl version defines */ -#include "curl/curlbuild.h" /* libcurl build definitions */ +#include "curlbuild.h" /* libcurl build definitions */ #include "curlrules.h" /* libcurl rules enforcement */ /* @@ -47,41 +46,42 @@ #include #include +#if defined(__FreeBSD__) && (__FreeBSD__ >= 2) +/* Needed for __FreeBSD_version symbol definition */ +#include +#endif + /* The include stuff here below is mainly for time_t! */ -#ifdef vms -# include -# include -#else -# include -# include -#endif /* defined (vms) */ +#include +#include -#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ - !defined(__CYGWIN__) || defined(__MINGW32__) -#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) +#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \ + defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H)) /* The check above prevents the winsock2 inclusion if winsock.h already was included, since they can't co-exist without problems */ #include #include #endif -#else +#endif /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish - libc5-based Linux systems. Only include it on system that are known to + libc5-based Linux systems. Only include it on systems that are known to require it! */ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ - defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) + defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ + defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ + (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) #include #endif -#ifndef _WIN32_WCE +#if !defined(WIN32) && !defined(_WIN32_WCE) #include #endif -#if !defined(WIN32) && !defined(__WATCOMC__) + +#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) #include #endif -#include -#endif #ifdef __BEOS__ #include @@ -91,37 +91,29 @@ extern "C" { #endif -typedef void CURL; +typedef struct Curl_easy CURL; /* - * Decorate exportable functions for Win32 and Symbian OS DLL linking. - * This avoids using a .def file for building libcurl.dll. + * libcurl external API function linkage decorations. */ -#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \ - !defined(CURL_STATICLIB) -#if defined(BUILDING_LIBCURL) -#define CURL_EXTERN __declspec(dllexport) -#else -#define CURL_EXTERN __declspec(dllimport) -#endif -#else -#ifdef CURL_HIDDEN_SYMBOLS -/* - * This definition is used to make external definitions visible in the - * shared library when symbols are hidden by default. It makes no - * difference when compiling applications whether this is set or not, - * only when compiling the library. - */ -#define CURL_EXTERN CURL_EXTERN_SYMBOL +#ifdef CURL_STATICLIB +# define CURL_EXTERN +#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) +# if defined(BUILDING_LIBCURL) +# define CURL_EXTERN __declspec(dllexport) +# else +# define CURL_EXTERN __declspec(dllimport) +# endif +#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) +# define CURL_EXTERN CURL_EXTERN_SYMBOL #else -#define CURL_EXTERN -#endif +# define CURL_EXTERN #endif #ifndef curl_socket_typedef /* socket typedef */ -#ifdef WIN32 +#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H) typedef SOCKET curl_socket_t; #define CURL_SOCKET_BAD INVALID_SOCKET #else @@ -136,7 +128,8 @@ struct curl_httppost { char *name; /* pointer to allocated name */ long namelength; /* length of name length */ char *contents; /* pointer to allocated data contents */ - long contentslength; /* length of contents field */ + long contentslength; /* length of contents field, see also + CURL_HTTPPOST_LARGE */ char *buffer; /* pointer to allocated buffer contents */ long bufferlength; /* length of buffer field */ char *contenttype; /* Content-Type */ @@ -145,48 +138,169 @@ struct curl_httppost { file, this link should link to following files */ long flags; /* as defined below */ -#define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ -#define HTTPPOST_READFILE (1<<1) /* specified content is a file name */ -#define HTTPPOST_PTRNAME (1<<2) /* name is only stored pointer - do not free in formfree */ -#define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer - do not free in formfree */ -#define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ -#define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ -#define HTTPPOST_CALLBACK (1<<6) /* upload file contents by using the - regular read callback to get the data - and pass the given pointer as custom - pointer */ + +/* specified content is a file name */ +#define CURL_HTTPPOST_FILENAME (1<<0) +/* specified content is a file name */ +#define CURL_HTTPPOST_READFILE (1<<1) +/* name is only stored pointer do not free in formfree */ +#define CURL_HTTPPOST_PTRNAME (1<<2) +/* contents is only stored pointer do not free in formfree */ +#define CURL_HTTPPOST_PTRCONTENTS (1<<3) +/* upload file from buffer */ +#define CURL_HTTPPOST_BUFFER (1<<4) +/* upload file from pointer contents */ +#define CURL_HTTPPOST_PTRBUFFER (1<<5) +/* upload file contents by using the regular read callback to get the data and + pass the given pointer as custom pointer */ +#define CURL_HTTPPOST_CALLBACK (1<<6) +/* use size in 'contentlen', added in 7.46.0 */ +#define CURL_HTTPPOST_LARGE (1<<7) char *showfilename; /* The file name to show. If not set, the actual file name will be used (if this is a file part) */ void *userp; /* custom pointer used for HTTPPOST_CALLBACK posts */ + curl_off_t contentlen; /* alternative length of contents + field. Used if CURL_HTTPPOST_LARGE is + set. Added in 7.46.0 */ }; +/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered + deprecated but was the only choice up until 7.31.0 */ typedef int (*curl_progress_callback)(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow); +/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in + 7.32.0, it avoids floating point and provides more detailed information. */ +typedef int (*curl_xferinfo_callback)(void *clientp, + curl_off_t dltotal, + curl_off_t dlnow, + curl_off_t ultotal, + curl_off_t ulnow); + #ifndef CURL_MAX_WRITE_SIZE /* Tests have proven that 20K is a very bad buffer size for uploads on Windows, while 16K for some odd reason performed a lot better. We do the ifndef check to allow this value to easier be changed at build - time for those who feel adventurous. */ + time for those who feel adventurous. The practical minimum is about + 400 bytes since libcurl uses a buffer of this size as a scratch area + (unrelated to network send operations). */ #define CURL_MAX_WRITE_SIZE 16384 #endif + +#ifndef CURL_MAX_HTTP_HEADER +/* The only reason to have a max limit for this is to avoid the risk of a bad + server feeding libcurl with a never-ending header that will cause reallocs + infinitely */ +#define CURL_MAX_HTTP_HEADER (100*1024) +#endif + /* This is a magic return code for the write callback that, when returned, will signal libcurl to pause receiving on the current transfer. */ #define CURL_WRITEFUNC_PAUSE 0x10000001 + typedef size_t (*curl_write_callback)(char *buffer, size_t size, size_t nitems, void *outstream); -/* this is the return codes for the seek callbacks */ + + +/* enumeration of file types */ +typedef enum { + CURLFILETYPE_FILE = 0, + CURLFILETYPE_DIRECTORY, + CURLFILETYPE_SYMLINK, + CURLFILETYPE_DEVICE_BLOCK, + CURLFILETYPE_DEVICE_CHAR, + CURLFILETYPE_NAMEDPIPE, + CURLFILETYPE_SOCKET, + CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */ + + CURLFILETYPE_UNKNOWN /* should never occur */ +} curlfiletype; + +#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0) +#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1) +#define CURLFINFOFLAG_KNOWN_TIME (1<<2) +#define CURLFINFOFLAG_KNOWN_PERM (1<<3) +#define CURLFINFOFLAG_KNOWN_UID (1<<4) +#define CURLFINFOFLAG_KNOWN_GID (1<<5) +#define CURLFINFOFLAG_KNOWN_SIZE (1<<6) +#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7) + +/* Content of this structure depends on information which is known and is + achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man + page for callbacks returning this structure -- some fields are mandatory, + some others are optional. The FLAG field has special meaning. */ +struct curl_fileinfo { + char *filename; + curlfiletype filetype; + time_t time; + unsigned int perm; + int uid; + int gid; + curl_off_t size; + long int hardlinks; + + struct { + /* If some of these fields is not NULL, it is a pointer to b_data. */ + char *time; + char *perm; + char *user; + char *group; + char *target; /* pointer to the target filename of a symlink */ + } strings; + + unsigned int flags; + + /* used internally */ + char * b_data; + size_t b_size; + size_t b_used; +}; + +/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */ +#define CURL_CHUNK_BGN_FUNC_OK 0 +#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */ +#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */ + +/* if splitting of data transfer is enabled, this callback is called before + download of an individual chunk started. Note that parameter "remains" works + only for FTP wildcard downloading (for now), otherwise is not used */ +typedef long (*curl_chunk_bgn_callback)(const void *transfer_info, + void *ptr, + int remains); + +/* return codes for CURLOPT_CHUNK_END_FUNCTION */ +#define CURL_CHUNK_END_FUNC_OK 0 +#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */ + +/* If splitting of data transfer is enabled this callback is called after + download of an individual chunk finished. + Note! After this callback was set then it have to be called FOR ALL chunks. + Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC. + This is the reason why we don't need "transfer_info" parameter in this + callback and we are not interested in "remains" parameter too. */ +typedef long (*curl_chunk_end_callback)(void *ptr); + +/* return codes for FNMATCHFUNCTION */ +#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */ +#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */ +#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */ + +/* callback type for wildcard downloading pattern matching. If the + string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */ +typedef int (*curl_fnmatch_callback)(void *ptr, + const char *pattern, + const char *string); + +/* These are the return codes for the seek callbacks */ #define CURL_SEEKFUNC_OK 0 #define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ #define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so @@ -208,10 +322,18 @@ typedef size_t (*curl_read_callback)(char *buffer, void *instream); typedef enum { - CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ - CURLSOCKTYPE_LAST /* never use */ + CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ + CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */ + CURLSOCKTYPE_LAST /* never use */ } curlsocktype; +/* The return code from the sockopt_callback can signal information back + to libcurl: */ +#define CURL_SOCKOPT_OK 0 +#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return + CURLE_ABORTED_BY_CALLBACK */ +#define CURL_SOCKOPT_ALREADY_CONNECTED 2 + typedef int (*curl_sockopt_callback)(void *clientp, curl_socket_t curlfd, curlsocktype purpose); @@ -231,13 +353,8 @@ typedef curl_socket_t curlsocktype purpose, struct curl_sockaddr *address); -#ifndef CURL_NO_OLDIES - /* not used since 7.10.8, will be removed in a future release */ -typedef int (*curl_passwd_callback)(void *clientp, - const char *prompt, - char *buffer, - int buflen); -#endif +typedef int +(*curl_closesocket_callback)(void *clientp, curl_socket_t item); typedef enum { CURLIOE_OK, /* I/O operation successful */ @@ -256,6 +373,7 @@ typedef curlioerr (*curl_ioctl_callback)(CURL *handle, int cmd, void *clientp); +#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS /* * The following typedef's are signatures of malloc, free, realloc, strdup and * calloc respectively. Function pointers of these types can be passed to the @@ -268,6 +386,9 @@ typedef void *(*curl_realloc_callback)(void *ptr, size_t size); typedef char *(*curl_strdup_callback)(const char *str); typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); +#define CURL_DID_MEMORY_FUNC_TYPEDEFS +#endif + /* the kind of data that is passed to information_callback*/ typedef enum { CURLINFO_TEXT = 0, @@ -299,7 +420,8 @@ typedef enum { CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ CURLE_FAILED_INIT, /* 2 */ CURLE_URL_MALFORMAT, /* 3 */ - CURLE_OBSOLETE4, /* 4 - NOT USED */ + CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for + 7.17.0, reused in April 2011 for 7.21.5] */ CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ CURLE_COULDNT_RESOLVE_HOST, /* 6 */ CURLE_COULDNT_CONNECT, /* 7 */ @@ -307,13 +429,18 @@ typedef enum { CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server due to lack of access - when login fails this is not returned. */ - CURLE_OBSOLETE10, /* 10 - NOT USED */ + CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for + 7.15.4, reused in Dec 2011 for 7.24.0]*/ CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ - CURLE_OBSOLETE12, /* 12 - NOT USED */ + CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server + [was obsoleted in August 2007 for 7.17.0, + reused in Dec 2011 for 7.24.0]*/ CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ CURLE_FTP_CANT_GET_HOST, /* 15 */ - CURLE_OBSOLETE16, /* 16 - NOT USED */ + CURLE_HTTP2, /* 16 - A problem in the http2 framing layer. + [was obsoleted in August 2007 for 7.17.0, + reused in July 2014 for 7.38.0] */ CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ CURLE_PARTIAL_FILE, /* 18 */ CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ @@ -348,9 +475,9 @@ typedef enum { CURLE_OBSOLETE44, /* 44 - NOT USED */ CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ CURLE_OBSOLETE46, /* 46 - NOT USED */ - CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ - CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ - CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ + CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */ + CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */ + CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */ CURLE_OBSOLETE50, /* 50 - NOT USED */ CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint wasn't verified fine */ @@ -364,7 +491,7 @@ typedef enum { CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ - CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ + CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */ CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ @@ -402,13 +529,36 @@ typedef enum { wrong format (Added in 7.19.0) */ CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in 7.19.0) */ + CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ + CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ + CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */ + CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ + CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ + CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the + session will be queued */ + CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not + match */ + CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */ + CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer + */ CURL_LAST /* never use! */ } CURLcode; #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ -/* Backwards compatibility with older names */ +/* Previously obsolete error code re-used in 7.38.0 */ +#define CURLE_OBSOLETE16 CURLE_HTTP2 + +/* Previously obsolete error codes re-used in 7.24.0 */ +#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED +#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT + +/* compatibility with older names */ +#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING + +/* The following were added in 7.21.5, April 2011 */ +#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION /* The following were added in 7.17.1 */ /* These are scheduled to disappear by 2009 */ @@ -416,7 +566,7 @@ typedef enum { /* The following were added in 7.17.0 */ /* These are scheduled to disappear by 2009 */ -#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */ +#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */ #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 @@ -428,7 +578,7 @@ typedef enum { #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 -#define CURLE_URL_MALFORMAT_USER CURLE_OBSOLETE4 +#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE @@ -454,6 +604,16 @@ typedef enum { make programs break */ #define CURLE_ALREADY_COMPLETE 99999 +/* Provide defines for really old option names */ +#define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */ +#define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */ +#define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA + +/* Since long deprecated options with no code in the lib that does anything + with them. */ +#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40 +#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72 + #endif /*!CURL_NO_OLDIES*/ /* This prototype applies to all conversion callbacks */ @@ -478,14 +638,35 @@ typedef enum { in 7.18.0 */ } curl_proxytype; /* this enum was added in 7.10 */ -#define CURLAUTH_NONE 0 /* nothing */ -#define CURLAUTH_BASIC (1<<0) /* Basic (default) */ -#define CURLAUTH_DIGEST (1<<1) /* Digest */ -#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ -#define CURLAUTH_NTLM (1<<3) /* NTLM */ -#define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */ -#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */ -#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) +/* + * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options: + * + * CURLAUTH_NONE - No HTTP authentication + * CURLAUTH_BASIC - HTTP Basic authentication (default) + * CURLAUTH_DIGEST - HTTP Digest authentication + * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication + * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated) + * CURLAUTH_NTLM - HTTP NTLM authentication + * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour + * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper + * CURLAUTH_ONLY - Use together with a single other type to force no + * authentication or just that single type + * CURLAUTH_ANY - All fine types set + * CURLAUTH_ANYSAFE - All fine types except Basic + */ + +#define CURLAUTH_NONE ((unsigned long)0) +#define CURLAUTH_BASIC (((unsigned long)1)<<0) +#define CURLAUTH_DIGEST (((unsigned long)1)<<1) +#define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2) +/* Deprecated since the advent of CURLAUTH_NEGOTIATE */ +#define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE +#define CURLAUTH_NTLM (((unsigned long)1)<<3) +#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) +#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) +#define CURLAUTH_ONLY (((unsigned long)1)<<31) +#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) +#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) #define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ #define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ @@ -493,10 +674,56 @@ typedef enum { #define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ #define CURLSSH_AUTH_HOST (1<<2) /* host key files */ #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ +#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */ #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY +#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */ +#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */ +#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */ + #define CURL_ERROR_SIZE 256 +enum curl_khtype { + CURLKHTYPE_UNKNOWN, + CURLKHTYPE_RSA1, + CURLKHTYPE_RSA, + CURLKHTYPE_DSS +}; + +struct curl_khkey { + const char *key; /* points to a zero-terminated string encoded with base64 + if len is zero, otherwise to the "raw" data */ + size_t len; + enum curl_khtype keytype; +}; + +/* this is the set of return values expected from the curl_sshkeycallback + callback */ +enum curl_khstat { + CURLKHSTAT_FINE_ADD_TO_FILE, + CURLKHSTAT_FINE, + CURLKHSTAT_REJECT, /* reject the connection, return an error */ + CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so + this causes a CURLE_DEFER error but otherwise the + connection will be left intact etc */ + CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ +}; + +/* this is the set of status codes pass in to the callback */ +enum curl_khmatch { + CURLKHMATCH_OK, /* match */ + CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ + CURLKHMATCH_MISSING, /* no matching host/key found */ + CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ +}; + +typedef int + (*curl_sshkeycallback) (CURL *easy, /* easy handle */ + const struct curl_khkey *knownkey, /* known */ + const struct curl_khkey *foundkey, /* found */ + enum curl_khmatch, /* libcurl's view on the keys */ + void *clientp); /* custom pointer passed from app */ + /* parameter for the CURLOPT_USE_SSL option */ typedef enum { CURLUSESSL_NONE, /* do not attempt to use SSL */ @@ -506,6 +733,19 @@ typedef enum { CURLUSESSL_LAST /* not an option, never use */ } curl_usessl; +/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */ + +/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the + name of improving interoperability with older servers. Some SSL libraries + have introduced work-arounds for this flaw but those work-arounds sometimes + make the SSL communication fail. To regain functionality with those broken + servers, a user can this way allow the vulnerability back. */ +#define CURLSSLOPT_ALLOW_BEAST (1<<0) + +/* - NO_REVOKE tells libcurl to disable certificate revocation checks for those + SSL backends where such behavior is present. */ +#define CURLSSLOPT_NO_REVOKE (1<<1) + #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ @@ -556,6 +796,10 @@ typedef enum { CURLFTPMETHOD_LAST /* not an option, never use */ } curl_ftpmethod; +/* bitmask defines for CURLOPT_HEADEROPT */ +#define CURLHEADER_UNIFIED 0 +#define CURLHEADER_SEPARATE (1<<0) + /* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ #define CURLPROTO_HTTP (1<<0) #define CURLPROTO_HTTPS (1<<1) @@ -569,15 +813,35 @@ typedef enum { #define CURLPROTO_DICT (1<<9) #define CURLPROTO_FILE (1<<10) #define CURLPROTO_TFTP (1<<11) +#define CURLPROTO_IMAP (1<<12) +#define CURLPROTO_IMAPS (1<<13) +#define CURLPROTO_POP3 (1<<14) +#define CURLPROTO_POP3S (1<<15) +#define CURLPROTO_SMTP (1<<16) +#define CURLPROTO_SMTPS (1<<17) +#define CURLPROTO_RTSP (1<<18) +#define CURLPROTO_RTMP (1<<19) +#define CURLPROTO_RTMPT (1<<20) +#define CURLPROTO_RTMPE (1<<21) +#define CURLPROTO_RTMPTE (1<<22) +#define CURLPROTO_RTMPS (1<<23) +#define CURLPROTO_RTMPTS (1<<24) +#define CURLPROTO_GOPHER (1<<25) +#define CURLPROTO_SMB (1<<26) +#define CURLPROTO_SMBS (1<<27) #define CURLPROTO_ALL (~0) /* enable everything */ /* long may be 32 or 64 bits, but we should never depend on anything else but 32 */ #define CURLOPTTYPE_LONG 0 #define CURLOPTTYPE_OBJECTPOINT 10000 +#define CURLOPTTYPE_STRINGPOINT 10000 #define CURLOPTTYPE_FUNCTIONPOINT 20000 #define CURLOPTTYPE_OFF_T 30000 +/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the + string options from the header file */ + /* name is uppercase CURLOPT_, type is one of the defined CURLOPTTYPE_ number is unique identifier */ @@ -586,11 +850,12 @@ typedef enum { #endif #ifdef CURL_ISOCPP -#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number +#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ #define LONG CURLOPTTYPE_LONG #define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT +#define STRINGPOINT CURLOPTTYPE_OBJECTPOINT #define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT #define OFF_T CURLOPTTYPE_OFF_T #define CINIT(name,type,number) CURLOPT_/**/name = type + number @@ -604,30 +869,30 @@ typedef enum { typedef enum { /* This is the FILE * or void * the regular output should be written to. */ - CINIT(FILE, OBJECTPOINT, 1), + CINIT(WRITEDATA, OBJECTPOINT, 1), /* The full URL to get/put */ - CINIT(URL, OBJECTPOINT, 2), + CINIT(URL, STRINGPOINT, 2), /* Port number to connect to, if other than default. */ CINIT(PORT, LONG, 3), /* Name of proxy to use. */ - CINIT(PROXY, OBJECTPOINT, 4), + CINIT(PROXY, STRINGPOINT, 4), - /* "name:password" to use when fetching. */ - CINIT(USERPWD, OBJECTPOINT, 5), + /* "user:password;options" to use when fetching. */ + CINIT(USERPWD, STRINGPOINT, 5), - /* "name:password" to use with proxy. */ - CINIT(PROXYUSERPWD, OBJECTPOINT, 6), + /* "user:password" to use with proxy. */ + CINIT(PROXYUSERPWD, STRINGPOINT, 6), /* Range to get, specified as an ASCII string. */ - CINIT(RANGE, OBJECTPOINT, 7), + CINIT(RANGE, STRINGPOINT, 7), /* not used */ /* Specified file stream to upload from (use as input): */ - CINIT(INFILE, OBJECTPOINT, 9), + CINIT(READDATA, OBJECTPOINT, 9), /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE * bytes big. If this is not used, error messages go to stderr instead: */ @@ -659,14 +924,14 @@ typedef enum { CINIT(POSTFIELDS, OBJECTPOINT, 15), /* Set the referrer page (needed by some CGIs) */ - CINIT(REFERER, OBJECTPOINT, 16), + CINIT(REFERER, STRINGPOINT, 16), /* Set the FTP PORT string (interface name, named or numerical IP address) Use i.e '-' to use default address. */ - CINIT(FTPPORT, OBJECTPOINT, 17), + CINIT(FTPPORT, STRINGPOINT, 17), /* Set the User-Agent string (examined by some CGIs) */ - CINIT(USERAGENT, OBJECTPOINT, 18), + CINIT(USERAGENT, STRINGPOINT, 18), /* If the download receives less than "low speed limit" bytes/second * during "low speed time" seconds, the operations is aborted. @@ -689,19 +954,20 @@ typedef enum { CINIT(RESUME_FROM, LONG, 21), /* Set cookie in request: */ - CINIT(COOKIE, OBJECTPOINT, 22), + CINIT(COOKIE, STRINGPOINT, 22), - /* This points to a linked list of headers, struct curl_slist kind */ + /* This points to a linked list of headers, struct curl_slist kind. This + list is also used for RTSP (in spite of its name) */ CINIT(HTTPHEADER, OBJECTPOINT, 23), /* This points to a linked list of post entries, struct curl_httppost */ CINIT(HTTPPOST, OBJECTPOINT, 24), /* name of the file keeping your private SSL-certificate */ - CINIT(SSLCERT, OBJECTPOINT, 25), + CINIT(SSLCERT, STRINGPOINT, 25), /* password for the SSL or SSH private key */ - CINIT(KEYPASSWD, OBJECTPOINT, 26), + CINIT(KEYPASSWD, STRINGPOINT, 26), /* send TYPE parameter? */ CINIT(CRLF, LONG, 27), @@ -711,11 +977,11 @@ typedef enum { /* send FILE * or void * to store headers to, if you use a callback it is simply passed to the callback unmodified */ - CINIT(WRITEHEADER, OBJECTPOINT, 29), + CINIT(HEADERDATA, OBJECTPOINT, 29), /* point to a file to read the initial cookies from, also enables "cookie awareness" */ - CINIT(COOKIEFILE, OBJECTPOINT, 31), + CINIT(COOKIEFILE, STRINGPOINT, 31), /* What version to specifically try to use. See CURL_SSLVERSION defines below. */ @@ -734,9 +1000,9 @@ typedef enum { HTTP: DELETE, TRACE and others FTP: to use a different list command */ - CINIT(CUSTOMREQUEST, OBJECTPOINT, 36), + CINIT(CUSTOMREQUEST, STRINGPOINT, 36), - /* HTTP request, for odd commands like DELETE, TRACE and others */ + /* FILE handle to use instead of stderr */ CINIT(STDERR, OBJECTPOINT, 37), /* 38 is not used */ @@ -744,18 +1010,16 @@ typedef enum { /* send linked-list of post-transfer QUOTE commands */ CINIT(POSTQUOTE, OBJECTPOINT, 39), - /* Pass a pointer to string of the output using full variable-replacement - as described elsewhere. */ - CINIT(WRITEINFO, OBJECTPOINT, 40), + CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */ CINIT(VERBOSE, LONG, 41), /* talk a lot */ CINIT(HEADER, LONG, 42), /* throw the header out too */ CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ - CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ + CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 400 */ CINIT(UPLOAD, LONG, 46), /* this is an upload */ CINIT(POST, LONG, 47), /* HTTP POST method */ - CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */ + CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */ CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ @@ -770,13 +1034,16 @@ typedef enum { /* 55 = OBSOLETE */ - /* Function that will be called instead of the internal progress display + /* DEPRECATED + * Function that will be called instead of the internal progress display * function. This function should be defined as the curl_progress_callback * prototype defines. */ CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), - /* Data passed to the progress callback */ + /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION + callbacks */ CINIT(PROGRESSDATA, OBJECTPOINT, 57), +#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA /* We want the referrer field set automatically when following locations */ CINIT(AUTOREFERER, LONG, 58), @@ -792,19 +1059,19 @@ typedef enum { CINIT(HTTPPROXYTUNNEL, LONG, 61), /* Set the interface string to use as outgoing network interface */ - CINIT(INTERFACE, OBJECTPOINT, 62), + CINIT(INTERFACE, STRINGPOINT, 62), /* Set the krb4/5 security level, this also enables krb4/5 awareness. This * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string * is set but doesn't match one of these, 'private' will be used. */ - CINIT(KRBLEVEL, OBJECTPOINT, 63), + CINIT(KRBLEVEL, STRINGPOINT, 63), /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ CINIT(SSL_VERIFYPEER, LONG, 64), /* The CApath or CAfile used to validate the peer certificate this option is used only if SSL_VERIFYPEER is true */ - CINIT(CAINFO, OBJECTPOINT, 65), + CINIT(CAINFO, STRINGPOINT, 65), /* 66 = OBSOLETE */ /* 67 = OBSOLETE */ @@ -822,9 +1089,7 @@ typedef enum { /* Max amount of cached alive connections */ CINIT(MAXCONNECTS, LONG, 71), - /* What policy to use when closing connections when the cache is filled - up */ - CINIT(CLOSEPOLICY, LONG, 72), + CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */ /* 73 = OBSOLETE */ @@ -840,14 +1105,13 @@ typedef enum { /* Set to a file name that contains random data for libcurl to use to seed the random engine when doing SSL connects. */ - CINIT(RANDOM_FILE, OBJECTPOINT, 76), + CINIT(RANDOM_FILE, STRINGPOINT, 76), /* Set to the Entropy Gathering Daemon socket pathname */ - CINIT(EGDSOCKET, OBJECTPOINT, 77), + CINIT(EGDSOCKET, STRINGPOINT, 77), - /* Time-out connect operations after this amount of seconds, if connects - are OK within this time, then fine... This only aborts the connect - phase. [Only works on unix-style/SIGALRM operating systems] */ + /* Time-out connect operations after this amount of seconds, if connects are + OK within this time, then fine... This only aborts the connect phase. */ CINIT(CONNECTTIMEOUT, LONG, 78), /* Function that will be called to store headers (instead of fwrite). The @@ -866,10 +1130,10 @@ typedef enum { /* Specify which file name to write all known cookies in after completed operation. Set file name to "-" (dash) to make it go to stdout. */ - CINIT(COOKIEJAR, OBJECTPOINT, 82), + CINIT(COOKIEJAR, STRINGPOINT, 82), /* Specify which SSL ciphers to use */ - CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83), + CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83), /* Specify which HTTP version to use! This must be set to one of the CURL_HTTP_VERSION* enums set below. */ @@ -881,16 +1145,16 @@ typedef enum { CINIT(FTP_USE_EPSV, LONG, 85), /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ - CINIT(SSLCERTTYPE, OBJECTPOINT, 86), + CINIT(SSLCERTTYPE, STRINGPOINT, 86), /* name of the file keeping your private SSL-key */ - CINIT(SSLKEY, OBJECTPOINT, 87), + CINIT(SSLKEY, STRINGPOINT, 87), /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ - CINIT(SSLKEYTYPE, OBJECTPOINT, 88), + CINIT(SSLKEYTYPE, STRINGPOINT, 88), /* crypto engine for the SSL-sub system */ - CINIT(SSLENGINE, OBJECTPOINT, 89), + CINIT(SSLENGINE, STRINGPOINT, 89), /* set the crypto engine for the SSL-sub system as default the param has no meaning... @@ -898,7 +1162,7 @@ typedef enum { CINIT(SSLENGINE_DEFAULT, LONG, 90), /* Non-zero value means to use the global dns cache */ - CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */ + CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */ /* DNS cache timeout */ CINIT(DNS_CACHE_TIMEOUT, LONG, 92), @@ -917,7 +1181,7 @@ typedef enum { /* The CApath directory used to validate the peer certificate this option is used only if SSL_VERIFYPEER is true */ - CINIT(CAPATH, OBJECTPOINT, 97), + CINIT(CAPATH, STRINGPOINT, 97), /* Instruct libcurl to use a smaller receive buffer */ CINIT(BUFFERSIZE, LONG, 98), @@ -935,8 +1199,9 @@ typedef enum { CINIT(PROXYTYPE, LONG, 101), /* Set the Accept-Encoding string. Use this to tell a server you would like - the response to be compressed. */ - CINIT(ENCODING, OBJECTPOINT, 102), + the response to be compressed. Before 7.21.6, this was known as + CURLOPT_ENCODING */ + CINIT(ACCEPT_ENCODING, STRINGPOINT, 102), /* Set pointer to private data */ CINIT(PRIVATE, OBJECTPOINT, 103), @@ -949,8 +1214,8 @@ typedef enum { and password to whatever host the server decides. */ CINIT(UNRESTRICTED_AUTH, LONG, 105), - /* Specifically switch on or off the FTP engine's use of the EPRT command ( it - also disables the LPRT attempt). By default, those ones will always be + /* Specifically switch on or off the FTP engine's use of the EPRT command ( + it also disables the LPRT attempt). By default, those ones will always be attempted before the good old traditional PORT command. */ CINIT(FTP_USE_EPRT, LONG, 106), @@ -984,6 +1249,7 @@ typedef enum { essentially places a demand on the FTP server to acknowledge commands in a timely manner. */ CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), +#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to tell libcurl to resolve names to those IP versions only. This only has @@ -1016,12 +1282,12 @@ typedef enum { to parse (using the CURLOPT_NETRC option). If not set, libcurl will do a poor attempt to find the user's home directory and check for a .netrc file in there. */ - CINIT(NETRC_FILE, OBJECTPOINT, 118), + CINIT(NETRC_FILE, STRINGPOINT, 118), /* Enable SSL/TLS for FTP, pick one of: - CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise - CURLFTPSSL_CONTROL - SSL for the control connection or fail - CURLFTPSSL_ALL - SSL for all communication or fail + CURLUSESSL_TRY - try using SSL, proceed anyway otherwise + CURLUSESSL_CONTROL - SSL for the control connection or fail + CURLUSESSL_ALL - SSL for all communication or fail */ CINIT(USE_SSL, LONG, 119), @@ -1059,10 +1325,10 @@ typedef enum { /* zero terminated string for pass on to the FTP server when asked for "account" info */ - CINIT(FTP_ACCOUNT, OBJECTPOINT, 134), + CINIT(FTP_ACCOUNT, STRINGPOINT, 134), - /* feed cookies into cookie engine */ - CINIT(COOKIELIST, OBJECTPOINT, 135), + /* feed cookie into cookie engine */ + CINIT(COOKIELIST, STRINGPOINT, 135), /* ignore Content-Length */ CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), @@ -1108,7 +1374,7 @@ typedef enum { CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), /* Pointer to command string to send if USER/PASS fails. */ - CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147), + CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147), /* callback function for setting socket options */ CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), @@ -1122,8 +1388,8 @@ typedef enum { CINIT(SSH_AUTH_TYPES, LONG, 151), /* Used by scp/sftp to do public/private key authentication */ - CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152), - CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153), + CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152), + CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153), /* Send CCC (Clear Command Channel) after authentication */ CINIT(FTP_SSL_CCC, LONG, 154), @@ -1147,7 +1413,7 @@ typedef enum { CINIT(POSTREDIR, LONG, 161), /* used by scp/sftp to verify the host's public key */ - CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162), + CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162), /* Callback function for opening socket (instead of socket(2)). Optionally, callback is able change the address or refuse to connect returning @@ -1167,26 +1433,25 @@ typedef enum { CINIT(SEEKDATA, OBJECTPOINT, 168), /* CRL file */ - CINIT(CRLFILE, OBJECTPOINT, 169), + CINIT(CRLFILE, STRINGPOINT, 169), /* Issuer certificate */ - CINIT(ISSUERCERT, OBJECTPOINT, 170), + CINIT(ISSUERCERT, STRINGPOINT, 170), /* (IPv6) Address scope */ CINIT(ADDRESS_SCOPE, LONG, 171), /* Collect certificate chain info and allow it to get retrievable with - CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only - working with OpenSSL-powered builds. */ + CURLINFO_CERTINFO after the transfer is complete. */ CINIT(CERTINFO, LONG, 172), /* "name" and "pwd" to use when fetching. */ - CINIT(USERNAME, OBJECTPOINT, 173), - CINIT(PASSWORD, OBJECTPOINT, 174), + CINIT(USERNAME, STRINGPOINT, 173), + CINIT(PASSWORD, STRINGPOINT, 174), /* "name" and "pwd" to use with Proxy when fetching. */ - CINIT(PROXYUSERNAME, OBJECTPOINT, 175), - CINIT(PROXYPASSWORD, OBJECTPOINT, 176), + CINIT(PROXYUSERNAME, STRINGPOINT, 175), + CINIT(PROXYPASSWORD, STRINGPOINT, 176), /* Comma separated list of hostnames defining no-proxy zones. These should match both hostnames directly, and hostnames within a domain. For @@ -1195,13 +1460,13 @@ typedef enum { implementations of this, .local.com will be considered to be the same as local.com. A single * is the only valid wildcard, and effectively disables the use of proxy. */ - CINIT(NOPROXY, OBJECTPOINT, 177), + CINIT(NOPROXY, STRINGPOINT, 177), /* block size for TFTP transfers */ CINIT(TFTP_BLKSIZE, LONG, 178), /* Socks Service */ - CINIT(SOCKS5_GSSAPI_SERVICE, LONG, 179), + CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */ /* Socks Service */ CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), @@ -1218,6 +1483,212 @@ typedef enum { to all protocols except FILE and SCP. */ CINIT(REDIR_PROTOCOLS, LONG, 182), + /* set the SSH knownhost file name to use */ + CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183), + + /* set the SSH host key callback, must point to a curl_sshkeycallback + function */ + CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), + + /* set the SSH host key callback custom pointer */ + CINIT(SSH_KEYDATA, OBJECTPOINT, 185), + + /* set the SMTP mail originator */ + CINIT(MAIL_FROM, STRINGPOINT, 186), + + /* set the list of SMTP mail receiver(s) */ + CINIT(MAIL_RCPT, OBJECTPOINT, 187), + + /* FTP: send PRET before PASV */ + CINIT(FTP_USE_PRET, LONG, 188), + + /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */ + CINIT(RTSP_REQUEST, LONG, 189), + + /* The RTSP session identifier */ + CINIT(RTSP_SESSION_ID, STRINGPOINT, 190), + + /* The RTSP stream URI */ + CINIT(RTSP_STREAM_URI, STRINGPOINT, 191), + + /* The Transport: header to use in RTSP requests */ + CINIT(RTSP_TRANSPORT, STRINGPOINT, 192), + + /* Manually initialize the client RTSP CSeq for this handle */ + CINIT(RTSP_CLIENT_CSEQ, LONG, 193), + + /* Manually initialize the server RTSP CSeq for this handle */ + CINIT(RTSP_SERVER_CSEQ, LONG, 194), + + /* The stream to pass to INTERLEAVEFUNCTION. */ + CINIT(INTERLEAVEDATA, OBJECTPOINT, 195), + + /* Let the application define a custom write method for RTP data */ + CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196), + + /* Turn on wildcard matching */ + CINIT(WILDCARDMATCH, LONG, 197), + + /* Directory matching callback called before downloading of an + individual file (chunk) started */ + CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198), + + /* Directory matching callback called after the file (chunk) + was downloaded, or skipped */ + CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199), + + /* Change match (fnmatch-like) callback for wildcard matching */ + CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200), + + /* Let the application define custom chunk data pointer */ + CINIT(CHUNK_DATA, OBJECTPOINT, 201), + + /* FNMATCH_FUNCTION user pointer */ + CINIT(FNMATCH_DATA, OBJECTPOINT, 202), + + /* send linked-list of name:port:address sets */ + CINIT(RESOLVE, OBJECTPOINT, 203), + + /* Set a username for authenticated TLS */ + CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204), + + /* Set a password for authenticated TLS */ + CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205), + + /* Set authentication type for authenticated TLS */ + CINIT(TLSAUTH_TYPE, STRINGPOINT, 206), + + /* Set to 1 to enable the "TE:" header in HTTP requests to ask for + compressed transfer-encoded responses. Set to 0 to disable the use of TE: + in outgoing requests. The current default is 0, but it might change in a + future libcurl release. + + libcurl will ask for the compressed methods it knows of, and if that + isn't any, it will not ask for transfer-encoding at all even if this + option is set to 1. + + */ + CINIT(TRANSFER_ENCODING, LONG, 207), + + /* Callback function for closing socket (instead of close(2)). The callback + should have type curl_closesocket_callback */ + CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208), + CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209), + + /* allow GSSAPI credential delegation */ + CINIT(GSSAPI_DELEGATION, LONG, 210), + + /* Set the name servers to use for DNS resolution */ + CINIT(DNS_SERVERS, STRINGPOINT, 211), + + /* Time-out accept operations (currently for FTP only) after this amount + of miliseconds. */ + CINIT(ACCEPTTIMEOUT_MS, LONG, 212), + + /* Set TCP keepalive */ + CINIT(TCP_KEEPALIVE, LONG, 213), + + /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */ + CINIT(TCP_KEEPIDLE, LONG, 214), + CINIT(TCP_KEEPINTVL, LONG, 215), + + /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */ + CINIT(SSL_OPTIONS, LONG, 216), + + /* Set the SMTP auth originator */ + CINIT(MAIL_AUTH, STRINGPOINT, 217), + + /* Enable/disable SASL initial response */ + CINIT(SASL_IR, LONG, 218), + + /* Function that will be called instead of the internal progress display + * function. This function should be defined as the curl_xferinfo_callback + * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */ + CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219), + + /* The XOAUTH2 bearer token */ + CINIT(XOAUTH2_BEARER, STRINGPOINT, 220), + + /* Set the interface string to use as outgoing network + * interface for DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_INTERFACE, STRINGPOINT, 221), + + /* Set the local IPv4 address to use for outgoing DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222), + + /* Set the local IPv4 address to use for outgoing DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223), + + /* Set authentication options directly */ + CINIT(LOGIN_OPTIONS, STRINGPOINT, 224), + + /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */ + CINIT(SSL_ENABLE_NPN, LONG, 225), + + /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */ + CINIT(SSL_ENABLE_ALPN, LONG, 226), + + /* Time to wait for a response to a HTTP request containing an + * Expect: 100-continue header before sending the data anyway. */ + CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227), + + /* This points to a linked list of headers used for proxy requests only, + struct curl_slist kind */ + CINIT(PROXYHEADER, OBJECTPOINT, 228), + + /* Pass in a bitmask of "header options" */ + CINIT(HEADEROPT, LONG, 229), + + /* The public key in DER form used to validate the peer public key + this option is used only if SSL_VERIFYPEER is true */ + CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230), + + /* Path to Unix domain socket */ + CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231), + + /* Set if we should verify the certificate status. */ + CINIT(SSL_VERIFYSTATUS, LONG, 232), + + /* Set if we should enable TLS false start. */ + CINIT(SSL_FALSESTART, LONG, 233), + + /* Do not squash dot-dot sequences */ + CINIT(PATH_AS_IS, LONG, 234), + + /* Proxy Service Name */ + CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235), + + /* Service Name */ + CINIT(SERVICE_NAME, STRINGPOINT, 236), + + /* Wait/don't wait for pipe/mutex to clarify */ + CINIT(PIPEWAIT, LONG, 237), + + /* Set the protocol used when curl is given a URL without a protocol */ + CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238), + + /* Set stream weight, 1 - 256 (default is 16) */ + CINIT(STREAM_WEIGHT, LONG, 239), + + /* Set stream dependency on another CURL handle */ + CINIT(STREAM_DEPENDS, OBJECTPOINT, 240), + + /* Set E-xclusive stream dependency on another CURL handle */ + CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241), + + /* Do not send any tftp option requests to the server */ + CINIT(TFTP_NO_OPTIONS, LONG, 242), + + /* Linked-list of host:port:connect-to-host:connect-to-port, + overrides the URL's host:port (only for the network layer) */ + CINIT(CONNECT_TO, OBJECTPOINT, 243), + + /* Set TCP Fast Open */ + CINIT(TCP_FASTOPEN, LONG, 244), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1254,13 +1725,11 @@ typedef enum { option might be handy to force libcurl to use a specific IP version. */ #define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP versions that your system allows */ -#define CURL_IPRESOLVE_V4 1 /* resolve to ipv4 addresses */ -#define CURL_IPRESOLVE_V6 2 /* resolve to ipv6 addresses */ +#define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */ +#define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */ /* three convenient "aliases" that follow the name scheme better */ -#define CURLOPT_WRITEDATA CURLOPT_FILE -#define CURLOPT_READDATA CURLOPT_INFILE -#define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER +#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ enum { @@ -1269,10 +1738,38 @@ enum { for us! */ CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ + CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */ + CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */ + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1 + Upgrade */ CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ }; +/* Convenience definition simple because the name of the version is HTTP/2 and + not 2.0. The 2_0 version of the enum name was set while the version was + still planned to be 2.0 and we stick to it for compatibility. */ +#define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0 + +/* + * Public API enums for RTSP requests + */ +enum { + CURL_RTSPREQ_NONE, /* first in list */ + CURL_RTSPREQ_OPTIONS, + CURL_RTSPREQ_DESCRIBE, + CURL_RTSPREQ_ANNOUNCE, + CURL_RTSPREQ_SETUP, + CURL_RTSPREQ_PLAY, + CURL_RTSPREQ_PAUSE, + CURL_RTSPREQ_TEARDOWN, + CURL_RTSPREQ_GET_PARAMETER, + CURL_RTSPREQ_SET_PARAMETER, + CURL_RTSPREQ_RECORD, + CURL_RTSPREQ_RECEIVE, + CURL_RTSPREQ_LAST /* last in list */ +}; + /* These enums are for use with the CURLOPT_NETRC option. */ enum CURL_NETRC_OPTION { CURL_NETRC_IGNORED, /* The .netrc will never be read. @@ -1287,21 +1784,33 @@ enum CURL_NETRC_OPTION { enum { CURL_SSLVERSION_DEFAULT, - CURL_SSLVERSION_TLSv1, + CURL_SSLVERSION_TLSv1, /* TLS 1.x */ CURL_SSLVERSION_SSLv2, CURL_SSLVERSION_SSLv3, + CURL_SSLVERSION_TLSv1_0, + CURL_SSLVERSION_TLSv1_1, + CURL_SSLVERSION_TLSv1_2, CURL_SSLVERSION_LAST /* never use, keep last */ }; +enum CURL_TLSAUTH { + CURL_TLSAUTH_NONE, + CURL_TLSAUTH_SRP, + CURL_TLSAUTH_LAST /* never use, keep last */ +}; + /* symbols to use with CURLOPT_POSTREDIR. - CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that - CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */ + CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303 + can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302 + | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */ #define CURL_REDIR_GET_ALL 0 #define CURL_REDIR_POST_301 1 #define CURL_REDIR_POST_302 2 -#define CURL_REDIR_POST_ALL (CURL_REDIR_POST_301|CURL_REDIR_POST_302) +#define CURL_REDIR_POST_303 4 +#define CURL_REDIR_POST_ALL \ + (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303) typedef enum { CURL_TIMECOND_NONE, @@ -1357,6 +1866,7 @@ typedef enum { CFINIT(OBSOLETE2), CFINIT(STREAM), + CFINIT(CONTENTLEN), /* added in 7.46.0, provide a curl_off_t length */ CURLFORM_LASTENTRY /* the last unused */ } CURLformoption; @@ -1420,7 +1930,8 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, * Should return the buffer length passed to it as the argument "len" on * success. */ -typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len); +typedef size_t (*curl_formget_callback)(void *arg, const char *buf, + size_t len); /* * NAME curl_formget() @@ -1516,7 +2027,7 @@ CURL_EXTERN void curl_free(void *p); * DESCRIPTION * * curl_global_init() should be invoked exactly once for each application that - * uses libcurl and before any call of other libcurl function. + * uses libcurl and before any call of other libcurl functions. * * This function is not thread-safe! */ @@ -1598,10 +2109,40 @@ struct curl_certinfo { format "name: value" */ }; +/* enum for the different supported SSL backends */ +typedef enum { + CURLSSLBACKEND_NONE = 0, + CURLSSLBACKEND_OPENSSL = 1, + CURLSSLBACKEND_GNUTLS = 2, + CURLSSLBACKEND_NSS = 3, + CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ + CURLSSLBACKEND_GSKIT = 5, + CURLSSLBACKEND_POLARSSL = 6, + CURLSSLBACKEND_CYASSL = 7, + CURLSSLBACKEND_SCHANNEL = 8, + CURLSSLBACKEND_DARWINSSL = 9, + CURLSSLBACKEND_AXTLS = 10, + CURLSSLBACKEND_MBEDTLS = 11 +} curl_sslbackend; + +/* aliases for library clones and renames */ +#define CURLSSLBACKEND_LIBRESSL 1 +#define CURLSSLBACKEND_BORINGSSL 1 +#define CURLSSLBACKEND_WOLFSSL 6 + +/* Information about the SSL library used and the respective internal SSL + handle, which can be used to obtain further information regarding the + connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */ +struct curl_tlssessioninfo { + curl_sslbackend backend; + void *internals; +}; + #define CURLINFO_STRING 0x100000 #define CURLINFO_LONG 0x200000 #define CURLINFO_DOUBLE 0x300000 #define CURLINFO_SLIST 0x400000 +#define CURLINFO_SOCKET 0x500000 #define CURLINFO_MASK 0x0fffff #define CURLINFO_TYPEMASK 0xf00000 @@ -1642,9 +2183,20 @@ typedef enum { CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, CURLINFO_CERTINFO = CURLINFO_SLIST + 34, CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, + CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36, + CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, + CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38, + CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39, + CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, + CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, + CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, + CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43, + CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, + CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45, + CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 35 + CURLINFO_LASTONE = 46 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as @@ -1668,6 +2220,7 @@ typedef enum { #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) #define CURL_GLOBAL_NOTHING 0 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL +#define CURL_GLOBAL_ACK_EINTR (1<<2) /***************************************************************************** @@ -1705,15 +2258,16 @@ typedef void (*curl_unlock_function)(CURL *handle, curl_lock_data data, void *userptr); -typedef void CURLSH; +typedef struct Curl_share CURLSH; typedef enum { CURLSHE_OK, /* all is fine */ CURLSHE_BAD_OPTION, /* 1 */ CURLSHE_IN_USE, /* 2 */ CURLSHE_INVALID, /* 3 */ - CURLSHE_NOMEM, /* out of memory */ - CURLSHE_LAST /* never use */ + CURLSHE_NOMEM, /* 4 out of memory */ + CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */ + CURLSHE_LAST /* never use */ } CURLSHcode; typedef enum { @@ -1778,22 +2332,34 @@ typedef struct { } curl_version_info_data; -#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ -#define CURL_VERSION_KERBEROS4 (1<<1) /* kerberos auth is supported */ -#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ -#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ -#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ -#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth support */ -#define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ -#define CURL_VERSION_ASYNCHDNS (1<<7) /* asynchronous dns resolves */ -#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth */ -#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ -#define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ -#define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ -#define CURL_VERSION_CONV (1<<12) /* character conversions are - supported */ - -/* +#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ +#define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported + (deprecated) */ +#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ +#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ +#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ +#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported + (deprecated) */ +#define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */ +#define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */ +#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */ +#define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */ +#define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are + supported */ +#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */ +#define CURL_VERSION_CONV (1<<12) /* Character conversions supported */ +#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */ +#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ +#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper + is suported */ +#define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */ +#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */ +#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */ +#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */ +#define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used + for cookie domain verification */ + + /* * NAME curl_version_info() * * DESCRIPTION diff --git a/WebKitLibraries/win/include/curl/curlbuild.h b/WebKitLibraries/win/include/curl/curlbuild.h index 9cb34732..ae95095f 100644 --- a/WebKitLibraries/win/include/curl/curlbuild.h +++ b/WebKitLibraries/win/include/curl/curlbuild.h @@ -7,11 +7,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: curlbuild.h.dist,v 1.28 2009-05-12 01:57:54 yangtse Exp $ ***************************************************************************/ /* ================================================================ */ @@ -50,7 +49,7 @@ * * If you think that something actually needs to be changed, adjusted * or fixed in this file, then, report it on the libcurl development - * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/ + * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ * * Try to keep one section per platform, compiler and architecture, * otherwise, if an existing section is reused for a different one and @@ -68,7 +67,7 @@ * * For any given platform/compiler curl_off_t must be typedef'ed to a * 64-bit wide signed integral data type. The width of this data type - * must remain constant and independant of any possible large file + * must remain constant and independent of any possible large file * support settings. * * As an exception to the above, curl_off_t shall be typedef'ed to a @@ -76,7 +75,7 @@ * * As a general rule, curl_off_t shall not be mapped to off_t. This * rule shall only be violated if off_t is the only 64-bit data type - * available and the size of off_t is independant of large file support + * available and the size of off_t is independent of large file support * settings. Keep your build on the safe side avoiding an off_t gating. * If you have a 64-bit off_t then take for sure that another 64-bit * data type exists, dig deeper and you will find it. @@ -90,7 +89,7 @@ * when the libcurl source code distribution archive file is created. * * File include/curl/curlbuild.h.dist is not included in the distribution - * archive. File include/curl/curlbuild.h is not present in the CVS tree. + * archive. File include/curl/curlbuild.h is not present in the git tree. * * The distributed include/curl/curlbuild.h file is only intended to be used * on systems which can not run the also distributed configure script. @@ -100,7 +99,7 @@ * is suitable and specific to the library being configured and built, which * is generated from the include/curl/curlbuild.h.in template file. * - * If you check out from CVS on a non-configure platform, you must run the + * If you check out from git on a non-configure platform, you must run the * appropriate buildconf* script to set up curlbuild.h and other local files. * */ @@ -370,16 +369,7 @@ # define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__VMS) -# if defined(__alpha) || defined(__ia64) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# else +# if defined(__VAX) # define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" @@ -388,6 +378,15 @@ # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int # define CURL_SIZEOF_CURL_SOCKLEN_T 4 @@ -528,7 +527,9 @@ /* ===================================== */ #elif defined(__GNUC__) -# if defined(__i386__) || defined(__ppc__) +# if !defined(__LP64__) && (defined(__ILP32__) || \ + defined(__i386__) || defined(__ppc__) || defined(__arm__) || \ + defined(__sparc__) || defined(__mips__) || defined(__sh__)) # define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" @@ -537,7 +538,8 @@ # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(__x86_64__) || defined(__ppc64__) +# elif defined(__LP64__) || \ + defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) # define CURL_SIZEOF_LONG 8 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" diff --git a/WebKitLibraries/win/include/curl/curlrules.h b/WebKitLibraries/win/include/curl/curlrules.h index 44018737..55d21f68 100644 --- a/WebKitLibraries/win/include/curl/curlrules.h +++ b/WebKitLibraries/win/include/curl/curlrules.h @@ -7,11 +7,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: curlrules.h,v 1.6 2009-04-29 15:15:38 yangtse Exp $ ***************************************************************************/ /* ================================================================ */ @@ -48,7 +47,7 @@ * library is properly built and used. * * You can find further help on the libcurl development mailing list: - * http://cool.haxx.se/mailman/listinfo/curl-library/ + * https://cool.haxx.se/mailman/listinfo/curl-library/ * * NOTE 2 * ------ @@ -57,7 +56,7 @@ * that the dimension of a constant array can not be a negative one. * In this way if the compile time verification fails, the compilation * will fail issuing an error. The error description wording is compiler - * dependant but it will be quite similar to one of the following: + * dependent but it will be quite similar to one of the following: * * "negative subscript or subscript is too large" * "array must have at least one element" @@ -187,11 +186,11 @@ typedef char /* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ /* ================================================================ */ -/* +/* * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow * these to be visible and exported by the external libcurl interface API, * while also making them visible to the library internals, simply including - * setup.h, without actually needing to include curl.h internally. + * curl_setup.h, without actually needing to include curl.h internally. * If some day this section would grow big enough, all this should be moved * to its own header file. */ @@ -217,14 +216,23 @@ typedef char * Macros for minimum-width signed and unsigned curl_off_t integer constants. */ -#ifdef CURL_ISOCPP -# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val ## Suffix +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) +# define __CURL_OFF_T_C_HLPR2(x) x +# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) #else -# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix +# ifdef CURL_ISOCPP +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix +# else +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix +# endif +# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) #endif -#define __CURL_OFF_T_C_HELPER1(Val,Suffix) __CURL_OFF_T_C_HELPER2(Val,Suffix) -#define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T) -#define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU) /* * Get rid of macros private to this header file. @@ -240,10 +248,15 @@ typedef char #undef CURL_PULL_WS2TCPIP_H #undef CURL_PULL_SYS_TYPES_H #undef CURL_PULL_SYS_SOCKET_H +#undef CURL_PULL_SYS_POLL_H #undef CURL_PULL_STDINT_H #undef CURL_PULL_INTTYPES_H #undef CURL_TYPEOF_CURL_SOCKLEN_T #undef CURL_TYPEOF_CURL_OFF_T +#ifdef CURL_NO_OLDIES +#undef CURL_FORMAT_OFF_T /* not required since 7.19.0 - obsoleted in 7.20.0 */ +#endif + #endif /* __CURL_CURLRULES_H */ diff --git a/WebKitLibraries/win/include/curl/curlver.h b/WebKitLibraries/win/include/curl/curlver.h index 66314a91..cebcf422 100644 --- a/WebKitLibraries/win/include/curl/curlver.h +++ b/WebKitLibraries/win/include/curl/curlver.h @@ -7,11 +7,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -20,24 +20,23 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: curlver.h,v 1.46 2009-03-02 23:44:43 bagder Exp $ ***************************************************************************/ /* This header file contains nothing but libcurl version info, generated by a script at release-time. This was made its own header file in 7.11.2 */ /* This is the global package copyright */ -#define LIBCURL_COPYRIGHT "1996 - 2009 Daniel Stenberg, ." +#define LIBCURL_COPYRIGHT "1996 - 2016 Daniel Stenberg, ." /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.19.5" +#define LIBCURL_VERSION "7.50.0" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 5 +#define LIBCURL_VERSION_MINOR 50 +#define LIBCURL_VERSION_PATCH 0 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,18 +52,26 @@ This 6-digit (24 bits) hexadecimal number does not show pre-release number, and it is always a greater number in a more recent release. It makes comparisons with greater than and less than work. + + Note: This define is the full hex number and _does not_ use the + CURL_VERSION_BITS() macro since curl's own configure script greps for it + and needs it to contain the full number. */ -#define LIBCURL_VERSION_NUM 0x071305 +#define LIBCURL_VERSION_NUM 0x073200 /* * This is the date and time when the full source package was created. The - * timestamp is not stored in CVS, as the timestamp is properly set in the + * timestamp is not stored in git, as the timestamp is properly set in the * tarballs by the maketgz script. * * The format of the date should follow this template: * * "Mon Feb 12 11:35:33 UTC 2007" */ -#define LIBCURL_TIMESTAMP "Mon May 18 07:07:11 UTC 2009" +#define LIBCURL_TIMESTAMP "Thu Jul 21 08:55:43 UTC 2016" + +#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z) +#define CURL_AT_LEAST_VERSION(x,y,z) \ + (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) #endif /* __CURL_CURLVER_H */ diff --git a/WebKitLibraries/win/include/curl/easy.h b/WebKitLibraries/win/include/curl/easy.h index 40449c3e..afc766cd 100644 --- a/WebKitLibraries/win/include/curl/easy.h +++ b/WebKitLibraries/win/include/curl/easy.h @@ -11,7 +11,7 @@ * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: easy.h,v 1.14 2008-05-12 21:43:28 bagder Exp $ ***************************************************************************/ #ifdef __cplusplus extern "C" { @@ -54,8 +53,8 @@ CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); * * Creates a new curl session handle with the same options set for the handle * passed in. Duplicating a handle could only be a matter of cloning data and - * options, internal state info and things like persistant connections cannot - * be transfered. It is useful in multithreaded applications when you can run + * options, internal state info and things like persistent connections cannot + * be transferred. It is useful in multithreaded applications when you can run * curl_easy_duphandle() for each new thread to avoid a series of identical * curl_easy_setopt() invokes in every thread. */ diff --git a/WebKitLibraries/win/include/curl/mprintf.h b/WebKitLibraries/win/include/curl/mprintf.h index d7202de1..e20f546e 100644 --- a/WebKitLibraries/win/include/curl/mprintf.h +++ b/WebKitLibraries/win/include/curl/mprintf.h @@ -7,11 +7,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -20,13 +20,11 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: mprintf.h,v 1.16 2008-05-20 10:21:50 patrickm Exp $ ***************************************************************************/ #include #include /* needed for FILE */ - -#include "curl.h" +#include "curl.h" /* for CURL_EXTERN */ #ifdef __cplusplus extern "C" { @@ -45,36 +43,6 @@ CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, CURL_EXTERN char *curl_maprintf(const char *format, ...); CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); -#ifdef _MPRINTF_REPLACE -# undef printf -# undef fprintf -# undef sprintf -# undef vsprintf -# undef snprintf -# undef vprintf -# undef vfprintf -# undef vsnprintf -# undef aprintf -# undef vaprintf -# define printf curl_mprintf -# define fprintf curl_mfprintf -#ifdef CURLDEBUG -/* When built with CURLDEBUG we define away the sprintf() functions since we - don't want internal code to be using them */ -# define sprintf sprintf_was_used -# define vsprintf vsprintf_was_used -#else -# define sprintf curl_msprintf -# define vsprintf curl_mvsprintf -#endif -# define snprintf curl_msnprintf -# define vprintf curl_mvprintf -# define vfprintf curl_mvfprintf -# define vsnprintf curl_mvsnprintf -# define aprintf curl_maprintf -# define vaprintf curl_mvaprintf -#endif - #ifdef __cplusplus } #endif diff --git a/WebKitLibraries/win/include/curl/multi.h b/WebKitLibraries/win/include/curl/multi.h index 153f7721..7a1040f4 100644 --- a/WebKitLibraries/win/include/curl/multi.h +++ b/WebKitLibraries/win/include/curl/multi.h @@ -7,11 +7,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: multi.h,v 1.45 2008-05-20 10:21:50 patrickm Exp $ ***************************************************************************/ /* This is an "external" header file. Don't give away any internals here! @@ -53,7 +52,7 @@ extern "C" { #endif -typedef void CURLM; +typedef struct Curl_multi CURLM; typedef enum { CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or @@ -65,6 +64,8 @@ typedef enum { CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ + CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was + attempted to get added - again */ CURLM_LAST } CURLMcode; @@ -73,6 +74,11 @@ typedef enum { curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ #define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM +/* bitmask bits for CURLMOPT_PIPELINING */ +#define CURLPIPE_NOTHING 0L +#define CURLPIPE_HTTP1 1L +#define CURLPIPE_MULTIPLEX 2L + typedef enum { CURLMSG_NONE, /* first, not used */ CURLMSG_DONE, /* This easy handle has completed. 'result' contains @@ -90,6 +96,19 @@ struct CURLMsg { }; typedef struct CURLMsg CURLMsg; +/* Based on poll(2) structure and values. + * We don't use pollfd and POLL* constants explicitly + * to cover platforms without poll(). */ +#define CURL_WAIT_POLLIN 0x0001 +#define CURL_WAIT_POLLPRI 0x0002 +#define CURL_WAIT_POLLOUT 0x0004 + +struct curl_waitfd { + curl_socket_t fd; + short events; + short revents; /* not supported yet */ +}; + /* * Name: curl_multi_init() * @@ -134,6 +153,20 @@ CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, fd_set *exc_fd_set, int *max_fd); +/* + * Name: curl_multi_wait() + * + * Desc: Poll on all fds within a CURLM set as well as any + * additional fds passed to the function. + * + * Returns: CURLMcode type, general multi error code. + */ +CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, + struct curl_waitfd extra_fds[], + unsigned int extra_nfds, + int timeout_ms, + int *ret); + /* * Name: curl_multi_perform() * @@ -312,6 +345,37 @@ typedef enum { /* maximum number of entries in the connection cache */ CINIT(MAXCONNECTS, LONG, 6), + /* maximum number of (pipelining) connections to one host */ + CINIT(MAX_HOST_CONNECTIONS, LONG, 7), + + /* maximum number of requests in a pipeline */ + CINIT(MAX_PIPELINE_LENGTH, LONG, 8), + + /* a connection with a content-length longer than this + will not be considered for pipelining */ + CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9), + + /* a connection with a chunk length longer than this + will not be considered for pipelining */ + CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10), + + /* a list of site names(+port) that are blacklisted from + pipelining */ + CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11), + + /* a list of server types that are blacklisted from + pipelining */ + CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12), + + /* maximum number of open connections in total */ + CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13), + + /* This is the server push callback function pointer */ + CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14), + + /* This is the argument passed to the server push callback */ + CINIT(PUSHDATA, OBJECTPOINT, 15), + CURLMOPT_LASTENTRY /* the last unused */ } CURLMoption; @@ -339,6 +403,31 @@ CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t sockfd, void *sockp); + +/* + * Name: curl_push_callback + * + * Desc: This callback gets called when a new stream is being pushed by the + * server. It approves or denies the new stream. + * + * Returns: CURL_PUSH_OK or CURL_PUSH_DENY. + */ +#define CURL_PUSH_OK 0 +#define CURL_PUSH_DENY 1 + +struct curl_pushheaders; /* forward declaration only */ + +CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h, + size_t num); +CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h, + const char *name); + +typedef int (*curl_push_callback)(CURL *parent, + CURL *easy, + size_t num_headers, + struct curl_pushheaders *headers, + void *userp); + #ifdef __cplusplus } /* end of extern "C" */ #endif diff --git a/WebKitLibraries/win/include/curl/stdcheaders.h b/WebKitLibraries/win/include/curl/stdcheaders.h index 024413ac..6f0f7f34 100644 --- a/WebKitLibraries/win/include/curl/stdcheaders.h +++ b/WebKitLibraries/win/include/curl/stdcheaders.h @@ -1,18 +1,18 @@ #ifndef __STDC_HEADERS_H #define __STDC_HEADERS_H /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * + * are also available at https://curl.haxx.se/docs/copyright.html. + * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: stdcheaders.h,v 1.8 2004/01/07 09:19:34 bagder Exp $ ***************************************************************************/ #include @@ -31,4 +30,4 @@ size_t fwrite (const void *, size_t, size_t, FILE *); int strcasecmp(const char *, const char *); int strncasecmp(const char *, const char *, size_t); -#endif +#endif /* __STDC_HEADERS_H */ diff --git a/WebKitLibraries/win/include/curl/typecheck-gcc.h b/WebKitLibraries/win/include/curl/typecheck-gcc.h index 97883058..6ec8bcfd 100644 --- a/WebKitLibraries/win/include/curl/typecheck-gcc.h +++ b/WebKitLibraries/win/include/curl/typecheck-gcc.h @@ -7,11 +7,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -20,69 +20,88 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: typecheck-gcc.h,v 1.9 2009-01-25 23:26:31 bagder Exp $ ***************************************************************************/ /* wraps curl_easy_setopt() with typechecking */ /* To add a new kind of warning, add an - * if(_curl_is_sometype_option(_curl_opt) && ! _curl_is_sometype(value)) - * _curl_easy_setopt_err_sometype(); + * if(_curl_is_sometype_option(_curl_opt)) + * if(!_curl_is_sometype(value)) + * _curl_easy_setopt_err_sometype(); * block and define _curl_is_sometype_option, _curl_is_sometype and * _curl_easy_setopt_err_sometype below * + * NOTE: We use two nested 'if' statements here instead of the && operator, in + * order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x + * when compiling with -Wlogical-op. + * * To add an option that uses the same type as an existing option, you'll just * need to extend the appropriate _curl_*_option macro */ #define curl_easy_setopt(handle, option, value) \ __extension__ ({ \ __typeof__ (option) _curl_opt = option; \ - if (__builtin_constant_p(_curl_opt)) { \ - if (_curl_is_long_option(_curl_opt) && !_curl_is_long(value)) \ - _curl_easy_setopt_err_long(); \ - if (_curl_is_off_t_option(_curl_opt) && !_curl_is_off_t(value)) \ - _curl_easy_setopt_err_curl_off_t(); \ - if (_curl_is_string_option(_curl_opt) && !_curl_is_string(value)) \ - _curl_easy_setopt_err_string(); \ - if (_curl_is_write_cb_option(_curl_opt) && !_curl_is_write_cb(value)) \ - _curl_easy_setopt_err_write_callback(); \ - if ((_curl_opt) == CURLOPT_READFUNCTION && !_curl_is_read_cb(value)) \ - _curl_easy_setopt_err_read_cb(); \ - if ((_curl_opt) == CURLOPT_IOCTLFUNCTION && !_curl_is_ioctl_cb(value)) \ - _curl_easy_setopt_err_ioctl_cb(); \ - if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION && !_curl_is_sockopt_cb(value))\ - _curl_easy_setopt_err_sockopt_cb(); \ - if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION && \ - !_curl_is_opensocket_cb(value)) \ - _curl_easy_setopt_err_opensocket_cb(); \ - if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION && \ - !_curl_is_progress_cb(value)) \ - _curl_easy_setopt_err_progress_cb(); \ - if ((_curl_opt) == CURLOPT_DEBUGFUNCTION && !_curl_is_debug_cb(value)) \ - _curl_easy_setopt_err_debug_cb(); \ - if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION && \ - !_curl_is_ssl_ctx_cb(value)) \ - _curl_easy_setopt_err_ssl_ctx_cb(); \ - if (_curl_is_conv_cb_option(_curl_opt) && !_curl_is_conv_cb(value)) \ - _curl_easy_setopt_err_conv_cb(); \ - if ((_curl_opt) == CURLOPT_SEEKFUNCTION && !_curl_is_seek_cb(value)) \ - _curl_easy_setopt_err_seek_cb(); \ - if (_curl_is_cb_data_option(_curl_opt) && !_curl_is_cb_data(value)) \ - _curl_easy_setopt_err_cb_data(); \ - if ((_curl_opt) == CURLOPT_ERRORBUFFER && !_curl_is_error_buffer(value)) \ - _curl_easy_setopt_err_error_buffer(); \ - if ((_curl_opt) == CURLOPT_STDERR && !_curl_is_FILE(value)) \ - _curl_easy_setopt_err_FILE(); \ - if (_curl_is_postfields_option(_curl_opt) && !_curl_is_postfields(value)) \ - _curl_easy_setopt_err_postfields(); \ - if ((_curl_opt) == CURLOPT_HTTPPOST && \ - !_curl_is_arr((value), struct curl_httppost)) \ - _curl_easy_setopt_err_curl_httpost(); \ - if (_curl_is_slist_option(_curl_opt) && \ - !_curl_is_arr((value), struct curl_slist)) \ - _curl_easy_setopt_err_curl_slist(); \ - if ((_curl_opt) == CURLOPT_SHARE && !_curl_is_ptr((value), CURLSH)) \ - _curl_easy_setopt_err_CURLSH(); \ + if(__builtin_constant_p(_curl_opt)) { \ + if(_curl_is_long_option(_curl_opt)) \ + if(!_curl_is_long(value)) \ + _curl_easy_setopt_err_long(); \ + if(_curl_is_off_t_option(_curl_opt)) \ + if(!_curl_is_off_t(value)) \ + _curl_easy_setopt_err_curl_off_t(); \ + if(_curl_is_string_option(_curl_opt)) \ + if(!_curl_is_string(value)) \ + _curl_easy_setopt_err_string(); \ + if(_curl_is_write_cb_option(_curl_opt)) \ + if(!_curl_is_write_cb(value)) \ + _curl_easy_setopt_err_write_callback(); \ + if((_curl_opt) == CURLOPT_READFUNCTION) \ + if(!_curl_is_read_cb(value)) \ + _curl_easy_setopt_err_read_cb(); \ + if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ + if(!_curl_is_ioctl_cb(value)) \ + _curl_easy_setopt_err_ioctl_cb(); \ + if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ + if(!_curl_is_sockopt_cb(value)) \ + _curl_easy_setopt_err_sockopt_cb(); \ + if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ + if(!_curl_is_opensocket_cb(value)) \ + _curl_easy_setopt_err_opensocket_cb(); \ + if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ + if(!_curl_is_progress_cb(value)) \ + _curl_easy_setopt_err_progress_cb(); \ + if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ + if(!_curl_is_debug_cb(value)) \ + _curl_easy_setopt_err_debug_cb(); \ + if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ + if(!_curl_is_ssl_ctx_cb(value)) \ + _curl_easy_setopt_err_ssl_ctx_cb(); \ + if(_curl_is_conv_cb_option(_curl_opt)) \ + if(!_curl_is_conv_cb(value)) \ + _curl_easy_setopt_err_conv_cb(); \ + if((_curl_opt) == CURLOPT_SEEKFUNCTION) \ + if(!_curl_is_seek_cb(value)) \ + _curl_easy_setopt_err_seek_cb(); \ + if(_curl_is_cb_data_option(_curl_opt)) \ + if(!_curl_is_cb_data(value)) \ + _curl_easy_setopt_err_cb_data(); \ + if((_curl_opt) == CURLOPT_ERRORBUFFER) \ + if(!_curl_is_error_buffer(value)) \ + _curl_easy_setopt_err_error_buffer(); \ + if((_curl_opt) == CURLOPT_STDERR) \ + if(!_curl_is_FILE(value)) \ + _curl_easy_setopt_err_FILE(); \ + if(_curl_is_postfields_option(_curl_opt)) \ + if(!_curl_is_postfields(value)) \ + _curl_easy_setopt_err_postfields(); \ + if((_curl_opt) == CURLOPT_HTTPPOST) \ + if(!_curl_is_arr((value), struct curl_httppost)) \ + _curl_easy_setopt_err_curl_httpost(); \ + if(_curl_is_slist_option(_curl_opt)) \ + if(!_curl_is_arr((value), struct curl_slist)) \ + _curl_easy_setopt_err_curl_slist(); \ + if((_curl_opt) == CURLOPT_SHARE) \ + if(!_curl_is_ptr((value), CURLSH)) \ + _curl_easy_setopt_err_CURLSH(); \ } \ curl_easy_setopt(handle, _curl_opt, value); \ }) @@ -92,16 +111,19 @@ __extension__ ({ \ #define curl_easy_getinfo(handle, info, arg) \ __extension__ ({ \ __typeof__ (info) _curl_info = info; \ - if (__builtin_constant_p(_curl_info)) { \ - if (_curl_is_string_info(_curl_info) && !_curl_is_arr((arg), char *)) \ - _curl_easy_getinfo_err_string(); \ - if (_curl_is_long_info(_curl_info) && !_curl_is_arr((arg), long)) \ - _curl_easy_getinfo_err_long(); \ - if (_curl_is_double_info(_curl_info) && !_curl_is_arr((arg), double)) \ - _curl_easy_getinfo_err_double(); \ - if (_curl_is_slist_info(_curl_info) && \ - !_curl_is_arr((arg), struct curl_slist *)) \ - _curl_easy_getinfo_err_curl_slist(); \ + if(__builtin_constant_p(_curl_info)) { \ + if(_curl_is_string_info(_curl_info)) \ + if(!_curl_is_arr((arg), char *)) \ + _curl_easy_getinfo_err_string(); \ + if(_curl_is_long_info(_curl_info)) \ + if(!_curl_is_arr((arg), long)) \ + _curl_easy_getinfo_err_long(); \ + if(_curl_is_double_info(_curl_info)) \ + if(!_curl_is_arr((arg), double)) \ + _curl_easy_getinfo_err_double(); \ + if(_curl_is_slist_info(_curl_info)) \ + if(!_curl_is_arr((arg), struct curl_slist *)) \ + _curl_easy_getinfo_err_curl_slist(); \ } \ curl_easy_getinfo(handle, _curl_info, arg); \ }) @@ -119,15 +141,17 @@ __extension__ ({ \ /* To define a new warning, use _CURL_WARNING(identifier, "message") */ #define _CURL_WARNING(id, message) \ - static void __attribute__((warning(message))) __attribute__((unused)) \ - __attribute__((noinline)) id(void) { __asm__(""); } + static void __attribute__((__warning__(message))) \ + __attribute__((__unused__)) __attribute__((__noinline__)) \ + id(void) { __asm__(""); } _CURL_WARNING(_curl_easy_setopt_err_long, "curl_easy_setopt expects a long argument for this option") _CURL_WARNING(_curl_easy_setopt_err_curl_off_t, "curl_easy_setopt expects a curl_off_t argument for this option") _CURL_WARNING(_curl_easy_setopt_err_string, - "curl_easy_setopt expects a string (char* or char[]) argument for this option" + "curl_easy_setopt expects a " + "string (char* or char[]) argument for this option" ) _CURL_WARNING(_curl_easy_setopt_err_write_callback, "curl_easy_setopt expects a curl_write_callback argument for this option") @@ -138,7 +162,8 @@ _CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, _CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, "curl_easy_setopt expects a curl_sockopt_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, - "curl_easy_setopt expects a curl_opensocket_callback argument for this option" + "curl_easy_setopt expects a " + "curl_opensocket_callback argument for this option" ) _CURL_WARNING(_curl_easy_setopt_err_progress_cb, "curl_easy_setopt expects a curl_progress_callback argument for this option") @@ -151,9 +176,11 @@ _CURL_WARNING(_curl_easy_setopt_err_conv_cb, _CURL_WARNING(_curl_easy_setopt_err_seek_cb, "curl_easy_setopt expects a curl_seek_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_cb_data, - "curl_easy_setopt expects a private data pointer as argument for this option") + "curl_easy_setopt expects a " + "private data pointer as argument for this option") _CURL_WARNING(_curl_easy_setopt_err_error_buffer, - "curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option") + "curl_easy_setopt expects a " + "char buffer of CURL_ERROR_SIZE as argument for this option") _CURL_WARNING(_curl_easy_setopt_err_FILE, "curl_easy_setopt expects a FILE* argument for this option") _CURL_WARNING(_curl_easy_setopt_err_postfields, @@ -191,46 +218,67 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, /* evaluates to true if option takes a char* argument */ #define _curl_is_string_option(option) \ - ((option) == CURLOPT_URL || \ - (option) == CURLOPT_PROXY || \ - (option) == CURLOPT_INTERFACE || \ - (option) == CURLOPT_NETRC_FILE || \ - (option) == CURLOPT_USERPWD || \ - (option) == CURLOPT_USERNAME || \ - (option) == CURLOPT_PASSWORD || \ - (option) == CURLOPT_PROXYUSERPWD || \ - (option) == CURLOPT_PROXYUSERNAME || \ - (option) == CURLOPT_PROXYPASSWORD || \ - (option) == CURLOPT_NOPROXY || \ - (option) == CURLOPT_ENCODING || \ - (option) == CURLOPT_REFERER || \ - (option) == CURLOPT_USERAGENT || \ + ((option) == CURLOPT_ACCEPT_ENCODING || \ + (option) == CURLOPT_CAINFO || \ + (option) == CURLOPT_CAPATH || \ (option) == CURLOPT_COOKIE || \ (option) == CURLOPT_COOKIEFILE || \ (option) == CURLOPT_COOKIEJAR || \ (option) == CURLOPT_COOKIELIST || \ + (option) == CURLOPT_CRLFILE || \ + (option) == CURLOPT_CUSTOMREQUEST || \ + (option) == CURLOPT_DEFAULT_PROTOCOL || \ + (option) == CURLOPT_DNS_INTERFACE || \ + (option) == CURLOPT_DNS_LOCAL_IP4 || \ + (option) == CURLOPT_DNS_LOCAL_IP6 || \ + (option) == CURLOPT_DNS_SERVERS || \ + (option) == CURLOPT_EGDSOCKET || \ (option) == CURLOPT_FTPPORT || \ - (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ (option) == CURLOPT_FTP_ACCOUNT || \ + (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ + (option) == CURLOPT_INTERFACE || \ + (option) == CURLOPT_ISSUERCERT || \ + (option) == CURLOPT_KEYPASSWD || \ + (option) == CURLOPT_KRBLEVEL || \ + (option) == CURLOPT_LOGIN_OPTIONS || \ + (option) == CURLOPT_MAIL_AUTH || \ + (option) == CURLOPT_MAIL_FROM || \ + (option) == CURLOPT_NETRC_FILE || \ + (option) == CURLOPT_NOPROXY || \ + (option) == CURLOPT_PASSWORD || \ + (option) == CURLOPT_PINNEDPUBLICKEY || \ + (option) == CURLOPT_PROXY || \ + (option) == CURLOPT_PROXYPASSWORD || \ + (option) == CURLOPT_PROXYUSERNAME || \ + (option) == CURLOPT_PROXYUSERPWD || \ + (option) == CURLOPT_PROXY_SERVICE_NAME || \ + (option) == CURLOPT_RANDOM_FILE || \ (option) == CURLOPT_RANGE || \ - (option) == CURLOPT_CUSTOMREQUEST || \ + (option) == CURLOPT_REFERER || \ + (option) == CURLOPT_RTSP_SESSION_ID || \ + (option) == CURLOPT_RTSP_STREAM_URI || \ + (option) == CURLOPT_RTSP_TRANSPORT || \ + (option) == CURLOPT_SERVICE_NAME || \ + (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \ + (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ + (option) == CURLOPT_SSH_KNOWNHOSTS || \ + (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ + (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ (option) == CURLOPT_SSLCERT || \ (option) == CURLOPT_SSLCERTTYPE || \ + (option) == CURLOPT_SSLENGINE || \ (option) == CURLOPT_SSLKEY || \ (option) == CURLOPT_SSLKEYTYPE || \ - (option) == CURLOPT_KEYPASSWD || \ - (option) == CURLOPT_SSLENGINE || \ - (option) == CURLOPT_CAINFO || \ - (option) == CURLOPT_CAPATH || \ - (option) == CURLOPT_RANDOM_FILE || \ - (option) == CURLOPT_EGDSOCKET || \ (option) == CURLOPT_SSL_CIPHER_LIST || \ - (option) == CURLOPT_KRBLEVEL || \ - (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ - (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ - (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ - (option) == CURLOPT_CRLFILE || \ - (option) == CURLOPT_ISSUERCERT || \ + (option) == CURLOPT_TLSAUTH_PASSWORD || \ + (option) == CURLOPT_TLSAUTH_TYPE || \ + (option) == CURLOPT_TLSAUTH_USERNAME || \ + (option) == CURLOPT_UNIX_SOCKET_PATH || \ + (option) == CURLOPT_URL || \ + (option) == CURLOPT_USERAGENT || \ + (option) == CURLOPT_USERNAME || \ + (option) == CURLOPT_USERPWD || \ + (option) == CURLOPT_XOAUTH2_BEARER || \ 0) /* evaluates to true if option takes a curl_write_callback argument */ @@ -246,17 +294,22 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, /* evaluates to true if option takes a data argument to pass to a callback */ #define _curl_is_cb_data_option(option) \ - ((option) == CURLOPT_WRITEDATA || \ - (option) == CURLOPT_READDATA || \ + ((option) == CURLOPT_CHUNK_DATA || \ + (option) == CURLOPT_CLOSESOCKETDATA || \ + (option) == CURLOPT_DEBUGDATA || \ + (option) == CURLOPT_FNMATCH_DATA || \ + (option) == CURLOPT_HEADERDATA || \ + (option) == CURLOPT_INTERLEAVEDATA || \ (option) == CURLOPT_IOCTLDATA || \ - (option) == CURLOPT_SOCKOPTDATA || \ (option) == CURLOPT_OPENSOCKETDATA || \ + (option) == CURLOPT_PRIVATE || \ (option) == CURLOPT_PROGRESSDATA || \ - (option) == CURLOPT_WRITEHEADER || \ - (option) == CURLOPT_DEBUGDATA || \ - (option) == CURLOPT_SSL_CTX_DATA || \ + (option) == CURLOPT_READDATA || \ (option) == CURLOPT_SEEKDATA || \ - (option) == CURLOPT_PRIVATE || \ + (option) == CURLOPT_SOCKOPTDATA || \ + (option) == CURLOPT_SSH_KEYDATA || \ + (option) == CURLOPT_SSL_CTX_DATA || \ + (option) == CURLOPT_WRITEDATA || \ 0) /* evaluates to true if option takes a POST data argument (void* or char*) */ @@ -267,11 +320,14 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, /* evaluates to true if option takes a struct curl_slist * argument */ #define _curl_is_slist_option(option) \ - ((option) == CURLOPT_HTTPHEADER || \ - (option) == CURLOPT_HTTP200ALIASES || \ - (option) == CURLOPT_QUOTE || \ + ((option) == CURLOPT_HTTP200ALIASES || \ + (option) == CURLOPT_HTTPHEADER || \ + (option) == CURLOPT_MAIL_RCPT || \ (option) == CURLOPT_POSTQUOTE || \ (option) == CURLOPT_PREQUOTE || \ + (option) == CURLOPT_PROXYHEADER || \ + (option) == CURLOPT_QUOTE || \ + (option) == CURLOPT_RESOLVE || \ (option) == CURLOPT_TELNETOPTIONS || \ 0) @@ -355,7 +411,8 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, /* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ /* XXX: also check size of an char[] array? */ #define _curl_is_error_buffer(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), char *) || \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), char *) || \ __builtin_types_compatible_p(__typeof__(expr), char[])) /* evaluates to true if expr is of type (const) void* or (const) FILE* */ @@ -448,7 +505,8 @@ typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, curlsocktype); -/* evaluates to true if expr is of type curl_opensocket_callback or "similar" */ +/* evaluates to true if expr is of type curl_opensocket_callback or + "similar" */ #define _curl_is_opensocket_cb(expr) \ (_curl_is_NULL(expr) || \ __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ @@ -483,7 +541,11 @@ typedef int (_curl_progress_callback2)(const void *, _curl_callback_compatible((expr), _curl_debug_callback1) || \ _curl_callback_compatible((expr), _curl_debug_callback2) || \ _curl_callback_compatible((expr), _curl_debug_callback3) || \ - _curl_callback_compatible((expr), _curl_debug_callback4)) + _curl_callback_compatible((expr), _curl_debug_callback4) || \ + _curl_callback_compatible((expr), _curl_debug_callback5) || \ + _curl_callback_compatible((expr), _curl_debug_callback6) || \ + _curl_callback_compatible((expr), _curl_debug_callback7) || \ + _curl_callback_compatible((expr), _curl_debug_callback8)) typedef int (_curl_debug_callback1) (CURL *, curl_infotype, char *, size_t, void *); typedef int (_curl_debug_callback2) (CURL *, @@ -492,6 +554,14 @@ typedef int (_curl_debug_callback3) (CURL *, curl_infotype, const char *, size_t, void *); typedef int (_curl_debug_callback4) (CURL *, curl_infotype, const char *, size_t, const void *); +typedef int (_curl_debug_callback5) (CURL *, + curl_infotype, unsigned char *, size_t, void *); +typedef int (_curl_debug_callback6) (CURL *, + curl_infotype, unsigned char *, size_t, const void *); +typedef int (_curl_debug_callback7) (CURL *, + curl_infotype, const unsigned char *, size_t, void *); +typedef int (_curl_debug_callback8) (CURL *, + curl_infotype, const unsigned char *, size_t, const void *); /* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ /* this is getting even messier... */ @@ -517,7 +587,8 @@ typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *); +typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, + const void *); #else typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; diff --git a/WebKitLibraries/win/include/curl/types.h b/WebKitLibraries/win/include/curl/types.h deleted file mode 100644 index d37d6ae9..00000000 --- a/WebKitLibraries/win/include/curl/types.h +++ /dev/null @@ -1 +0,0 @@ -/* not used */ diff --git a/WebKitLibraries/win/lib/libcrypto.lib b/WebKitLibraries/win/lib/libcrypto.lib new file mode 100644 index 00000000..7cf606c1 Binary files /dev/null and b/WebKitLibraries/win/lib/libcrypto.lib differ diff --git a/WebKitLibraries/win/lib/libcurl.lib b/WebKitLibraries/win/lib/libcurl.lib new file mode 100644 index 00000000..328f58fc Binary files /dev/null and b/WebKitLibraries/win/lib/libcurl.lib differ diff --git a/WebKitLibraries/win/lib/libcurl_imp.lib b/WebKitLibraries/win/lib/libcurl_imp.lib deleted file mode 100644 index 85886c44..00000000 Binary files a/WebKitLibraries/win/lib/libcurl_imp.lib and /dev/null differ diff --git a/WebKitLibraries/win/lib/libeay32.lib b/WebKitLibraries/win/lib/libeay32.lib deleted file mode 100644 index ae070c70..00000000 Binary files a/WebKitLibraries/win/lib/libeay32.lib and /dev/null differ diff --git a/WebKitLibraries/win/lib/libssl.lib b/WebKitLibraries/win/lib/libssl.lib new file mode 100644 index 00000000..8c07a6ea Binary files /dev/null and b/WebKitLibraries/win/lib/libssl.lib differ diff --git a/WebKitLibraries/win/lib/ossl_static.pdb b/WebKitLibraries/win/lib/ossl_static.pdb new file mode 100644 index 00000000..4243cc09 Binary files /dev/null and b/WebKitLibraries/win/lib/ossl_static.pdb differ diff --git a/WebKitLibraries/win/lib/ssleay32.lib b/WebKitLibraries/win/lib/ssleay32.lib deleted file mode 100644 index 710e6f0f..00000000 Binary files a/WebKitLibraries/win/lib/ssleay32.lib and /dev/null differ diff --git a/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.props b/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.props new file mode 100644 index 00000000..7ba40ae5 --- /dev/null +++ b/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.props @@ -0,0 +1,287 @@ + + + + + + + + ENABLE_CHANNEL_MESSAGING + ENABLE_CLIENT_BASED_GEOLOCATION + + + + ENABLE_SQL_DATABASE + + ENABLE_DATALIST + + ENABLE_DETAILS + + + ENABLE_FILTERS + + + + + ENABLE_GEOLOCATION + ENABLE_ICONDATABASE + + + + + + + + + + ENABLE_JAVASCRIPT_DEBUGGER + + ENABLE_MATHML + ENABLE_METER_TAG + + + + + + + + ENABLE_SHARED_WORKERS + ENABLE_SVG + + ENABLE_SVG_FONTS + + + + + ENABLE_WEB_SOCKETS + + ENABLE_WORKERS + ENABLE_XSLT + + + + $(ENABLE_3D_CANVAS);$(ENABLE_3D_RENDERING);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_BLOB);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CLIENT_BASED_GEOLOCATION);$(ENABLE_CSS_FILTERS);$(ENABLE_CSS_REGIONS);$(ENABLE_CSS_EXCLUSIONS);$(ENABLE_SQL_DATABASE);$(ENABLE_DATAGRID);$(ENABLE_DATALIST);$(ENABLE_DATA_TRANSFER_ITEMS);$(ENABLE_DETAILS);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_FILTERS);$(ENABLE_FILE_SYSTEM);$(ENABLE_CSS3_FLEXBOX);$(ENABLE_FULLSCREEN_API);$(ENABLE_GAMEPAD);$(ENABLE_GEOLOCATION);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_INPUT_TYPE_DATE);$(ENABLE_INPUT_TYPE_DATETIME);$(ENABLE_INPUT_TYPE_DATETIMELOCAL);$(ENABLE_INPUT_TYPE_MONTH);$(ENABLE_INPUT_TYPE_TIME);$(ENABLE_INPUT_TYPE_WEEK);$(ENABLE_JAVASCRIPT_DEBUGGER);$(ENABLE_LINK_PREFETCH);$(ENABLE_MATHML);$(ENABLE_METER_TAG);$(ENABLE_MICRODATA);$(ENABLE_MUTATION_OBSERVERS);$(ENABLE_NOTIFICATIONS);$(ENABLE_PAGE_VISIBILITY_API);$(ENABLE_PROGRESS_TAG);$(ENABLE_QUOTA);$(ENABLE_REGISTER_PROTOCOL_HANDLER);$(ENABLE_SHARED_WORKERS);$(ENABLE_SVG);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_VIDEO);$(ENABLE_MEDIA_SOURCE);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_WEB_SOCKETS);$(ENABLE_WEB_TIMING);$(ENABLE_WORKERS);$(ENABLE_XSLT);%(PreprocessorDefinitions) + + + + + $(ENABLE_3D_CANVAS) + true + + + $(ENABLE_3D_RENDERING) + true + + + $(ENABLE_ACCELERATED_2D_CANVAS) + true + + + $(ENABLE_BLOB) + true + + + $(ENABLE_CHANNEL_MESSAGING) + true + + + $(ENABLE_CLIENT_BASED_GEOLOCATION) + true + + + $(ENABLE_CSS_FILTERS) + true + + + $(ENABLE_CSS_REGIONS) + true + + + $(ENABLE_CSS_EXCLUSIONS) + true + + + $(ENABLE_SQL_DATABASE) + true + + + $(ENABLE_DATAGRID) + true + + + $(ENABLE_DATALIST) + true + + + $(ENABLE_DATA_TRANSFER_ITEMS) + true + + + $(ENABLE_DETAILS) + true + + + $(ENABLE_DEVICE_ORIENTATION) + true + + + $(ENABLE_DIRECTORY_UPLOAD) + true + + + $(ENABLE_FILTERS) + true + + + $(ENABLE_FILE_SYSTEM) + true + + + $(ENABLE_CSS3_FLEXBOX) + true + + + $(ENABLE_FULLSCREEN_API) + true + + + $(ENABLE_GAMEPAD) + true + + + $(ENABLE_GEOLOCATION) + true + + + $(ENABLE_ICONDATABASE) + true + + + $(ENABLE_INDEXED_DATABASE) + true + + + $(ENABLE_INPUT_COLOR) + true + + + $(ENABLE_INPUT_SPEECH) + true + + + $(ENABLE_INPUT_TYPE_DATE) + true + + + $(ENABLE_INPUT_TYPE_DATETIME) + true + + + $(ENABLE_INPUT_TYPE_DATETIMELOCAL) + true + + + $(ENABLE_INPUT_TYPE_MONTH) + true + + + $(ENABLE_INPUT_TYPE_TIME) + true + + + $(ENABLE_INPUT_TYPE_WEEK) + true + + + $(ENABLE_JAVASCRIPT_DEBUGGER) + true + + + $(ENABLE_LINK_PREFETCH) + true + + + $(ENABLE_MATHML) + true + + + $(ENABLE_METER_TAG) + true + + + $(ENABLE_MICRODATA) + true + + + $(ENABLE_MUTATION_OBSERVERS) + true + + + $(ENABLE_NOTIFICATIONS) + true + + + $(ENABLE_PAGE_VISIBILITY_API) + true + + + $(ENABLE_PROGRESS_TAG) + true + + + $(ENABLE_QUOTA) + true + + + $(ENABLE_REGISTER_PROTOCOL_HANDLER) + true + + + $(ENABLE_SHARED_WORKERS) + true + + + $(ENABLE_SVG) + true + + + $(ENABLE_SVG_DOM_OBJC_BINDINGS) + true + + + $(ENABLE_SVG_FONTS) + true + + + $(ENABLE_VIDEO) + true + + + $(ENABLE_MEDIA_SOURCE) + true + + + $(ENABLE_MEDIA_STATISTICS) + true + + + $(ENABLE_WEB_AUDIO) + true + + + $(ENABLE_WEB_SOCKETS) + true + + + $(ENABLE_WEB_TIMING) + true + + + $(ENABLE_WORKERS) + true + + + $(ENABLE_XSLT) + true + + + \ No newline at end of file diff --git a/WebKitLibraries/win/tools/vsprops/WinCairo.props b/WebKitLibraries/win/tools/vsprops/WinCairo.props new file mode 100644 index 00000000..d3decac5 --- /dev/null +++ b/WebKitLibraries/win/tools/vsprops/WinCairo.props @@ -0,0 +1,18 @@ + + + + + + $(WebKitLibrariesDir)\include\cairo;$(SolutionDir)\..\..\..\JavaScriptCore\os-win32;%(AdditionalIncludeDirectories) + WTF_PLATFORM_WIN_CAIRO=1;CAIRO_WIN32_STATIC_BUILD;%(PreprocessorDefinitions) + + + cairo.lib;libjpeg.lib;zlib.lib;libpng.lib + %(AdditionalLibraryDirectories) + + + true + + + + \ No newline at end of file diff --git a/WebKitLibraries/win/tools/vsprops/cURL.props b/WebKitLibraries/win/tools/vsprops/cURL.props new file mode 100644 index 00000000..fb17e7f2 --- /dev/null +++ b/WebKitLibraries/win/tools/vsprops/cURL.props @@ -0,0 +1,12 @@ + + + + + ws2_32.lib;wininet.lib;Wldap32.lib;libssl.lib;libcurl.lib;libcrypto.lib + + + + + + + \ No newline at end of file diff --git a/WebKitLibraries/win/tools/vsprops/cURL.vsprops b/WebKitLibraries/win/tools/vsprops/cURL.vsprops index 3f06aa6b..cbf424e8 100644 --- a/WebKitLibraries/win/tools/vsprops/cURL.vsprops +++ b/WebKitLibraries/win/tools/vsprops/cURL.vsprops @@ -6,7 +6,7 @@ > diff --git a/WebKitLibraries/win/tools/vsprops/debug.props b/WebKitLibraries/win/tools/vsprops/debug.props new file mode 100644 index 00000000..c963f9aa --- /dev/null +++ b/WebKitLibraries/win/tools/vsprops/debug.props @@ -0,0 +1,30 @@ + + + + + + + + + + Disabled + true + EnableFastChecks + MultiThreadedDebug + %(PreprocessorDefinitions) + + + + + $(WebKitConfigSuffix) + true + + + $(LibraryConfigSuffix) + true + + + $(WebKitDLLConfigSuffix) + + + \ No newline at end of file diff --git a/WebKitLibraries/win/tools/vsprops/debug_wincairo.props b/WebKitLibraries/win/tools/vsprops/debug_wincairo.props new file mode 100644 index 00000000..0712de4f --- /dev/null +++ b/WebKitLibraries/win/tools/vsprops/debug_wincairo.props @@ -0,0 +1,37 @@ + + + + _debug + + _debug + + + + $(WebKitLibrariesDir)\include\cairo;%(AdditionalIncludeDirectories) + Disabled + DEBUG_ALL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + "$(WebKitLibrariesDir)\lib" + + + false + + + + + $(WebKitConfigSuffix) + true + + + $(LibraryConfigSuffix) + true + + + $(WebKitDLLConfigSuffix) + + + \ No newline at end of file diff --git a/WebKitLibraries/win/tools/vsprops/release.props b/WebKitLibraries/win/tools/vsprops/release.props new file mode 100644 index 00000000..70856dbe --- /dev/null +++ b/WebKitLibraries/win/tools/vsprops/release.props @@ -0,0 +1,9 @@ + + + + + MultiThreaded + %(PreprocessorDefinitions) + + + \ No newline at end of file diff --git a/WebKitLibraries/win/tools/vsprops/releaseproduction.props b/WebKitLibraries/win/tools/vsprops/releaseproduction.props new file mode 100644 index 00000000..e3d4c042 --- /dev/null +++ b/WebKitLibraries/win/tools/vsprops/releaseproduction.props @@ -0,0 +1,26 @@ + + + + + + + + + + NDEBUG;%(PreprocessorDefinitions) + + + + + $(WebKitConfigSuffix) + true + + + $(LibraryConfigSuffix) + true + + + $(WebKitDLLConfigSuffix) + + + \ No newline at end of file diff --git a/demo/bin/english.html b/demo/bin/english.html new file mode 100644 index 00000000..ca084f7c --- /dev/null +++ b/demo/bin/english.html @@ -0,0 +1,18 @@ + + + + + + + + +中文 + + +english + + + + + + \ No newline at end of file diff --git a/demo/bin/english.png b/demo/bin/english.png new file mode 100644 index 00000000..a54018f6 Binary files /dev/null and b/demo/bin/english.png differ diff --git a/demo/bin/file.asp b/demo/bin/file.asp new file mode 100644 index 00000000..c91e9a89 --- /dev/null +++ b/demo/bin/file.asp @@ -0,0 +1,5 @@ +<% + filesize=Request.TotalBytes 'ϴļĴС + filedata=Request.BinaryRead(filesize) 'ϴļĶ + Response.Write filesize 'ʾ +%> \ No newline at end of file diff --git a/demo/bin/file.html b/demo/bin/file.html new file mode 100644 index 00000000..6573fba4 --- /dev/null +++ b/demo/bin/file.html @@ -0,0 +1,39 @@ + + + + + + + + +
+ + +
+ +
+
+
+
+
+
+ +
<a target="_blank"> +
<a target="_parent"> +
<a target="_self"> +
<a target="_top"> +
<a target="testTarget"> +
<a target="wontOpen"> + +
calc.exe +
www.baidu.com + + + + + + \ No newline at end of file diff --git a/demo/bin/plugins.html b/demo/bin/plugins.html new file mode 100644 index 00000000..9eb7fd32 --- /dev/null +++ b/demo/bin/plugins.html @@ -0,0 +1,35 @@ + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/demo/bin/vlc.html b/demo/bin/vlc.html new file mode 100644 index 00000000..cd3cff79 --- /dev/null +++ b/demo/bin/vlc.html @@ -0,0 +1,36 @@ + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/demo/bin/vlc.reg b/demo/bin/vlc.reg new file mode 100644 index 00000000..72615de3 --- /dev/null +++ b/demo/bin/vlc.reg @@ -0,0 +1,8 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MozillaPlugins\@videolan.org/vlc,version=2.0.3] +"Description"="VLC Multimedia Plugin" +"Path"="D:\\program\\VLCPortable2.0.3\\App\\vlc\\npvlc.dll" +"Product"="VLC media player" +"Vendor"="VideoLAN" +"Version"="2.0.3" \ No newline at end of file diff --git a/demo/bin/wke.dll b/demo/bin/wke.dll index 27895a15..a9b2a93b 100644 Binary files a/demo/bin/wke.dll and b/demo/bin/wke.dll differ diff --git a/demo/bin/wkeBrowser.exe b/demo/bin/wkeBrowser.exe index 7b13b65e..84787a2a 100644 Binary files a/demo/bin/wkeBrowser.exe and b/demo/bin/wkeBrowser.exe differ diff --git a/demo/bin/wkexe.exe b/demo/bin/wkexe.exe new file mode 100644 index 00000000..aa3458ed Binary files /dev/null and b/demo/bin/wkexe.exe differ diff --git a/demo/bin/wkexe.html b/demo/bin/wkexe.html new file mode 100644 index 00000000..e8ec8c79 --- /dev/null +++ b/demo/bin/wkexe.html @@ -0,0 +1,49 @@ + + + + + + + + +
+ + +
+ +
+
+
+
+
+ +
<a target="_blank"> +
<a target="_parent"> +
<a target="_self"> +
<a target="_top"> +
<a target="testTarget"> +
蝌蚪聊天室(websocket) +
Websocket聊天室 +
优酷 +
土豆 +
爱奇艺 +
鲁大师游戏库 +
传奇盛世|双线1区
+ +
calc.exe +
www.baidu.com +
prompt + + + + + + \ No newline at end of file diff --git "a/demo/bin/\344\270\255\346\226\207.html" "b/demo/bin/\344\270\255\346\226\207.html" new file mode 100644 index 00000000..ca084f7c --- /dev/null +++ "b/demo/bin/\344\270\255\346\226\207.html" @@ -0,0 +1,18 @@ + + + + + + + + +中文 + + +english + + + + + + \ No newline at end of file diff --git "a/demo/bin/\344\270\255\346\226\207.png" "b/demo/bin/\344\270\255\346\226\207.png" new file mode 100644 index 00000000..a54018f6 Binary files /dev/null and "b/demo/bin/\344\270\255\346\226\207.png" differ diff --git a/demo/libwke/wke.dll b/demo/libwke/wke.dll new file mode 100644 index 00000000..a9b2a93b Binary files /dev/null and b/demo/libwke/wke.dll differ diff --git a/demo/libwke/wke.h b/demo/libwke/wke.h index 8a2f6c0f..b96edbe0 100644 --- a/demo/libwke/wke.h +++ b/demo/libwke/wke.h @@ -11,37 +11,59 @@ #define WKE_H -#ifdef BUILDING_wke -# define WKE_API __declspec(dllexport) +////////////////////////////////////////////////////////////////////////// + + +#if defined(__cplusplus) + #define WKE_EXTERN_C extern "C" #else -# define WKE_API __declspec(dllimport) + #define WKE_EXTERN_C +#endif + + +#if defined(BUILDING_wke) +# define WKE_SYMBOL __declspec(dllexport) +#else +# define WKE_SYMBOL __declspec(dllimport) #endif -typedef char utf8; -typedef struct { +#define WKE_CALL _cdecl +#define WKE_API WKE_EXTERN_C WKE_SYMBOL + + + + +typedef struct +{ int x; int y; int w; int h; + } wkeRect; -enum wkeMouseFlags + +typedef enum { WKE_LBUTTON = 0x01, WKE_RBUTTON = 0x02, WKE_SHIFT = 0x04, WKE_CONTROL = 0x08, WKE_MBUTTON = 0x10, -}; -enum wkeKeyFlags +} wkeMouseFlags; + + +typedef enum { WKE_EXTENDED = 0x0100, WKE_REPEAT = 0x4000, -}; -enum wkeMouseMsg +} wkeKeyFlags; + + +typedef enum { WKE_MSG_MOUSEMOVE = 0x0200, WKE_MSG_LBUTTONDOWN = 0x0201, @@ -54,260 +76,388 @@ enum wkeMouseMsg WKE_MSG_MBUTTONUP = 0x0208, WKE_MSG_MBUTTONDBLCLK = 0x0209, WKE_MSG_MOUSEWHEEL = 0x020A, + +} wkeMouseMsg; + + + +#if !defined(__cplusplus) + #ifndef HAVE_WCHAR_T + typedef unsigned short wchar_t; + #endif + + #ifndef HAVE_BOOL + typedef unsigned char bool; + #define true 1 + #define false 0 + #endif +#endif + + +typedef char utf8; +typedef struct __wkeJSState wkeJSState; +typedef __int64 wkeJSValue; + + +#if defined(__cplusplus) + namespace wke{ class CWebView; }; + typedef wke::CWebView wkeWebView; + + namespace wke{ class CString; }; + typedef wke::CString wkeString; + +#else + typedef struct __wkeWebView wkeWebView; + typedef struct __wkeString wkeString; +#endif + + + +typedef enum +{ + WKE_PROXY_NONE, + WKE_PROXY_HTTP, + WKE_PROXY_SOCKS4, + WKE_PROXY_SOCKS4A, + WKE_PROXY_SOCKS5, + WKE_PROXY_SOCKS5HOSTNAME + +} wkeProxyType; + +typedef struct +{ + wkeProxyType type; + char hostname[100]; + unsigned short port; + char username[50]; + char password[50]; + +} wkeProxy; + +enum wkeSettingMask +{ + WKE_SETTING_PROXY = 1, + WKE_SETTING_COOKIE_FILE_PATH = 1<<1 }; -typedef void* jsExecState; -typedef __int64 jsValue; +typedef struct +{ + wkeProxy proxy; + char cookieFilePath[1024]; + unsigned int mask; -typedef void* wkeString; -typedef void (*ON_TITLE_CHANGED) (const struct _wkeClientHandler* clientHandler, const wkeString title); -typedef void (*ON_URL_CHANGED) (const struct _wkeClientHandler* clientHandler, const wkeString url); +} wkeSettings; -typedef struct _wkeClientHandler { - ON_TITLE_CHANGED onTitleChanged; - ON_URL_CHANGED onURLChanged; -} wkeClientHandler; /* - *c++ interface - *----------------------------------------------------------------------------------------------------------- + *c interface + *---------------------------------------------------------------------------------------------------------- * */ -#ifdef __cplusplus - -namespace wke +#if defined(__cplusplus) +extern "C" { - class IWebView - { - public: - virtual void destroy() = 0; +#endif - virtual const char* name() const = 0; - virtual void setName(const char* name) = 0; +WKE_API void WKE_CALL wkeInitialize(); +WKE_API void WKE_CALL wkeInitializeEx(const wkeSettings* settings); +WKE_API void WKE_CALL wkeConfigure(const wkeSettings* settings); + +WKE_API void WKE_CALL wkeFinalize(); +WKE_API void WKE_CALL wkeUpdate(); +WKE_API unsigned int WKE_CALL wkeGetVersion(); +WKE_API const utf8* WKE_CALL wkeGetVersionString(); + +typedef void* (WKE_CALL *FILE_OPEN) (const char* path); +typedef void (WKE_CALL *FILE_CLOSE) (void* handle); +typedef size_t (WKE_CALL *FILE_SIZE) (void* handle); +typedef int (WKE_CALL *FILE_READ) (void* handle, void* buffer, size_t size); +typedef int (WKE_CALL *FILE_SEEK) (void* handle, int offset, int origin); +WKE_API void WKE_CALL wkeSetFileSystem(FILE_OPEN pfn_open, FILE_CLOSE pfn_close, FILE_SIZE pfn_size, FILE_READ pfn_read, FILE_SEEK pfn_seek); + + +WKE_API wkeWebView* WKE_CALL wkeCreateWebView(); +WKE_API wkeWebView* WKE_CALL wkeGetWebView(const char* name); +WKE_API void WKE_CALL wkeDestroyWebView(wkeWebView* webView); - virtual bool transparent() const = 0; - virtual void setTransparent(bool transparent) = 0; +WKE_API const char* WKE_CALL wkeGetName(wkeWebView* webView); +WKE_API void WKE_CALL wkeSetName(wkeWebView* webView, const char* name); - virtual void loadURL(const utf8* url) = 0; - virtual void loadURL(const wchar_t* url) = 0; +WKE_API bool WKE_CALL wkeIsTransparent(wkeWebView* webView); +WKE_API void WKE_CALL wkeSetTransparent(wkeWebView* webView, bool transparent); - virtual void loadHTML(const utf8* html) = 0; - virtual void loadHTML(const wchar_t* html) = 0; +WKE_API void WKE_CALL wkeSetUserAgent(wkeWebView* webView, const utf8* userAgent); +WKE_API void WKE_CALL wkeSetUserAgentW(wkeWebView* webView, const wchar_t* userAgent); - virtual void loadFile(const utf8* filename) = 0; - virtual void loadFile(const wchar_t* filename) = 0; +WKE_API void WKE_CALL wkeLoadURL(wkeWebView* webView, const utf8* url); +WKE_API void WKE_CALL wkeLoadURLW(wkeWebView* webView, const wchar_t* url); +WKE_API void WKE_CALL wkePostURL(wkeWebView* wkeView,const utf8* url, const char* postData,int postLen); +WKE_API void WKE_CALL wkePostURLW(wkeWebView* wkeView,const wchar_t* url, const char* postData, int postLen); - virtual bool isLoaded() const = 0; /*document load sucessed*/ - virtual bool isLoadFailed() const = 0; /*document load failed*/ - virtual bool isLoadComplete() const = 0; /*document load complete*/ - virtual bool isDocumentReady() const = 0; /*document ready*/ - virtual void stopLoading() = 0; - virtual void reload() = 0; +WKE_API void WKE_CALL wkeLoadHTML(wkeWebView* webView, const utf8* html); +WKE_API void WKE_CALL wkeLoadHTMLW(wkeWebView* webView, const wchar_t* html); - virtual const utf8* title() = 0; - virtual const wchar_t* titleW() = 0; +WKE_API void WKE_CALL wkeLoadFile(wkeWebView* webView, const utf8* filename); +WKE_API void WKE_CALL wkeLoadFileW(wkeWebView* webView, const wchar_t* filename); - virtual void resize(int w, int h) = 0; - virtual int width() const = 0; /*viewport width*/ - virtual int height() const = 0; /*viewport height*/ +WKE_API void WKE_CALL wkeLoad(wkeWebView* webView, const utf8* str); +WKE_API void WKE_CALL wkeLoadW(wkeWebView* webView, const wchar_t* str); - virtual int contentsWidth() const = 0; /*contents width*/ - virtual int contentsHeight() const = 0; /*contents height*/ +WKE_API bool WKE_CALL wkeIsLoading(wkeWebView* webView); +WKE_API bool WKE_CALL wkeIsLoadingSucceeded(wkeWebView* webView); +WKE_API bool WKE_CALL wkeIsLoadingFailed(wkeWebView* webView); +WKE_API bool WKE_CALL wkeIsLoadingCompleted(wkeWebView* webView); +WKE_API bool WKE_CALL wkeIsDocumentReady(wkeWebView* webView); +WKE_API void WKE_CALL wkeStopLoading(wkeWebView* webView); +WKE_API void WKE_CALL wkeReload(wkeWebView* webView); - virtual void setDirty(bool dirty) = 0; - virtual bool isDirty() const = 0; - virtual void addDirtyArea(int x, int y, int w, int h) = 0; +WKE_API const utf8* WKE_CALL wkeGetTitle(wkeWebView* webView); +WKE_API const wchar_t* WKE_CALL wkeGetTitleW(wkeWebView* webView); - virtual void layoutIfNeeded() = 0; - virtual void paint(void* bits, int pitch) = 0; +WKE_API void WKE_CALL wkeResize(wkeWebView* webView, int w, int h); +WKE_API int WKE_CALL wkeGetWidth(wkeWebView* webView); +WKE_API int WKE_CALL wkeGetHeight(wkeWebView* webView); +WKE_API int WKE_CALL wkeGetContentWidth(wkeWebView* webView); +WKE_API int WKE_CALL wkeGetContentHeight(wkeWebView* webView); - virtual bool canGoBack() const = 0; - virtual bool goBack() = 0; - virtual bool canGoForward() const = 0; - virtual bool goForward() = 0; +WKE_API void WKE_CALL wkeSetDirty(wkeWebView* webView, bool dirty); +WKE_API bool WKE_CALL wkeIsDirty(wkeWebView* webView); +WKE_API void WKE_CALL wkeAddDirtyArea(wkeWebView* webView, int x, int y, int w, int h); +WKE_API void WKE_CALL wkeLayoutIfNeeded(wkeWebView* webView); +WKE_API void WKE_CALL wkePaint(wkeWebView* webView, void* bits,int bufWid, int bufHei, int xDst, int yDst, int w, int h, int xSrc, int ySrc, bool bCopyAlpha); +WKE_API void WKE_CALL wkePaint2(wkeWebView* webView, void* bits,int pitch); +WKE_API bool WKE_CALL wkeRepaintIfNeeded(wkeWebView* webView); +WKE_API void* WKE_CALL wkeGetViewDC(wkeWebView* webView); - virtual void selectAll() = 0; - virtual void copy() = 0; - virtual void cut() = 0; - virtual void paste() = 0; - virtual void delete_() = 0; +WKE_API void WKE_CALL wkeSetRepaintInterval(wkeWebView* webView, int ms); +WKE_API int WKE_CALL wkeGetRepaintInterval(wkeWebView* webView); +WKE_API bool WKE_CALL wkeRepaintIfNeededAfterInterval(wkeWebView* webView); +WKE_API bool WKE_CALL wkeRepaintAllNeeded(); +WKE_API int WKE_CALL wkeRunMessageLoop(const bool *quit); - virtual void setCookieEnabled(bool enable) = 0; - virtual bool cookieEnabled() const = 0; +WKE_API bool WKE_CALL wkeCanGoBack(wkeWebView* webView); +WKE_API bool WKE_CALL wkeGoBack(wkeWebView* webView); +WKE_API bool WKE_CALL wkeCanGoForward(wkeWebView* webView); +WKE_API bool WKE_CALL wkeGoForward(wkeWebView* webView); - virtual void setMediaVolume(float volume) = 0; - virtual float mediaVolume() const = 0; +WKE_API void WKE_CALL wkeEditorSelectAll(wkeWebView* webView); +WKE_API void WKE_CALL wkeEditorCopy(wkeWebView* webView); +WKE_API void WKE_CALL wkeEditorCut(wkeWebView* webView); +WKE_API void WKE_CALL wkeEditorPaste(wkeWebView* webView); +WKE_API void WKE_CALL wkeEditorDelete(wkeWebView* webView); - virtual bool mouseEvent(unsigned int message, int x, int y, unsigned int flags) = 0; - virtual bool contextMenuEvent(int x, int y, unsigned int flags) = 0; - virtual bool mouseWheel(int x, int y, int delta, unsigned int flags) = 0; - virtual bool keyUp(unsigned int virtualKeyCode, unsigned int flags, bool systemKey) = 0; - virtual bool keyDown(unsigned int virtualKeyCode, unsigned int flags, bool systemKey) = 0; - virtual bool keyPress(unsigned int virtualKeyCode, unsigned int flags, bool systemKey) = 0; +WKE_API const wchar_t* WKE_CALL wkeGetCookieW(wkeWebView* webView); +WKE_API const utf8* WKE_CALL wkeGetCookie(wkeWebView* webView); +WKE_API void WKE_CALL wkeSetCookieEnabled(wkeWebView* webView, bool enable); +WKE_API bool WKE_CALL wkeIsCookieEnabled(wkeWebView* webView); - virtual void focus() = 0; - virtual void unfocus() = 0; +WKE_API void WKE_CALL wkeSetMediaVolume(wkeWebView* webView, float volume); +WKE_API float WKE_CALL wkeGetMediaVolume(wkeWebView* webView); - virtual wkeRect getCaret() = 0; +WKE_API bool WKE_CALL wkeFireMouseEvent(wkeWebView* webView, unsigned int message, int x, int y, unsigned int flags); +WKE_API bool WKE_CALL wkeFireContextMenuEvent(wkeWebView* webView, int x, int y, unsigned int flags); +WKE_API bool WKE_CALL wkeFireMouseWheelEvent(wkeWebView* webView, int x, int y, int delta, unsigned int flags); +WKE_API bool WKE_CALL wkeFireKeyUpEvent(wkeWebView* webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey); +WKE_API bool WKE_CALL wkeFireKeyDownEvent(wkeWebView* webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey); +WKE_API bool WKE_CALL wkeFireKeyPressEvent(wkeWebView* webView, unsigned int charCode, unsigned int flags, bool systemKey); - virtual jsValue runJS(const utf8* script) = 0; - virtual jsValue runJS(const wchar_t* script) = 0; - virtual jsExecState globalExec() = 0; +WKE_API void WKE_CALL wkeSetFocus(wkeWebView* webView); +WKE_API void WKE_CALL wkeKillFocus(wkeWebView* webView); - virtual void sleep() = 0; //moveOffscreen - virtual void awaken() = 0; //moveOnscreen - virtual bool isAwake() const = 0; +WKE_API wkeRect WKE_CALL wkeGetCaretRect(wkeWebView* webView); - virtual void setZoomFactor(float factor) = 0; - virtual float zoomFactor() const = 0; +WKE_API wkeJSValue WKE_CALL wkeRunJS(wkeWebView* webView, const utf8* script); +WKE_API wkeJSValue WKE_CALL wkeRunJSW(wkeWebView* webView, const wchar_t* script); - virtual void setEditable(bool editable) = 0; +WKE_API wkeJSState* WKE_CALL wkeGlobalExec(wkeWebView* webView); - virtual void setClientHandler(const wkeClientHandler* handler) = 0; - virtual const wkeClientHandler* getClientHandler() const = 0; - }; -} +WKE_API void WKE_CALL wkeSleep(wkeWebView* webView); +WKE_API void WKE_CALL wkeWake(wkeWebView* webView); +WKE_API bool WKE_CALL wkeIsAwake(wkeWebView* webView); -typedef wke::IWebView* wkeWebView; +WKE_API void WKE_CALL wkeSetZoomFactor(wkeWebView* webView, float factor); +WKE_API float WKE_CALL wkeGetZoomFactor(wkeWebView* webView); -#else +WKE_API void WKE_CALL wkeSetEditable(wkeWebView* webView, bool editable); -typedef void* wkeWebView; +WKE_API void WKE_CALL wkeSetHostWindow(wkeWebView* webWindow, void* hostWindow); +WKE_API void* WKE_CALL wkeGetHostWindow(wkeWebView* webWindow); -#ifndef HAVE_WCHAR_T -typedef unsigned short wchar_t; -#endif -#ifndef HAVE_BOOL -typedef unsigned char bool; -#define true 1 -#define false 0 -#endif +WKE_API const utf8* WKE_CALL wkeGetString(const wkeString* string); +WKE_API const wchar_t* WKE_CALL wkeGetStringW(const wkeString* string); -#endif /*__cplusplus*/ +WKE_API void WKE_CALL wkeSetString(wkeString* string, const utf8* str, size_t len); +WKE_API void WKE_CALL wkeSetStringW(wkeString* string, const wchar_t* str, size_t len); -/* - *c interface - *---------------------------------------------------------------------------------------------------------- - * - */ +typedef void (WKE_CALL *wkeTitleChangedCallback)(wkeWebView* webView, void* param, const wkeString* title); +WKE_API void WKE_CALL wkeOnTitleChanged(wkeWebView* webView, wkeTitleChangedCallback callback, void* callbackParam); -#ifdef __cplusplus -extern "C" +typedef void (WKE_CALL *wkeURLChangedCallback)(wkeWebView* webView, void* param, const wkeString* url); +WKE_API void WKE_CALL wkeOnURLChanged(wkeWebView* webView, wkeURLChangedCallback callback, void* callbackParam); + +typedef void (WKE_CALL *wkePaintUpdatedCallback)(wkeWebView* webView, void* param, const void* hdc, int x, int y, int cx, int cy); +WKE_API void WKE_CALL wkeOnPaintUpdated(wkeWebView* webView, wkePaintUpdatedCallback callback, void* callbackParam); + +typedef void (WKE_CALL *wkeAlertBoxCallback)(wkeWebView* webView, void* param, const wkeString* msg); +WKE_API void WKE_CALL wkeOnAlertBox(wkeWebView* webView, wkeAlertBoxCallback callback, void* callbackParam); + +typedef bool (WKE_CALL *wkeConfirmBoxCallback)(wkeWebView* webView, void* param, const wkeString* msg); +WKE_API void WKE_CALL wkeOnConfirmBox(wkeWebView* webView, wkeConfirmBoxCallback callback, void* callbackParam); + +typedef bool (WKE_CALL *wkePromptBoxCallback)(wkeWebView* webView, void* param, const wkeString* msg, const wkeString* defaultResult, wkeString* result); +WKE_API void WKE_CALL wkeOnPromptBox(wkeWebView* webView, wkePromptBoxCallback callback, void* callbackParam); + + +typedef enum { -#endif + WKE_MESSAGE_SOURCE_HTML, + WKE_MESSAGE_SOURCE_XML, + WKE_MESSAGE_SOURCE_JS, + WKE_MESSAGE_SOURCE_NETWORK, + WKE_MESSAGE_SOURCE_CONSOLE_API, + WKE_MESSAGE_SOURCE_OTHER -WKE_API void wkeInit(); -WKE_API void wkeShutdown(); -WKE_API void wkeUpdate(); -WKE_API unsigned int wkeVersion(); -WKE_API const utf8* wkeVersionString(); +} wkeMessageSource; -typedef void* (*FILE_OPEN) (const char* path); -typedef void (*FILE_CLOSE) (void* handle); -typedef size_t (*FILE_SIZE) (void* handle); -typedef int (*FILE_READ) (void* handle, void* buffer, size_t size); -typedef int (*FILE_SEEK) (void* handle, int offset, int origin); +typedef enum +{ + WKE_MESSAGE_TYPE_LOG, + WKE_MESSAGE_TYPE_DIR, + WKE_MESSAGE_TYPE_DIR_XML, + WKE_MESSAGE_TYPE_TRACE, + WKE_MESSAGE_TYPE_START_GROUP, + WKE_MESSAGE_TYPE_START_GROUP_COLLAPSED, + WKE_MESSAGE_TYPE_END_GROUP, + WKE_MESSAGE_TYPE_ASSERT + +} wkeMessageType; + +typedef enum +{ + WKE_MESSAGE_LEVEL_TIP, + WKE_MESSAGE_LEVEL_LOG, + WKE_MESSAGE_LEVEL_WARNING, + WKE_MESSAGE_LEVEL_ERROR, + WKE_MESSAGE_LEVEL_DEBUG + +} wkeMessageLevel; + +typedef struct +{ + wkeMessageSource source; + wkeMessageType type; + wkeMessageLevel level; + wkeString* message; + wkeString* url; + unsigned int lineNumber; + +} wkeConsoleMessage; + +typedef void (WKE_CALL *wkeConsoleMessageCallback)(wkeWebView* webView, void* param, const wkeConsoleMessage* message); +WKE_API void WKE_CALL wkeOnConsoleMessage(wkeWebView* webView, wkeConsoleMessageCallback callback, void* callbackParam); + + + +typedef enum +{ + WKE_NAVIGATION_TYPE_LINKCLICK, + WKE_NAVIGATION_TYPE_FORMSUBMITTE, + WKE_NAVIGATION_TYPE_BACKFORWARD, + WKE_NAVIGATION_TYPE_RELOAD, + WKE_NAVIGATION_TYPE_FORMRESUBMITT, + WKE_NAVIGATION_TYPE_OTHER -WKE_API void wkeSetFileSystem(FILE_OPEN pfn_open, FILE_CLOSE pfn_close, FILE_SIZE pfn_size, FILE_READ pfn_read, FILE_SEEK pfn_seek); +} wkeNavigationType; +typedef bool (WKE_CALL *wkeNavigationCallback)(wkeWebView* webView, void* param, wkeNavigationType navigationType, const wkeString* url); +WKE_API void WKE_CALL wkeOnNavigation(wkeWebView* webView, wkeNavigationCallback callback, void* param); -WKE_API wkeWebView wkeCreateWebView(); -WKE_API wkeWebView wkeGetWebView(const char* name); -WKE_API void wkeDestroyWebView(wkeWebView webView); -WKE_API const char* wkeWebViewName(wkeWebView webView); -WKE_API void wkeSetWebViewName(wkeWebView webView, const char* name); +typedef struct +{ + wkeNavigationType navigationType; + wkeString* url; + wkeString* target; + + int x; + int y; + int width; + int height; -WKE_API bool wkeIsTransparent(wkeWebView webView); -WKE_API void wkeSetTransparent(wkeWebView webView, bool transparent); + bool menuBarVisible; + bool statusBarVisible; + bool toolBarVisible; + bool locationBarVisible; + bool scrollbarsVisible; + bool resizable; + bool fullscreen; -WKE_API void wkeLoadURL(wkeWebView webView, const utf8* url); -WKE_API void wkeLoadURLW(wkeWebView webView, const wchar_t* url); +} wkeNewViewInfo; -WKE_API void wkeLoadHTML(wkeWebView webView, const utf8* html); -WKE_API void wkeLoadHTMLW(wkeWebView webView, const wchar_t* html); -WKE_API void wkeLoadFile(wkeWebView webView, const utf8* filename); -WKE_API void wkeLoadFileW(wkeWebView webView, const wchar_t* filename); +typedef wkeWebView* (WKE_CALL *wkeCreateViewCallback)(wkeWebView* webView, void* param, const wkeNewViewInfo* info); +WKE_API void WKE_CALL wkeOnCreateView(wkeWebView* webView, wkeCreateViewCallback callback, void* param); -WKE_API bool wkeIsLoaded(wkeWebView webView); -WKE_API bool wkeIsLoadFailed(wkeWebView webView); -WKE_API bool wkeIsLoadComplete(wkeWebView webView); -WKE_API bool wkeIsDocumentReady(wkeWebView webView); -WKE_API bool wkeIsLoading(wkeWebView webView); -WKE_API void wkeStopLoading(wkeWebView webView); -WKE_API void wkeReload(wkeWebView webView); -WKE_API const utf8* wkeTitle(wkeWebView webView); -WKE_API const wchar_t* wkeTitleW(wkeWebView webView); +typedef struct +{ + wkeString* url; + wkeJSState* frameJSState; + wkeJSState* mainFrameJSState; -WKE_API void wkeResize(wkeWebView webView, int w, int h); -WKE_API int wkeWidth(wkeWebView webView); -WKE_API int wkeHeight(wkeWebView webView); +} wkeDocumentReadyInfo; -WKE_API int wkeContentsWidth(wkeWebView webView); -WKE_API int wkeContentsHeight(wkeWebView webView); +typedef void (WKE_CALL *wkeDocumentReadyCallback)(wkeWebView* webView, void* param, const wkeDocumentReadyInfo* info); +WKE_API void WKE_CALL wkeOnDocumentReady(wkeWebView* webView, wkeDocumentReadyCallback callback, void* param); -WKE_API void wkeSetDirty(wkeWebView webView, bool dirty); -WKE_API bool wkeIsDirty(wkeWebView webView); -WKE_API void wkeAddDirtyArea(wkeWebView webView, int x, int y, int w, int h); -WKE_API void wkeLayoutIfNeeded(wkeWebView webView); -WKE_API void wkePaint(wkeWebView webView, void* bits, int pitch); -WKE_API bool wkeCanGoBack(wkeWebView webView); -WKE_API bool wkeGoBack(wkeWebView webView); -WKE_API bool wkeCanGoForward(wkeWebView webView); -WKE_API bool wkeGoForward(wkeWebView webView); +typedef enum +{ + WKE_LOADING_SUCCEEDED, + WKE_LOADING_FAILED, + WKE_LOADING_CANCELED -WKE_API void wkeSelectAll(wkeWebView webView); -WKE_API void wkeCopy(wkeWebView webView); -WKE_API void wkeCut(wkeWebView webView); -WKE_API void wkePaste(wkeWebView webView); -WKE_API void wkeDelete(wkeWebView webView); +} wkeLoadingResult; -WKE_API void wkeSetCookieEnabled(wkeWebView webView, bool enable); -WKE_API bool wkeCookieEnabled(wkeWebView webView); +typedef void (WKE_CALL *wkeLoadingFinishCallback)(wkeWebView* webView, void* param, const wkeString* url, wkeLoadingResult result, const wkeString* failedReason); +WKE_API void WKE_CALL wkeOnLoadingFinish(wkeWebView* webView, wkeLoadingFinishCallback callback, void* param); -WKE_API void wkeSetMediaVolume(wkeWebView webView, float volume); -WKE_API float wkeMediaVolume(wkeWebView webView); -WKE_API bool wkeMouseEvent(wkeWebView webView, unsigned int message, int x, int y, unsigned int flags); -WKE_API bool wkeContextMenuEvent(wkeWebView webView, int x, int y, unsigned int flags); -WKE_API bool wkeMouseWheel(wkeWebView webView, int x, int y, int delta, unsigned int flags); -WKE_API bool wkeKeyUp(wkeWebView webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey); -WKE_API bool wkeKeyDown(wkeWebView webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey); -WKE_API bool wkeKeyPress(wkeWebView webView, unsigned int charCode, unsigned int flags, bool systemKey); +typedef enum +{ + WKE_WINDOW_TYPE_POPUP, + WKE_WINDOW_TYPE_TRANSPARENT, + WKE_WINDOW_TYPE_CONTROL -WKE_API void wkeFocus(wkeWebView webView); -WKE_API void wkeUnfocus(wkeWebView webView); +} wkeWindowType; -WKE_API wkeRect wkeGetCaret(wkeWebView webView); +WKE_API wkeWebView* WKE_CALL wkeCreateWebWindow(wkeWindowType type, void* parent, int x, int y, int width, int height); +WKE_API void WKE_CALL wkeDestroyWebWindow(wkeWebView* webWindow); +WKE_API void* WKE_CALL wkeGetWindowHandle(wkeWebView* webWindow); -WKE_API jsValue wkeRunJS(wkeWebView webView, const utf8* script); -WKE_API jsValue wkeRunJSW(wkeWebView webView, const wchar_t* script); +typedef bool (WKE_CALL *wkeWindowClosingCallback)(wkeWebView* webWindow, void* param); +WKE_API void WKE_CALL wkeOnWindowClosing(wkeWebView* webWindow, wkeWindowClosingCallback callback, void* param); -WKE_API jsExecState wkeGlobalExec(wkeWebView webView); +typedef void (WKE_CALL *wkeWindowDestroyCallback)(wkeWebView* webWindow, void* param); +WKE_API void WKE_CALL wkeOnWindowDestroy(wkeWebView* webWindow, wkeWindowDestroyCallback callback, void* param); -WKE_API void wkeSleep(wkeWebView webView); -WKE_API void wkeAwaken(wkeWebView webView); -WKE_API bool wkeIsAwake(wkeWebView webView); -WKE_API void wkeSetZoomFactor(wkeWebView webView, float factor); -WKE_API float wkeZoomFactor(wkeWebView webView); +WKE_API void WKE_CALL wkeShowWindow(wkeWebView* webWindow, bool show); +WKE_API void WKE_CALL wkeEnableWindow(wkeWebView* webWindow, bool enable); -WKE_API void wkeSetEditable(wkeWebView webView, bool editable); +WKE_API void WKE_CALL wkeMoveWindow(wkeWebView* webWindow, int x, int y, int width, int height); +WKE_API void WKE_CALL wkeMoveToCenter(wkeWebView* webWindow); +WKE_API void WKE_CALL wkeResizeWindow(wkeWebView* webWindow, int width, int height); -WKE_API void wkeSetClientHandler(wkeWebView webView, const wkeClientHandler* handler); -WKE_API const wkeClientHandler* wkeGetClientHandler(wkeWebView webView); +WKE_API void WKE_CALL wkeSetWindowTitle(wkeWebView* webWindow, const utf8* title); +WKE_API void WKE_CALL wkeSetWindowTitleW(wkeWebView* webWindow, const wchar_t* title); -WKE_API const utf8* wkeToString(const wkeString string); -WKE_API const wchar_t* wkeToStringW(const wkeString string); /***JavaScript Bind***/ #define JS_CALL __fastcall -typedef jsValue (JS_CALL *jsNativeFunction) (jsExecState es); +typedef wkeJSValue (JS_CALL *wkeJSNativeFunction) (wkeJSState* es); typedef enum { @@ -317,80 +467,107 @@ typedef enum JSTYPE_OBJECT, JSTYPE_FUNCTION, JSTYPE_UNDEFINED, -} jsType; - -WKE_API void jsBindFunction(const char* name, jsNativeFunction fn, unsigned int argCount); -WKE_API void jsBindGetter(const char* name, jsNativeFunction fn); /*get property*/ -WKE_API void jsBindSetter(const char* name, jsNativeFunction fn); /*set property*/ - -WKE_API int jsArgCount(jsExecState es); -WKE_API jsType jsArgType(jsExecState es, int argIdx); -WKE_API jsValue jsArg(jsExecState es, int argIdx); +} wkeJSType; + + +WKE_API void WKE_CALL wkeJSBindFunction(const char* name, wkeJSNativeFunction fn, unsigned int argCount); +WKE_API void WKE_CALL wkeJSBindGetter(const char* name, wkeJSNativeFunction fn); /*get property*/ +WKE_API void WKE_CALL wkeJSBindSetter(const char* name, wkeJSNativeFunction fn); /*set property*/ + +WKE_API int WKE_CALL wkeJSParamCount(wkeJSState* es); +WKE_API wkeJSType WKE_CALL wkeJSParamType(wkeJSState* es, int index); +WKE_API wkeJSValue WKE_CALL wkeJSParam(wkeJSState* es, int index); + +WKE_API wkeJSType WKE_CALL wkeJSTypeOf(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsNumber(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsString(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsBool(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsObject(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsFunction(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsUndefined(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsNull(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsArray(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsTrue(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsFalse(wkeJSState* es, wkeJSValue v); + +WKE_API int WKE_CALL wkeJSToInt(wkeJSState* es, wkeJSValue v); +WKE_API float WKE_CALL wkeJSToFloat(wkeJSState* es, wkeJSValue v); +WKE_API double WKE_CALL wkeJSToDouble(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSToBool(wkeJSState* es, wkeJSValue v); +WKE_API const utf8* WKE_CALL wkeJSToTempString(wkeJSState* es, wkeJSValue v); +WKE_API const wchar_t* WKE_CALL wkeJSToTempStringW(wkeJSState* es, wkeJSValue v); + +WKE_API wkeJSValue WKE_CALL wkeJSInt(wkeJSState* es, int n); +WKE_API wkeJSValue WKE_CALL wkeJSFloat(wkeJSState* es, float f); +WKE_API wkeJSValue WKE_CALL wkeJSDouble(wkeJSState* es, double d); +WKE_API wkeJSValue WKE_CALL wkeJSBool(wkeJSState* es, bool b); + +WKE_API wkeJSValue WKE_CALL wkeJSUndefined(wkeJSState* es); +WKE_API wkeJSValue WKE_CALL wkeJSNull(wkeJSState* es); +WKE_API wkeJSValue WKE_CALL wkeJSTrue(wkeJSState* es); +WKE_API wkeJSValue WKE_CALL wkeJSFalse(wkeJSState* es); + +WKE_API wkeJSValue WKE_CALL wkeJSString(wkeJSState* es, const utf8* str); +WKE_API wkeJSValue WKE_CALL wkeJSStringW(wkeJSState* es, const wchar_t* str); +WKE_API wkeJSValue WKE_CALL wkeJSEmptyObject(wkeJSState* es); +WKE_API wkeJSValue WKE_CALL wkeJSEmptyArray(wkeJSState* es); + + + +//cexer JS󡢺֧ +typedef struct __wkeJSData wkeJSData; +typedef wkeJSValue (WKE_CALL *wkeJSGetPropertyCallback)(wkeJSState* es, wkeJSValue object, const char* propertyName); +typedef bool (WKE_CALL *wkeJSSetPropertyCallback)(wkeJSState* es, wkeJSValue object, const char* propertyName, wkeJSValue value); +typedef wkeJSValue (WKE_CALL *wkeJSCallAsFunctionCallback)(wkeJSState* es, wkeJSValue object, wkeJSValue* args, int argCount); +typedef void (WKE_CALL *wkeJSFinalizeCallback)(wkeJSData* data); + +typedef struct __wkeJSData +{ + char typeName[100]; + wkeJSGetPropertyCallback propertyGet; + wkeJSSetPropertyCallback propertySet; + wkeJSFinalizeCallback finalize; + wkeJSCallAsFunctionCallback callAsFunction; -WKE_API jsType jsTypeOf(jsValue v); -WKE_API bool jsIsNumber(jsValue v); -WKE_API bool jsIsString(jsValue v); -WKE_API bool jsIsBoolean(jsValue v); -WKE_API bool jsIsObject(jsValue v); -WKE_API bool jsIsFunction(jsValue v); -WKE_API bool jsIsUndefined(jsValue v); -WKE_API bool jsIsNull(jsValue v); -WKE_API bool jsIsArray(jsValue v); -WKE_API bool jsIsTrue(jsValue v); -WKE_API bool jsIsFalse(jsValue v); +} wkeJSData; -WKE_API int jsToInt(jsExecState es, jsValue v); -WKE_API float jsToFloat(jsExecState es, jsValue v); -WKE_API double jsToDouble(jsExecState es, jsValue v); -WKE_API bool jsToBoolean(jsExecState es, jsValue v); -WKE_API const utf8* jsToString(jsExecState es, jsValue v); -WKE_API const wchar_t* jsToStringW(jsExecState es, jsValue v); +WKE_API wkeJSValue WKE_CALL wkeJSObject(wkeJSState* es, wkeJSData* obj); +WKE_API wkeJSValue WKE_CALL wkeJSFunction(wkeJSState* es, wkeJSData* obj); +WKE_API wkeJSData* WKE_CALL wkeJSGetData(wkeJSState* es, wkeJSValue object); -WKE_API jsValue jsInt(int n); -WKE_API jsValue jsFloat(float f); -WKE_API jsValue jsDouble(double d); -WKE_API jsValue jsBoolean(bool b); +WKE_API wkeJSValue WKE_CALL wkeJSGet(wkeJSState* es, wkeJSValue object, const char* prop); +WKE_API void WKE_CALL wkeJSSet(wkeJSState* es, wkeJSValue object, const char* prop, wkeJSValue v); -WKE_API jsValue jsUndefined(); -WKE_API jsValue jsNull(); -WKE_API jsValue jsTrue(); -WKE_API jsValue jsFalse(); +WKE_API wkeJSValue WKE_CALL wkeJSGetAt(wkeJSState* es, wkeJSValue object, int index); +WKE_API void WKE_CALL wkeJSSetAt(wkeJSState* es, wkeJSValue object, int index, wkeJSValue v); -WKE_API jsValue jsString(jsExecState es, const utf8* str); -WKE_API jsValue jsStringW(jsExecState es, const wchar_t* str); -WKE_API jsValue jsObject(jsExecState es); -WKE_API jsValue jsArray(jsExecState es); +WKE_API int WKE_CALL wkeJSGetLength(wkeJSState* es, wkeJSValue object); +WKE_API void WKE_CALL wkeJSSetLength(wkeJSState* es, wkeJSValue object, int length); -WKE_API jsValue jsFunction(jsExecState es, jsNativeFunction fn, unsigned int argCount); -//return the window object -WKE_API jsValue jsGlobalObject(jsExecState es); +WKE_API wkeJSValue WKE_CALL wkeJSGlobalObject(wkeJSState* es); +WKE_API wkeWebView* WKE_CALL wkeJSGetWebView(wkeJSState* es); -WKE_API jsValue jsEval(jsExecState es, const utf8* str); -WKE_API jsValue jsEvalW(jsExecState es, const wchar_t* str); +WKE_API wkeJSValue WKE_CALL wkeJSEval(wkeJSState* es, const utf8* str); +WKE_API wkeJSValue WKE_CALL wkeJSEvalW(wkeJSState* es, const wchar_t* str); -WKE_API jsValue jsCall(jsExecState es, jsValue func, jsValue thisObject, jsValue* args, int argCount); -WKE_API jsValue jsCallGlobal(jsExecState es, jsValue func, jsValue* args, int argCount); +WKE_API wkeJSValue WKE_CALL wkeJSCall(wkeJSState* es, wkeJSValue func, wkeJSValue thisObject, wkeJSValue* args, int argCount); +WKE_API wkeJSValue WKE_CALL wkeJSCallGlobal(wkeJSState* es, wkeJSValue func, wkeJSValue* args, int argCount); -WKE_API jsValue jsGet(jsExecState es, jsValue object, const char* prop); -WKE_API void jsSet(jsExecState es, jsValue object, const char* prop, jsValue v); +WKE_API wkeJSValue WKE_CALL wkeJSGetGlobal(wkeJSState* es, const char* prop); +WKE_API void WKE_CALL wkeJSSetGlobal(wkeJSState* es, const char* prop, wkeJSValue v); -WKE_API jsValue jsGetGlobal(jsExecState es, const char* prop); -WKE_API void jsSetGlobal(jsExecState es, const char* prop, jsValue v); -WKE_API jsValue jsGetAt(jsExecState es, jsValue object, int index); -WKE_API void jsSetAt(jsExecState es, jsValue object, int index, jsValue v); +WKE_API void WKE_CALL wkeJSAddRef(wkeJSState* es, wkeJSValue v); +WKE_API void WKE_CALL wkeJSReleaseRef(wkeJSState* es, wkeJSValue v); +WKE_API void WKE_CALL wkeJSCollectGarbge(); -WKE_API int jsGetLength(jsExecState es, jsValue object); -WKE_API void jsSetLength(jsExecState es, jsValue object, int length); -WKE_API wkeWebView jsGetWebView(jsExecState es); -WKE_API void jsGC(); //garbage collect #ifdef __cplusplus } #endif -#endif \ No newline at end of file +#endif//#ifndef WKE_H diff --git a/demo/libwke/wke.lib b/demo/libwke/wke.lib index d9512fab..ca823375 100644 Binary files a/demo/libwke/wke.lib and b/demo/libwke/wke.lib differ diff --git a/readme.md b/readme.md new file mode 100644 index 00000000..94c7f986 --- /dev/null +++ b/readme.md @@ -0,0 +1,121 @@ +wke Ŀĵ +=========================== + +Ŀ¼ +--------- + +- [Ŀ](#introduce) +- [ָ](#build) + - [԰棺ܱԴͬ](#build-flathead-way) + - [棺ɱԴͬ](#build-hotshot-way) +- [FAQ](#FAQ) + - [FAQ1. wke HTML5 ֧Σ](#FAQ1) + - [FAQ2. Ϊʲô](#FAQ2) + - [FAQ3. Ϊʲô wke ĿûΪ WebCore Ŀ](#FAQ3) +- [](#contributors) + - [BlzFans](#blzfans) + - [Vincent.Lin](#vincent-lin) + - [__](#shao) + - [ ](#guang-guang) + - [](#ma-yi) + - [SOUI](#flyhigh) + - [](#others) + + Ŀ +--------- + +wke һ WebKit 棬ԭĿַ ԭֹͣ£˳ڼоĿ fork ҵʱάѧϰ WebKit ؼҲʵ齫 web UIԱĿȤӭעʱıҲһ WebKit оߡߣҲӭͨĿ㱦ľ顣 + +һ±Ŀ޸ʷ[ύ־](https://github.com/cexer/wke/commits/master)ҲԲ鿴[޸ļ¼](https://github.com/cexer/wke/blob/master/Document/history.md)˽޸ġκĿص飬ӭQQȺ **178168957** [WebUI:wke/cef/mshtml/miniblink](http://shang.qq.com/wpa/qunwpa?idkey=ebe64628d19349ed41e2e77b6dfdb4bdd11fc1cb46f6721f24de1a674bd3bf9b) д + + + ָ +--------- + + **԰棺ܱԴͬ** + +˷򵥡˳ı취ȱص ZIP Դ޲ֿϢ޷ֺ git ֿͬ + +1. [Ŀhttps://www.github.com/cexer/wke](https://www.github.com/cexer/wke) Դ **ZIP **ѹĿĿ¼ +2. ҪѡִĿĿ¼ vs2008.batvs2010.batvs2013.batú VS 򿪽 +3. ڽУȱ WebCore Ŀɹ֮ٱ wkeBrowserwkexe Ŀ + +ϸɱ99%ĵIJȿӷ˽Ϊʲô룬 [FAQ2. Ϊʲô](#FAQ2) + + **棺ɱԴͬ** + +һ׵ˣ뱣 git ֿͬɼ˷ + +1. ϸĶ[GitHub һӣзԶת](http://blog.jobbole.com/46200/)Ȼ˵ú git ͻˡ +2. ҪѡִĿĿ¼ vs2008.batvs2010.batvs2013.batú VS 򿪽 +3. ڽУȱ WebCore Ŀɹ֮ٱ wkeBrowserwkexe Ŀ + +԰ zip ҪĿǹ git ͻ clone ʱһ޿ӣ[GitHub һӣзԶת](http://blog.jobbole.com/46200/)ֻҪеķú git ͻˣͿ clonepullpush ֿˡ + + + FAQ +--------- + +### FAQ1. wke HTML5 ֧Σ + +wke WebKit 2011 İ汾֮һֱûͬ WebKit ¹ wke HTML5 ֧ͣ 2011 ꣬һֱδĽһֱ۵ġȻǺ׼ȷĸ wke HTML5 ִ֧Լ IE9 ֮ϣ IE10 ֮£ ܷΪ 222 ֣Զ CEF 530 ֮¡Ƕ HTML5 ҪϸߵĻʹ wke뿼 CEF ڿе miniblink ںˡ + + +### FAQ2. Ϊʲô + +99%Ŀԭ + +**1. Բе git ͻ autocrlf ܵ⣺** + +JavaScriptCoreWebCore ĿʱҪ perlpython ȽűģԴļIDLɽӿļȣΪwke ĿԴһ cygwin ĿѾԤ perlpython cygwin 汾 perlpython linux 汾һֶֻ֧ȡ linux з`\n`ļûʲô⣬Ϊ wke ĿеģļIDLļ linux ʽĻз**Ȼ** git ͻĬϻῪһԲеĹ `autocrlf`֮ܿʹ git ͻȡʱ򣬻ὫԴļģļIDLļĻзǿ޸ΪǰϵͳĻз windows ϼ `\r\n` perlpython ޷ȡļ޷һԴļӿļ ZIP ƹ git ͻ˵Բйܡ + +ϸ˽⣬鿴 [GitHub һӣзԶת](http://blog.jobbole.com/46200/) + +**2. ϵ VS2010 - VS2013 ҲԼ nmake ⣺** + + JavaScriptCoreWebCore ĿʱҪ perlpython Ƚűһļ perlpython VSͨԼҵ nmake ġȻ˷֢մ VS2010 - VS2013ĬҲ Լҵ nmakeVS֮ǰһ vsvars32.bat ûĿĿ¼ vs2010.batvs2013.bat ļʵVS2008 û⣬ΪͳһҲڸĿ¼·һ vs2008.bat + +ִϲδ⣬QQȺ **178168957** [WebUI:wke/cef/mshtml/miniblink](http://shang.qq.com/wpa/qunwpa?idkey=ebe64628d19349ed41e2e77b6dfdb4bdd11fc1cb46f6721f24de1a674bd3bf9b) + +### FAQ3. Ϊʲô wke ĿûΪ WebCore Ŀ + + [FAQ2. Ϊʲô](#FAQ2) еԭģ JavaScriptCoreWebCore ĿǰкܶĽűãĿǷѾɹЩÿζִһ飬ܷʱ䣬ʵ WebCoreJavaScriptCore ĿڿУǼٻ޸Ҫ±ġ wke Ϊ WebCoreôÿ wke 붼ᵼ WebCoreJavaScriptCore ĿнűãѲҪʱ䣬Դ wke WebCoreĿʼ WebCore ޸ʱʱֶһ WebCoreȻʱ붼ûѲҪĽűʱˡ + + + +--------- + +### BlzFans + +`BlzFans` λɲȻΪ˼͵ wke Ŀ˦Դ֮󣬴뿪ȥʵԼߵֵˣһ䣬һĤݡлŬdzĵ·ǰҲϣһܹٴλص WebUI Ķֱӷ WebUI ۷塣 + +### Vincent.Lin + +`Vincent.Lin` ǴٳɽQQȺ github Ŀԭϡwke ֮ǰһֱûQQȺͳάĿԴĿֱijż `Vincent.Lin` һ˼ wke BUGҪһQQȺ½ԴĿ뷨ӴBUG޸֮һͻ۵IJֿ⣬wke ûһij + + +### __ + +`__` ҲȺԭ֮һΪ wke ˲ٴ룬 cookie Ľӿڡ POST ʽҳĽӿڵȡΪȺԱ𱣩֮һԹXXһÿղۼ⡢ij̸Ϊ˴ɽ + + +### + +` ` ˾ҲӰȥٵĴwke ֮ǰֻ vs2005vs2008 VSĿļ vs2010vs2013 Ȱ汾֪ÿ޵` ` ʱΪ wke vs2010vs2013 Ĺ̡ȻҲʧˡȻҲ vs2017vs2018 УΪ⽹ͷöʱֻ̤ɫƲʳ + + +### + +`` ʦ wke ȺмἼþɱḻܼܹȺ`` ʦѾõ wke ⣨ijЩ»ᵼ codemirror ٣,ʵܸߵ websocket ܣ wke ҲˣĪɡ + + +### SOUI + +`SOUI` һ DirectUI ⣬ҵļ罫 wke ӿԴվõʵʵ SOUI СΪ wke ǿ˲ٹܡ޸һЩ BUGƻصURLıصȡҲǴ SOUI Ⱥ wke ԽԽ֪ǵĿֿĹףȤĿԼ SOUI QQȺ **229313785** + + +### + +ʵкܶˣҲΪ wke Ŀ׹ǴϵĻDZķĵĹףڴһл + +ÿߵһһʹ wke ԽԽǿ \ No newline at end of file diff --git a/readme.txt b/readme.txt deleted file mode 100644 index 5b539b12..00000000 --- a/readme.txt +++ /dev/null @@ -1,29 +0,0 @@ - -Web and Flash Embedded in 3D games, based on WebKit - - - - -Building wke - -VS2005: -1 Install Visual Studio 2005 SP1 -2 Install the Windows SDK 6.0 -3 Open the vs2005/wke.sln solution file in Visual Studio and build the solution. - This can take from 30 minutes to 1 hours. More likely 40 minutes. - -VS2008: -1 Install Visual Studio 2008 SP1 -2 Install the Windows SDK 6.0 or newer -3 Open the vs2008/wke.sln solution file in Visual Studio and build the solution. - This can take from 30 minutes to 1 hours. More likely 40 minutes. - -Run wke -The wkeBrowser.exe executable can be found at demo/bin/wkeBrowser.exe - - -Common Build Errors: - -1. Cygwin exception::handle: Exception: STATUS_ACCESS_VIOLATION - - Close the Visual Studio, then relaunch and rebuild. This usually fixes the problem. \ No newline at end of file diff --git a/vs2005.bat b/vs2005.bat new file mode 100644 index 00000000..41b592f9 --- /dev/null +++ b/vs2005.bat @@ -0,0 +1,5 @@ +@ECHO off +CALL "%VS80COMNTOOLS%vsvars32.bat" +CD "%~dp0vs2005" +wke.sln +EXIT \ No newline at end of file diff --git a/vs2005/targetver.h b/vs2005/targetver.h new file mode 100644 index 00000000..e69de29b diff --git a/vs2005/vsprops/WTFCommon.vsprops b/vs2005/vsprops/WTFCommon.vsprops index 84401328..03bc572f 100644 --- a/vs2005/vsprops/WTFCommon.vsprops +++ b/vs2005/vsprops/WTFCommon.vsprops @@ -10,7 +10,7 @@ AdditionalIncludeDirectories=""$(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\";../Source/JavaScriptCore/;"../Source/JavaScriptCore/os-win32/";../Source/JavaScriptCore/wtf/;../Source/JavaScriptCore/wtf/threads/;../Source/JavaScriptCore/wtf/unicode/;"$(ConfigurationBuildDir)\include\private";"$(WebKitLibrariesDir)\include";"$(ConfigurationBuildDir)\include\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads"" PreprocessorDefinitions="__STD_C" ForcedIncludeFiles="ICUVersion.h" - ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb" + ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc90.pdb" /> diff --git a/vs2005/vsprops/wkeCommon.vsprops b/vs2005/vsprops/wkeCommon.vsprops index 5b2cc82a..f975224d 100644 --- a/vs2005/vsprops/wkeCommon.vsprops +++ b/vs2005/vsprops/wkeCommon.vsprops @@ -12,7 +12,7 @@ /> diff --git a/vs2005/wke.sln b/vs2005/wke.sln index 29656253..0235246a 100644 --- a/vs2005/wke.sln +++ b/vs2005/wke.sln @@ -37,6 +37,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wkeBrowser", "wkeBrowser.vc {011D10F1-B656-4A1B-A0C3-3842F02122C6} = {011D10F1-B656-4A1B-A0C3-3842F02122C6} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wkexe", "wkexe.vcproj", "{5C21D8AD-3930-4AC3-9E32-21FCA603DB76}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_Cairo_CFLite|Win32 = Debug_Cairo_CFLite|Win32 @@ -71,6 +73,10 @@ Global {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -83,3 +89,4 @@ Global {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {0E50E567-2DE0-49A9-A34F-7984F3809FE3} EndGlobalSection EndGlobal + diff --git a/vs2005/wke.vcproj b/vs2005/wke.vcproj index b0dfdb42..45f9a199 100644 --- a/vs2005/wke.vcproj +++ b/vs2005/wke.vcproj @@ -22,6 +22,58 @@ InheritedPropertySheets=".\vsprops\wkeDebug.vsprops" CharacterSet="1" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -47,75 +151,111 @@ > - + + - + + + + + + + + + + + + + + + + diff --git a/vs2005/wkeBrowser.vcproj b/vs2005/wkeBrowser.vcproj index 1a1018dd..fde6b3ca 100644 --- a/vs2005/wkeBrowser.vcproj +++ b/vs2005/wkeBrowser.vcproj @@ -59,7 +59,7 @@ /> @@ -182,31 +182,27 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - - NUL ..\demo\libwke xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\bin\ xcopy /D /F /R /Y "%CONFIGURATIONBUILDDIR%\lib\wke.lib" ..\demo\libwke\ -xcopy /D /F /R /Y "..\wke\wke.h" ..\demo\libwke\ \ No newline at end of file +xcopy /D /F /R /Y "..\wke\wke.h" ..\demo\libwke\ +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\libwke\ \ No newline at end of file diff --git a/vs2005/wkexe.vcproj b/vs2005/wkexe.vcproj new file mode 100644 index 00000000..a5c13b02 --- /dev/null +++ b/vs2005/wkexe.vcproj @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vs2005/wkexePostBuild.cmd b/vs2005/wkexePostBuild.cmd new file mode 100644 index 00000000..4a09195d --- /dev/null +++ b/vs2005/wkexePostBuild.cmd @@ -0,0 +1,3 @@ +mkdir 2>NUL ..\demo\bin + +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\bin\ \ No newline at end of file diff --git a/vs2008.bat b/vs2008.bat new file mode 100644 index 00000000..e595388a --- /dev/null +++ b/vs2008.bat @@ -0,0 +1,5 @@ +@ECHO off +CALL "%VS90COMNTOOLS%vsvars32.bat" +CD "%~dp0vs2008" +wke.sln +EXIT \ No newline at end of file diff --git a/vs2008/WebCore.vcproj b/vs2008/WebCore.vcproj index 431c3f45..fb31215e 100644 --- a/vs2008/WebCore.vcproj +++ b/vs2008/WebCore.vcproj @@ -6,6 +6,7 @@ ProjectGUID="{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}" RootNamespace="WebCore" Keyword="Win32Proj" + TargetFrameworkVersion="0" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -98,6 +189,18 @@ /> + + + + + + @@ -122,18 +225,6 @@ /> - - - - - - @@ -290,7 +381,7 @@ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSCanvasGradient.cpp" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - + + + + - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - @@ -52066,7 +52157,7 @@ RelativePath="..\Source\WebCore\editing\SmartReplaceCF.cpp" > - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/vs2008/wke.sln b/vs2008/wke.sln index 7e78de59..323b9ddf 100644 --- a/vs2008/wke.sln +++ b/vs2008/wke.sln @@ -28,16 +28,21 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "WebCore.vcproj", EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wke", "wke.vcproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wkeBrowser", "wkeBrowser.vcproj", "{5C21D8AD-3930-4AC3-9E32-21FCA602DB76}" ProjectSection(ProjectDependencies) = postProject - {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} + {011D10F1-B656-4A1B-A0C3-3842F02122C6} = {011D10F1-B656-4A1B-A0C3-3842F02122C6} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wkeBrowser", "wkeBrowser.vcproj", "{5C21D8AD-3930-4AC3-9E32-21FCA602DB76}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wkexe", "wkexe.vcproj", "{5C21D8AD-3930-4AC3-9E32-21FCA603DB76}" ProjectSection(ProjectDependencies) = postProject {011D10F1-B656-4A1B-A0C3-3842F02122C6} = {011D10F1-B656-4A1B-A0C3-3842F02122C6} EndProjectSection EndProject Global + GlobalSection(DPCodeReviewSolutionGUID) = preSolution + DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_Cairo_CFLite|Win32 = Debug_Cairo_CFLite|Win32 Release_Cairo_CFLite|Win32 = Release_Cairo_CFLite|Win32 @@ -71,6 +76,10 @@ Global {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/vs2008/wke.vcproj b/vs2008/wke.vcproj index 6bdbfa4a..a7f8b1f2 100644 --- a/vs2008/wke.vcproj +++ b/vs2008/wke.vcproj @@ -22,6 +22,58 @@ InheritedPropertySheets=".\vsprops\wkeDebug.vsprops" CharacterSet="1" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -47,75 +151,115 @@ > - - + + + + + + + + + + + + + + + + + + + + diff --git a/vs2008/wkeBrowser.vcproj b/vs2008/wkeBrowser.vcproj index 4b57ca0e..d522004e 100644 --- a/vs2008/wkeBrowser.vcproj +++ b/vs2008/wkeBrowser.vcproj @@ -60,7 +60,7 @@ /> @@ -177,15 +177,15 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - - - + + diff --git a/vs2008/wkePostBuild.cmd b/vs2008/wkePostBuild.cmd index 3ca69ea6..55ac2511 100644 --- a/vs2008/wkePostBuild.cmd +++ b/vs2008/wkePostBuild.cmd @@ -3,4 +3,5 @@ mkdir 2>NUL ..\demo\libwke xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\bin\ xcopy /D /F /R /Y "%CONFIGURATIONBUILDDIR%\lib\wke.lib" ..\demo\libwke\ -xcopy /D /F /R /Y "..\wke\wke.h" ..\demo\libwke\ \ No newline at end of file +xcopy /D /F /R /Y "..\wke\wke.h" ..\demo\libwke\ +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\libwke\ \ No newline at end of file diff --git a/vs2008/wkexe.vcproj b/vs2008/wkexe.vcproj new file mode 100644 index 00000000..a52a6f8c --- /dev/null +++ b/vs2008/wkexe.vcproj @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vs2008/wkexePostBuild.cmd b/vs2008/wkexePostBuild.cmd new file mode 100644 index 00000000..4a09195d --- /dev/null +++ b/vs2008/wkexePostBuild.cmd @@ -0,0 +1,3 @@ +mkdir 2>NUL ..\demo\bin + +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\bin\ \ No newline at end of file diff --git a/vs2010.bat b/vs2010.bat new file mode 100644 index 00000000..ef741332 --- /dev/null +++ b/vs2010.bat @@ -0,0 +1,5 @@ +@ECHO off +CALL "%VS100COMNTOOLS%vsvars32.bat" +CD "%~dp0vs2010" +wke.sln +EXIT \ No newline at end of file diff --git a/vs2010/JavaScriptCore.vcxproj b/vs2010/JavaScriptCore.vcxproj new file mode 100644 index 00000000..ee890f6c --- /dev/null +++ b/vs2010/JavaScriptCore.vcxproj @@ -0,0 +1,430 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {011D10F1-B656-4A1B-A0C3-3842F02122C5} + JavaScriptCore + Win32Proj + + + + StaticLibrary + Unicode + + + StaticLibrary + Unicode + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + AllRules.ruleset + + + AllRules.ruleset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {aa8a5a85-592b-4357-bc60-e0e91e026af6} + false + + + + + + \ No newline at end of file diff --git a/vs2010/JavaScriptCore.vcxproj.filters b/vs2010/JavaScriptCore.vcxproj.filters new file mode 100644 index 00000000..c0a8a7be --- /dev/null +++ b/vs2010/JavaScriptCore.vcxproj.filters @@ -0,0 +1,1150 @@ + + + + + {39b57a75-11b6-45c1-9cb1-667b83a50d19} + + + {d8574145-d5c0-471b-98fb-d6a9863c226f} + + + {c2ef5188-d0f4-4d6c-a85f-856449c0801d} + + + {9b234a2e-9f74-487c-934e-81c3856fd373} + + + {ad032024-b643-46cb-83af-610f2f6b787c} + + + {aa75281e-30c6-4eb8-ab3a-5bc2c8c0c532} + + + {93e557db-d66c-4e72-bee6-826edfe591cd} + + + {4153d55f-0723-4f57-ac30-c4448dfe4eaf} + + + {32bd84fe-d726-4cd1-ab7f-6e8a32201c3d} + + + {a6a31a00-9d69-4c7b-92dc-b82e206380c9} + + + {4c9a40a1-9481-4a4a-b620-977e7fdb83f2} + + + {d6259e7b-e46e-40d8-be5c-c48f3d0f7d53} + + + {74d86d46-037f-4b82-a322-f80cb53c3a41} + + + {50c6fc0a-e132-4791-9136-f22bce4ab36c} + + + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + profiler + + + profiler + + + profiler + + + profiler + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + debugger + + + debugger + + + debugger + + + yarr + + + yarr + + + yarr + + + yarr + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + interpreter + + + interpreter + + + interpreter + + + bytecompiler + + + bytecompiler + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + debugger + + + debugger + + + debugger + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + dfg + + + dfg + + + dfg + + + yarr + + + yarr + + + yarr + + + yarr + + + yarr + + + yarr + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + bytecompiler + + + bytecompiler + + + bytecompiler + + + bytecompiler + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + + \ No newline at end of file diff --git a/vs2010/JavaScriptCoreGenerated.vcxproj b/vs2010/JavaScriptCoreGenerated.vcxproj new file mode 100644 index 00000000..0d91de83 --- /dev/null +++ b/vs2010/JavaScriptCoreGenerated.vcxproj @@ -0,0 +1,52 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} + JavaScriptCoreGenerated + MakeFileProj + + + + Makefile + + + Makefile + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2010/JavaScriptCorePostBuild.cmd b/vs2010/JavaScriptCorePostBuild.cmd new file mode 100644 index 00000000..2bc2d135 --- /dev/null +++ b/vs2010/JavaScriptCorePostBuild.cmd @@ -0,0 +1,2 @@ +if exist "%WEBKITLIBRARIESDIR%\tools\VersionStamper\VersionStamper.exe" "%WEBKITLIBRARIESDIR%\tools\VersionStamper\VersionStamper.exe" --verbose "%TARGETPATH%" +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/vs2010/JavaScriptCorePreBuild.cmd b/vs2010/JavaScriptCorePreBuild.cmd new file mode 100644 index 00000000..ae60d71b --- /dev/null +++ b/vs2010/JavaScriptCorePreBuild.cmd @@ -0,0 +1,4 @@ +cmd /c +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" +if errorlevel 1 exit 1 +echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/vs2010/WTF.vcxproj b/vs2010/WTF.vcxproj new file mode 100644 index 00000000..5a615bb4 --- /dev/null +++ b/vs2010/WTF.vcxproj @@ -0,0 +1,252 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {AA8A5A85-592B-4357-BC60-E0E91E026AF6} + WTF + Win32Proj + + + + StaticLibrary + Unicode + + + StaticLibrary + Unicode + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + AllRules.ruleset + + + AllRules.ruleset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4702;%(DisableSpecificWarnings) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {4ff5ba11-59ec-4c24-8f52-f235c2e7d43a} + false + + + + + + \ No newline at end of file diff --git a/vs2010/WTF.vcxproj.filters b/vs2010/WTF.vcxproj.filters new file mode 100644 index 00000000..8be98c8c --- /dev/null +++ b/vs2010/WTF.vcxproj.filters @@ -0,0 +1,313 @@ + + + + + {df08bdf0-be78-4ece-b469-ddcedcac8b77} + + + {35de3352-f067-4799-b019-bf85ee3fb06f} + + + {ce9a1906-5528-4130-b881-1fab8d5d6cf0} + + + {3ba56a39-9ca9-4a45-b084-bfef8b5954a4} + + + {045d38bf-85fa-442f-b8c7-f0366f22e952} + + + {f42b70c7-8461-4e56-bbf2-efc5703ee91d} + + + {9fdeeb36-9fa5-4a2e-b69f-580c91b18615} + + + + + win + + + win + + + unicode + + + unicode\icu + + + text + + + text + + + text + + + text + + + text + + + text + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + threads\win + + + threads + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + unicode + + + unicode + + + unicode + + + unicode + + + unicode + + + unicode\icu + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + threads + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2010/WTFPostBuild.cmd b/vs2010/WTFPostBuild.cmd new file mode 100644 index 00000000..670a8a45 --- /dev/null +++ b/vs2010/WTFPostBuild.cmd @@ -0,0 +1 @@ +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/vs2010/WTFPreBuild.cmd b/vs2010/WTFPreBuild.cmd new file mode 100644 index 00000000..ae60d71b --- /dev/null +++ b/vs2010/WTFPreBuild.cmd @@ -0,0 +1,4 @@ +cmd /c +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" +if errorlevel 1 exit 1 +echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/vs2010/WebCore.vcxproj b/vs2010/WebCore.vcxproj new file mode 100644 index 00000000..a5dd246e --- /dev/null +++ b/vs2010/WebCore.vcxproj @@ -0,0 +1,7772 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} + WebCore + Win32Proj + + + + StaticLibrary + Unicode + + + StaticLibrary + Unicode + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + AllRules.ruleset + + + AllRules.ruleset + + + + + + true + + + + + + + + + + + 4065;4273;4565;4701;4702;%(DisableSpecificWarnings) + ICUVersion.h + + + 4065;4273;4565;4701;4702;%(DisableSpecificWarnings) + ICUVersion.h + + + + + + + 4819;%(DisableSpecificWarnings) + + + 4819;%(DisableSpecificWarnings) + + + true + true + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + true + true + + + + true + true + + + true + true + + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + true + true + + + + + + + + + 4065;4273;4565;4701;4702;%(DisableSpecificWarnings) + ICUVersion.h + + + 4065;4273;4565;4701;4702;%(DisableSpecificWarnings) + ICUVersion.h + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICUVersion.h + + + ICUVersion.h + + + + Create + 4819;%(DisableSpecificWarnings) + Create + 4819;%(DisableSpecificWarnings) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + + + true + true + + + + + + + true + true + + + + true + true + + + + + + true + true + + + + + + + true + true + + + true + true + + + + + + true + true + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4481;4611;%(DisableSpecificWarnings) + 4481;4611;%(DisableSpecificWarnings) + + + 4481;4611;%(DisableSpecificWarnings) + 4481;4611;%(DisableSpecificWarnings) + + + + + + $(IntDir)%(Filename)1.obj + $(IntDir)%(Filename)1.xdc + $(IntDir)%(Filename)1.obj + $(IntDir)%(Filename)1.xdc + + + $(IntDir)%(Filename)1.obj + $(IntDir)%(Filename)1.xdc + $(IntDir)%(Filename)1.obj + $(IntDir)%(Filename)1.xdc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + ICUVersion.h + + + ICUVersion.h + + + + + + + + + + + + + + + + + true + true + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Frame.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Frame.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {0a324352-b3b6-496c-9e5b-4c7e923e628b} + false + + + + + + \ No newline at end of file diff --git a/vs2010/WebCore.vcxproj.filters b/vs2010/WebCore.vcxproj.filters new file mode 100644 index 00000000..1f9818a0 --- /dev/null +++ b/vs2010/WebCore.vcxproj.filters @@ -0,0 +1,13595 @@ + + + + + {2c2b44d5-5edf-4f63-99a8-fe13c503229b} + + + {30d2bd31-2882-4914-abc9-0c7daca37e18} + + + {25850d82-85d9-4672-a1fb-d8d43a952f93} + + + {401743ca-932a-4899-b87a-c8824a30cfcc} + + + {fa76d740-3b76-4105-a8d9-d540cada2bed} + + + {155c626e-0069-4849-8828-375f771d5168} + + + {f8d84a4d-6757-4992-bb38-6104c38a22b5} + + + {8e4feb74-7365-4545-b605-ca4efa7e61fb} + + + {547f6628-3f1e-4d5a-87f5-d19fed7ddf13} + + + {ba7c292c-91fb-4450-834f-4f420dc90751} + + + {7e80fd5d-47f6-4645-bd45-453ff7028b08} + + + {77cc45b9-a218-4d1a-899f-04bd5e44d842} + + + {77319b5a-1594-4e44-b28d-8d7733b57038} + + + {2e20adfa-c19c-4be0-b464-56d699d32e0d} + + + {90fe258e-025c-4f4c-856c-f9ee471b7100} + + + {9ba13080-f5e6-49f0-9b76-357a45e9cf00} + + + {f3bbfae2-e3d2-46a4-b558-438fd66085e1} + + + {a7042231-6721-4880-9d39-ffbdb0f5e86f} + + + {332e20ea-df84-4b40-af03-9313e2c68838} + + + {c87f41bd-8ffe-4961-8bc9-ca750b3df0d2} + + + {6082031a-a65f-4631-b943-16043a42fb79} + + + {afeccfa3-8aa2-4cdc-bffd-979102db7487} + + + {b34b5868-273d-4e64-846e-317bf31f0f54} + + + {b112094d-bc95-41c4-824c-1e76c2b5a220} + + + {aee9cd73-3682-4900-98fa-966f050ad90f} + + + {4a6aaba0-d48d-474a-8216-330e9e191c9f} + + + {6570975e-7bc2-4a85-80d4-69862b8d0d87} + + + {3e838c8b-8978-4e8a-978f-066fc911e1a3} + + + {280c2a43-8241-4060-a7c7-16b6ed84de57} + + + {1b96419d-ed36-4b7a-a244-1ab86620507c} + + + {fba60670-09d3-4b49-a50d-62dc8dd302b4} + + + {0060f878-cc04-4137-9431-646c7c0cab63} + + + {a3e5f71e-3e49-45a1-9619-39998e0e6dd7} + + + {721a9a44-d0ed-43e1-908b-ffa2e85cf140} + + + {aaca613a-81ce-4828-9ba1-82e9a33a23c4} + + + {aa1fa59a-dbf3-45fb-a513-3a828c86ec14} + + + {ae912850-0180-4d75-89ec-a9100d2bb3f8} + + + {d2c5df2d-78b3-4eeb-9c4e-f7e4dfaa9e54} + + + {157f9948-b2b1-43f1-b16f-aeac7bdde905} + + + {7a5a044f-ffd3-410e-8d96-e827814eb590} + + + {635e4c78-f221-43a4-8153-3b8163da246e} + + + {8726413d-40e9-4bcc-9a79-2a99da9ddf72} + + + {a4f62510-e44a-4571-a3dc-f2153f8428a8} + + + {1fd83545-98c2-4632-a5d2-13b2d2d3dcbd} + + + {d3fea1bf-179e-4019-b609-d6b39eb0d209} + + + {0468eaae-8413-4df3-b4c5-3faac32a1fe6} + + + {8b1f1d88-b97e-4f73-83ae-b0704526e98f} + + + {b0241d02-1136-4890-aba7-5036d1e69569} + + + {eb3694ad-5880-410f-8a0e-bbff8a290787} + + + {bd728f4e-a49a-4767-8b17-7ab0badabce1} + + + {61626377-15af-415f-8056-195fc5259108} + + + {927b9b3c-de85-4696-84e5-dca62546428b} + + + {3de5073b-551a-42f1-96c9-88411eb80cc6} + + + {945e2777-8b62-4aa8-b35c-32aec776ff88} + + + {e04a002e-abf2-459b-9ded-8c95d69eb9b2} + + + {3828a8b9-7cab-4488-b302-f26a1e1a8e45} + + + {f198a67c-119f-4d72-aa33-3b893acae889} + + + {d78b9625-300f-4507-b54d-9d71d15c68ad} + + + {6f6f62b7-48f0-4e62-b33b-d2086f1a5a45} + + + {9cd7976c-2e5e-46be-8d90-5de74ef73d8d} + + + {f0ea7070-8aeb-482f-9da6-ead4dd5726ab} + + + {8dc483f0-976e-4ee9-8372-3ce3c9191b7c} + + + {cdbc900a-29c8-423b-b9a5-e637089eb87c} + + + {220ba2d6-8833-43e9-9214-671a36a72e04} + + + {a82f23c9-3a15-48fd-8fa3-47e10d0b9351} + + + {ffb52659-4d77-4dd0-8a66-035e20e2bd83} + + + {d76814b5-4a1a-48f1-8cb9-8a3aaa3ca465} + + + {1a1c6ad9-2644-4ccd-8431-bbd5dbe34eab} + + + {ff75c2e8-b0d6-471e-9cb6-25bd531cdac4} + + + {bb8ac413-0678-41fd-9442-8b6d7f52b0fd} + + + {9e154258-1e3b-426a-a41d-6e5ad2f164c2} + + + {da29b768-b7f0-4739-99e3-c74a3ad5951d} + + + {e5cc22a0-a1bd-4b10-bf31-e6c01621e41a} + + + {b54af28f-9864-4cae-a256-85a29019c74a} + + + {4ac6d3ab-1980-488d-9078-46e8bfa0c25a} + + + {7d7d4b73-a21b-4c93-8359-45c96d89f4bb} + + + {bf7d80c5-3b57-46d1-8853-09fc7d4a4aab} + + + {97f91c35-7799-47f9-8067-63054dce0d71} + + + {f2207c28-044a-4c21-8092-4b0bf8c5f872} + + + {800222e8-d5bf-4c6d-a29c-effb358fbd66} + + + {24ec72fe-adcf-46e0-9b61-390016c94009} + + + {9ba2a265-d51b-4f2c-94b8-bc612d7d0dea} + + + {6b47d0ac-4e70-46da-a533-e74dc74d6c53} + + + {3f34af27-b057-4117-9dd5-e241f0d82535} + + + {739b6963-30c1-415e-8f4b-865d7375c725} + + + {1cf26e8e-b6d1-4b58-9636-f64c3b34ff73} + + + {24851c9a-b062-4ce1-b26a-4bd7ddd38ef6} + + + {2f59c351-679c-416a-a2a7-748a6a04fbbf} + + + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility\win + + + accessibility\win + + + p2p + + + p2p + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page\win + + + page\win + + + page\win + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\archive + + + loader\archive + + + loader\archive + + + loader\archive + + + loader\archive\cf + + + loader\archive\mhtml + + + loader\archive\mhtml + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\cf + + + platform\cf + + + platform\cf + + + platform\cf\win + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\ca + + + platform\graphics\ca + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\avfoundation + + + platform\graphics\avfoundation\cf + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\win + + + platform\network\win + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text\cf + + + platform\text\cf + + + platform\text\cf + + + platform\text\win + + + platform\text\transcoder + + + platform\image-decoders + + + platform\image-decoders\cairo + + + platform\image-decoders\gif + + + platform\image-decoders\gif + + + platform\image-decoders\jpeg + + + platform\image-decoders\png + + + platform\image-decoders\bmp + + + platform\image-decoders\bmp + + + platform\image-decoders\ico + + + platform\animation + + + platform\animation + + + platform\mock + + + platform\mock + + + platform\mock + + + platform\mock + + + platform\mock + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + notifications + + + notifications + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + bindings + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins\win + + + plugins\win + + + plugins\win + + + plugins\win + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg\animation + + + rendering\svg\animation + + + rendering\svg\animation + + + rendering\svg\graphics + + + rendering\svg\graphics\filters + + + rendering\svg\graphics\filters + + + rendering\svg\graphics\filters + + + rendering\svg\properties + + + rendering\svg\properties + + + history + + + history + + + history + + + history + + + history + + + history + + + history\cf + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + strings + + + strings + + + strings + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + platform\graphics\cg + + + platform\network\cf + + + platform\network\cf + + + + + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility\win + + + p2p + + + p2p + + + p2p + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page\win + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\archive + + + loader\archive + + + loader\archive + + + loader\archive + + + loader\archive\cf + + + loader\archive\mhtml + + + loader\archive\mhtml + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\cf + + + platform\cf + + + platform\cf\win + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\ca + + + platform\graphics\ca + + + platform\graphics\ca + + + platform\graphics\ca + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\avfoundation + + + platform\graphics\avfoundation\cf + + + platform\graphics\avfoundation\cf + + + platform\graphics\avfoundation\cf + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text\transcoder + + + platform\image-decoders + + + platform\image-decoders\gif + + + platform\image-decoders\gif + + + platform\image-decoders\jpeg + + + platform\image-decoders\png + + + platform\image-decoders\bmp + + + platform\image-decoders\bmp + + + platform\image-decoders\ico + + + platform\animation + + + platform\animation + + + platform\animation + + + platform\mock + + + platform\mock + + + platform\mock + + + platform\mock + + + platform\mock + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + notifications + + + notifications + + + notifications + + + notifications + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + bindings + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins\win + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg\animation + + + rendering\svg\animation + + + rendering\svg\animation + + + rendering\svg\graphics + + + rendering\svg\graphics\filters + + + rendering\svg\graphics\filters + + + rendering\svg\graphics\filters + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + ForwardingHeaders + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf\unicode + + + ForwardingHeaders\wtf\unicode\icu + + + ForwardingHeaders\wtf\text + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\yarr + + + ForwardingHeaders\yarr + + + ForwardingHeaders\yarr + + + ForwardingHeaders\bindings + + + ForwardingHeaders\bindings + + + ForwardingHeaders\bindings + + + ForwardingHeaders\profiler + + + ForwardingHeaders\profiler + + + ForwardingHeaders\profiler + + + ForwardingHeaders\masm + + + ForwardingHeaders\heap + + + history + + + history + + + history + + + history + + + history + + + history + + + history + + + history + + + history\cf + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + + + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + xml + + + bindings\scripts + + + bindings\scripts + + + bindings\scripts + + + bindings\scripts + + + bindings\scripts + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + rendering + + + rendering + + + rendering + + + \ No newline at end of file diff --git a/vs2010/WebCoreGenerated.vcxproj b/vs2010/WebCoreGenerated.vcxproj new file mode 100644 index 00000000..969997fb --- /dev/null +++ b/vs2010/WebCoreGenerated.vcxproj @@ -0,0 +1,59 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {0A324352-B3B6-496C-9E5B-4C7E923E628B} + MakeFileProj + + + + Makefile + + + Makefile + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + + + + + + + + + + + + {011d10f1-b656-4a1b-a0c3-3842f02122c5} + false + + + + + + \ No newline at end of file diff --git a/vs2010/WebCorePostBuild.cmd b/vs2010/WebCorePostBuild.cmd new file mode 100644 index 00000000..670a8a45 --- /dev/null +++ b/vs2010/WebCorePostBuild.cmd @@ -0,0 +1 @@ +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/vs2010/WebCorePreBuild.cmd b/vs2010/WebCorePreBuild.cmd new file mode 100644 index 00000000..a41ebec8 --- /dev/null +++ b/vs2010/WebCorePreBuild.cmd @@ -0,0 +1,6 @@ +cmd /c +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" +if errorlevel 1 exit 1 +echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" + +exit /b diff --git a/vs2010/targetver.h b/vs2010/targetver.h new file mode 100644 index 00000000..e69de29b diff --git a/vs2010/vsprops/JavaScriptCoreCommon.props b/vs2010/vsprops/JavaScriptCoreCommon.props new file mode 100644 index 00000000..1a829718 --- /dev/null +++ b/vs2010/vsprops/JavaScriptCoreCommon.props @@ -0,0 +1,13 @@ + + + + $(ConfigurationBuildDir)\lib\ + + + + $(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\;../Source/JavaScriptCore/;../Source/JavaScriptCore/API/;../Source/JavaScriptCore/parser/;../Source/JavaScriptCore/bytecompiler/;../Source/JavaScriptCore/dfg/;../Source/JavaScriptCore/jit/;../Source/JavaScriptCore/runtime/;../Source/JavaScriptCore/bytecode/;../Source/JavaScriptCore/interpreter/;../Source/JavaScriptCore/wtf/;../Source/JavaScriptCore/profiler;../Source/JavaScriptCore/assembler/;../Source/JavaScriptCore/debugger/;../Source/JavaScriptCore/heap/;$(WebKitLibrariesDir)\include;$(WebKitLibrariesDir)\include\private;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private;$(WebKitLibrariesDir)\include\pthreads;%(AdditionalIncludeDirectories) + ICUVersion.h + __STD_C;%(PreprocessorDefinitions) + + + diff --git a/vs2010/vsprops/JavaScriptCoreDebugCairoCFLite.props b/vs2010/vsprops/JavaScriptCoreDebugCairoCFLite.props new file mode 100644 index 00000000..8f5d5dde --- /dev/null +++ b/vs2010/vsprops/JavaScriptCoreDebugCairoCFLite.props @@ -0,0 +1,13 @@ + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2010/vsprops/JavaScriptCoreGeneratedCommon.props b/vs2010/vsprops/JavaScriptCoreGeneratedCommon.props new file mode 100644 index 00000000..69f6ae87 --- /dev/null +++ b/vs2010/vsprops/JavaScriptCoreGeneratedCommon.props @@ -0,0 +1,28 @@ + + + + + + + <_ProjectFileVersion>10.0.40219.1 + set PATH=$(ProjectDir)\..\cygwin\bin%3b$(PATH) + cd ..\Source\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore +cmd /c + +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +nmake /nologo -f JavaScriptCoreGenerated.make + set PATH=$(ProjectDir)\..\cygwin\bin%3b$(PATH) +cd ..\Source\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore +cmd /c + +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +nmake /nologo -f JavaScriptCoreGenerated.make clean +nmake -f JavaScriptCoreGenerated.make + set PATH=$(ProjectDir)\..\cygwin\bin%3b$(PATH) +cd ..\Source\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore +cmd /c + +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +nmake /nologo -f JavaScriptCoreGenerated.make clean + + \ No newline at end of file diff --git a/vs2010/vsprops/JavaScriptCoreReleaseCairoCFLite.props b/vs2010/vsprops/JavaScriptCoreReleaseCairoCFLite.props new file mode 100644 index 00000000..d81b467f --- /dev/null +++ b/vs2010/vsprops/JavaScriptCoreReleaseCairoCFLite.props @@ -0,0 +1,14 @@ + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2010/vsprops/WTFCommon.props b/vs2010/vsprops/WTFCommon.props new file mode 100644 index 00000000..be07248b --- /dev/null +++ b/vs2010/vsprops/WTFCommon.props @@ -0,0 +1,13 @@ + + + + $(ConfigurationBuildDir)\lib\ + + + + $(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\;../Source/JavaScriptCore/;../Source/JavaScriptCore/os-win32/;../Source/JavaScriptCore/wtf/;../Source/JavaScriptCore/wtf/threads/;../Source/JavaScriptCore/wtf/unicode/;$(ConfigurationBuildDir)\include\private;$(WebKitLibrariesDir)\include;$(ConfigurationBuildDir)\include\JavaScriptCore;$(WebKitLibrariesDir)\include\pthreads;%(AdditionalIncludeDirectories) + ICUVersion.h + __STD_C;%(PreprocessorDefinitions) + + + diff --git a/vs2010/vsprops/WTFDebugCairoCFLite.props b/vs2010/vsprops/WTFDebugCairoCFLite.props new file mode 100644 index 00000000..ab3f0ca4 --- /dev/null +++ b/vs2010/vsprops/WTFDebugCairoCFLite.props @@ -0,0 +1,13 @@ + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2010/vsprops/WTFReleaseCairoCFLite.props b/vs2010/vsprops/WTFReleaseCairoCFLite.props new file mode 100644 index 00000000..20ce4ca0 --- /dev/null +++ b/vs2010/vsprops/WTFReleaseCairoCFLite.props @@ -0,0 +1,14 @@ + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2010/vsprops/WebCoreCURL.props b/vs2010/vsprops/WebCoreCURL.props new file mode 100644 index 00000000..cdec51be --- /dev/null +++ b/vs2010/vsprops/WebCoreCURL.props @@ -0,0 +1,9 @@ + + + + + $(ProjectDir)..\Source\WebCore\platform\network\curl;%(AdditionalIncludeDirectories) + USE_WINDOWS_SSPI;USE_SSLEAY;HAVE_ZLIB;%(PreprocessorDefinitions) + + + diff --git a/vs2010/vsprops/WebCoreCairo.props b/vs2010/vsprops/WebCoreCairo.props new file mode 100644 index 00000000..df9fca5c --- /dev/null +++ b/vs2010/vsprops/WebCoreCairo.props @@ -0,0 +1,9 @@ + + + + + $(ProjectDir)..\Source\WebCore\platform\graphics\cairo;$(ProjectDir)..\Source\WebCore\platform\graphics\win\cairo;$(ProjectDir)..\Source\WebCore\svg\graphics\cairo;$(ProjectDir)..\Source\WebCore\platform\image-decoders;$(ProjectDir)..\Source\WebCore\platform\image-decoders\bmp;$(ProjectDir)..\Source\WebCore\platform\image-decoders\cairo;$(ProjectDir)..\Source\WebCore\platform\image-decoders\gif;$(ProjectDir)..\Source\WebCore\platform\image-decoders\ico;$(ProjectDir)..\Source\WebCore\platform\image-decoders\jpeg;$(ProjectDir)..\Source\WebCore\platform\image-decoders\png;$(ProjectDir)..\Source\WebCore\platform\image-decoders\webp;$(WebKitLibrariesDir)\include\cairo;%(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + diff --git a/vs2010/vsprops/WebCoreCommon.props b/vs2010/vsprops/WebCoreCommon.props new file mode 100644 index 00000000..113f71fb --- /dev/null +++ b/vs2010/vsprops/WebCoreCommon.props @@ -0,0 +1,15 @@ + + + + $(ConfigurationBuildDir)\lib\ + + + + $(ProjectDir)..\Source\WebCore;$(ProjectDir)..\Source\WebCore\accessibility;$(ProjectDir)..\Source\WebCore\accessibility\win;$(ProjectDir)..\Source\WebCore\bridge;$(ProjectDir)..\Source\WebCore\bridge\c;$(ProjectDir)..\Source\WebCore\bridge\jsc;$(ProjectDir)..\Source\WebCore\css;$(ProjectDir)..\Source\WebCore\editing;$(ProjectDir)..\Source\WebCore\fileapi;$(ProjectDir)..\Source\WebCore\rendering;$(ProjectDir)..\Source\WebCore\rendering\mathml;$(ProjectDir)..\Source\WebCore\rendering\style;$(ProjectDir)..\Source\WebCore\rendering\svg;$(ProjectDir)..\Source\WebCore\bindings;$(ProjectDir)..\Source\WebCore\bindings\generic;$(ProjectDir)..\Source\WebCore\bindings\js;$(ProjectDir)..\Source\WebCore\bindings\js\specialization;$(ProjectDir)..\Source\WebCore\dom;$(ProjectDir)..\Source\WebCore\dom\default;$(ProjectDir)..\Source\WebCore\history;$(ProjectDir)..\Source\WebCore\html;$(ProjectDir)..\Source\WebCore\html\canvas;$(ProjectDir)..\Source\WebCore\html\parser;$(ProjectDir)..\Source\WebCore\html\shadow;$(ProjectDir)..\Source\WebCore\inspector;$(ProjectDir)..\Source\WebCore\loader;$(ProjectDir)..\Source\WebCore\loader\appcache;$(ProjectDir)..\Source\WebCore\loader\archive;$(ProjectDir)..\Source\WebCore\loader\archive\cf;$(ProjectDir)..\Source\WebCore\loader\cache;$(ProjectDir)..\Source\WebCore\loader\icon;$(ProjectDir)..\Source\WebCore\mathml;$(ProjectDir)..\Source\WebCore\notifications;$(ProjectDir)..\Source\WebCore\page;$(ProjectDir)..\Source\WebCore\page\animation;$(ProjectDir)..\Source\WebCore\page\win;$(ProjectDir)..\Source\WebCore\platform;$(ProjectDir)..\Source\WebCore\platform\animation;$(ProjectDir)..\Source\WebCore\platform\mock;$(ProjectDir)..\Source\WebCore\platform\sql;$(ProjectDir)..\Source\WebCore\platform\win;$(ProjectDir)..\Source\WebCore\platform\network;$(ProjectDir)..\Source\WebCore\platform\network\win;$(ProjectDir)..\Source\WebCore\platform\cf;$(ProjectDir)..\Source\WebCore\platform\graphics;$(ProjectDir)..\Source\WebCore\platform\graphics\ca;$(ProjectDir)..\Source\WebCore\platform\graphics\filters;$(ProjectDir)..\Source\WebCore\platform\graphics\filters\arm;$(ProjectDir)..\Source\WebCore\platform\graphics\opentype;$(ProjectDir)..\Source\WebCore\platform\graphics\transforms;$(ProjectDir)..\Source\WebCore\platform\text;$(ProjectDir)..\Source\WebCore\platform\text\transcoder;$(ProjectDir)..\Source\WebCore\platform\graphics\win;$(ProjectDir)..\Source\WebCore\xml;$(ProjectDir)..\Source\WebCore\xml\parser;$(ConfigurationBuildDir)\obj\WebCore\DerivedSources;$(ProjectDir)..\Source\WebCore\plugins;$(ProjectDir)..\Source\WebCore\plugins\win;$(ProjectDir)..\Source\WebCore\svg\animation;$(ProjectDir)..\Source\WebCore\svg\graphics;$(ProjectDir)..\Source\WebCore\svg\properties;$(ProjectDir)..\Source\WebCore\svg\graphics\filters;$(ProjectDir)..\Source\WebCore\svg;$(ProjectDir)..\Source\WebCore\testing;$(ProjectDir)..\Source\WebCore\wml;$(ProjectDir)..\Source\WebCore\storage;$(ProjectDir)..\Source\WebCore\websockets;$(ProjectDir)..\Source\WebCore\workers;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ProjectDir)..\Source\WebCore\ForwardingHeaders;$(WebKitLibrariesDir)\include;$(WebKitLibrariesDir)\include\private;$(WebKitLibrariesDir)\include\private\JavaScriptCore;$(WebKitLibrariesDir)\include\pthreads;$(WebKitLibrariesDir)\include\sqlite;$(WebKitLibrariesDir)\include\JavaScriptCore;$(WebKitLibrariesDir)\include\zlib;%(AdditionalIncludeDirectories) + __WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS;%(PreprocessorDefinitions) + Use + WebCorePrefix.h + WebCorePrefix.h;ICUVersion.h + + + diff --git a/vs2010/vsprops/WebCoreDebugCairoCFLite.props b/vs2010/vsprops/WebCoreDebugCairoCFLite.props new file mode 100644 index 00000000..f3a65602 --- /dev/null +++ b/vs2010/vsprops/WebCoreDebugCairoCFLite.props @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2010/vsprops/WebCoreGeneratedCairo.props b/vs2010/vsprops/WebCoreGeneratedCairo.props new file mode 100644 index 00000000..7f2469ff --- /dev/null +++ b/vs2010/vsprops/WebCoreGeneratedCairo.props @@ -0,0 +1,44 @@ + + + + + + + <_ProjectFileVersion>10.0.40219.1 + set PATH=$(ProjectDir)\..\cygwin\bin%3b$(PATH) +cmd /c +if exist "$(ConfigurationBuildDir)\buildfailed" grep XX$(ProjectName)XX "$(ConfigurationBuildDir)\buildfailed" +if errorlevel 1 exit 1 +echo XX$(ProjectName)XX > "$(ConfigurationBuildDir)\buildfailed" + +cd ..\Source\WebCore\WebCore.vcproj +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +bash build-generated-files.sh "$(ConfigurationBuildDir)" "$(WebKitLibrariesDir)" "..\..\..\WebKitLibraries\win" cairo +bash migrate-scripts.sh "$(ConfigurationBuildDir)/obj/WebCore/scripts" +cmd /C copyForwardingHeaders.cmd cairo curl +cmd /C copyWebCoreResourceFiles.cmd + +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + echo XX$(ProjectName)XX > "$(ConfigurationBuildDir)\buildfailed" + +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\DerivedSources" +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\scripts" +set PATH=$(ProjectDir)\..\cygwin\bin%3b$(PATH) +cmd /c + +cd ..\Source\WebCore\WebCore.vcproj +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +bash build-generated-files.sh "$(ConfigurationBuildDir)" "$(WebKitLibrariesDir)" "$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win" cairo +bash migrate-scripts.sh "$(ConfigurationBuildDir)/obj/WebCore/scripts" +cmd /C copyForwardingHeaders.cmd cairo curl +cmd /C copyWebCoreResourceFiles.cmd + +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + del /s /q "$(ConfigurationBuildDir)\obj\WebCore\DerivedSources" +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\scripts" +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + + \ No newline at end of file diff --git a/vs2010/vsprops/WebCoreGeneratedCommon.props b/vs2010/vsprops/WebCoreGeneratedCommon.props new file mode 100644 index 00000000..48c4970b --- /dev/null +++ b/vs2010/vsprops/WebCoreGeneratedCommon.props @@ -0,0 +1,46 @@ + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SystemDrive)\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=$(SystemDrive)\cygwin\bin%3b$(PATH) +cmd /c +if exist "$(ConfigurationBuildDir)\buildfailed" grep XX$(ProjectName)XX "$(ConfigurationBuildDir)\buildfailed" +if errorlevel 1 exit 1 +echo XX$(ProjectName)XX > "$(ConfigurationBuildDir)\buildfailed" + +bash build-generated-files.sh "$(ConfigurationBuildDir)" "$(WebKitLibrariesDir)" "$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win" windows +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +bash migrate-scripts.sh "$(WebKitOutputDir)/$(Configuration)/obj/WebCore/scripts" +cmd /C copyForwardingHeaders.cmd cg cf +cmd /C copyWebCoreResourceFiles.cmd + +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + echo XX$(ProjectName)XX > "$(ConfigurationBuildDir)\buildfailed" + +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\DerivedSources" +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\scripts" +$(SystemDrive)\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=$(SystemDrive)\cygwin\bin%3b$(PATH) +cmd /c +bash build-generated-files.sh "$(ConfigurationBuildDir)" "$(WebKitLibrariesDir)" "$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win" windows +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +bash migrate-scripts.sh "$(WebKitOutputDir)/$(Configuration)/obj/WebCore/scripts" +cmd /C copyForwardingHeaders.cmd cg cf +cmd /C copyWebCoreResourceFiles.cmd + +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + del /s /q "$(ConfigurationBuildDir)\obj\WebCore\DerivedSources" +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\scripts" +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + + + $(ConfigurationBuildDir)\lib\ + + \ No newline at end of file diff --git a/vs2010/vsprops/WebCoreReleaseCairoCFLite.props b/vs2010/vsprops/WebCoreReleaseCairoCFLite.props new file mode 100644 index 00000000..af7f7d76 --- /dev/null +++ b/vs2010/vsprops/WebCoreReleaseCairoCFLite.props @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2010/vsprops/common.props b/vs2010/vsprops/common.props new file mode 100644 index 00000000..68b80d16 --- /dev/null +++ b/vs2010/vsprops/common.props @@ -0,0 +1,46 @@ + + + + 0 + $(ProjectDir)..\build\vs2010 + $(ProjectDir)..\WebKitLibraries\win + $(WebKitOutputDir)\$(Configuration) + + + <_ProjectFileVersion>10.0.40219.1 + + + + WIN32;_WINDOWS;WINVER=0x502;_WIN32_WINNT=0x502;_WIN32_IE=0x603;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_HAS_EXCEPTIONS=0;BUILDING_$(ProjectName);JS_NO_EXPORT;CURL_STATICLIB;LIBXML_STATIC;LIBXSLT_STATIC;PTW32_STATIC_LIB;UCONFIG_NO_COLLATION=1;U_STATIC_IMPLEMENTATION;%(PreprocessorDefinitions) + false + 4018;4068;4099;4100;4127;4138;4180;4189;4201;4244;4251;4275;4288;4291;4305;4344;4355;4389;4481;4503;4505;4510;4512;4610;4706;4800;4951;4952;4996;6011;6031;6211;6246;6255;6387;4396;4819 + /bigobj /GS %(AdditionalOptions) + false + + + + $(ConfigurationBuildDir)\lib;$(WebKitLibrariesDir)\lib;%(AdditionalLibraryDirectories) + + + + + $(ConfigurationBuildDir)\bin\ + $(ConfigurationBuildDir)\obj\$(ProjectName)\ + + + + $(ProductionBuild) + + + $(WEBKITOUTPUTDIR) + true + + + $(WEBKITLIBRARIESDIR) + true + + + $(ConfigurationBuildDir) + + + \ No newline at end of file diff --git a/vs2010/vsprops/wkeCommon.props b/vs2010/vsprops/wkeCommon.props new file mode 100644 index 00000000..2efeb40e --- /dev/null +++ b/vs2010/vsprops/wkeCommon.props @@ -0,0 +1,17 @@ + + + + + __STD_C;%(PreprocessorDefinitions) + ICUVersion.h + $(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources;$(ConfigurationBuildDir)\Include;$(ConfigurationBuildDir)\Include\private;$(WebKitLibrariesDir)\Include;$(WebKitLibrariesDir)\Include\private;$(WebKitLibrariesDir)\Include\pthreads;$(ConfigurationBuildDir)\Include\JavaScriptCore;$(ConfigurationBuildDir)\Include\private\JavaScriptCore;$(WebKitLibrariesDir)\Include\JavaScriptCore;$(WebKitLibrariesDir)\Include\private\JavaScriptCore;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders;%(AdditionalIncludeDirectories) + + + + + + $(IntDir)\lib;$(WebKitLibrariesDir)\lib;$(ConfigurationBuildDir)\lib;%(AdditionalLibraryDirectories) + comdlg32.lib;Imm32.lib;delayimp.lib;kernel32.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;usp10.lib;comctl32.lib;version.lib;shlwapi.lib;libxml2$(LibraryConfigSuffix).lib;libxslt$(LibraryConfigSuffix).lib;SQLite3$(LibraryConfigSuffix).lib;pthreadVC2$(LibraryConfigSuffix).lib;JavaScriptCore.lib;WebCore.lib;msimg32.lib;crypt32.lib;iphlpapi.lib;winmm.lib;comsuppw.lib;rpcrt4.lib;zlib$(LibraryConfigSuffix).lib;CFLite$(LibraryConfigSuffix).lib;WTF.lib;%(AdditionalDependencies) + + + \ No newline at end of file diff --git a/vs2010/vsprops/wkeDebug.props b/vs2010/vsprops/wkeDebug.props new file mode 100644 index 00000000..450bd5a0 --- /dev/null +++ b/vs2010/vsprops/wkeDebug.props @@ -0,0 +1,15 @@ + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2010/vsprops/wkeRelease.props b/vs2010/vsprops/wkeRelease.props new file mode 100644 index 00000000..8b010b11 --- /dev/null +++ b/vs2010/vsprops/wkeRelease.props @@ -0,0 +1,15 @@ + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2010/wke.sln b/vs2010/wke.sln new file mode 100644 index 00000000..40e4f294 --- /dev/null +++ b/vs2010/wke.sln @@ -0,0 +1,76 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JavaScriptCore Folder", "JavaScriptCore Folder", "{65AA684F-0694-4922-81CE-C9FEA9039823}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebCore Folder", "WebCore Folder", "{0E50E567-2DE0-49A9-A34F-7984F3809FE3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "JavaScriptCoreGenerated.vcxproj", "{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "WTF.vcxproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "JavaScriptCore.vcxproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCoreGenerated", "WebCoreGenerated.vcxproj", "{0A324352-B3B6-496C-9E5B-4C7E923E628B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "WebCore.vcxproj", "{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wke", "wke.vcxproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wkeBrowser", "wkeBrowser.vcxproj", "{5C21D8AD-3930-4AC3-9E32-21FCA602DB76}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wkexe", "wkexe.vcxproj", "{5C21D8AD-3930-4AC3-9E32-21FCA603DB76}" + ProjectSection(ProjectDependencies) = postProject + {011D10F1-B656-4A1B-A0C3-3842F02122C6} = {011D10F1-B656-4A1B-A0C3-3842F02122C6} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_Cairo_CFLite|Win32 = Debug_Cairo_CFLite|Win32 + Release_Cairo_CFLite|Win32 = Release_Cairo_CFLite|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C6}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C6}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C6}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C6}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {65AA684F-0694-4922-81CE-C9FEA9039823} + {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {65AA684F-0694-4922-81CE-C9FEA9039823} + {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {65AA684F-0694-4922-81CE-C9FEA9039823} + {0A324352-B3B6-496C-9E5B-4C7E923E628B} = {0E50E567-2DE0-49A9-A34F-7984F3809FE3} + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {0E50E567-2DE0-49A9-A34F-7984F3809FE3} + EndGlobalSection +EndGlobal diff --git a/vs2010/wke.vcxproj b/vs2010/wke.vcxproj new file mode 100644 index 00000000..f085c161 --- /dev/null +++ b/vs2010/wke.vcxproj @@ -0,0 +1,110 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {011D10F1-B656-4A1B-A0C3-3842F02122C6} + wke + Win32Proj + + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + AllRules.ruleset + + + AllRules.ruleset + + + + + + + %(AdditionalDependencies) + msvcrt.lib;LIBCMT.lib + + + + + true + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {1c16337b-acf3-4d03-aa90-851c5b5eada6} + false + + + + + + \ No newline at end of file diff --git a/vs2010/wkeBrowser.vcxproj b/vs2010/wkeBrowser.vcxproj new file mode 100644 index 00000000..51538db5 --- /dev/null +++ b/vs2010/wkeBrowser.vcxproj @@ -0,0 +1,189 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {5C21D8AD-3930-4AC3-9E32-21FCA602DB76} + wkeBrowser + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\build\vs2010\$(Configuration)\bin\ + ..\build\vs2010\$(Configuration)\obj\$(ProjectName)\ + true + ..\build\vs2010\$(Configuration)\bin\ + ..\build\vs2010\$(Configuration)\obj\$(ProjectName)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\wke;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + Level3 + EditAndContinue + + + Imm32.lib;wke.lib;shell32.lib;%(AdditionalDependencies) + ..\build\vs2010\$(Configuration)\lib;..\build\vs2010\$(Configuration)\bin;%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + + + REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file +if not exist "$(ProjectDir)$(ProjectName)PostBuild.cmd" exit /b + +set CONFIGURATIONNAME=$(Configuration) +set INPUTDIR=$(ProjectDir) +set INPUTFILENAME=$(ProjectFileName) +set INPUTPATH=$(ProjectPath) +set INTDIR=$(IntDir) +set OUTDIR=$(OutDir) +set PLATFORMNAME=$(Platform) +set PROJECTDIR=$(ProjectDir) +set PROJECTFILENAME=$(ProjectFileName) +set PROJECTNAME=$(ProjectName) +set PROJECTPATH=$(ProjectPath) +set SOLUTIONDIR=$(SolutionDir) +set SOLUTIONFILENAME=$(SolutionFileName) +set SOLUTIONNAME=$(SolutionName) +set SOLUTIONPATH=$(SolutionPath) +set TARGETDIR=$(TargetDir) +set TARGETEXT=$(TargetExt) +set TARGETFILENAME=$(TargetFileName) +set TARGETPATH=$(TargetPath) + +REM If any of the above variables didn%27t exist previously and +REM were set to an empty string, set will set the errorlevel to 1, +REM which will cause the project-specific script to think the build +REM has failed. This cmd /c call will clear the errorlevel. +cmd /c + +"$(ProjectDir)$(ProjectName)PostBuild.cmd" + + + + + + MaxSpeed + true + ..\wke;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + true + Level3 + ProgramDatabase + + + Imm32.lib;wke.lib;shell32.lib;%(AdditionalDependencies) + ..\build\vs2010\$(Configuration)\lib;..\build\vs2010\$(Configuration)\bin;%(AdditionalLibraryDirectories) + true + Windows + true + true + MachineX86 + + + REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file +if not exist "$(ProjectDir)$(ProjectName)PostBuild.cmd" exit /b + +set CONFIGURATIONNAME=$(Configuration) +set INPUTDIR=$(ProjectDir) +set INPUTFILENAME=$(ProjectFileName) +set INPUTPATH=$(ProjectPath) +set INTDIR=$(IntDir) +set OUTDIR=$(OutDir) +set PLATFORMNAME=$(Platform) +set PROJECTDIR=$(ProjectDir) +set PROJECTFILENAME=$(ProjectFileName) +set PROJECTNAME=$(ProjectName) +set PROJECTPATH=$(ProjectPath) +set SOLUTIONDIR=$(SolutionDir) +set SOLUTIONFILENAME=$(SolutionFileName) +set SOLUTIONNAME=$(SolutionName) +set SOLUTIONPATH=$(SolutionPath) +set TARGETDIR=$(TargetDir) +set TARGETEXT=$(TargetExt) +set TARGETFILENAME=$(TargetFileName) +set TARGETPATH=$(TargetPath) + +REM If any of the above variables didn%27t exist previously and +REM were set to an empty string, set will set the errorlevel to 1, +REM which will cause the project-specific script to think the build +REM has failed. This cmd /c call will clear the errorlevel. +cmd /c + +"$(ProjectDir)$(ProjectName)PostBuild.cmd" + + + + + + + + + + + + + + + + + + + + + + + + + + + {011d10f1-b656-4a1b-a0c3-3842f02122c6} + false + + + + + + \ No newline at end of file diff --git a/vs2010/wkeBrowser.vcxproj.filters b/vs2010/wkeBrowser.vcxproj.filters new file mode 100644 index 00000000..fe5e0ebc --- /dev/null +++ b/vs2010/wkeBrowser.vcxproj.filters @@ -0,0 +1,60 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/vs2010/wkeBrowserPostBuild.cmd b/vs2010/wkeBrowserPostBuild.cmd new file mode 100644 index 00000000..4a09195d --- /dev/null +++ b/vs2010/wkeBrowserPostBuild.cmd @@ -0,0 +1,3 @@ +mkdir 2>NUL ..\demo\bin + +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\bin\ \ No newline at end of file diff --git a/vs2010/wkePostBuild.cmd b/vs2010/wkePostBuild.cmd new file mode 100644 index 00000000..55ac2511 --- /dev/null +++ b/vs2010/wkePostBuild.cmd @@ -0,0 +1,7 @@ +mkdir 2>NUL ..\demo\bin +mkdir 2>NUL ..\demo\libwke + +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\bin\ +xcopy /D /F /R /Y "%CONFIGURATIONBUILDDIR%\lib\wke.lib" ..\demo\libwke\ +xcopy /D /F /R /Y "..\wke\wke.h" ..\demo\libwke\ +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\libwke\ \ No newline at end of file diff --git a/vs2010/wkexe.vcxproj b/vs2010/wkexe.vcxproj new file mode 100644 index 00000000..85cb029b --- /dev/null +++ b/vs2010/wkexe.vcxproj @@ -0,0 +1,175 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76} + wkexe + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\build\vs2010\$(Configuration)\bin\ + ..\build\vs2010\$(Configuration)\obj\$(ProjectName)\ + true + ..\build\vs2010\$(Configuration)\bin\ + ..\build\vs2010\$(Configuration)\obj\$(ProjectName)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\wke;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;STATIC_GETOPT;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + Level3 + EditAndContinue + + + Imm32.lib;wke.lib;shell32.lib;%(AdditionalDependencies) + ..\build\vs2010\$(Configuration)\lib;..\build\vs2010\$(Configuration)\bin;%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + + + REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file +if not exist "$(ProjectDir)$(ProjectName)PostBuild.cmd" exit /b + +set CONFIGURATIONNAME=$(Configuration) +set INPUTDIR=$(ProjectDir) +set INPUTFILENAME=$(ProjectFileName) +set INPUTPATH=$(ProjectPath) +set INTDIR=$(IntDir) +set OUTDIR=$(OutDir) +set PLATFORMNAME=$(Platform) +set PROJECTDIR=$(ProjectDir) +set PROJECTFILENAME=$(ProjectFileName) +set PROJECTNAME=$(ProjectName) +set PROJECTPATH=$(ProjectPath) +set SOLUTIONDIR=$(SolutionDir) +set SOLUTIONFILENAME=$(SolutionFileName) +set SOLUTIONNAME=$(SolutionName) +set SOLUTIONPATH=$(SolutionPath) +set TARGETDIR=$(TargetDir) +set TARGETEXT=$(TargetExt) +set TARGETFILENAME=$(TargetFileName) +set TARGETPATH=$(TargetPath) + +REM If any of the above variables didn%27t exist previously and +REM were set to an empty string, set will set the errorlevel to 1, +REM which will cause the project-specific script to think the build +REM has failed. This cmd /c call will clear the errorlevel. +cmd /c + +"$(ProjectDir)$(ProjectName)PostBuild.cmd" + + + + + + MaxSpeed + true + ..\wke;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;STATIC_GETOPT;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + true + Level3 + ProgramDatabase + + + Imm32.lib;wke.lib;shell32.lib;%(AdditionalDependencies) + ..\build\vs2010\$(Configuration)\lib;..\build\vs2010\$(Configuration)\bin;%(AdditionalLibraryDirectories) + true + Windows + true + true + MachineX86 + + + REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file +if not exist "$(ProjectDir)$(ProjectName)PostBuild.cmd" exit /b + +set CONFIGURATIONNAME=$(Configuration) +set INPUTDIR=$(ProjectDir) +set INPUTFILENAME=$(ProjectFileName) +set INPUTPATH=$(ProjectPath) +set INTDIR=$(IntDir) +set OUTDIR=$(OutDir) +set PLATFORMNAME=$(Platform) +set PROJECTDIR=$(ProjectDir) +set PROJECTFILENAME=$(ProjectFileName) +set PROJECTNAME=$(ProjectName) +set PROJECTPATH=$(ProjectPath) +set SOLUTIONDIR=$(SolutionDir) +set SOLUTIONFILENAME=$(SolutionFileName) +set SOLUTIONNAME=$(SolutionName) +set SOLUTIONPATH=$(SolutionPath) +set TARGETDIR=$(TargetDir) +set TARGETEXT=$(TargetExt) +set TARGETFILENAME=$(TargetFileName) +set TARGETPATH=$(TargetPath) + +REM If any of the above variables didn%27t exist previously and +REM were set to an empty string, set will set the errorlevel to 1, +REM which will cause the project-specific script to think the build +REM has failed. This cmd /c call will clear the errorlevel. +cmd /c + +"$(ProjectDir)$(ProjectName)PostBuild.cmd" + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2010/wkexePostBuild.cmd b/vs2010/wkexePostBuild.cmd new file mode 100644 index 00000000..4a09195d --- /dev/null +++ b/vs2010/wkexePostBuild.cmd @@ -0,0 +1,3 @@ +mkdir 2>NUL ..\demo\bin + +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\bin\ \ No newline at end of file diff --git a/vs2013.bat b/vs2013.bat new file mode 100644 index 00000000..939c7605 --- /dev/null +++ b/vs2013.bat @@ -0,0 +1,5 @@ +@ECHO off +CALL "%VS120COMNTOOLS%vsvars32.bat" +CD "%~dp0vs2013" +wke.sln +EXIT \ No newline at end of file diff --git a/vs2013/JavaScriptCore.vcxproj b/vs2013/JavaScriptCore.vcxproj new file mode 100644 index 00000000..8e2b96b4 --- /dev/null +++ b/vs2013/JavaScriptCore.vcxproj @@ -0,0 +1,432 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {011D10F1-B656-4A1B-A0C3-3842F02122C5} + JavaScriptCore + Win32Proj + + + + StaticLibrary + Unicode + v120 + + + StaticLibrary + Unicode + v120 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + AllRules.ruleset + + + AllRules.ruleset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {aa8a5a85-592b-4357-bc60-e0e91e026af6} + false + + + + + + \ No newline at end of file diff --git a/vs2013/JavaScriptCore.vcxproj.filters b/vs2013/JavaScriptCore.vcxproj.filters new file mode 100644 index 00000000..c0a8a7be --- /dev/null +++ b/vs2013/JavaScriptCore.vcxproj.filters @@ -0,0 +1,1150 @@ + + + + + {39b57a75-11b6-45c1-9cb1-667b83a50d19} + + + {d8574145-d5c0-471b-98fb-d6a9863c226f} + + + {c2ef5188-d0f4-4d6c-a85f-856449c0801d} + + + {9b234a2e-9f74-487c-934e-81c3856fd373} + + + {ad032024-b643-46cb-83af-610f2f6b787c} + + + {aa75281e-30c6-4eb8-ab3a-5bc2c8c0c532} + + + {93e557db-d66c-4e72-bee6-826edfe591cd} + + + {4153d55f-0723-4f57-ac30-c4448dfe4eaf} + + + {32bd84fe-d726-4cd1-ab7f-6e8a32201c3d} + + + {a6a31a00-9d69-4c7b-92dc-b82e206380c9} + + + {4c9a40a1-9481-4a4a-b620-977e7fdb83f2} + + + {d6259e7b-e46e-40d8-be5c-c48f3d0f7d53} + + + {74d86d46-037f-4b82-a322-f80cb53c3a41} + + + {50c6fc0a-e132-4791-9136-f22bce4ab36c} + + + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + profiler + + + profiler + + + profiler + + + profiler + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + debugger + + + debugger + + + debugger + + + yarr + + + yarr + + + yarr + + + yarr + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + interpreter + + + interpreter + + + interpreter + + + bytecompiler + + + bytecompiler + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + debugger + + + debugger + + + debugger + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + dfg + + + dfg + + + dfg + + + yarr + + + yarr + + + yarr + + + yarr + + + yarr + + + yarr + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + bytecompiler + + + bytecompiler + + + bytecompiler + + + bytecompiler + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + + \ No newline at end of file diff --git a/vs2013/JavaScriptCoreGenerated.vcxproj b/vs2013/JavaScriptCoreGenerated.vcxproj new file mode 100644 index 00000000..0d91de83 --- /dev/null +++ b/vs2013/JavaScriptCoreGenerated.vcxproj @@ -0,0 +1,52 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} + JavaScriptCoreGenerated + MakeFileProj + + + + Makefile + + + Makefile + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2013/JavaScriptCorePostBuild.cmd b/vs2013/JavaScriptCorePostBuild.cmd new file mode 100644 index 00000000..2bc2d135 --- /dev/null +++ b/vs2013/JavaScriptCorePostBuild.cmd @@ -0,0 +1,2 @@ +if exist "%WEBKITLIBRARIESDIR%\tools\VersionStamper\VersionStamper.exe" "%WEBKITLIBRARIESDIR%\tools\VersionStamper\VersionStamper.exe" --verbose "%TARGETPATH%" +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/vs2013/JavaScriptCorePreBuild.cmd b/vs2013/JavaScriptCorePreBuild.cmd new file mode 100644 index 00000000..ae60d71b --- /dev/null +++ b/vs2013/JavaScriptCorePreBuild.cmd @@ -0,0 +1,4 @@ +cmd /c +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" +if errorlevel 1 exit 1 +echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/vs2013/WTF.vcxproj b/vs2013/WTF.vcxproj new file mode 100644 index 00000000..7af803ca --- /dev/null +++ b/vs2013/WTF.vcxproj @@ -0,0 +1,254 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {AA8A5A85-592B-4357-BC60-E0E91E026AF6} + WTF + Win32Proj + + + + StaticLibrary + Unicode + v120 + + + StaticLibrary + Unicode + v120 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + AllRules.ruleset + + + AllRules.ruleset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4702;%(DisableSpecificWarnings) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {4ff5ba11-59ec-4c24-8f52-f235c2e7d43a} + false + + + + + + \ No newline at end of file diff --git a/vs2013/WTF.vcxproj.filters b/vs2013/WTF.vcxproj.filters new file mode 100644 index 00000000..8be98c8c --- /dev/null +++ b/vs2013/WTF.vcxproj.filters @@ -0,0 +1,313 @@ + + + + + {df08bdf0-be78-4ece-b469-ddcedcac8b77} + + + {35de3352-f067-4799-b019-bf85ee3fb06f} + + + {ce9a1906-5528-4130-b881-1fab8d5d6cf0} + + + {3ba56a39-9ca9-4a45-b084-bfef8b5954a4} + + + {045d38bf-85fa-442f-b8c7-f0366f22e952} + + + {f42b70c7-8461-4e56-bbf2-efc5703ee91d} + + + {9fdeeb36-9fa5-4a2e-b69f-580c91b18615} + + + + + win + + + win + + + unicode + + + unicode\icu + + + text + + + text + + + text + + + text + + + text + + + text + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + threads\win + + + threads + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + unicode + + + unicode + + + unicode + + + unicode + + + unicode + + + unicode\icu + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + dtoa + + + threads + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2013/WTFPostBuild.cmd b/vs2013/WTFPostBuild.cmd new file mode 100644 index 00000000..670a8a45 --- /dev/null +++ b/vs2013/WTFPostBuild.cmd @@ -0,0 +1 @@ +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/vs2013/WTFPreBuild.cmd b/vs2013/WTFPreBuild.cmd new file mode 100644 index 00000000..ae60d71b --- /dev/null +++ b/vs2013/WTFPreBuild.cmd @@ -0,0 +1,4 @@ +cmd /c +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" +if errorlevel 1 exit 1 +echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/vs2013/WebCore.vcxproj b/vs2013/WebCore.vcxproj new file mode 100644 index 00000000..bdc30839 --- /dev/null +++ b/vs2013/WebCore.vcxproj @@ -0,0 +1,7774 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} + WebCore + Win32Proj + + + + StaticLibrary + Unicode + v120 + + + StaticLibrary + Unicode + v120 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + AllRules.ruleset + + + AllRules.ruleset + + + + + + true + + + + + + + + + + + 4065;4273;4565;4701;4702;%(DisableSpecificWarnings) + ICUVersion.h + + + 4065;4273;4565;4701;4702;%(DisableSpecificWarnings) + ICUVersion.h + + + + + + + 4819;%(DisableSpecificWarnings) + + + 4819;%(DisableSpecificWarnings) + + + true + true + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + true + true + + + + true + true + + + true + true + + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + true + true + + + + + + + + + 4065;4273;4565;4701;4702;%(DisableSpecificWarnings) + ICUVersion.h + + + 4065;4273;4565;4701;4702;%(DisableSpecificWarnings) + ICUVersion.h + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICUVersion.h + + + ICUVersion.h + + + + Create + 4819;%(DisableSpecificWarnings) + Create + 4819;%(DisableSpecificWarnings) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + + + true + true + + + + + + + true + true + + + + true + true + + + + + + true + true + + + + + + + true + true + + + true + true + + + + + + true + true + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4481;4611;%(DisableSpecificWarnings) + 4481;4611;%(DisableSpecificWarnings) + + + 4481;4611;%(DisableSpecificWarnings) + 4481;4611;%(DisableSpecificWarnings) + + + + + + $(IntDir)%(Filename)1.obj + $(IntDir)%(Filename)1.xdc + $(IntDir)%(Filename)1.obj + $(IntDir)%(Filename)1.xdc + + + $(IntDir)%(Filename)1.obj + $(IntDir)%(Filename)1.xdc + $(IntDir)%(Filename)1.obj + $(IntDir)%(Filename)1.xdc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + ICUVersion.h + + + ICUVersion.h + + + + + + + + + + + + + + + + + true + true + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + true + true + + + true + true + + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Frame.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Frame.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {0a324352-b3b6-496c-9e5b-4c7e923e628b} + false + + + + + + \ No newline at end of file diff --git a/vs2013/WebCore.vcxproj.filters b/vs2013/WebCore.vcxproj.filters new file mode 100644 index 00000000..1f9818a0 --- /dev/null +++ b/vs2013/WebCore.vcxproj.filters @@ -0,0 +1,13595 @@ + + + + + {2c2b44d5-5edf-4f63-99a8-fe13c503229b} + + + {30d2bd31-2882-4914-abc9-0c7daca37e18} + + + {25850d82-85d9-4672-a1fb-d8d43a952f93} + + + {401743ca-932a-4899-b87a-c8824a30cfcc} + + + {fa76d740-3b76-4105-a8d9-d540cada2bed} + + + {155c626e-0069-4849-8828-375f771d5168} + + + {f8d84a4d-6757-4992-bb38-6104c38a22b5} + + + {8e4feb74-7365-4545-b605-ca4efa7e61fb} + + + {547f6628-3f1e-4d5a-87f5-d19fed7ddf13} + + + {ba7c292c-91fb-4450-834f-4f420dc90751} + + + {7e80fd5d-47f6-4645-bd45-453ff7028b08} + + + {77cc45b9-a218-4d1a-899f-04bd5e44d842} + + + {77319b5a-1594-4e44-b28d-8d7733b57038} + + + {2e20adfa-c19c-4be0-b464-56d699d32e0d} + + + {90fe258e-025c-4f4c-856c-f9ee471b7100} + + + {9ba13080-f5e6-49f0-9b76-357a45e9cf00} + + + {f3bbfae2-e3d2-46a4-b558-438fd66085e1} + + + {a7042231-6721-4880-9d39-ffbdb0f5e86f} + + + {332e20ea-df84-4b40-af03-9313e2c68838} + + + {c87f41bd-8ffe-4961-8bc9-ca750b3df0d2} + + + {6082031a-a65f-4631-b943-16043a42fb79} + + + {afeccfa3-8aa2-4cdc-bffd-979102db7487} + + + {b34b5868-273d-4e64-846e-317bf31f0f54} + + + {b112094d-bc95-41c4-824c-1e76c2b5a220} + + + {aee9cd73-3682-4900-98fa-966f050ad90f} + + + {4a6aaba0-d48d-474a-8216-330e9e191c9f} + + + {6570975e-7bc2-4a85-80d4-69862b8d0d87} + + + {3e838c8b-8978-4e8a-978f-066fc911e1a3} + + + {280c2a43-8241-4060-a7c7-16b6ed84de57} + + + {1b96419d-ed36-4b7a-a244-1ab86620507c} + + + {fba60670-09d3-4b49-a50d-62dc8dd302b4} + + + {0060f878-cc04-4137-9431-646c7c0cab63} + + + {a3e5f71e-3e49-45a1-9619-39998e0e6dd7} + + + {721a9a44-d0ed-43e1-908b-ffa2e85cf140} + + + {aaca613a-81ce-4828-9ba1-82e9a33a23c4} + + + {aa1fa59a-dbf3-45fb-a513-3a828c86ec14} + + + {ae912850-0180-4d75-89ec-a9100d2bb3f8} + + + {d2c5df2d-78b3-4eeb-9c4e-f7e4dfaa9e54} + + + {157f9948-b2b1-43f1-b16f-aeac7bdde905} + + + {7a5a044f-ffd3-410e-8d96-e827814eb590} + + + {635e4c78-f221-43a4-8153-3b8163da246e} + + + {8726413d-40e9-4bcc-9a79-2a99da9ddf72} + + + {a4f62510-e44a-4571-a3dc-f2153f8428a8} + + + {1fd83545-98c2-4632-a5d2-13b2d2d3dcbd} + + + {d3fea1bf-179e-4019-b609-d6b39eb0d209} + + + {0468eaae-8413-4df3-b4c5-3faac32a1fe6} + + + {8b1f1d88-b97e-4f73-83ae-b0704526e98f} + + + {b0241d02-1136-4890-aba7-5036d1e69569} + + + {eb3694ad-5880-410f-8a0e-bbff8a290787} + + + {bd728f4e-a49a-4767-8b17-7ab0badabce1} + + + {61626377-15af-415f-8056-195fc5259108} + + + {927b9b3c-de85-4696-84e5-dca62546428b} + + + {3de5073b-551a-42f1-96c9-88411eb80cc6} + + + {945e2777-8b62-4aa8-b35c-32aec776ff88} + + + {e04a002e-abf2-459b-9ded-8c95d69eb9b2} + + + {3828a8b9-7cab-4488-b302-f26a1e1a8e45} + + + {f198a67c-119f-4d72-aa33-3b893acae889} + + + {d78b9625-300f-4507-b54d-9d71d15c68ad} + + + {6f6f62b7-48f0-4e62-b33b-d2086f1a5a45} + + + {9cd7976c-2e5e-46be-8d90-5de74ef73d8d} + + + {f0ea7070-8aeb-482f-9da6-ead4dd5726ab} + + + {8dc483f0-976e-4ee9-8372-3ce3c9191b7c} + + + {cdbc900a-29c8-423b-b9a5-e637089eb87c} + + + {220ba2d6-8833-43e9-9214-671a36a72e04} + + + {a82f23c9-3a15-48fd-8fa3-47e10d0b9351} + + + {ffb52659-4d77-4dd0-8a66-035e20e2bd83} + + + {d76814b5-4a1a-48f1-8cb9-8a3aaa3ca465} + + + {1a1c6ad9-2644-4ccd-8431-bbd5dbe34eab} + + + {ff75c2e8-b0d6-471e-9cb6-25bd531cdac4} + + + {bb8ac413-0678-41fd-9442-8b6d7f52b0fd} + + + {9e154258-1e3b-426a-a41d-6e5ad2f164c2} + + + {da29b768-b7f0-4739-99e3-c74a3ad5951d} + + + {e5cc22a0-a1bd-4b10-bf31-e6c01621e41a} + + + {b54af28f-9864-4cae-a256-85a29019c74a} + + + {4ac6d3ab-1980-488d-9078-46e8bfa0c25a} + + + {7d7d4b73-a21b-4c93-8359-45c96d89f4bb} + + + {bf7d80c5-3b57-46d1-8853-09fc7d4a4aab} + + + {97f91c35-7799-47f9-8067-63054dce0d71} + + + {f2207c28-044a-4c21-8092-4b0bf8c5f872} + + + {800222e8-d5bf-4c6d-a29c-effb358fbd66} + + + {24ec72fe-adcf-46e0-9b61-390016c94009} + + + {9ba2a265-d51b-4f2c-94b8-bc612d7d0dea} + + + {6b47d0ac-4e70-46da-a533-e74dc74d6c53} + + + {3f34af27-b057-4117-9dd5-e241f0d82535} + + + {739b6963-30c1-415e-8f4b-865d7375c725} + + + {1cf26e8e-b6d1-4b58-9636-f64c3b34ff73} + + + {24851c9a-b062-4ce1-b26a-4bd7ddd38ef6} + + + {2f59c351-679c-416a-a2a7-748a6a04fbbf} + + + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility\win + + + accessibility\win + + + p2p + + + p2p + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page\win + + + page\win + + + page\win + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\archive + + + loader\archive + + + loader\archive + + + loader\archive + + + loader\archive\cf + + + loader\archive\mhtml + + + loader\archive\mhtml + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\cf + + + platform\cf + + + platform\cf + + + platform\cf\win + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\ca + + + platform\graphics\ca + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\avfoundation + + + platform\graphics\avfoundation\cf + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\win + + + platform\network\win + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text\cf + + + platform\text\cf + + + platform\text\cf + + + platform\text\win + + + platform\text\transcoder + + + platform\image-decoders + + + platform\image-decoders\cairo + + + platform\image-decoders\gif + + + platform\image-decoders\gif + + + platform\image-decoders\jpeg + + + platform\image-decoders\png + + + platform\image-decoders\bmp + + + platform\image-decoders\bmp + + + platform\image-decoders\ico + + + platform\animation + + + platform\animation + + + platform\mock + + + platform\mock + + + platform\mock + + + platform\mock + + + platform\mock + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + notifications + + + notifications + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + bindings + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins\win + + + plugins\win + + + plugins\win + + + plugins\win + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg\animation + + + rendering\svg\animation + + + rendering\svg\animation + + + rendering\svg\graphics + + + rendering\svg\graphics\filters + + + rendering\svg\graphics\filters + + + rendering\svg\graphics\filters + + + rendering\svg\properties + + + rendering\svg\properties + + + history + + + history + + + history + + + history + + + history + + + history + + + history\cf + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + strings + + + strings + + + strings + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + platform\graphics\cg + + + platform\network\cf + + + platform\network\cf + + + + + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + DerivedSources + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility + + + accessibility\win + + + p2p + + + p2p + + + p2p + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page + + + page\win + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\icon + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\appcache + + + loader\archive + + + loader\archive + + + loader\archive + + + loader\archive + + + loader\archive\cf + + + loader\archive\mhtml + + + loader\archive\mhtml + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + loader\cache + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\win + + + platform\cf + + + platform\cf + + + platform\cf\win + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\cairo + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\transforms + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\filters + + + platform\graphics\ca + + + platform\graphics\ca + + + platform\graphics\ca + + + platform\graphics\ca + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\graphics\avfoundation + + + platform\graphics\avfoundation\cf + + + platform\graphics\avfoundation\cf + + + platform\graphics\avfoundation\cf + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\network\curl + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\sql + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text + + + platform\text\transcoder + + + platform\image-decoders + + + platform\image-decoders\gif + + + platform\image-decoders\gif + + + platform\image-decoders\jpeg + + + platform\image-decoders\png + + + platform\image-decoders\bmp + + + platform\image-decoders\bmp + + + platform\image-decoders\ico + + + platform\animation + + + platform\animation + + + platform\animation + + + platform\mock + + + platform\mock + + + platform\mock + + + platform\mock + + + platform\mock + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\style + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + xml\parser + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + dom + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + workers + + + notifications + + + notifications + + + notifications + + + notifications + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + editing + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\parser + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + html\shadow + + + bindings + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\generic + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + bindings\js + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins + + + plugins\win + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg + + + rendering\svg\animation + + + rendering\svg\animation + + + rendering\svg\animation + + + rendering\svg\graphics + + + rendering\svg\graphics\filters + + + rendering\svg\graphics\filters + + + rendering\svg\graphics\filters + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + rendering\svg\properties + + + ForwardingHeaders + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf + + + ForwardingHeaders\wtf\unicode + + + ForwardingHeaders\wtf\unicode\icu + + + ForwardingHeaders\wtf\text + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\JSC + + + ForwardingHeaders\yarr + + + ForwardingHeaders\yarr + + + ForwardingHeaders\yarr + + + ForwardingHeaders\bindings + + + ForwardingHeaders\bindings + + + ForwardingHeaders\bindings + + + ForwardingHeaders\profiler + + + ForwardingHeaders\profiler + + + ForwardingHeaders\profiler + + + ForwardingHeaders\masm + + + ForwardingHeaders\heap + + + history + + + history + + + history + + + history + + + history + + + history + + + history + + + history + + + history\cf + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + storage + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + bridge + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + inspector + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + websockets + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + rendering\mathml + + + + + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + css + + + xml + + + bindings\scripts + + + bindings\scripts + + + bindings\scripts + + + bindings\scripts + + + bindings\scripts + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + inspector\front-end + + + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\win + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\cg + + + platform\graphics\ca\win + + + platform\graphics\ca\win + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + platform\network\cf + + + rendering + + + rendering + + + rendering + + + \ No newline at end of file diff --git a/vs2013/WebCoreGenerated.vcxproj b/vs2013/WebCoreGenerated.vcxproj new file mode 100644 index 00000000..969997fb --- /dev/null +++ b/vs2013/WebCoreGenerated.vcxproj @@ -0,0 +1,59 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {0A324352-B3B6-496C-9E5B-4C7E923E628B} + MakeFileProj + + + + Makefile + + + Makefile + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + + + + + + + + + + + + {011d10f1-b656-4a1b-a0c3-3842f02122c5} + false + + + + + + \ No newline at end of file diff --git a/vs2013/WebCorePostBuild.cmd b/vs2013/WebCorePostBuild.cmd new file mode 100644 index 00000000..670a8a45 --- /dev/null +++ b/vs2013/WebCorePostBuild.cmd @@ -0,0 +1 @@ +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/vs2013/WebCorePreBuild.cmd b/vs2013/WebCorePreBuild.cmd new file mode 100644 index 00000000..a41ebec8 --- /dev/null +++ b/vs2013/WebCorePreBuild.cmd @@ -0,0 +1,6 @@ +cmd /c +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" +if errorlevel 1 exit 1 +echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" + +exit /b diff --git a/vs2013/targetver.h b/vs2013/targetver.h new file mode 100644 index 00000000..e69de29b diff --git a/vs2013/vsprops/JavaScriptCoreCommon.props b/vs2013/vsprops/JavaScriptCoreCommon.props new file mode 100644 index 00000000..1a829718 --- /dev/null +++ b/vs2013/vsprops/JavaScriptCoreCommon.props @@ -0,0 +1,13 @@ + + + + $(ConfigurationBuildDir)\lib\ + + + + $(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\;../Source/JavaScriptCore/;../Source/JavaScriptCore/API/;../Source/JavaScriptCore/parser/;../Source/JavaScriptCore/bytecompiler/;../Source/JavaScriptCore/dfg/;../Source/JavaScriptCore/jit/;../Source/JavaScriptCore/runtime/;../Source/JavaScriptCore/bytecode/;../Source/JavaScriptCore/interpreter/;../Source/JavaScriptCore/wtf/;../Source/JavaScriptCore/profiler;../Source/JavaScriptCore/assembler/;../Source/JavaScriptCore/debugger/;../Source/JavaScriptCore/heap/;$(WebKitLibrariesDir)\include;$(WebKitLibrariesDir)\include\private;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private;$(WebKitLibrariesDir)\include\pthreads;%(AdditionalIncludeDirectories) + ICUVersion.h + __STD_C;%(PreprocessorDefinitions) + + + diff --git a/vs2013/vsprops/JavaScriptCoreDebugCairoCFLite.props b/vs2013/vsprops/JavaScriptCoreDebugCairoCFLite.props new file mode 100644 index 00000000..8f5d5dde --- /dev/null +++ b/vs2013/vsprops/JavaScriptCoreDebugCairoCFLite.props @@ -0,0 +1,13 @@ + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2013/vsprops/JavaScriptCoreGeneratedCommon.props b/vs2013/vsprops/JavaScriptCoreGeneratedCommon.props new file mode 100644 index 00000000..69f6ae87 --- /dev/null +++ b/vs2013/vsprops/JavaScriptCoreGeneratedCommon.props @@ -0,0 +1,28 @@ + + + + + + + <_ProjectFileVersion>10.0.40219.1 + set PATH=$(ProjectDir)\..\cygwin\bin%3b$(PATH) + cd ..\Source\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore +cmd /c + +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +nmake /nologo -f JavaScriptCoreGenerated.make + set PATH=$(ProjectDir)\..\cygwin\bin%3b$(PATH) +cd ..\Source\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore +cmd /c + +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +nmake /nologo -f JavaScriptCoreGenerated.make clean +nmake -f JavaScriptCoreGenerated.make + set PATH=$(ProjectDir)\..\cygwin\bin%3b$(PATH) +cd ..\Source\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore +cmd /c + +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +nmake /nologo -f JavaScriptCoreGenerated.make clean + + \ No newline at end of file diff --git a/vs2013/vsprops/JavaScriptCoreReleaseCairoCFLite.props b/vs2013/vsprops/JavaScriptCoreReleaseCairoCFLite.props new file mode 100644 index 00000000..d81b467f --- /dev/null +++ b/vs2013/vsprops/JavaScriptCoreReleaseCairoCFLite.props @@ -0,0 +1,14 @@ + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2013/vsprops/WTFCommon.props b/vs2013/vsprops/WTFCommon.props new file mode 100644 index 00000000..be07248b --- /dev/null +++ b/vs2013/vsprops/WTFCommon.props @@ -0,0 +1,13 @@ + + + + $(ConfigurationBuildDir)\lib\ + + + + $(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\;../Source/JavaScriptCore/;../Source/JavaScriptCore/os-win32/;../Source/JavaScriptCore/wtf/;../Source/JavaScriptCore/wtf/threads/;../Source/JavaScriptCore/wtf/unicode/;$(ConfigurationBuildDir)\include\private;$(WebKitLibrariesDir)\include;$(ConfigurationBuildDir)\include\JavaScriptCore;$(WebKitLibrariesDir)\include\pthreads;%(AdditionalIncludeDirectories) + ICUVersion.h + __STD_C;%(PreprocessorDefinitions) + + + diff --git a/vs2013/vsprops/WTFDebugCairoCFLite.props b/vs2013/vsprops/WTFDebugCairoCFLite.props new file mode 100644 index 00000000..ab3f0ca4 --- /dev/null +++ b/vs2013/vsprops/WTFDebugCairoCFLite.props @@ -0,0 +1,13 @@ + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2013/vsprops/WTFReleaseCairoCFLite.props b/vs2013/vsprops/WTFReleaseCairoCFLite.props new file mode 100644 index 00000000..20ce4ca0 --- /dev/null +++ b/vs2013/vsprops/WTFReleaseCairoCFLite.props @@ -0,0 +1,14 @@ + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2013/vsprops/WebCoreCURL.props b/vs2013/vsprops/WebCoreCURL.props new file mode 100644 index 00000000..cdec51be --- /dev/null +++ b/vs2013/vsprops/WebCoreCURL.props @@ -0,0 +1,9 @@ + + + + + $(ProjectDir)..\Source\WebCore\platform\network\curl;%(AdditionalIncludeDirectories) + USE_WINDOWS_SSPI;USE_SSLEAY;HAVE_ZLIB;%(PreprocessorDefinitions) + + + diff --git a/vs2013/vsprops/WebCoreCairo.props b/vs2013/vsprops/WebCoreCairo.props new file mode 100644 index 00000000..df9fca5c --- /dev/null +++ b/vs2013/vsprops/WebCoreCairo.props @@ -0,0 +1,9 @@ + + + + + $(ProjectDir)..\Source\WebCore\platform\graphics\cairo;$(ProjectDir)..\Source\WebCore\platform\graphics\win\cairo;$(ProjectDir)..\Source\WebCore\svg\graphics\cairo;$(ProjectDir)..\Source\WebCore\platform\image-decoders;$(ProjectDir)..\Source\WebCore\platform\image-decoders\bmp;$(ProjectDir)..\Source\WebCore\platform\image-decoders\cairo;$(ProjectDir)..\Source\WebCore\platform\image-decoders\gif;$(ProjectDir)..\Source\WebCore\platform\image-decoders\ico;$(ProjectDir)..\Source\WebCore\platform\image-decoders\jpeg;$(ProjectDir)..\Source\WebCore\platform\image-decoders\png;$(ProjectDir)..\Source\WebCore\platform\image-decoders\webp;$(WebKitLibrariesDir)\include\cairo;%(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + diff --git a/vs2013/vsprops/WebCoreCommon.props b/vs2013/vsprops/WebCoreCommon.props new file mode 100644 index 00000000..113f71fb --- /dev/null +++ b/vs2013/vsprops/WebCoreCommon.props @@ -0,0 +1,15 @@ + + + + $(ConfigurationBuildDir)\lib\ + + + + $(ProjectDir)..\Source\WebCore;$(ProjectDir)..\Source\WebCore\accessibility;$(ProjectDir)..\Source\WebCore\accessibility\win;$(ProjectDir)..\Source\WebCore\bridge;$(ProjectDir)..\Source\WebCore\bridge\c;$(ProjectDir)..\Source\WebCore\bridge\jsc;$(ProjectDir)..\Source\WebCore\css;$(ProjectDir)..\Source\WebCore\editing;$(ProjectDir)..\Source\WebCore\fileapi;$(ProjectDir)..\Source\WebCore\rendering;$(ProjectDir)..\Source\WebCore\rendering\mathml;$(ProjectDir)..\Source\WebCore\rendering\style;$(ProjectDir)..\Source\WebCore\rendering\svg;$(ProjectDir)..\Source\WebCore\bindings;$(ProjectDir)..\Source\WebCore\bindings\generic;$(ProjectDir)..\Source\WebCore\bindings\js;$(ProjectDir)..\Source\WebCore\bindings\js\specialization;$(ProjectDir)..\Source\WebCore\dom;$(ProjectDir)..\Source\WebCore\dom\default;$(ProjectDir)..\Source\WebCore\history;$(ProjectDir)..\Source\WebCore\html;$(ProjectDir)..\Source\WebCore\html\canvas;$(ProjectDir)..\Source\WebCore\html\parser;$(ProjectDir)..\Source\WebCore\html\shadow;$(ProjectDir)..\Source\WebCore\inspector;$(ProjectDir)..\Source\WebCore\loader;$(ProjectDir)..\Source\WebCore\loader\appcache;$(ProjectDir)..\Source\WebCore\loader\archive;$(ProjectDir)..\Source\WebCore\loader\archive\cf;$(ProjectDir)..\Source\WebCore\loader\cache;$(ProjectDir)..\Source\WebCore\loader\icon;$(ProjectDir)..\Source\WebCore\mathml;$(ProjectDir)..\Source\WebCore\notifications;$(ProjectDir)..\Source\WebCore\page;$(ProjectDir)..\Source\WebCore\page\animation;$(ProjectDir)..\Source\WebCore\page\win;$(ProjectDir)..\Source\WebCore\platform;$(ProjectDir)..\Source\WebCore\platform\animation;$(ProjectDir)..\Source\WebCore\platform\mock;$(ProjectDir)..\Source\WebCore\platform\sql;$(ProjectDir)..\Source\WebCore\platform\win;$(ProjectDir)..\Source\WebCore\platform\network;$(ProjectDir)..\Source\WebCore\platform\network\win;$(ProjectDir)..\Source\WebCore\platform\cf;$(ProjectDir)..\Source\WebCore\platform\graphics;$(ProjectDir)..\Source\WebCore\platform\graphics\ca;$(ProjectDir)..\Source\WebCore\platform\graphics\filters;$(ProjectDir)..\Source\WebCore\platform\graphics\filters\arm;$(ProjectDir)..\Source\WebCore\platform\graphics\opentype;$(ProjectDir)..\Source\WebCore\platform\graphics\transforms;$(ProjectDir)..\Source\WebCore\platform\text;$(ProjectDir)..\Source\WebCore\platform\text\transcoder;$(ProjectDir)..\Source\WebCore\platform\graphics\win;$(ProjectDir)..\Source\WebCore\xml;$(ProjectDir)..\Source\WebCore\xml\parser;$(ConfigurationBuildDir)\obj\WebCore\DerivedSources;$(ProjectDir)..\Source\WebCore\plugins;$(ProjectDir)..\Source\WebCore\plugins\win;$(ProjectDir)..\Source\WebCore\svg\animation;$(ProjectDir)..\Source\WebCore\svg\graphics;$(ProjectDir)..\Source\WebCore\svg\properties;$(ProjectDir)..\Source\WebCore\svg\graphics\filters;$(ProjectDir)..\Source\WebCore\svg;$(ProjectDir)..\Source\WebCore\testing;$(ProjectDir)..\Source\WebCore\wml;$(ProjectDir)..\Source\WebCore\storage;$(ProjectDir)..\Source\WebCore\websockets;$(ProjectDir)..\Source\WebCore\workers;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ProjectDir)..\Source\WebCore\ForwardingHeaders;$(WebKitLibrariesDir)\include;$(WebKitLibrariesDir)\include\private;$(WebKitLibrariesDir)\include\private\JavaScriptCore;$(WebKitLibrariesDir)\include\pthreads;$(WebKitLibrariesDir)\include\sqlite;$(WebKitLibrariesDir)\include\JavaScriptCore;$(WebKitLibrariesDir)\include\zlib;%(AdditionalIncludeDirectories) + __WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS;%(PreprocessorDefinitions) + Use + WebCorePrefix.h + WebCorePrefix.h;ICUVersion.h + + + diff --git a/vs2013/vsprops/WebCoreDebugCairoCFLite.props b/vs2013/vsprops/WebCoreDebugCairoCFLite.props new file mode 100644 index 00000000..f3a65602 --- /dev/null +++ b/vs2013/vsprops/WebCoreDebugCairoCFLite.props @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2013/vsprops/WebCoreGeneratedCairo.props b/vs2013/vsprops/WebCoreGeneratedCairo.props new file mode 100644 index 00000000..7f2469ff --- /dev/null +++ b/vs2013/vsprops/WebCoreGeneratedCairo.props @@ -0,0 +1,44 @@ + + + + + + + <_ProjectFileVersion>10.0.40219.1 + set PATH=$(ProjectDir)\..\cygwin\bin%3b$(PATH) +cmd /c +if exist "$(ConfigurationBuildDir)\buildfailed" grep XX$(ProjectName)XX "$(ConfigurationBuildDir)\buildfailed" +if errorlevel 1 exit 1 +echo XX$(ProjectName)XX > "$(ConfigurationBuildDir)\buildfailed" + +cd ..\Source\WebCore\WebCore.vcproj +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +bash build-generated-files.sh "$(ConfigurationBuildDir)" "$(WebKitLibrariesDir)" "..\..\..\WebKitLibraries\win" cairo +bash migrate-scripts.sh "$(ConfigurationBuildDir)/obj/WebCore/scripts" +cmd /C copyForwardingHeaders.cmd cairo curl +cmd /C copyWebCoreResourceFiles.cmd + +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + echo XX$(ProjectName)XX > "$(ConfigurationBuildDir)\buildfailed" + +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\DerivedSources" +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\scripts" +set PATH=$(ProjectDir)\..\cygwin\bin%3b$(PATH) +cmd /c + +cd ..\Source\WebCore\WebCore.vcproj +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +bash build-generated-files.sh "$(ConfigurationBuildDir)" "$(WebKitLibrariesDir)" "$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win" cairo +bash migrate-scripts.sh "$(ConfigurationBuildDir)/obj/WebCore/scripts" +cmd /C copyForwardingHeaders.cmd cairo curl +cmd /C copyWebCoreResourceFiles.cmd + +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + del /s /q "$(ConfigurationBuildDir)\obj\WebCore\DerivedSources" +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\scripts" +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + + \ No newline at end of file diff --git a/vs2013/vsprops/WebCoreGeneratedCommon.props b/vs2013/vsprops/WebCoreGeneratedCommon.props new file mode 100644 index 00000000..48c4970b --- /dev/null +++ b/vs2013/vsprops/WebCoreGeneratedCommon.props @@ -0,0 +1,46 @@ + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SystemDrive)\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=$(SystemDrive)\cygwin\bin%3b$(PATH) +cmd /c +if exist "$(ConfigurationBuildDir)\buildfailed" grep XX$(ProjectName)XX "$(ConfigurationBuildDir)\buildfailed" +if errorlevel 1 exit 1 +echo XX$(ProjectName)XX > "$(ConfigurationBuildDir)\buildfailed" + +bash build-generated-files.sh "$(ConfigurationBuildDir)" "$(WebKitLibrariesDir)" "$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win" windows +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +bash migrate-scripts.sh "$(WebKitOutputDir)/$(Configuration)/obj/WebCore/scripts" +cmd /C copyForwardingHeaders.cmd cg cf +cmd /C copyWebCoreResourceFiles.cmd + +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + echo XX$(ProjectName)XX > "$(ConfigurationBuildDir)\buildfailed" + +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\DerivedSources" +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\scripts" +$(SystemDrive)\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=$(SystemDrive)\cygwin\bin%3b$(PATH) +cmd /c +bash build-generated-files.sh "$(ConfigurationBuildDir)" "$(WebKitLibrariesDir)" "$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win" windows +set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir) +bash migrate-scripts.sh "$(WebKitOutputDir)/$(Configuration)/obj/WebCore/scripts" +cmd /C copyForwardingHeaders.cmd cg cf +cmd /C copyWebCoreResourceFiles.cmd + +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + del /s /q "$(ConfigurationBuildDir)\obj\WebCore\DerivedSources" +del /s /q "$(ConfigurationBuildDir)\obj\WebCore\scripts" +if exist "$(ConfigurationBuildDir)\buildfailed" del "$(ConfigurationBuildDir)\buildfailed" + + + + $(ConfigurationBuildDir)\lib\ + + \ No newline at end of file diff --git a/vs2013/vsprops/WebCoreReleaseCairoCFLite.props b/vs2013/vsprops/WebCoreReleaseCairoCFLite.props new file mode 100644 index 00000000..af7f7d76 --- /dev/null +++ b/vs2013/vsprops/WebCoreReleaseCairoCFLite.props @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2013/vsprops/common.props b/vs2013/vsprops/common.props new file mode 100644 index 00000000..362ec32a --- /dev/null +++ b/vs2013/vsprops/common.props @@ -0,0 +1,46 @@ + + + + 0 + $(ProjectDir)..\build\vs2013 + $(ProjectDir)..\WebKitLibraries\win + $(WebKitOutputDir)\$(Configuration) + + + <_ProjectFileVersion>10.0.40219.1 + + + + WIN32;_WINDOWS;WINVER=0x502;_WIN32_WINNT=0x502;_WIN32_IE=0x603;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_HAS_EXCEPTIONS=0;BUILDING_$(ProjectName);JS_NO_EXPORT;CURL_STATICLIB;LIBXML_STATIC;LIBXSLT_STATIC;PTW32_STATIC_LIB;UCONFIG_NO_COLLATION=1;U_STATIC_IMPLEMENTATION;%(PreprocessorDefinitions) + false + 4018;4068;4099;4100;4127;4138;4180;4189;4201;4244;4251;4275;4288;4291;4305;4344;4355;4389;4481;4503;4505;4510;4512;4610;4706;4800;4951;4952;4996;6011;6031;6211;6246;6255;6387;4396;4819 + /bigobj /GS %(AdditionalOptions) + false + + + + $(ConfigurationBuildDir)\lib;$(WebKitLibrariesDir)\lib;%(AdditionalLibraryDirectories) + + + + + $(ConfigurationBuildDir)\bin\ + $(ConfigurationBuildDir)\obj\$(ProjectName)\ + + + + $(ProductionBuild) + + + $(WEBKITOUTPUTDIR) + true + + + $(WEBKITLIBRARIESDIR) + true + + + $(ConfigurationBuildDir) + + + \ No newline at end of file diff --git a/vs2013/vsprops/wkeCommon.props b/vs2013/vsprops/wkeCommon.props new file mode 100644 index 00000000..2efeb40e --- /dev/null +++ b/vs2013/vsprops/wkeCommon.props @@ -0,0 +1,17 @@ + + + + + __STD_C;%(PreprocessorDefinitions) + ICUVersion.h + $(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources;$(ConfigurationBuildDir)\Include;$(ConfigurationBuildDir)\Include\private;$(WebKitLibrariesDir)\Include;$(WebKitLibrariesDir)\Include\private;$(WebKitLibrariesDir)\Include\pthreads;$(ConfigurationBuildDir)\Include\JavaScriptCore;$(ConfigurationBuildDir)\Include\private\JavaScriptCore;$(WebKitLibrariesDir)\Include\JavaScriptCore;$(WebKitLibrariesDir)\Include\private\JavaScriptCore;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders;%(AdditionalIncludeDirectories) + + + + + + $(IntDir)\lib;$(WebKitLibrariesDir)\lib;$(ConfigurationBuildDir)\lib;%(AdditionalLibraryDirectories) + comdlg32.lib;Imm32.lib;delayimp.lib;kernel32.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;usp10.lib;comctl32.lib;version.lib;shlwapi.lib;libxml2$(LibraryConfigSuffix).lib;libxslt$(LibraryConfigSuffix).lib;SQLite3$(LibraryConfigSuffix).lib;pthreadVC2$(LibraryConfigSuffix).lib;JavaScriptCore.lib;WebCore.lib;msimg32.lib;crypt32.lib;iphlpapi.lib;winmm.lib;comsuppw.lib;rpcrt4.lib;zlib$(LibraryConfigSuffix).lib;CFLite$(LibraryConfigSuffix).lib;WTF.lib;%(AdditionalDependencies) + + + \ No newline at end of file diff --git a/vs2013/vsprops/wkeDebug.props b/vs2013/vsprops/wkeDebug.props new file mode 100644 index 00000000..450bd5a0 --- /dev/null +++ b/vs2013/vsprops/wkeDebug.props @@ -0,0 +1,15 @@ + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2013/vsprops/wkeRelease.props b/vs2013/vsprops/wkeRelease.props new file mode 100644 index 00000000..8b010b11 --- /dev/null +++ b/vs2013/vsprops/wkeRelease.props @@ -0,0 +1,15 @@ + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + \ No newline at end of file diff --git a/vs2013/wke.sln b/vs2013/wke.sln new file mode 100644 index 00000000..f3d230ef --- /dev/null +++ b/vs2013/wke.sln @@ -0,0 +1,78 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JavaScriptCore Folder", "JavaScriptCore Folder", "{65AA684F-0694-4922-81CE-C9FEA9039823}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebCore Folder", "WebCore Folder", "{0E50E567-2DE0-49A9-A34F-7984F3809FE3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "JavaScriptCoreGenerated.vcxproj", "{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "WTF.vcxproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "JavaScriptCore.vcxproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCoreGenerated", "WebCoreGenerated.vcxproj", "{0A324352-B3B6-496C-9E5B-4C7E923E628B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "WebCore.vcxproj", "{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wke", "wke.vcxproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wkeBrowser", "wkeBrowser.vcxproj", "{5C21D8AD-3930-4AC3-9E32-21FCA602DB76}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wkexe", "wkexe.vcxproj", "{5C21D8AD-3930-4AC3-9E32-21FCA603DB76}" + ProjectSection(ProjectDependencies) = postProject + {011D10F1-B656-4A1B-A0C3-3842F02122C6} = {011D10F1-B656-4A1B-A0C3-3842F02122C6} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_Cairo_CFLite|Win32 = Debug_Cairo_CFLite|Win32 + Release_Cairo_CFLite|Win32 = Release_Cairo_CFLite|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C6}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C6}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C6}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {011D10F1-B656-4A1B-A0C3-3842F02122C6}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA602DB76}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {65AA684F-0694-4922-81CE-C9FEA9039823} + {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {65AA684F-0694-4922-81CE-C9FEA9039823} + {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {65AA684F-0694-4922-81CE-C9FEA9039823} + {0A324352-B3B6-496C-9E5B-4C7E923E628B} = {0E50E567-2DE0-49A9-A34F-7984F3809FE3} + {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {0E50E567-2DE0-49A9-A34F-7984F3809FE3} + EndGlobalSection +EndGlobal diff --git a/vs2013/wke.vcxproj b/vs2013/wke.vcxproj new file mode 100644 index 00000000..10cc9d80 --- /dev/null +++ b/vs2013/wke.vcxproj @@ -0,0 +1,108 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {011D10F1-B656-4A1B-A0C3-3842F02122C6} + wke + Win32Proj + + + + DynamicLibrary + Unicode + v120 + + + DynamicLibrary + Unicode + v120 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + AllRules.ruleset + + + AllRules.ruleset + + + + + + true + + + %(AdditionalDependencies) + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {1c16337b-acf3-4d03-aa90-851c5b5eada6} + false + + + + + + \ No newline at end of file diff --git a/vs2013/wkeBrowser.vcxproj b/vs2013/wkeBrowser.vcxproj new file mode 100644 index 00000000..a20e3f6b --- /dev/null +++ b/vs2013/wkeBrowser.vcxproj @@ -0,0 +1,191 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {5C21D8AD-3930-4AC3-9E32-21FCA602DB76} + wkeBrowser + Win32Proj + + + + Application + Unicode + true + v120 + + + Application + Unicode + v120 + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\build\vs2013\$(Configuration)\bin\ + ..\build\vs2013\$(Configuration)\obj\$(ProjectName)\ + true + ..\build\vs2013\$(Configuration)\bin\ + ..\build\vs2013\$(Configuration)\obj\$(ProjectName)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\wke;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + Level3 + EditAndContinue + + + Imm32.lib;wke.lib;shell32.lib;%(AdditionalDependencies) + ..\build\vs2013\$(Configuration)\lib;..\build\vs2013\$(Configuration)\bin;%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + + + REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file +if not exist "$(ProjectDir)$(ProjectName)PostBuild.cmd" exit /b + +set CONFIGURATIONNAME=$(Configuration) +set INPUTDIR=$(ProjectDir) +set INPUTFILENAME=$(ProjectFileName) +set INPUTPATH=$(ProjectPath) +set INTDIR=$(IntDir) +set OUTDIR=$(OutDir) +set PLATFORMNAME=$(Platform) +set PROJECTDIR=$(ProjectDir) +set PROJECTFILENAME=$(ProjectFileName) +set PROJECTNAME=$(ProjectName) +set PROJECTPATH=$(ProjectPath) +set SOLUTIONDIR=$(SolutionDir) +set SOLUTIONFILENAME=$(SolutionFileName) +set SOLUTIONNAME=$(SolutionName) +set SOLUTIONPATH=$(SolutionPath) +set TARGETDIR=$(TargetDir) +set TARGETEXT=$(TargetExt) +set TARGETFILENAME=$(TargetFileName) +set TARGETPATH=$(TargetPath) + +REM If any of the above variables didn%27t exist previously and +REM were set to an empty string, set will set the errorlevel to 1, +REM which will cause the project-specific script to think the build +REM has failed. This cmd /c call will clear the errorlevel. +cmd /c + +"$(ProjectDir)$(ProjectName)PostBuild.cmd" + + + + + + MaxSpeed + true + ..\wke;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + true + Level3 + ProgramDatabase + + + Imm32.lib;wke.lib;shell32.lib;%(AdditionalDependencies) + ..\build\vs2013\$(Configuration)\lib;..\build\vs2013\$(Configuration)\bin;%(AdditionalLibraryDirectories) + true + Windows + true + true + MachineX86 + + + REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file +if not exist "$(ProjectDir)$(ProjectName)PostBuild.cmd" exit /b + +set CONFIGURATIONNAME=$(Configuration) +set INPUTDIR=$(ProjectDir) +set INPUTFILENAME=$(ProjectFileName) +set INPUTPATH=$(ProjectPath) +set INTDIR=$(IntDir) +set OUTDIR=$(OutDir) +set PLATFORMNAME=$(Platform) +set PROJECTDIR=$(ProjectDir) +set PROJECTFILENAME=$(ProjectFileName) +set PROJECTNAME=$(ProjectName) +set PROJECTPATH=$(ProjectPath) +set SOLUTIONDIR=$(SolutionDir) +set SOLUTIONFILENAME=$(SolutionFileName) +set SOLUTIONNAME=$(SolutionName) +set SOLUTIONPATH=$(SolutionPath) +set TARGETDIR=$(TargetDir) +set TARGETEXT=$(TargetExt) +set TARGETFILENAME=$(TargetFileName) +set TARGETPATH=$(TargetPath) + +REM If any of the above variables didn%27t exist previously and +REM were set to an empty string, set will set the errorlevel to 1, +REM which will cause the project-specific script to think the build +REM has failed. This cmd /c call will clear the errorlevel. +cmd /c + +"$(ProjectDir)$(ProjectName)PostBuild.cmd" + + + + + + + + + + + + + + + + + + + + + + + + + + + {011d10f1-b656-4a1b-a0c3-3842f02122c6} + false + + + + + + \ No newline at end of file diff --git a/vs2013/wkeBrowser.vcxproj.filters b/vs2013/wkeBrowser.vcxproj.filters new file mode 100644 index 00000000..fe5e0ebc --- /dev/null +++ b/vs2013/wkeBrowser.vcxproj.filters @@ -0,0 +1,60 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/vs2013/wkeBrowserPostBuild.cmd b/vs2013/wkeBrowserPostBuild.cmd new file mode 100644 index 00000000..4a09195d --- /dev/null +++ b/vs2013/wkeBrowserPostBuild.cmd @@ -0,0 +1,3 @@ +mkdir 2>NUL ..\demo\bin + +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\bin\ \ No newline at end of file diff --git a/vs2013/wkePostBuild.cmd b/vs2013/wkePostBuild.cmd new file mode 100644 index 00000000..55ac2511 --- /dev/null +++ b/vs2013/wkePostBuild.cmd @@ -0,0 +1,7 @@ +mkdir 2>NUL ..\demo\bin +mkdir 2>NUL ..\demo\libwke + +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\bin\ +xcopy /D /F /R /Y "%CONFIGURATIONBUILDDIR%\lib\wke.lib" ..\demo\libwke\ +xcopy /D /F /R /Y "..\wke\wke.h" ..\demo\libwke\ +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\libwke\ \ No newline at end of file diff --git a/vs2013/wkexe.vcxproj b/vs2013/wkexe.vcxproj new file mode 100644 index 00000000..a1398092 --- /dev/null +++ b/vs2013/wkexe.vcxproj @@ -0,0 +1,177 @@ + + + + + Debug_Cairo_CFLite + Win32 + + + Release_Cairo_CFLite + Win32 + + + + {5C21D8AD-3930-4AC3-9E32-21FCA603DB76} + wkexe + Win32Proj + + + + Application + Unicode + true + v120 + + + Application + Unicode + v120 + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\build\vs2013\$(Configuration)\bin\ + ..\build\vs2013\$(Configuration)\obj\$(ProjectName)\ + true + ..\build\vs2010\$(Configuration)\bin\ + ..\build\vs2010\$(Configuration)\obj\$(ProjectName)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\wke;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;STATIC_GETOPT;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + Level3 + EditAndContinue + + + Imm32.lib;wke.lib;shell32.lib;%(AdditionalDependencies) + ..\build\vs2013\$(Configuration)\lib;..\build\vs2013\$(Configuration)\bin;%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + + + REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file +if not exist "$(ProjectDir)$(ProjectName)PostBuild.cmd" exit /b + +set CONFIGURATIONNAME=$(Configuration) +set INPUTDIR=$(ProjectDir) +set INPUTFILENAME=$(ProjectFileName) +set INPUTPATH=$(ProjectPath) +set INTDIR=$(IntDir) +set OUTDIR=$(OutDir) +set PLATFORMNAME=$(Platform) +set PROJECTDIR=$(ProjectDir) +set PROJECTFILENAME=$(ProjectFileName) +set PROJECTNAME=$(ProjectName) +set PROJECTPATH=$(ProjectPath) +set SOLUTIONDIR=$(SolutionDir) +set SOLUTIONFILENAME=$(SolutionFileName) +set SOLUTIONNAME=$(SolutionName) +set SOLUTIONPATH=$(SolutionPath) +set TARGETDIR=$(TargetDir) +set TARGETEXT=$(TargetExt) +set TARGETFILENAME=$(TargetFileName) +set TARGETPATH=$(TargetPath) + +REM If any of the above variables didn%27t exist previously and +REM were set to an empty string, set will set the errorlevel to 1, +REM which will cause the project-specific script to think the build +REM has failed. This cmd /c call will clear the errorlevel. +cmd /c + +"$(ProjectDir)$(ProjectName)PostBuild.cmd" + + + + + + MaxSpeed + true + ..\wke;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;STATIC_GETOPT;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + true + Level3 + ProgramDatabase + + + Imm32.lib;wke.lib;shell32.lib;%(AdditionalDependencies) + ..\build\vs2013\$(Configuration)\lib;..\build\vs2013\$(Configuration)\bin;%(AdditionalLibraryDirectories) + true + Windows + true + true + MachineX86 + + + REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file +if not exist "$(ProjectDir)$(ProjectName)PostBuild.cmd" exit /b + +set CONFIGURATIONNAME=$(Configuration) +set INPUTDIR=$(ProjectDir) +set INPUTFILENAME=$(ProjectFileName) +set INPUTPATH=$(ProjectPath) +set INTDIR=$(IntDir) +set OUTDIR=$(OutDir) +set PLATFORMNAME=$(Platform) +set PROJECTDIR=$(ProjectDir) +set PROJECTFILENAME=$(ProjectFileName) +set PROJECTNAME=$(ProjectName) +set PROJECTPATH=$(ProjectPath) +set SOLUTIONDIR=$(SolutionDir) +set SOLUTIONFILENAME=$(SolutionFileName) +set SOLUTIONNAME=$(SolutionName) +set SOLUTIONPATH=$(SolutionPath) +set TARGETDIR=$(TargetDir) +set TARGETEXT=$(TargetExt) +set TARGETFILENAME=$(TargetFileName) +set TARGETPATH=$(TargetPath) + +REM If any of the above variables didn%27t exist previously and +REM were set to an empty string, set will set the errorlevel to 1, +REM which will cause the project-specific script to think the build +REM has failed. This cmd /c call will clear the errorlevel. +cmd /c + +"$(ProjectDir)$(ProjectName)PostBuild.cmd" + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2013/wkexePostBuild.cmd b/vs2013/wkexePostBuild.cmd new file mode 100644 index 00000000..4a09195d --- /dev/null +++ b/vs2013/wkexePostBuild.cmd @@ -0,0 +1,3 @@ +mkdir 2>NUL ..\demo\bin + +xcopy /D /F /R /Y "%TARGETPATH%" ..\demo\bin\ \ No newline at end of file diff --git a/wke/jsBind.cpp b/wke/jsBind.cpp index bbd6175b..17118b59 100644 --- a/wke/jsBind.cpp +++ b/wke/jsBind.cpp @@ -1,8 +1,14 @@ +////////////////////////////////////////////////////////////////////////// + + #include #include #include #include +#include +#include #include +#include #include #include #include @@ -10,31 +16,38 @@ #include #include -#include "wke.h" #include "wkeDebug.h" -#include "stringTable.h" -int jsArgCount(jsExecState es) +//cexer: ں棬Ϊе wke.h -> windows.h ᶨ maxmin WebCore ڲ maxmin ִҡ +#include "wkeWebView.h" + + +////////////////////////////////////////////////////////////////////////// + + + + +int wkeJSParamCount(wkeJSState* es) { JSC::ExecState* exec = (JSC::ExecState*)es; return (int)exec->argumentCount(); } -jsType jsArgType(jsExecState es, int argIdx) +wkeJSType wkeJSParamType(wkeJSState* es, int argIdx) { - return jsTypeOf(jsArg(es, argIdx)); + return wkeJSTypeOf(es, wkeJSParam(es, argIdx)); } -jsValue jsArg(jsExecState es, int argIdx) +wkeJSValue wkeJSParam(wkeJSState* es, int argIdx) { JSC::ExecState* exec = (JSC::ExecState*)es; JSC::JSValue value = exec->argument(argIdx); - return JSC::JSValue::encode(value); + return (wkeJSValue)JSC::JSValue::encode(value); } -jsType jsTypeOf(jsValue v) +wkeJSType wkeJSTypeOf(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); if (value.isUndefined()) return JSTYPE_UNDEFINED; @@ -63,194 +76,233 @@ jsType jsTypeOf(jsValue v) return JSTYPE_OBJECT; } -bool jsIsNumber(jsValue v) +bool wkeJSIsNumber(wkeJSState* es, wkeJSValue v) { - return jsTypeOf(v) == JSTYPE_NUMBER ? true : false; + return wkeJSTypeOf(es, v) == JSTYPE_NUMBER ? true : false; } -bool jsIsString(jsValue v) +bool wkeJSIsString(wkeJSState* es, wkeJSValue v) { - return jsTypeOf(v) == JSTYPE_STRING ? true : false; + return wkeJSTypeOf(es, v) == JSTYPE_STRING ? true : false; } -bool jsIsBoolean(jsValue v) +bool wkeJSIsBool(wkeJSState* es, wkeJSValue v) { - return jsTypeOf(v) == JSTYPE_BOOLEAN ? true : false; + return wkeJSTypeOf(es, v) == JSTYPE_BOOLEAN ? true : false; } -bool jsIsObject(jsValue v) +bool wkeJSIsObject(wkeJSState* es, wkeJSValue v) { - return jsTypeOf(v) == JSTYPE_OBJECT ? true : false; + return wkeJSTypeOf(es, v) == JSTYPE_OBJECT ? true : false; } -bool jsIsFunction(jsValue v) +bool wkeJSIsFunction(wkeJSState* es, wkeJSValue v) { - return jsTypeOf(v) == JSTYPE_FUNCTION ? true : false; + return wkeJSTypeOf(es, v) == JSTYPE_FUNCTION ? true : false; } -bool jsIsUndefined(jsValue v) +bool wkeJSIsUndefined(wkeJSState* es, wkeJSValue v) { - return jsTypeOf(v) == JSTYPE_UNDEFINED ? true : false; + return wkeJSTypeOf(es, v) == JSTYPE_UNDEFINED ? true : false; } -bool jsIsNull(jsValue v) +bool wkeJSIsNull(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); return value.isNull(); } -bool jsIsArray(jsValue v) +bool wkeJSIsArray(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); if (!value.isObject()) return false; return value.inherits(&JSC::JSArray::s_info); } -bool jsIsTrue(jsValue v) +bool wkeJSIsTrue(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); return value.isTrue(); } -bool jsIsFalse(jsValue v) +bool wkeJSIsFalse(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); return value.isFalse(); } -int jsToInt(jsExecState es, jsValue v) +int wkeJSToInt(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); return value.toInt32((JSC::ExecState*)es); } -float jsToFloat(jsExecState es, jsValue v) +float wkeJSToFloat(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); return value.toFloat((JSC::ExecState*)es); } -double jsToDouble(jsExecState es, jsValue v) +double wkeJSToDouble(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); return value.toNumber((JSC::ExecState*)es); } -bool jsToBoolean(jsExecState es, jsValue v) +bool wkeJSToBool(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); return value.toBoolean((JSC::ExecState*)es); } -const utf8* jsToString(jsExecState es, jsValue v) + +template +class wkeSimpleStringT +{ +public: + wkeSimpleStringT() + : m_buffer(NULL) + , m_capacity(0) + , m_size(0) + {} + + ~wkeSimpleStringT() + { + delete [] m_buffer; + } + +public: + void assign(const T* ptr, size_t len) + { + if (!m_buffer || m_capacity < len) + { + delete [] m_buffer; + m_buffer = new T[len * 2 + 1]; + m_capacity = len * 2; + } + memcpy(m_buffer, ptr, len * sizeof(T)); + m_buffer[len] = 0; + } + + const T* c_str() const + { + return m_buffer; + } + +protected: + T* m_buffer; + size_t m_size; + size_t m_capacity; +}; + +static wkeSimpleStringT s_sharedStringBuffer; +static wkeSimpleStringT s_sharedStringBufferW; + +const utf8* wkeJSToTempString(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); JSC::UString str = value.toString((JSC::ExecState*)es); - return StringTable::addString(str.characters(), str.length()); + CString utf8 = str.utf8(); + s_sharedStringBuffer.assign(utf8.data(), utf8.length()); + return s_sharedStringBuffer.c_str(); } -const wchar_t* jsToStringW(jsExecState es, jsValue v) +const wchar_t* wkeJSToTempStringW(wkeJSState* es, wkeJSValue v) { - JSC::JSValue value = JSC::JSValue::decode(v); + JSC::JSValue value = JSC::JSValue::decode((JSC::EncodedJSValue)v); JSC::UString str = value.toString((JSC::ExecState*)es); - return StringTableW::addString(str.characters(), str.length()); + s_sharedStringBufferW.assign(str.characters(), str.length()); + return s_sharedStringBufferW.c_str(); } -jsValue jsInt(int n) +wkeJSValue wkeJSInt(wkeJSState* es, int n) { - return JSC::JSValue::encode(JSC::jsNumber(n)); + return (wkeJSValue)JSC::JSValue::encode(JSC::jsNumber(n)); } -jsValue jsFloat(float f) +wkeJSValue wkeJSFloat(wkeJSState* es, float f) { - return JSC::JSValue::encode(JSC::jsDoubleNumber(f)); + return (wkeJSValue)JSC::JSValue::encode(JSC::jsDoubleNumber(f)); } -jsValue jsDouble(double d) +wkeJSValue wkeJSDouble(wkeJSState* es, double d) { - return JSC::JSValue::encode(JSC::jsDoubleNumber(d)); + return (wkeJSValue)JSC::JSValue::encode(JSC::jsDoubleNumber(d)); } -jsValue jsBoolean(bool b) +wkeJSValue wkeJSBool(wkeJSState* es, bool b) { - return JSC::JSValue::encode(JSC::jsBoolean(b)); + return (wkeJSValue)JSC::JSValue::encode(JSC::jsBoolean(b)); } -jsValue jsUndefined() +wkeJSValue wkeJSUndefined(wkeJSState* es) { - return JSC::JSValue::encode(JSC::jsUndefined()); + return (wkeJSValue)JSC::JSValue::encode(JSC::jsUndefined()); } -jsValue jsNull() +wkeJSValue wkeJSNull(wkeJSState* es) { - return JSC::JSValue::encode(JSC::jsNull()); + return (wkeJSValue)JSC::JSValue::encode(JSC::jsNull()); } -jsValue jsTrue() +wkeJSValue wkeJSTrue(wkeJSState* es) { - return JSC::JSValue::encode(JSC::jsBoolean(true)); + return (wkeJSValue)JSC::JSValue::encode(JSC::jsBoolean(true)); } -jsValue jsFalse() +wkeJSValue wkeJSFalse(wkeJSState* es) { - return JSC::JSValue::encode(JSC::jsBoolean(false)); + return (wkeJSValue)JSC::JSValue::encode(JSC::jsBoolean(false)); } -jsValue jsString(jsExecState es, const utf8* str) +wkeJSValue wkeJSString(wkeJSState* es, const utf8* str) { String s = String::fromUTF8(str); JSC::JSValue value = JSC::jsString((JSC::ExecState*)es, JSC::UString(s.impl())); - return JSC::JSValue::encode(value); + return (wkeJSValue)JSC::JSValue::encode(value); } -jsValue jsStringW(jsExecState es, const wchar_t* str) +wkeJSValue wkeJSStringW(wkeJSState* es, const wchar_t* str) { JSC::JSValue value = JSC::jsString((JSC::ExecState*)es, JSC::UString(str)); - return JSC::JSValue::encode(value); + return (wkeJSValue)JSC::JSValue::encode(value); } -jsValue jsObject(jsExecState es) +wkeJSValue wkeJSEmptyObject(wkeJSState* es) { JSC::JSValue value(JSC::constructEmptyObject((JSC::ExecState*)es)); - return JSC::JSValue::encode(value); + return (wkeJSValue)JSC::JSValue::encode(value); } -jsValue jsArray(jsExecState es) +wkeJSValue wkeJSEmptyArray(wkeJSState* es) { JSC::JSValue value(JSC::constructEmptyArray((JSC::ExecState*)es)); - return JSC::JSValue::encode(value); + return (wkeJSValue)JSC::JSValue::encode(value); } -jsValue jsFunction(jsExecState es, jsNativeFunction fn, unsigned int argCount) -{ - JSC::ExecState* exec = (JSC::ExecState*)es; - JSC::JSGlobalObject* globalObject = (JSC::JSGlobalObject*)exec->lexicalGlobalObject()->toThisObject(exec); - JSC::JSValue value(JSC::JSFunction::create(exec, globalObject, argCount, JSC::Identifier(), (JSC::NativeFunction)fn)); - return JSC::JSValue::encode(value); -} //return the window object -jsValue jsGlobalObject(jsExecState es) +wkeJSValue wkeJSGlobalObject(wkeJSState* es) { JSC::ExecState* exec = (JSC::ExecState*)es; JSC::JSValue value(exec->lexicalGlobalObject()->toThisObject(exec)); - return JSC::JSValue::encode(value); + return (wkeJSValue)JSC::JSValue::encode(value); } -jsValue jsEval(jsExecState es, const utf8* str) +wkeJSValue wkeJSEval(wkeJSState* es, const utf8* str) { String s = String::fromUTF8(str); - return jsEvalW(es, s.charactersWithNullTermination()); + return (wkeJSValue)wkeJSEvalW(es, s.charactersWithNullTermination()); } -jsValue jsEvalW(jsExecState es, const wchar_t* str) +wkeJSValue wkeJSEvalW(wkeJSState* es, const wchar_t* str) { JSC::ExecState* exec = (JSC::ExecState*)es; @@ -260,118 +312,158 @@ jsValue jsEvalW(jsExecState es, const wchar_t* str) JSC::JSValue returnValue = JSC::evaluate(globalObject->globalExec(), globalObject->globalScopeChain(), source); if (returnValue) - return JSC::JSValue::encode(returnValue); + return (wkeJSValue)JSC::JSValue::encode(returnValue); // happens, for example, when the only statement is an empty (';') statement - return jsUndefined(); + return wkeJSUndefined(es); } -jsValue jsCall(jsExecState es, jsValue func, jsValue thisValue, jsValue* args, int argCount) +wkeJSValue wkeJSCall(wkeJSState* es, wkeJSValue func, wkeJSValue thisValue, wkeJSValue* args, int argCount) { JSC::ExecState* exec = (JSC::ExecState*)es; - if (!jsIsFunction(func)) - return jsUndefined(); + if (!wkeJSIsFunction(es, func)) + return wkeJSUndefined(es); - JSC::JSValue jsThisValue = JSC::JSValue::decode(thisValue); + JSC::JSValue jsThisValue = JSC::JSValue::decode((JSC::EncodedJSValue)thisValue); if (!jsThisValue.isObject()) jsThisValue = exec->globalThisValue(); JSC::MarkedArgumentBuffer argList; for (int i = 0; i < argCount; i++) - argList.append(JSC::JSValue::decode(args[i])); + argList.append(JSC::JSValue::decode((JSC::EncodedJSValue)args[i])); JSC::CallData callData; - JSC::JSObject* object = JSC::asObject(JSC::JSValue::decode(func)); + JSC::JSObject* object = JSC::asObject(JSC::JSValue::decode((JSC::EncodedJSValue)func)); JSC::CallType callType = object->methodTable()->getCallData(object, callData); JSC::JSValue value = JSC::call(exec, object, callType, callData, jsThisValue, argList); - return JSC::JSValue::encode(value); + return (wkeJSValue)JSC::JSValue::encode(value); } -jsValue jsCallGlobal(jsExecState es, jsValue func, jsValue* args, int argCount) +wkeJSValue wkeJSCallGlobal(wkeJSState* es, wkeJSValue func, wkeJSValue* args, int argCount) { - return jsCall(es, func, jsUndefined(), args, argCount); + return wkeJSCall(es, func, wkeJSUndefined(es), args, argCount); } -jsValue jsGet(jsExecState es, jsValue object, const char* prop) +wkeJSValue wkeJSGet(wkeJSState* es, wkeJSValue object, const char* prop) { - JSC::JSValue o = JSC::JSValue::decode(object); + //cexer + //ʹJSC::Identifier((JSC::ExecState*)es, prop)JSC::IdentifierJSC::UStringڲconst char*ַΪhashֵ + //ʹͬڴַÿδŲͬô˺ȴʵǵһεʱԡ + //JSC::JSValue o = JSC::JSValue::decode(object); + //JSC::JSValue ret = o.get((JSC::ExecState*)es, JSC::Identifier((JSC::ExecState*)es, prop)); + //return JSC::JSValue::encode(ret); - JSC::JSValue ret = o.get((JSC::ExecState*)es, JSC::Identifier((JSC::ExecState*)es, prop)); - return JSC::JSValue::encode(ret); + wkeJSValue ret = wkeJSUndefined(es); + + JSC::ExecState* exec = (JSC::ExecState*)es; + if (JSC::JSGlobalData* data = exec->scopeChain()->globalData) + { + JSContextRef ctx = toRef(exec); + JSObjectRef objectRef = JSValueToObject(ctx, toRef(exec, JSC::JSValue::decode((JSC::EncodedJSValue)object)), NULL); + JSStringRef propertyName = JSStringCreateWithUTF8CString(prop); + JSValueRef valueRef = JSObjectGetProperty(ctx, objectRef, propertyName, NULL); + ret = (wkeJSValue)JSC::JSValue::encode(toJS(exec, valueRef)); + } + return ret; } -void jsSet(jsExecState es, jsValue object, const char* prop, jsValue value) +void wkeJSSet(wkeJSState* es, wkeJSValue object, const char* prop, wkeJSValue value) { - JSC::JSValue o = JSC::JSValue::decode(object); - JSC::JSValue v = JSC::JSValue::decode(value); + //cexer + //ʹJSC::Identifier((JSC::ExecState*)es, prop)JSC::IdentifierJSC::UStringڲconst char*ַΪhashֵ + //ʹͬڴַÿδŲͬô˺ȴʵǵһεʱԡ + //JSC::JSValue o = JSC::JSValue::decode(object); + //JSC::JSValue v = JSC::JSValue::decode(value); + //JSC::PutPropertySlot slot; + //o.put((JSC::ExecState*)es, JSC::Identifier((JSC::ExecState*)es, prop), v, slot); - JSC::PutPropertySlot slot; - o.put((JSC::ExecState*)es, JSC::Identifier((JSC::ExecState*)es, prop), v, slot); + JSC::ExecState* exec = (JSC::ExecState*)es; + if (JSC::JSGlobalData* data = exec->scopeChain()->globalData) + { + JSContextRef ctx = toRef(exec); + JSObjectRef objectRef = JSValueToObject(ctx, toRef(exec, JSC::JSValue::decode((JSC::EncodedJSValue)object)), NULL); + JSStringRef propertyName = JSStringCreateWithUTF8CString(prop); + JSValueRef valueRef = toRef(exec, JSC::JSValue::decode((JSC::EncodedJSValue)value)); + + JSObjectSetProperty(ctx, objectRef, propertyName, valueRef, kJSClassAttributeNone, NULL); + } } -jsValue jsGetGlobal(jsExecState es, const char* prop) +wkeJSValue wkeJSGetGlobal(wkeJSState* es, const char* prop) { - return jsGet(es, jsGlobalObject(es), prop); + return wkeJSGet(es, wkeJSGlobalObject(es), prop); } -void jsSetGlobal(jsExecState es, const char* prop, jsValue v) +void wkeJSSetGlobal(wkeJSState* es, const char* prop, wkeJSValue v) { - jsSet(es, jsGlobalObject(es), prop, v); + wkeJSSet(es, wkeJSGlobalObject(es), prop, v); } -jsValue jsGetAt(jsExecState es, jsValue object, int index) +wkeJSValue wkeJSGetAt(wkeJSState* es, wkeJSValue object, int index) { - JSC::JSValue o = JSC::JSValue::decode(object); + JSC::JSValue o = JSC::JSValue::decode((JSC::EncodedJSValue)object); JSC::JSValue ret = o.get((JSC::ExecState*)es, index); - return JSC::JSValue::encode(ret); + return (wkeJSValue)JSC::JSValue::encode(ret); } -void jsSetAt(jsExecState es, jsValue object, int index, jsValue value) +void wkeJSSetAt(wkeJSState* es, wkeJSValue object, int index, wkeJSValue value) { - JSC::JSValue o = JSC::JSValue::decode(object); - JSC::JSValue v = JSC::JSValue::decode(value); + JSC::JSValue o = JSC::JSValue::decode((JSC::EncodedJSValue)object); + JSC::JSValue v = JSC::JSValue::decode((JSC::EncodedJSValue)value); o.put((JSC::ExecState*)es, index, v); } -int jsGetLength(jsExecState es, jsValue object) +int wkeJSGetLength(wkeJSState* es, wkeJSValue object) { JSC::ExecState* exec = (JSC::ExecState*)es; - JSC::JSValue o = JSC::JSValue::decode(object); + JSC::JSValue o = JSC::JSValue::decode((JSC::EncodedJSValue)object); return o.get(exec, JSC::Identifier(exec, "length")).toInt32(exec); } -void jsSetLength(jsExecState es, jsValue object, int length) +void wkeJSSetLength(wkeJSState* es, wkeJSValue object, int length) { JSC::ExecState* exec = (JSC::ExecState*)es; - JSC::JSValue o = JSC::JSValue::decode(object); + JSC::JSValue o = JSC::JSValue::decode((JSC::EncodedJSValue)object); JSC::PutPropertySlot slot; o.put(exec, JSC::Identifier(exec, "length"), JSC::jsNumber(length), slot); } -wkeWebView jsGetWebView(jsExecState es) +wkeWebView* wkeJSGetWebView(wkeJSState* es) { JSC::ExecState* exec = (JSC::ExecState*)es; WebCore::JSDOMWindow* window = WebCore::asJSDOMWindow(exec->lexicalGlobalObject()); if (window) - return (wkeWebView)window->impl()->frame()->page()->chrome()->client()->webView(); + return (wkeWebView*)window->impl()->frame()->page()->chrome()->client()->webView(); return 0; } -void jsGC() +void wkeJSCollectGarbge() { WebCore::gcController().garbageCollectNow(); } +void wkeJSAddRef(wkeJSState* es, wkeJSValue val) +{ + JSC::JSValue v = JSC::JSValue::decode((JSC::EncodedJSValue)val); + JSC::gcProtect(v); +} + +void wkeJSReleaseRef(wkeJSState* es, wkeJSValue val) +{ + JSC::JSValue v = JSC::JSValue::decode((JSC::EncodedJSValue)val); + JSC::gcUnprotect(v); +} -static void addFunction(JSC::JSGlobalObject* globalObject, const char* name, jsNativeFunction function, unsigned int argCount) + +static void addFunction(JSC::JSGlobalObject* globalObject, const char* name, wkeJSNativeFunction function, unsigned int argCount) { JSC::ExecState* exec = globalObject->globalExec(); @@ -381,7 +473,7 @@ static void addFunction(JSC::JSGlobalObject* globalObject, const char* name, jsN globalObject->putDirect(globalObject->globalData(), identifier, funcObject); } -static void addGetter(JSC::JSGlobalObject* globalObject, const char* name, jsNativeFunction function) +static void addGetter(JSC::JSGlobalObject* globalObject, const char* name, wkeJSNativeFunction function) { JSC::ExecState* exec = globalObject->globalExec(); @@ -390,7 +482,7 @@ static void addGetter(JSC::JSGlobalObject* globalObject, const char* name, jsNat globalObject->defineGetter(exec, identifier, getterFunc, 0); } -static void addSetter(JSC::JSGlobalObject* globalObject, const char* name, jsNativeFunction function) +static void addSetter(JSC::JSGlobalObject* globalObject, const char* name, wkeJSNativeFunction function) { JSC::ExecState* exec = globalObject->globalExec(); @@ -409,14 +501,14 @@ static void addSetter(JSC::JSGlobalObject* globalObject, const char* name, jsNat struct jsFunctionInfo { char name[MAX_NAME_LENGTH]; - jsNativeFunction fn; + wkeJSNativeFunction fn; unsigned int argCount; unsigned int funcType; }; static Vector s_jsFunctions; -void jsBindFunction(const char* name, jsNativeFunction fn, unsigned int argCount) +void wkeJSBindFunction(const char* name, wkeJSNativeFunction fn, unsigned int argCount) { for (unsigned int i = 0; i < s_jsFunctions.size(); ++i) { @@ -439,7 +531,7 @@ void jsBindFunction(const char* name, jsNativeFunction fn, unsigned int argCount s_jsFunctions.append(funcInfo); } -void jsBindGetter(const char* name, jsNativeFunction fn) +void wkeJSBindGetter(const char* name, wkeJSNativeFunction fn) { for (unsigned int i = 0; i < s_jsFunctions.size(); ++i) { @@ -461,7 +553,7 @@ void jsBindGetter(const char* name, jsNativeFunction fn) s_jsFunctions.append(funcInfo); } -void jsBindSetter(const char* name, jsNativeFunction fn) +void wkeJSBindSetter(const char* name, wkeJSNativeFunction fn) { for (unsigned int i = 0; i < s_jsFunctions.size(); ++i) { @@ -485,32 +577,135 @@ void jsBindSetter(const char* name, jsNativeFunction fn) -jsValue JS_CALL js_outputMsg(jsExecState es) +wkeJSValue JS_CALL js_outputMsg(wkeJSState* es) { - //ASSERT(jsArgCount(es) == 1); - //ASSERT(jsArgType(es, 0) == JSTYPE_STRING); + //ASSERT(wkeJSParamCount(es) == 1); + //ASSERT(wkeJSParamType(es, 0) == JSTYPE_STRING); - jsValue value = jsArg(es, 0); - OutputDebugStringW(jsToStringW(es, value)); + wkeJSValue value = wkeJSParam(es, 0); + OutputDebugStringW(wkeJSToTempStringW(es, value)); - return jsUndefined(); + return wkeJSUndefined(es); } -jsValue JS_CALL js_getWebViewName(jsExecState es) +wkeJSValue JS_CALL js_getWebViewName(wkeJSState* es) { - wkeWebView webView = jsGetWebView(es); - return jsString(es, webView->name()); + wkeWebView* webView = wkeJSGetWebView(es); + return wkeJSString(es, webView->name()); } -jsValue JS_CALL js_setWebViewName(jsExecState es) +wkeJSValue JS_CALL js_setWebViewName(wkeJSState* es) { - const char* name = jsToString(es, jsArg(es, 0)); - wkeWebView webView = jsGetWebView(es); + const char* name = wkeJSToTempString(es, wkeJSParam(es, 0)); + wkeWebView* webView = wkeJSGetWebView(es); webView->setName(name); - return jsUndefined(); + return wkeJSUndefined(es); +} + +JSValueRef objectGetPropertyCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) +{ + JSC::ExecState* exec = toJS(ctx); + JSC::JSObject* obj = toJS(object); + + wkeJSData* p = (wkeJSData*)JSObjectGetPrivate(object); + if (!p || !p->propertyGet) + return false; + + WTF::CString str = propertyName->ustring().latin1(); + const char* name = str.data(); + wkeJSValue ret = p->propertyGet((wkeJSState*)exec, (wkeJSValue)JSC::JSValue::encode(obj), name); + + return toRef(exec, JSC::JSValue::decode((JSC::EncodedJSValue)ret)); +} + +bool objectSetPropertyCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + JSC::ExecState* exec = toJS(ctx); + JSC::JSObject* obj = toJS(object); + + wkeJSData* p = (wkeJSData*)JSObjectGetPrivate(object); + if (!p || !p->propertySet) + return false; + + WTF::CString str = propertyName->ustring().latin1(); + const char* name = str.data(); + return p->propertySet((wkeJSState*)exec, (wkeJSValue)JSC::JSValue::encode(obj), name, (wkeJSValue)JSC::JSValue::encode(toJS(exec,value))); +} + +void objectFinalize(JSObjectRef object) +{ + wkeJSData* p = (wkeJSData*)JSObjectGetPrivate(object); + if (p && p->finalize) + p->finalize(p); +} + +JSValueRef objectCallAsFunctionCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + JSC::ExecState* exec = toJS(ctx); + JSC::JSObject* obj = toJS(function); + + wkeJSData* p = (wkeJSData*)JSObjectGetPrivate(function); + if (!p || !p->callAsFunction) + return false; + + wkeJSValue args[10] = { 0 }; + for (int i = 0; i < argumentCount; ++i) + args[i] = (wkeJSValue)JSC::JSValue::encode(toJS(exec, arguments[i])); + + wkeJSValue ret = p->callAsFunction((wkeJSState*)exec, (wkeJSValue)JSC::JSValue::encode(toJS(function)), args, argumentCount); + return toRef(exec, JSC::JSValue::decode((JSC::EncodedJSValue)ret)); } + +WKE_API wkeJSValue wkeJSObject(wkeJSState* es, wkeJSData* data) +{ + JSC::ExecState* exec = (JSC::ExecState*)es; + JSC::JSGlobalObject* globalObject = (JSC::JSGlobalObject*)exec->lexicalGlobalObject(); + JSContextRef ctx = toRef(exec); + + JSClassDefinition classDef = kJSClassDefinitionEmpty; + classDef.getProperty = objectGetPropertyCallback; + classDef.setProperty = objectSetPropertyCallback; + classDef.finalize = objectFinalize; + + JSClassRef globalClass = JSClassCreate(&classDef); + JSObjectRef obj = JSObjectMake(ctx, globalClass, NULL); + JSObjectSetPrivate(obj ,data); + + JSC::JSValue value = toJS(obj); + return (wkeJSValue)JSC::JSValue::encode(value); +} + +WKE_API wkeJSValue wkeJSFunction(wkeJSState* es, wkeJSData* data) +{ + JSC::ExecState* exec = (JSC::ExecState*)es; + JSC::JSGlobalObject* globalObject = (JSC::JSGlobalObject*)exec->lexicalGlobalObject(); + JSContextRef ctx = toRef(exec); + + JSClassDefinition classDef = kJSClassDefinitionEmpty; + classDef.finalize = objectFinalize; + classDef.callAsFunction = objectCallAsFunctionCallback; + + JSClassRef globalClass = JSClassCreate(&classDef); + JSObjectRef obj = JSObjectMake(ctx, globalClass, NULL); + JSObjectSetPrivate(obj ,data); + + JSC::JSValue value = toJS(obj); + return (wkeJSValue)JSC::JSValue::encode(value); +} + + +WKE_API wkeJSData* wkeJSGetData(wkeJSState* es, wkeJSValue object) +{ + JSC::ExecState* exec = (JSC::ExecState*)es; + JSC::JSValue val = JSC::JSValue::decode((JSC::EncodedJSValue)object); + JSValueRef valRef = toRef(exec, val); + JSContextRef ctxRef = toRef(exec); + return (wkeJSData*)JSObjectGetPrivate(JSValueToObject(ctxRef, valRef, NULL)); +} + + void onCreateGlobalObject(JSC::JSGlobalObject* globalObject) { addFunction(globalObject, "outputMsg", js_outputMsg, 1); @@ -518,7 +713,7 @@ void onCreateGlobalObject(JSC::JSGlobalObject* globalObject) addSetter(globalObject, "webViewName", js_setWebViewName); JSC::ExecState* exec = globalObject->globalExec(); - jsSetGlobal(exec, "wke", ::jsString(exec, wkeVersionString())); + wkeJSSetGlobal((wkeJSState*)exec, "wke", ::wkeJSString((wkeJSState*)exec, wkeGetVersionString())); for (size_t i = 0; i < s_jsFunctions.size(); ++i) { @@ -529,4 +724,4 @@ void onCreateGlobalObject(JSC::JSGlobalObject* globalObject) else if (s_jsFunctions[i].funcType == JS_SETTER) addSetter(globalObject, s_jsFunctions[i].name, s_jsFunctions[i].fn); } -} \ No newline at end of file +} diff --git a/wke/resource.h b/wke/resource.h new file mode 100644 index 00000000..eecff85a --- /dev/null +++ b/wke/resource.h @@ -0,0 +1,15 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by wke.rc +// + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/wke/stringTable.cpp b/wke/stringTable.cpp deleted file mode 100644 index 359f981a..00000000 --- a/wke/stringTable.cpp +++ /dev/null @@ -1,179 +0,0 @@ -#include -#include -#include -#include -#include - -#include "stringTable.h" - -struct StringTableHash { - - static unsigned hash(const char* key) - { - return StringHasher::computeHash(key, strlen(key)); - } - - static bool equal(const char* a, const char* b) - { - return strcmp(a, b) == 0; - } - - static unsigned hash(const wchar_t* key) - { - return StringHasher::computeHash(key, wcslen(key)); - } - - static bool equal(const wchar_t* a, const wchar_t* b) - { - return wcscmp(a, b) == 0; - } - - static const bool safeToCompareToEmptyOrDeleted = false; -}; - -struct CharBuffer { - const char* s; - unsigned length; -}; - -struct CharBufferTranslator { - static unsigned hash(const CharBuffer& buf) - { - return StringHasher::computeHash(buf.s, buf.length); - } - - static bool equal(const char* const& str, const CharBuffer& buf) - { - return strncmp(str, buf.s, buf.length) == 0; - } - - static void translate(const char*& location, const CharBuffer& buf, unsigned hash) - { - char* str = static_cast(fastMalloc(buf.length + 1)); - memcpy(str, buf.s, buf.length); - str[buf.length] = '\0'; - - location = str; - } -}; - -struct WCharBuffer { - const wchar_t* s; - unsigned length; -}; - -struct WCharBufferTranslator { - static unsigned hash(const WCharBuffer& buf) - { - return StringHasher::computeHash(buf.s, buf.length); - } - - static bool equal(const wchar_t* const& str, const WCharBuffer& buf) - { - return wcsncmp(str, buf.s, buf.length) == 0; - } - - static void translate(const wchar_t*& location, const WCharBuffer& buf, unsigned hash) - { - wchar_t* str = static_cast(fastMalloc((buf.length + 1)*sizeof(wchar_t))); - memcpy(str, buf.s, buf.length*sizeof(wchar_t)); - str[buf.length] = L'\0'; - - location = str; - } -}; - - -namespace WTF { - -template struct DefaultHash; -template<> struct DefaultHash { - typedef StringTableHash Hash; -}; - -template<> struct DefaultHash { - typedef StringTableHash Hash; -}; - -} - -HashSet s_stringTable; -HashSet s_stringTableW; - -static const wchar_t* s_empty = L"\0"; - -const char* StringTable::addString(const char* str, unsigned int len/* = 0*/) -{ - if (str == NULL || str[0] == '\0') - return emptyString(); - - if (len == 0) - len = strlen(str); - - CharBuffer buf = { str, len }; - return *s_stringTable.add(buf).first; -} - -const char* StringTable::addString(const wchar_t* str, unsigned int len/* = 0*/) -{ - if (str == NULL || str[0] == L'\0') - return emptyString(); - - if (len == 0) - len = wcslen(str); - - CString s = String(str, len).utf8(); - return addString(s.data(), s.length()); -} - -const char* StringTable::emptyString() -{ - return (const char*)s_empty; -} - -const wchar_t* StringTableW::addString(const wchar_t* str, unsigned int len/* = 0*/) -{ - if (str == NULL || str[0] == L'\0') - return emptyString(); - - if (len == 0) - len = wcslen(str); - - WCharBuffer buf = { str, len }; - return *s_stringTableW.add(buf).first; -} - -const wchar_t* StringTableW::addString(const char* str, unsigned int len/* = 0*/) -{ - if (str == NULL || str[0] == '\0') - return emptyString(); - - if (len == 0) - len = strlen(str); - - String s = String::fromUTF8(str, len); - return addString(s.characters(), s.length()); -} - -const wchar_t* StringTableW::emptyString() -{ - return s_empty; -} - -void initStringTable() -{ -} - -void destroyStringTable() -{ - for (HashSet::iterator itr = s_stringTable.begin(); itr != s_stringTable.end(); ++itr) - fastFree((void*)*itr); - - s_stringTable.clear(); - - for (HashSet::iterator itr = s_stringTableW.begin(); itr != s_stringTableW.end(); ++itr) - fastFree((void*)*itr); - - s_stringTableW.clear(); -} - diff --git a/wke/stringTable.h b/wke/stringTable.h deleted file mode 100644 index 4a5c0fa4..00000000 --- a/wke/stringTable.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef STRING_TABLE_H -#define STRING_TABLE_H - -class StringTable -{ -public: - static const char* addString(const char* str, unsigned int len = 0); - static const char* addString(const wchar_t* str, unsigned int len = 0); - - static const char* emptyString(); -}; - -class StringTableW -{ -public: - static const wchar_t* addString(const char* str, unsigned int len = 0); - static const wchar_t* addString(const wchar_t* str, unsigned int len = 0); - - static const wchar_t* emptyString(); -}; - -void initStringTable(); -void destroyStringTable(); - -#endif \ No newline at end of file diff --git a/wke/wke.cpp b/wke/wke.cpp index 2b489c20..71b477fb 100644 --- a/wke/wke.cpp +++ b/wke/wke.cpp @@ -1,6 +1,7 @@ +////////////////////////////////////////////////////////////////////////// -#include +#include #include #include #include @@ -10,14 +11,25 @@ #include #include #include +#include +#include -#include "wkePlatformStrategies.inl" - -#include "wke.h" +#include "wkePlatformStrategies.h" #include "icuwin.h" -#include "stringTable.h" -void wkeInit() +//cexer: ں棬Ϊе wke.h -> windows.h ᶨ maxmin WebCore ڲ maxmin ִҡ +#include "wkeString.h" +#include "wkeWebView.h" +#include "wkeWebWindow.h" +#include + +////////////////////////////////////////////////////////////////////////// + + + +extern "C" IMAGE_DOS_HEADER __ImageBase; + +void wkeInitialize() { //double-precision float _controlfp(_PC_53, _MCW_PC); @@ -25,25 +37,77 @@ void wkeInit() CoInitialize(NULL); icuwin_init(); - initStringTable(); JSC::initializeThreading(); WTF::initializeMainThread(); wke::PlatformStrategies::initialize(); + //cexer ܼرͼƬBUG + WebCore::SecurityOrigin::setLocalLoadPolicy(WebCore::SecurityOrigin::AllowLocalLoadsForAll); + //WebCore::Console::setShouldPrintExceptions(true); //WebCore::ResourceHandleManager::sharedInstance()->setCookieJarFileName("cookie.txt"); + + WCHAR storageDir[MAX_PATH + 1] = { 0 }; + GetModuleFileNameW((HMODULE)&__ImageBase, storageDir, MAX_PATH); + PathRemoveFileSpecW(storageDir); + wcscat(storageDir, L"\\wkeStorage"); + WebCore::DatabaseTracker::initializeTracker(storageDir); +} + +void wkeConfigProxy(const wkeProxy* proxy) +{ + WebCore::ResourceHandleManager::ProxyType proxyType = WebCore::ResourceHandleManager::HTTP; + String hostname; + String username; + String password; + + if (proxy->hostname[0] != 0 && proxy->type >= WKE_PROXY_HTTP && proxy->type <= WKE_PROXY_SOCKS5HOSTNAME) + { + switch (proxy->type) + { + case WKE_PROXY_HTTP: proxyType = WebCore::ResourceHandleManager::HTTP; break; + case WKE_PROXY_SOCKS4: proxyType = WebCore::ResourceHandleManager::Socks4; break; + case WKE_PROXY_SOCKS4A: proxyType = WebCore::ResourceHandleManager::Socks4A; break; + case WKE_PROXY_SOCKS5: proxyType = WebCore::ResourceHandleManager::Socks5; break; + case WKE_PROXY_SOCKS5HOSTNAME: proxyType = WebCore::ResourceHandleManager::Socks5Hostname; break; + } + + hostname = String::fromUTF8(proxy->hostname); + username = String::fromUTF8(proxy->username); + password = String::fromUTF8(proxy->password); + } + + WebCore::ResourceHandleManager::sharedInstance()->setProxyInfo(hostname, proxy->port, proxyType, username, password); } -void wkeShutdown() +void wkeConfigCookieFilePath(const char* path) +{ + WebCore::ResourceHandleManager::sharedInstance()->setCookieJarFileName(path); +} + +void wkeConfigure(const wkeSettings* settings) +{ + if (settings->mask & WKE_SETTING_PROXY) + wkeConfigProxy(&settings->proxy); + + if (settings->mask & WKE_SETTING_COOKIE_FILE_PATH) + wkeConfigCookieFilePath(settings->cookieFilePath); +} + +void wkeInitializeEx(const wkeSettings* settings) +{ + wkeInitialize(); + wkeConfigure(settings); +} + +void wkeFinalize() { wkeUpdate(); WebCore::iconDatabase().close(); WebCore::PageGroup::closeLocalStorage(); - destroyStringTable(); - CoUninitialize(); } @@ -69,12 +133,12 @@ void wkeUpdate() #define MINOR_VERSION (2) #define WEBKIT_BUILD (98096) -unsigned int wkeVersion() +unsigned int wkeGetVersion() { return (MAJOR_VERSION << 8) + MINOR_VERSION; } -const utf8* wkeVersionString() +const utf8* wkeGetVersionString() { static utf8 s_versionString[128]; sprintf(s_versionString, "wke version %d.%02d\n" @@ -94,324 +158,457 @@ void wkeSetFileSystem(FILE_OPEN pfn_open, FILE_CLOSE pfn_close, FILE_SIZE pfn_si libcurl_set_file_system(pfn_open, pfn_close, pfn_size, pfn_read, pfn_seek); } -const char* wkeWebViewName(wkeWebView webView) +const char* wkeGetName(wkeWebView* webView) { return webView->name(); } -void wkeSetWebViewName(wkeWebView webView, const char* name) +void wkeSetName(wkeWebView* webView, const char* name) { webView->setName(name); } -bool wkeIsTransparent(wkeWebView webView) +bool wkeIsTransparent(wkeWebView* webView) { - return webView->transparent(); + return webView->isTransparent(); } -void wkeSetTransparent(wkeWebView webView, bool transparent) +void wkeSetTransparent(wkeWebView* webView, bool transparent) { webView->setTransparent(transparent); } +void wkeSetUserAgent(wkeWebView* webView, const utf8* userAgent) +{ + webView->setUserAgent(userAgent); +} -void wkeLoadURL(wkeWebView webView, const utf8* url) +void wkeSetUserAgentW(wkeWebView* webView, const wchar_t* userAgent) +{ + webView->setUserAgent(userAgent); +} + +void wkePostURL(wkeWebView* wkeView,const utf8 * url,const char *szPostData,int nLen) +{ + wkeView->loadPostURL(url,szPostData,nLen); +} +void wkePostURLW(wkeWebView* wkeView,const wchar_t * url,const char *szPostData,int nLen) +{ + wkeView->loadPostURL(url,szPostData,nLen); +} +void wkeLoadURL(wkeWebView* webView, const utf8* url) { webView->loadURL(url); } -void wkeLoadURLW(wkeWebView webView, const wchar_t* url) +void wkeLoadURLW(wkeWebView* webView, const wchar_t* url) { webView->loadURL(url); } -void wkeLoadHTML(wkeWebView webView, const utf8* html) +void wkeLoadHTML(wkeWebView* webView, const utf8* html) { webView->loadHTML(html); } -void wkeLoadHTMLW(wkeWebView webView, const wchar_t* html) +void wkeLoadHTMLW(wkeWebView* webView, const wchar_t* html) { webView->loadHTML(html); } -void wkeLoadFile(wkeWebView webView, const utf8* filename) +void wkeLoadFile(wkeWebView* webView, const utf8* filename) { return webView->loadFile(filename); } -void wkeLoadFileW(wkeWebView webView, const wchar_t* filename) +void wkeLoadFileW(wkeWebView* webView, const wchar_t* filename) { return webView->loadFile(filename); } -bool wkeIsLoaded(wkeWebView webView) +void wkeLoad(wkeWebView* webView, const utf8* str) +{ + return webView->load(str); +} + +void wkeLoadW(wkeWebView* webView, const wchar_t* str) +{ + return webView->load(str); +} + +bool wkeIsLoadingSucceeded(wkeWebView* webView) { - return webView->isLoaded(); + return webView->isLoadingSucceeded(); } -bool wkeIsLoadFailed(wkeWebView webView) +bool wkeIsLoadingFailed(wkeWebView* webView) { - return webView->isLoadFailed(); + return webView->isLoadingFailed(); } -bool wkeIsLoadComplete(wkeWebView webView) +bool wkeIsLoadingCompleted(wkeWebView* webView) { - return webView->isLoadComplete(); + return webView->isLoadingCompleted(); } -bool wkeIsDocumentReady(wkeWebView webView) +bool wkeIsDocumentReady(wkeWebView* webView) { return webView->isDocumentReady(); } -void wkeStopLoading(wkeWebView webView) +void wkeStopLoading(wkeWebView* webView) { webView->stopLoading(); } -void wkeReload(wkeWebView webView) +void wkeReload(wkeWebView* webView) { webView->reload(); } -const utf8* wkeTitle(wkeWebView webView) +const utf8* wkeGetTitle(wkeWebView* webView) { return webView->title(); } -const wchar_t* wkeTitleW(wkeWebView webView) +const wchar_t* wkeGetTitleW(wkeWebView* webView) { return webView->titleW(); } -void wkeResize(wkeWebView webView, int w, int h) +void wkeResize(wkeWebView* webView, int w, int h) { webView->resize(w, h); } -int wkeWidth(wkeWebView webView) +int wkeGetWidth(wkeWebView* webView) { return webView->width(); } -int wkeHeight(wkeWebView webView) +int wkeGetHeight(wkeWebView* webView) { return webView->height(); } -int wkeContentsWidth(wkeWebView webView) +int wkeGetContentWidth(wkeWebView* webView) { - return webView->contentsWidth(); + return webView->contentWidth(); } -int wkeContentsHeight(wkeWebView webView) +int wkeGetContentHeight(wkeWebView* webView) { - return webView->contentsHeight(); + return webView->contentHeight(); } -void wkeSetDirty(wkeWebView webView, bool dirty) +void wkeSetDirty(wkeWebView* webView, bool dirty) { webView->setDirty(dirty); } -bool wkeIsDirty(wkeWebView webView) +bool wkeIsDirty(wkeWebView* webView) { return webView->isDirty(); } -void wkeAddDirtyArea(wkeWebView webView, int x, int y, int w, int h) +void wkeAddDirtyArea(wkeWebView* webView, int x, int y, int w, int h) { webView->addDirtyArea(x, y, w, h); } -void wkeLayoutIfNeeded(wkeWebView webView) +void wkeLayoutIfNeeded(wkeWebView* webView) { webView->layoutIfNeeded(); } -void wkePaint(wkeWebView webView, void* bits, int pitch) +void wkePaint(wkeWebView* webView,void* bits, int bufWid, int bufHei, int xDst, int yDst, int w, int h, int xSrc, int ySrc, bool bCopyAlpha) +{ + webView->paint(bits, bufWid, bufHei, xDst, yDst, w, h, xSrc, ySrc, bCopyAlpha); +} + +void wkePaint2(wkeWebView* webView, void* bits,int pitch) { webView->paint(bits, pitch); } -bool wkeCanGoBack(wkeWebView webView) +bool wkeRepaintIfNeeded(wkeWebView* webView) +{ + return webView->repaintIfNeeded(); +} + +void* wkeGetViewDC(wkeWebView* webView) +{ + return webView->viewDC(); +} + +bool wkeCanGoBack(wkeWebView* webView) { return webView->canGoBack(); } -bool wkeGoBack(wkeWebView webView) +bool wkeGoBack(wkeWebView* webView) { return webView->goBack(); } -bool wkeCanGoForward(wkeWebView webView) +bool wkeCanGoForward(wkeWebView* webView) { return webView->canGoForward(); } -bool wkeGoForward(wkeWebView webView) +bool wkeGoForward(wkeWebView* webView) { return webView->goForward(); } -void wkeSelectAll(wkeWebView webView) +void wkeEditorSelectAll(wkeWebView* webView) +{ + webView->editorSelectAll(); +} + +void wkeEditorCopy(wkeWebView* webView) { - webView->selectAll(); + webView->editorCopy(); } -void wkeCopy(wkeWebView webView) +void wkeEditorCut(wkeWebView* webView) { - webView->copy(); + webView->editorCut(); } -void wkeCut(wkeWebView webView) +void wkeEditorPaste(wkeWebView* webView) { - webView->cut(); + webView->editorPaste(); } -void wkePaste(wkeWebView webView) +void wkeEditorDelete(wkeWebView* webView) { - webView->paste(); + webView->editorDelete(); } -void wkeDelete(wkeWebView webView) +const wchar_t * wkeGetCookieW(wkeWebView* webView) { - webView->delete_(); + return webView->cookieW(); } -void wkeSetCookieEnabled(wkeWebView webView, bool enable) +const utf8* wkeGetCookie(wkeWebView* webView) +{ + return webView->cookie(); +} + + +void wkeSetCookieEnabled(wkeWebView* webView, bool enable) { webView->setCookieEnabled(enable); } -bool wkeCookieEnabled(wkeWebView webView) +bool wkeIsCookieEnabled(wkeWebView* webView) { - return webView->cookieEnabled(); + return webView->isCookieEnabled(); } -void wkeSetMediaVolume(wkeWebView webView, float volume) +void wkeSetMediaVolume(wkeWebView* webView, float volume) { webView->setMediaVolume(volume); } -float wkeMediaVolume(wkeWebView webView) +float wkeGetMediaVolume(wkeWebView* webView) { return webView->mediaVolume(); } -bool wkeMouseEvent(wkeWebView webView, unsigned int message, int x, int y, unsigned int flags) +bool wkeFireMouseEvent(wkeWebView* webView, unsigned int message, int x, int y, unsigned int flags) { - return webView->mouseEvent(message, x, y, flags); + return webView->fireMouseEvent(message, x, y, flags); } -bool wkeContextMenuEvent(wkeWebView webView, int x, int y, unsigned int flags) +bool wkeFireContextMenuEvent(wkeWebView* webView, int x, int y, unsigned int flags) { - return webView->contextMenuEvent(x, y, flags); + return webView->fireContextMenuEvent(x, y, flags); } -bool wkeMouseWheel(wkeWebView webView, int x, int y, int delta, unsigned int flags) +bool wkeFireMouseWheelEvent(wkeWebView* webView, int x, int y, int delta, unsigned int flags) { - return webView->mouseWheel(x, y, delta, flags); + return webView->fireMouseWheelEvent(x, y, delta, flags); } -bool wkeKeyUp(wkeWebView webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey) +bool wkeFireKeyUpEvent(wkeWebView* webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey) { - return webView->keyUp(virtualKeyCode, flags, systemKey); + return webView->fireKeyUpEvent(virtualKeyCode, flags, systemKey); } -bool wkeKeyDown(wkeWebView webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey) +bool wkeFireKeyDownEvent(wkeWebView* webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey) { - return webView->keyDown(virtualKeyCode, flags, systemKey); + return webView->fireKeyDownEvent(virtualKeyCode, flags, systemKey); } -bool wkeKeyPress(wkeWebView webView, unsigned int charCode, unsigned int flags, bool systemKey) +bool wkeFireKeyPressEvent(wkeWebView* webView, unsigned int charCode, unsigned int flags, bool systemKey) { - return webView->keyPress(charCode, flags, systemKey); + return webView->fireKeyPressEvent(charCode, flags, systemKey); } -void wkeFocus(wkeWebView webView) +void wkeSetFocus(wkeWebView* webView) { - webView->focus(); + webView->setFocus(); } -void wkeUnfocus(wkeWebView webView) +void wkeKillFocus(wkeWebView* webView) { - webView->unfocus(); + webView->killFocus(); } -wkeRect wkeGetCaret(wkeWebView webView) +wkeRect wkeGetCaretRect(wkeWebView* webView) { - return webView->getCaret(); + return webView->caretRect(); } -jsValue wkeRunJS(wkeWebView webView, const utf8* script) +wkeJSValue wkeRunJS(wkeWebView* webView, const utf8* script) { return webView->runJS(script); } -jsValue wkeRunJSW(wkeWebView webView, const wchar_t* script) +wkeJSValue wkeRunJSW(wkeWebView* webView, const wchar_t* script) { return webView->runJS(script); } -jsExecState wkeGlobalExec(wkeWebView webView) +wkeJSState* wkeGlobalExec(wkeWebView* webView) { return webView->globalExec(); } -void wkeSleep(wkeWebView webView) +void wkeSleep(wkeWebView* webView) { webView->sleep(); } -void wkeAwaken(wkeWebView webView) +void wkeWake(wkeWebView* webView) { - webView->awaken(); + webView->wake(); } -bool wkeIsAwake(wkeWebView webView) +bool wkeIsAwake(wkeWebView* webView) { return webView->isAwake(); } -void wkeSetZoomFactor(wkeWebView webView, float factor) +void wkeSetZoomFactor(wkeWebView* webView, float factor) { webView->setZoomFactor(factor); } -float wkeZoomFactor(wkeWebView webView) +float wkeGetZoomFactor(wkeWebView* webView) { return webView->zoomFactor(); } -void wkeSetEditable(wkeWebView webView, bool editable) +void wkeSetEditable(wkeWebView* webView, bool editable) { webView->setEditable(editable); } -WKE_API void wkeSetClientHandler(wkeWebView webView, const wkeClientHandler* handler) +void wkeOnTitleChanged(wkeWebView* webView, wkeTitleChangedCallback callback, void* callbackParam) +{ + webView->onTitleChanged(callback, callbackParam); +} + +void wkeOnURLChanged(wkeWebView* webView, wkeURLChangedCallback callback, void* callbackParam) +{ + webView->onURLChanged(callback, callbackParam); +} + +void wkeOnPaintUpdated(wkeWebView* webView, wkePaintUpdatedCallback callback, void* callbackParam) +{ + webView->onPaintUpdated(callback, callbackParam); +} + +void wkeOnAlertBox(wkeWebView* webView, wkeAlertBoxCallback callback, void* callbackParam) +{ + webView->onAlertBox(callback, callbackParam); +} + +void wkeOnConfirmBox(wkeWebView* webView, wkeConfirmBoxCallback callback, void* callbackParam) +{ + webView->onConfirmBox(callback, callbackParam); +} + +void wkeOnPromptBox(wkeWebView* webView, wkePromptBoxCallback callback, void* callbackParam) +{ + webView->onPromptBox(callback, callbackParam); +} + +void wkeOnNavigation(wkeWebView* webView, wkeNavigationCallback callback, void* param) +{ + webView->onNavigation(callback, param); +} + +void wkeOnCreateView(wkeWebView* webView, wkeCreateViewCallback callback, void* param) +{ + webView->onCreateView(callback, param); +} + +void wkeOnDocumentReady(wkeWebView* webView, wkeDocumentReadyCallback callback, void* param) +{ + webView->onDocumentReady(callback, param); +} + +void wkeOnLoadingFinish(wkeWebView* webView, wkeLoadingFinishCallback callback, void* param) { - webView->setClientHandler(handler); + webView->onLoadingFinish(callback, param); } -WKE_API const wkeClientHandler* wkeGetClientHandler(wkeWebView webView) +void wkeOnConsoleMessage(wkeWebView* webView, wkeConsoleMessageCallback callback, void* callbackParam) { - return webView->getClientHandler(); + webView->onConsoleMessage(callback, callbackParam); } -WKE_API const utf8* wkeToString(const wkeString string) +const utf8* wkeGetString(const wkeString* s) { - const String* str = (const String*)string; - return StringTable::addString(str->characters(), str->length()); + return s ? s->string() : ""; } -WKE_API const wchar_t* wkeToStringW(const wkeString string) +const wchar_t* wkeGetStringW(const wkeString* string) { - const String* str = (const String*)string; - return StringTableW::addString(str->characters(), str->length()); + return string ? string->stringW() : L""; } +void wkeSetString(wkeString* string, const utf8* str, size_t len) +{ + if (!string) + return; + + if (str == NULL) + { + str = ""; + len = 0; + } + else + { + if (len == 0) + len = strlen(str); + } + + string->assign(str, len); +} + +void wkeSetStringW(wkeString* string, const wchar_t* str, size_t len) +{ + if (!string) + return; + + if (str == NULL) + { + str = L""; + len = 0; + } + else + { + if (len == 0) + len = wcslen(str); + } + + string->assign(str, len); +} @@ -461,4 +658,185 @@ STDAPI_(BOOL) DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID /*lpRe CoreFoundationDllMain(hModule, ul_reason_for_call, 0); return ret; -} \ No newline at end of file +} + + +static Vector s_webViews; + +wkeWebView* wkeCreateWebWindow(wkeWindowType type, void* parent, int x, int y, int width, int height) +{ + wke::CWebWindow* webWindow = new wke::CWebWindow(); + if (!webWindow->create((HWND)parent, type, x, y, width, height)) + { + delete webWindow; + return NULL; + } + s_webViews.append(webWindow); + + return webWindow; +} + +void wkeDestroyWebWindow(wkeWebView* webWindow) +{ + webWindow->destroy(); +} + + +void* wkeGetWindowHandle(wkeWebView* webWindow) +{ + if (wke::CWebWindow* window = dynamic_cast(webWindow)) + return window->windowHandle(); + else + return NULL; +} + +void wkeOnWindowClosing(wkeWebView* webWindow, wkeWindowClosingCallback callback, void* param) +{ + if (wke::CWebWindow* window = dynamic_cast(webWindow)) + return window->onClosing(callback, param); +} + +void wkeOnWindowDestroy(wkeWebView* webWindow, wkeWindowDestroyCallback callback, void* param) +{ + if (wke::CWebWindow* window = dynamic_cast(webWindow)) + return window->onDestroy(callback, param); +} + +void wkeShowWindow(wkeWebView* webWindow, bool showFlag) +{ + if (wke::CWebWindow* window = dynamic_cast(webWindow)) + return window->show(showFlag); +} + +void wkeEnableWindow(wkeWebView* webWindow, bool enableFlag) +{ + if (wke::CWebWindow* window = dynamic_cast(webWindow)) + return window->enable(enableFlag); +} + +void wkeMoveWindow(wkeWebView* webWindow, int x, int y, int width, int height) +{ + if (wke::CWebWindow* window = dynamic_cast(webWindow)) + return window->move(x, y, width, height); +} + +void wkeMoveToCenter(wkeWebView* webWindow) +{ + if (wke::CWebWindow* window = dynamic_cast(webWindow)) + return window->moveToCenter(); +} + +void wkeResizeWindow(wkeWebView* webWindow, int width, int height) +{ + if (wke::CWebWindow* window = dynamic_cast(webWindow)) + return window->resize(width, height); +} + +void wkeSetWindowTitle(wkeWebView* webWindow, const utf8* title) +{ + if (wke::CWebWindow* window = dynamic_cast(webWindow)) + return window->setTitle(title); +} + +void wkeSetWindowTitleW(wkeWebView* webWindow, const wchar_t* title) +{ + if (wke::CWebWindow* window = dynamic_cast(webWindow)) + return window->setTitle(title); +} + +void wkeSetHostWindow(wkeWebView* webView, void* host) +{ + webView->setHostWindow((HWND)host); +} + +void* wkeGetHostWindow(wkeWebView* webView) +{ + return webView->hostWindow(); +} + +void wkeSetRepaintInterval(wkeWebView* webView, int ms) +{ + webView->setRepaintInterval(ms); +} + +int wkeGetRepaintInterval(wkeWebView* webView) +{ + return webView->repaintInterval(); +} + +bool wkeRepaintIfNeededAfterInterval(wkeWebView* webView) +{ + return webView->repaintIfNeededAfterInterval(); +} + + +wkeWebView* wkeCreateWebView() +{ + wke::CWebView* webView = new wke::CWebView; + s_webViews.append(webView); + return webView; +} + +wkeWebView* wkeGetWebView(const char* name) +{ + for (size_t i = 0; i < s_webViews.size(); ++i) + { + if (strcmp(s_webViews[i]->name(), name) == 0) + return s_webViews[i]; + } + + return 0; +} + +void wkeDestroyWebView(wkeWebView* webView) +{ + size_t pos = s_webViews.find(webView); + + ASSERT(pos != notFound); + if (pos != notFound) + { + s_webViews.remove(pos); + delete webView; + } +} + +bool wkeRepaintAllNeeded() +{ + bool atLeastOneRepainted = false; + for (size_t i = 0; i < s_webViews.size(); ++i) + { + if (s_webViews[i]->repaintIfNeededAfterInterval()) + atLeastOneRepainted = true; + } + + return atLeastOneRepainted; +} + +int wkeRunMessageLoop(const bool *quit) +{ + MSG msg = { 0 }; + while (true) + { + if (quit && *quit) + return 0; + + //DWORD processStart = timeGetTime(); + if (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + + if (msg.message == WM_QUIT) + return (int)msg.wParam; + } + + wkeRepaintAllNeeded(); + + //DWORD processTime = timeGetTime() - processStart; + //if (processTime < 5) + // Sleep(5 - processTime); + Sleep(1); + } + + return 0; +} diff --git a/wke/wke.h b/wke/wke.h index 8a2f6c0f..b96edbe0 100644 --- a/wke/wke.h +++ b/wke/wke.h @@ -11,37 +11,59 @@ #define WKE_H -#ifdef BUILDING_wke -# define WKE_API __declspec(dllexport) +////////////////////////////////////////////////////////////////////////// + + +#if defined(__cplusplus) + #define WKE_EXTERN_C extern "C" #else -# define WKE_API __declspec(dllimport) + #define WKE_EXTERN_C +#endif + + +#if defined(BUILDING_wke) +# define WKE_SYMBOL __declspec(dllexport) +#else +# define WKE_SYMBOL __declspec(dllimport) #endif -typedef char utf8; -typedef struct { +#define WKE_CALL _cdecl +#define WKE_API WKE_EXTERN_C WKE_SYMBOL + + + + +typedef struct +{ int x; int y; int w; int h; + } wkeRect; -enum wkeMouseFlags + +typedef enum { WKE_LBUTTON = 0x01, WKE_RBUTTON = 0x02, WKE_SHIFT = 0x04, WKE_CONTROL = 0x08, WKE_MBUTTON = 0x10, -}; -enum wkeKeyFlags +} wkeMouseFlags; + + +typedef enum { WKE_EXTENDED = 0x0100, WKE_REPEAT = 0x4000, -}; -enum wkeMouseMsg +} wkeKeyFlags; + + +typedef enum { WKE_MSG_MOUSEMOVE = 0x0200, WKE_MSG_LBUTTONDOWN = 0x0201, @@ -54,260 +76,388 @@ enum wkeMouseMsg WKE_MSG_MBUTTONUP = 0x0208, WKE_MSG_MBUTTONDBLCLK = 0x0209, WKE_MSG_MOUSEWHEEL = 0x020A, + +} wkeMouseMsg; + + + +#if !defined(__cplusplus) + #ifndef HAVE_WCHAR_T + typedef unsigned short wchar_t; + #endif + + #ifndef HAVE_BOOL + typedef unsigned char bool; + #define true 1 + #define false 0 + #endif +#endif + + +typedef char utf8; +typedef struct __wkeJSState wkeJSState; +typedef __int64 wkeJSValue; + + +#if defined(__cplusplus) + namespace wke{ class CWebView; }; + typedef wke::CWebView wkeWebView; + + namespace wke{ class CString; }; + typedef wke::CString wkeString; + +#else + typedef struct __wkeWebView wkeWebView; + typedef struct __wkeString wkeString; +#endif + + + +typedef enum +{ + WKE_PROXY_NONE, + WKE_PROXY_HTTP, + WKE_PROXY_SOCKS4, + WKE_PROXY_SOCKS4A, + WKE_PROXY_SOCKS5, + WKE_PROXY_SOCKS5HOSTNAME + +} wkeProxyType; + +typedef struct +{ + wkeProxyType type; + char hostname[100]; + unsigned short port; + char username[50]; + char password[50]; + +} wkeProxy; + +enum wkeSettingMask +{ + WKE_SETTING_PROXY = 1, + WKE_SETTING_COOKIE_FILE_PATH = 1<<1 }; -typedef void* jsExecState; -typedef __int64 jsValue; +typedef struct +{ + wkeProxy proxy; + char cookieFilePath[1024]; + unsigned int mask; -typedef void* wkeString; -typedef void (*ON_TITLE_CHANGED) (const struct _wkeClientHandler* clientHandler, const wkeString title); -typedef void (*ON_URL_CHANGED) (const struct _wkeClientHandler* clientHandler, const wkeString url); +} wkeSettings; -typedef struct _wkeClientHandler { - ON_TITLE_CHANGED onTitleChanged; - ON_URL_CHANGED onURLChanged; -} wkeClientHandler; /* - *c++ interface - *----------------------------------------------------------------------------------------------------------- + *c interface + *---------------------------------------------------------------------------------------------------------- * */ -#ifdef __cplusplus - -namespace wke +#if defined(__cplusplus) +extern "C" { - class IWebView - { - public: - virtual void destroy() = 0; +#endif - virtual const char* name() const = 0; - virtual void setName(const char* name) = 0; +WKE_API void WKE_CALL wkeInitialize(); +WKE_API void WKE_CALL wkeInitializeEx(const wkeSettings* settings); +WKE_API void WKE_CALL wkeConfigure(const wkeSettings* settings); + +WKE_API void WKE_CALL wkeFinalize(); +WKE_API void WKE_CALL wkeUpdate(); +WKE_API unsigned int WKE_CALL wkeGetVersion(); +WKE_API const utf8* WKE_CALL wkeGetVersionString(); + +typedef void* (WKE_CALL *FILE_OPEN) (const char* path); +typedef void (WKE_CALL *FILE_CLOSE) (void* handle); +typedef size_t (WKE_CALL *FILE_SIZE) (void* handle); +typedef int (WKE_CALL *FILE_READ) (void* handle, void* buffer, size_t size); +typedef int (WKE_CALL *FILE_SEEK) (void* handle, int offset, int origin); +WKE_API void WKE_CALL wkeSetFileSystem(FILE_OPEN pfn_open, FILE_CLOSE pfn_close, FILE_SIZE pfn_size, FILE_READ pfn_read, FILE_SEEK pfn_seek); + + +WKE_API wkeWebView* WKE_CALL wkeCreateWebView(); +WKE_API wkeWebView* WKE_CALL wkeGetWebView(const char* name); +WKE_API void WKE_CALL wkeDestroyWebView(wkeWebView* webView); - virtual bool transparent() const = 0; - virtual void setTransparent(bool transparent) = 0; +WKE_API const char* WKE_CALL wkeGetName(wkeWebView* webView); +WKE_API void WKE_CALL wkeSetName(wkeWebView* webView, const char* name); - virtual void loadURL(const utf8* url) = 0; - virtual void loadURL(const wchar_t* url) = 0; +WKE_API bool WKE_CALL wkeIsTransparent(wkeWebView* webView); +WKE_API void WKE_CALL wkeSetTransparent(wkeWebView* webView, bool transparent); - virtual void loadHTML(const utf8* html) = 0; - virtual void loadHTML(const wchar_t* html) = 0; +WKE_API void WKE_CALL wkeSetUserAgent(wkeWebView* webView, const utf8* userAgent); +WKE_API void WKE_CALL wkeSetUserAgentW(wkeWebView* webView, const wchar_t* userAgent); - virtual void loadFile(const utf8* filename) = 0; - virtual void loadFile(const wchar_t* filename) = 0; +WKE_API void WKE_CALL wkeLoadURL(wkeWebView* webView, const utf8* url); +WKE_API void WKE_CALL wkeLoadURLW(wkeWebView* webView, const wchar_t* url); +WKE_API void WKE_CALL wkePostURL(wkeWebView* wkeView,const utf8* url, const char* postData,int postLen); +WKE_API void WKE_CALL wkePostURLW(wkeWebView* wkeView,const wchar_t* url, const char* postData, int postLen); - virtual bool isLoaded() const = 0; /*document load sucessed*/ - virtual bool isLoadFailed() const = 0; /*document load failed*/ - virtual bool isLoadComplete() const = 0; /*document load complete*/ - virtual bool isDocumentReady() const = 0; /*document ready*/ - virtual void stopLoading() = 0; - virtual void reload() = 0; +WKE_API void WKE_CALL wkeLoadHTML(wkeWebView* webView, const utf8* html); +WKE_API void WKE_CALL wkeLoadHTMLW(wkeWebView* webView, const wchar_t* html); - virtual const utf8* title() = 0; - virtual const wchar_t* titleW() = 0; +WKE_API void WKE_CALL wkeLoadFile(wkeWebView* webView, const utf8* filename); +WKE_API void WKE_CALL wkeLoadFileW(wkeWebView* webView, const wchar_t* filename); - virtual void resize(int w, int h) = 0; - virtual int width() const = 0; /*viewport width*/ - virtual int height() const = 0; /*viewport height*/ +WKE_API void WKE_CALL wkeLoad(wkeWebView* webView, const utf8* str); +WKE_API void WKE_CALL wkeLoadW(wkeWebView* webView, const wchar_t* str); - virtual int contentsWidth() const = 0; /*contents width*/ - virtual int contentsHeight() const = 0; /*contents height*/ +WKE_API bool WKE_CALL wkeIsLoading(wkeWebView* webView); +WKE_API bool WKE_CALL wkeIsLoadingSucceeded(wkeWebView* webView); +WKE_API bool WKE_CALL wkeIsLoadingFailed(wkeWebView* webView); +WKE_API bool WKE_CALL wkeIsLoadingCompleted(wkeWebView* webView); +WKE_API bool WKE_CALL wkeIsDocumentReady(wkeWebView* webView); +WKE_API void WKE_CALL wkeStopLoading(wkeWebView* webView); +WKE_API void WKE_CALL wkeReload(wkeWebView* webView); - virtual void setDirty(bool dirty) = 0; - virtual bool isDirty() const = 0; - virtual void addDirtyArea(int x, int y, int w, int h) = 0; +WKE_API const utf8* WKE_CALL wkeGetTitle(wkeWebView* webView); +WKE_API const wchar_t* WKE_CALL wkeGetTitleW(wkeWebView* webView); - virtual void layoutIfNeeded() = 0; - virtual void paint(void* bits, int pitch) = 0; +WKE_API void WKE_CALL wkeResize(wkeWebView* webView, int w, int h); +WKE_API int WKE_CALL wkeGetWidth(wkeWebView* webView); +WKE_API int WKE_CALL wkeGetHeight(wkeWebView* webView); +WKE_API int WKE_CALL wkeGetContentWidth(wkeWebView* webView); +WKE_API int WKE_CALL wkeGetContentHeight(wkeWebView* webView); - virtual bool canGoBack() const = 0; - virtual bool goBack() = 0; - virtual bool canGoForward() const = 0; - virtual bool goForward() = 0; +WKE_API void WKE_CALL wkeSetDirty(wkeWebView* webView, bool dirty); +WKE_API bool WKE_CALL wkeIsDirty(wkeWebView* webView); +WKE_API void WKE_CALL wkeAddDirtyArea(wkeWebView* webView, int x, int y, int w, int h); +WKE_API void WKE_CALL wkeLayoutIfNeeded(wkeWebView* webView); +WKE_API void WKE_CALL wkePaint(wkeWebView* webView, void* bits,int bufWid, int bufHei, int xDst, int yDst, int w, int h, int xSrc, int ySrc, bool bCopyAlpha); +WKE_API void WKE_CALL wkePaint2(wkeWebView* webView, void* bits,int pitch); +WKE_API bool WKE_CALL wkeRepaintIfNeeded(wkeWebView* webView); +WKE_API void* WKE_CALL wkeGetViewDC(wkeWebView* webView); - virtual void selectAll() = 0; - virtual void copy() = 0; - virtual void cut() = 0; - virtual void paste() = 0; - virtual void delete_() = 0; +WKE_API void WKE_CALL wkeSetRepaintInterval(wkeWebView* webView, int ms); +WKE_API int WKE_CALL wkeGetRepaintInterval(wkeWebView* webView); +WKE_API bool WKE_CALL wkeRepaintIfNeededAfterInterval(wkeWebView* webView); +WKE_API bool WKE_CALL wkeRepaintAllNeeded(); +WKE_API int WKE_CALL wkeRunMessageLoop(const bool *quit); - virtual void setCookieEnabled(bool enable) = 0; - virtual bool cookieEnabled() const = 0; +WKE_API bool WKE_CALL wkeCanGoBack(wkeWebView* webView); +WKE_API bool WKE_CALL wkeGoBack(wkeWebView* webView); +WKE_API bool WKE_CALL wkeCanGoForward(wkeWebView* webView); +WKE_API bool WKE_CALL wkeGoForward(wkeWebView* webView); - virtual void setMediaVolume(float volume) = 0; - virtual float mediaVolume() const = 0; +WKE_API void WKE_CALL wkeEditorSelectAll(wkeWebView* webView); +WKE_API void WKE_CALL wkeEditorCopy(wkeWebView* webView); +WKE_API void WKE_CALL wkeEditorCut(wkeWebView* webView); +WKE_API void WKE_CALL wkeEditorPaste(wkeWebView* webView); +WKE_API void WKE_CALL wkeEditorDelete(wkeWebView* webView); - virtual bool mouseEvent(unsigned int message, int x, int y, unsigned int flags) = 0; - virtual bool contextMenuEvent(int x, int y, unsigned int flags) = 0; - virtual bool mouseWheel(int x, int y, int delta, unsigned int flags) = 0; - virtual bool keyUp(unsigned int virtualKeyCode, unsigned int flags, bool systemKey) = 0; - virtual bool keyDown(unsigned int virtualKeyCode, unsigned int flags, bool systemKey) = 0; - virtual bool keyPress(unsigned int virtualKeyCode, unsigned int flags, bool systemKey) = 0; +WKE_API const wchar_t* WKE_CALL wkeGetCookieW(wkeWebView* webView); +WKE_API const utf8* WKE_CALL wkeGetCookie(wkeWebView* webView); +WKE_API void WKE_CALL wkeSetCookieEnabled(wkeWebView* webView, bool enable); +WKE_API bool WKE_CALL wkeIsCookieEnabled(wkeWebView* webView); - virtual void focus() = 0; - virtual void unfocus() = 0; +WKE_API void WKE_CALL wkeSetMediaVolume(wkeWebView* webView, float volume); +WKE_API float WKE_CALL wkeGetMediaVolume(wkeWebView* webView); - virtual wkeRect getCaret() = 0; +WKE_API bool WKE_CALL wkeFireMouseEvent(wkeWebView* webView, unsigned int message, int x, int y, unsigned int flags); +WKE_API bool WKE_CALL wkeFireContextMenuEvent(wkeWebView* webView, int x, int y, unsigned int flags); +WKE_API bool WKE_CALL wkeFireMouseWheelEvent(wkeWebView* webView, int x, int y, int delta, unsigned int flags); +WKE_API bool WKE_CALL wkeFireKeyUpEvent(wkeWebView* webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey); +WKE_API bool WKE_CALL wkeFireKeyDownEvent(wkeWebView* webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey); +WKE_API bool WKE_CALL wkeFireKeyPressEvent(wkeWebView* webView, unsigned int charCode, unsigned int flags, bool systemKey); - virtual jsValue runJS(const utf8* script) = 0; - virtual jsValue runJS(const wchar_t* script) = 0; - virtual jsExecState globalExec() = 0; +WKE_API void WKE_CALL wkeSetFocus(wkeWebView* webView); +WKE_API void WKE_CALL wkeKillFocus(wkeWebView* webView); - virtual void sleep() = 0; //moveOffscreen - virtual void awaken() = 0; //moveOnscreen - virtual bool isAwake() const = 0; +WKE_API wkeRect WKE_CALL wkeGetCaretRect(wkeWebView* webView); - virtual void setZoomFactor(float factor) = 0; - virtual float zoomFactor() const = 0; +WKE_API wkeJSValue WKE_CALL wkeRunJS(wkeWebView* webView, const utf8* script); +WKE_API wkeJSValue WKE_CALL wkeRunJSW(wkeWebView* webView, const wchar_t* script); - virtual void setEditable(bool editable) = 0; +WKE_API wkeJSState* WKE_CALL wkeGlobalExec(wkeWebView* webView); - virtual void setClientHandler(const wkeClientHandler* handler) = 0; - virtual const wkeClientHandler* getClientHandler() const = 0; - }; -} +WKE_API void WKE_CALL wkeSleep(wkeWebView* webView); +WKE_API void WKE_CALL wkeWake(wkeWebView* webView); +WKE_API bool WKE_CALL wkeIsAwake(wkeWebView* webView); -typedef wke::IWebView* wkeWebView; +WKE_API void WKE_CALL wkeSetZoomFactor(wkeWebView* webView, float factor); +WKE_API float WKE_CALL wkeGetZoomFactor(wkeWebView* webView); -#else +WKE_API void WKE_CALL wkeSetEditable(wkeWebView* webView, bool editable); -typedef void* wkeWebView; +WKE_API void WKE_CALL wkeSetHostWindow(wkeWebView* webWindow, void* hostWindow); +WKE_API void* WKE_CALL wkeGetHostWindow(wkeWebView* webWindow); -#ifndef HAVE_WCHAR_T -typedef unsigned short wchar_t; -#endif -#ifndef HAVE_BOOL -typedef unsigned char bool; -#define true 1 -#define false 0 -#endif +WKE_API const utf8* WKE_CALL wkeGetString(const wkeString* string); +WKE_API const wchar_t* WKE_CALL wkeGetStringW(const wkeString* string); -#endif /*__cplusplus*/ +WKE_API void WKE_CALL wkeSetString(wkeString* string, const utf8* str, size_t len); +WKE_API void WKE_CALL wkeSetStringW(wkeString* string, const wchar_t* str, size_t len); -/* - *c interface - *---------------------------------------------------------------------------------------------------------- - * - */ +typedef void (WKE_CALL *wkeTitleChangedCallback)(wkeWebView* webView, void* param, const wkeString* title); +WKE_API void WKE_CALL wkeOnTitleChanged(wkeWebView* webView, wkeTitleChangedCallback callback, void* callbackParam); -#ifdef __cplusplus -extern "C" +typedef void (WKE_CALL *wkeURLChangedCallback)(wkeWebView* webView, void* param, const wkeString* url); +WKE_API void WKE_CALL wkeOnURLChanged(wkeWebView* webView, wkeURLChangedCallback callback, void* callbackParam); + +typedef void (WKE_CALL *wkePaintUpdatedCallback)(wkeWebView* webView, void* param, const void* hdc, int x, int y, int cx, int cy); +WKE_API void WKE_CALL wkeOnPaintUpdated(wkeWebView* webView, wkePaintUpdatedCallback callback, void* callbackParam); + +typedef void (WKE_CALL *wkeAlertBoxCallback)(wkeWebView* webView, void* param, const wkeString* msg); +WKE_API void WKE_CALL wkeOnAlertBox(wkeWebView* webView, wkeAlertBoxCallback callback, void* callbackParam); + +typedef bool (WKE_CALL *wkeConfirmBoxCallback)(wkeWebView* webView, void* param, const wkeString* msg); +WKE_API void WKE_CALL wkeOnConfirmBox(wkeWebView* webView, wkeConfirmBoxCallback callback, void* callbackParam); + +typedef bool (WKE_CALL *wkePromptBoxCallback)(wkeWebView* webView, void* param, const wkeString* msg, const wkeString* defaultResult, wkeString* result); +WKE_API void WKE_CALL wkeOnPromptBox(wkeWebView* webView, wkePromptBoxCallback callback, void* callbackParam); + + +typedef enum { -#endif + WKE_MESSAGE_SOURCE_HTML, + WKE_MESSAGE_SOURCE_XML, + WKE_MESSAGE_SOURCE_JS, + WKE_MESSAGE_SOURCE_NETWORK, + WKE_MESSAGE_SOURCE_CONSOLE_API, + WKE_MESSAGE_SOURCE_OTHER -WKE_API void wkeInit(); -WKE_API void wkeShutdown(); -WKE_API void wkeUpdate(); -WKE_API unsigned int wkeVersion(); -WKE_API const utf8* wkeVersionString(); +} wkeMessageSource; -typedef void* (*FILE_OPEN) (const char* path); -typedef void (*FILE_CLOSE) (void* handle); -typedef size_t (*FILE_SIZE) (void* handle); -typedef int (*FILE_READ) (void* handle, void* buffer, size_t size); -typedef int (*FILE_SEEK) (void* handle, int offset, int origin); +typedef enum +{ + WKE_MESSAGE_TYPE_LOG, + WKE_MESSAGE_TYPE_DIR, + WKE_MESSAGE_TYPE_DIR_XML, + WKE_MESSAGE_TYPE_TRACE, + WKE_MESSAGE_TYPE_START_GROUP, + WKE_MESSAGE_TYPE_START_GROUP_COLLAPSED, + WKE_MESSAGE_TYPE_END_GROUP, + WKE_MESSAGE_TYPE_ASSERT + +} wkeMessageType; + +typedef enum +{ + WKE_MESSAGE_LEVEL_TIP, + WKE_MESSAGE_LEVEL_LOG, + WKE_MESSAGE_LEVEL_WARNING, + WKE_MESSAGE_LEVEL_ERROR, + WKE_MESSAGE_LEVEL_DEBUG + +} wkeMessageLevel; + +typedef struct +{ + wkeMessageSource source; + wkeMessageType type; + wkeMessageLevel level; + wkeString* message; + wkeString* url; + unsigned int lineNumber; + +} wkeConsoleMessage; + +typedef void (WKE_CALL *wkeConsoleMessageCallback)(wkeWebView* webView, void* param, const wkeConsoleMessage* message); +WKE_API void WKE_CALL wkeOnConsoleMessage(wkeWebView* webView, wkeConsoleMessageCallback callback, void* callbackParam); + + + +typedef enum +{ + WKE_NAVIGATION_TYPE_LINKCLICK, + WKE_NAVIGATION_TYPE_FORMSUBMITTE, + WKE_NAVIGATION_TYPE_BACKFORWARD, + WKE_NAVIGATION_TYPE_RELOAD, + WKE_NAVIGATION_TYPE_FORMRESUBMITT, + WKE_NAVIGATION_TYPE_OTHER -WKE_API void wkeSetFileSystem(FILE_OPEN pfn_open, FILE_CLOSE pfn_close, FILE_SIZE pfn_size, FILE_READ pfn_read, FILE_SEEK pfn_seek); +} wkeNavigationType; +typedef bool (WKE_CALL *wkeNavigationCallback)(wkeWebView* webView, void* param, wkeNavigationType navigationType, const wkeString* url); +WKE_API void WKE_CALL wkeOnNavigation(wkeWebView* webView, wkeNavigationCallback callback, void* param); -WKE_API wkeWebView wkeCreateWebView(); -WKE_API wkeWebView wkeGetWebView(const char* name); -WKE_API void wkeDestroyWebView(wkeWebView webView); -WKE_API const char* wkeWebViewName(wkeWebView webView); -WKE_API void wkeSetWebViewName(wkeWebView webView, const char* name); +typedef struct +{ + wkeNavigationType navigationType; + wkeString* url; + wkeString* target; + + int x; + int y; + int width; + int height; -WKE_API bool wkeIsTransparent(wkeWebView webView); -WKE_API void wkeSetTransparent(wkeWebView webView, bool transparent); + bool menuBarVisible; + bool statusBarVisible; + bool toolBarVisible; + bool locationBarVisible; + bool scrollbarsVisible; + bool resizable; + bool fullscreen; -WKE_API void wkeLoadURL(wkeWebView webView, const utf8* url); -WKE_API void wkeLoadURLW(wkeWebView webView, const wchar_t* url); +} wkeNewViewInfo; -WKE_API void wkeLoadHTML(wkeWebView webView, const utf8* html); -WKE_API void wkeLoadHTMLW(wkeWebView webView, const wchar_t* html); -WKE_API void wkeLoadFile(wkeWebView webView, const utf8* filename); -WKE_API void wkeLoadFileW(wkeWebView webView, const wchar_t* filename); +typedef wkeWebView* (WKE_CALL *wkeCreateViewCallback)(wkeWebView* webView, void* param, const wkeNewViewInfo* info); +WKE_API void WKE_CALL wkeOnCreateView(wkeWebView* webView, wkeCreateViewCallback callback, void* param); -WKE_API bool wkeIsLoaded(wkeWebView webView); -WKE_API bool wkeIsLoadFailed(wkeWebView webView); -WKE_API bool wkeIsLoadComplete(wkeWebView webView); -WKE_API bool wkeIsDocumentReady(wkeWebView webView); -WKE_API bool wkeIsLoading(wkeWebView webView); -WKE_API void wkeStopLoading(wkeWebView webView); -WKE_API void wkeReload(wkeWebView webView); -WKE_API const utf8* wkeTitle(wkeWebView webView); -WKE_API const wchar_t* wkeTitleW(wkeWebView webView); +typedef struct +{ + wkeString* url; + wkeJSState* frameJSState; + wkeJSState* mainFrameJSState; -WKE_API void wkeResize(wkeWebView webView, int w, int h); -WKE_API int wkeWidth(wkeWebView webView); -WKE_API int wkeHeight(wkeWebView webView); +} wkeDocumentReadyInfo; -WKE_API int wkeContentsWidth(wkeWebView webView); -WKE_API int wkeContentsHeight(wkeWebView webView); +typedef void (WKE_CALL *wkeDocumentReadyCallback)(wkeWebView* webView, void* param, const wkeDocumentReadyInfo* info); +WKE_API void WKE_CALL wkeOnDocumentReady(wkeWebView* webView, wkeDocumentReadyCallback callback, void* param); -WKE_API void wkeSetDirty(wkeWebView webView, bool dirty); -WKE_API bool wkeIsDirty(wkeWebView webView); -WKE_API void wkeAddDirtyArea(wkeWebView webView, int x, int y, int w, int h); -WKE_API void wkeLayoutIfNeeded(wkeWebView webView); -WKE_API void wkePaint(wkeWebView webView, void* bits, int pitch); -WKE_API bool wkeCanGoBack(wkeWebView webView); -WKE_API bool wkeGoBack(wkeWebView webView); -WKE_API bool wkeCanGoForward(wkeWebView webView); -WKE_API bool wkeGoForward(wkeWebView webView); +typedef enum +{ + WKE_LOADING_SUCCEEDED, + WKE_LOADING_FAILED, + WKE_LOADING_CANCELED -WKE_API void wkeSelectAll(wkeWebView webView); -WKE_API void wkeCopy(wkeWebView webView); -WKE_API void wkeCut(wkeWebView webView); -WKE_API void wkePaste(wkeWebView webView); -WKE_API void wkeDelete(wkeWebView webView); +} wkeLoadingResult; -WKE_API void wkeSetCookieEnabled(wkeWebView webView, bool enable); -WKE_API bool wkeCookieEnabled(wkeWebView webView); +typedef void (WKE_CALL *wkeLoadingFinishCallback)(wkeWebView* webView, void* param, const wkeString* url, wkeLoadingResult result, const wkeString* failedReason); +WKE_API void WKE_CALL wkeOnLoadingFinish(wkeWebView* webView, wkeLoadingFinishCallback callback, void* param); -WKE_API void wkeSetMediaVolume(wkeWebView webView, float volume); -WKE_API float wkeMediaVolume(wkeWebView webView); -WKE_API bool wkeMouseEvent(wkeWebView webView, unsigned int message, int x, int y, unsigned int flags); -WKE_API bool wkeContextMenuEvent(wkeWebView webView, int x, int y, unsigned int flags); -WKE_API bool wkeMouseWheel(wkeWebView webView, int x, int y, int delta, unsigned int flags); -WKE_API bool wkeKeyUp(wkeWebView webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey); -WKE_API bool wkeKeyDown(wkeWebView webView, unsigned int virtualKeyCode, unsigned int flags, bool systemKey); -WKE_API bool wkeKeyPress(wkeWebView webView, unsigned int charCode, unsigned int flags, bool systemKey); +typedef enum +{ + WKE_WINDOW_TYPE_POPUP, + WKE_WINDOW_TYPE_TRANSPARENT, + WKE_WINDOW_TYPE_CONTROL -WKE_API void wkeFocus(wkeWebView webView); -WKE_API void wkeUnfocus(wkeWebView webView); +} wkeWindowType; -WKE_API wkeRect wkeGetCaret(wkeWebView webView); +WKE_API wkeWebView* WKE_CALL wkeCreateWebWindow(wkeWindowType type, void* parent, int x, int y, int width, int height); +WKE_API void WKE_CALL wkeDestroyWebWindow(wkeWebView* webWindow); +WKE_API void* WKE_CALL wkeGetWindowHandle(wkeWebView* webWindow); -WKE_API jsValue wkeRunJS(wkeWebView webView, const utf8* script); -WKE_API jsValue wkeRunJSW(wkeWebView webView, const wchar_t* script); +typedef bool (WKE_CALL *wkeWindowClosingCallback)(wkeWebView* webWindow, void* param); +WKE_API void WKE_CALL wkeOnWindowClosing(wkeWebView* webWindow, wkeWindowClosingCallback callback, void* param); -WKE_API jsExecState wkeGlobalExec(wkeWebView webView); +typedef void (WKE_CALL *wkeWindowDestroyCallback)(wkeWebView* webWindow, void* param); +WKE_API void WKE_CALL wkeOnWindowDestroy(wkeWebView* webWindow, wkeWindowDestroyCallback callback, void* param); -WKE_API void wkeSleep(wkeWebView webView); -WKE_API void wkeAwaken(wkeWebView webView); -WKE_API bool wkeIsAwake(wkeWebView webView); -WKE_API void wkeSetZoomFactor(wkeWebView webView, float factor); -WKE_API float wkeZoomFactor(wkeWebView webView); +WKE_API void WKE_CALL wkeShowWindow(wkeWebView* webWindow, bool show); +WKE_API void WKE_CALL wkeEnableWindow(wkeWebView* webWindow, bool enable); -WKE_API void wkeSetEditable(wkeWebView webView, bool editable); +WKE_API void WKE_CALL wkeMoveWindow(wkeWebView* webWindow, int x, int y, int width, int height); +WKE_API void WKE_CALL wkeMoveToCenter(wkeWebView* webWindow); +WKE_API void WKE_CALL wkeResizeWindow(wkeWebView* webWindow, int width, int height); -WKE_API void wkeSetClientHandler(wkeWebView webView, const wkeClientHandler* handler); -WKE_API const wkeClientHandler* wkeGetClientHandler(wkeWebView webView); +WKE_API void WKE_CALL wkeSetWindowTitle(wkeWebView* webWindow, const utf8* title); +WKE_API void WKE_CALL wkeSetWindowTitleW(wkeWebView* webWindow, const wchar_t* title); -WKE_API const utf8* wkeToString(const wkeString string); -WKE_API const wchar_t* wkeToStringW(const wkeString string); /***JavaScript Bind***/ #define JS_CALL __fastcall -typedef jsValue (JS_CALL *jsNativeFunction) (jsExecState es); +typedef wkeJSValue (JS_CALL *wkeJSNativeFunction) (wkeJSState* es); typedef enum { @@ -317,80 +467,107 @@ typedef enum JSTYPE_OBJECT, JSTYPE_FUNCTION, JSTYPE_UNDEFINED, -} jsType; - -WKE_API void jsBindFunction(const char* name, jsNativeFunction fn, unsigned int argCount); -WKE_API void jsBindGetter(const char* name, jsNativeFunction fn); /*get property*/ -WKE_API void jsBindSetter(const char* name, jsNativeFunction fn); /*set property*/ - -WKE_API int jsArgCount(jsExecState es); -WKE_API jsType jsArgType(jsExecState es, int argIdx); -WKE_API jsValue jsArg(jsExecState es, int argIdx); +} wkeJSType; + + +WKE_API void WKE_CALL wkeJSBindFunction(const char* name, wkeJSNativeFunction fn, unsigned int argCount); +WKE_API void WKE_CALL wkeJSBindGetter(const char* name, wkeJSNativeFunction fn); /*get property*/ +WKE_API void WKE_CALL wkeJSBindSetter(const char* name, wkeJSNativeFunction fn); /*set property*/ + +WKE_API int WKE_CALL wkeJSParamCount(wkeJSState* es); +WKE_API wkeJSType WKE_CALL wkeJSParamType(wkeJSState* es, int index); +WKE_API wkeJSValue WKE_CALL wkeJSParam(wkeJSState* es, int index); + +WKE_API wkeJSType WKE_CALL wkeJSTypeOf(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsNumber(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsString(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsBool(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsObject(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsFunction(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsUndefined(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsNull(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsArray(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsTrue(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSIsFalse(wkeJSState* es, wkeJSValue v); + +WKE_API int WKE_CALL wkeJSToInt(wkeJSState* es, wkeJSValue v); +WKE_API float WKE_CALL wkeJSToFloat(wkeJSState* es, wkeJSValue v); +WKE_API double WKE_CALL wkeJSToDouble(wkeJSState* es, wkeJSValue v); +WKE_API bool WKE_CALL wkeJSToBool(wkeJSState* es, wkeJSValue v); +WKE_API const utf8* WKE_CALL wkeJSToTempString(wkeJSState* es, wkeJSValue v); +WKE_API const wchar_t* WKE_CALL wkeJSToTempStringW(wkeJSState* es, wkeJSValue v); + +WKE_API wkeJSValue WKE_CALL wkeJSInt(wkeJSState* es, int n); +WKE_API wkeJSValue WKE_CALL wkeJSFloat(wkeJSState* es, float f); +WKE_API wkeJSValue WKE_CALL wkeJSDouble(wkeJSState* es, double d); +WKE_API wkeJSValue WKE_CALL wkeJSBool(wkeJSState* es, bool b); + +WKE_API wkeJSValue WKE_CALL wkeJSUndefined(wkeJSState* es); +WKE_API wkeJSValue WKE_CALL wkeJSNull(wkeJSState* es); +WKE_API wkeJSValue WKE_CALL wkeJSTrue(wkeJSState* es); +WKE_API wkeJSValue WKE_CALL wkeJSFalse(wkeJSState* es); + +WKE_API wkeJSValue WKE_CALL wkeJSString(wkeJSState* es, const utf8* str); +WKE_API wkeJSValue WKE_CALL wkeJSStringW(wkeJSState* es, const wchar_t* str); +WKE_API wkeJSValue WKE_CALL wkeJSEmptyObject(wkeJSState* es); +WKE_API wkeJSValue WKE_CALL wkeJSEmptyArray(wkeJSState* es); + + + +//cexer JS󡢺֧ +typedef struct __wkeJSData wkeJSData; +typedef wkeJSValue (WKE_CALL *wkeJSGetPropertyCallback)(wkeJSState* es, wkeJSValue object, const char* propertyName); +typedef bool (WKE_CALL *wkeJSSetPropertyCallback)(wkeJSState* es, wkeJSValue object, const char* propertyName, wkeJSValue value); +typedef wkeJSValue (WKE_CALL *wkeJSCallAsFunctionCallback)(wkeJSState* es, wkeJSValue object, wkeJSValue* args, int argCount); +typedef void (WKE_CALL *wkeJSFinalizeCallback)(wkeJSData* data); + +typedef struct __wkeJSData +{ + char typeName[100]; + wkeJSGetPropertyCallback propertyGet; + wkeJSSetPropertyCallback propertySet; + wkeJSFinalizeCallback finalize; + wkeJSCallAsFunctionCallback callAsFunction; -WKE_API jsType jsTypeOf(jsValue v); -WKE_API bool jsIsNumber(jsValue v); -WKE_API bool jsIsString(jsValue v); -WKE_API bool jsIsBoolean(jsValue v); -WKE_API bool jsIsObject(jsValue v); -WKE_API bool jsIsFunction(jsValue v); -WKE_API bool jsIsUndefined(jsValue v); -WKE_API bool jsIsNull(jsValue v); -WKE_API bool jsIsArray(jsValue v); -WKE_API bool jsIsTrue(jsValue v); -WKE_API bool jsIsFalse(jsValue v); +} wkeJSData; -WKE_API int jsToInt(jsExecState es, jsValue v); -WKE_API float jsToFloat(jsExecState es, jsValue v); -WKE_API double jsToDouble(jsExecState es, jsValue v); -WKE_API bool jsToBoolean(jsExecState es, jsValue v); -WKE_API const utf8* jsToString(jsExecState es, jsValue v); -WKE_API const wchar_t* jsToStringW(jsExecState es, jsValue v); +WKE_API wkeJSValue WKE_CALL wkeJSObject(wkeJSState* es, wkeJSData* obj); +WKE_API wkeJSValue WKE_CALL wkeJSFunction(wkeJSState* es, wkeJSData* obj); +WKE_API wkeJSData* WKE_CALL wkeJSGetData(wkeJSState* es, wkeJSValue object); -WKE_API jsValue jsInt(int n); -WKE_API jsValue jsFloat(float f); -WKE_API jsValue jsDouble(double d); -WKE_API jsValue jsBoolean(bool b); +WKE_API wkeJSValue WKE_CALL wkeJSGet(wkeJSState* es, wkeJSValue object, const char* prop); +WKE_API void WKE_CALL wkeJSSet(wkeJSState* es, wkeJSValue object, const char* prop, wkeJSValue v); -WKE_API jsValue jsUndefined(); -WKE_API jsValue jsNull(); -WKE_API jsValue jsTrue(); -WKE_API jsValue jsFalse(); +WKE_API wkeJSValue WKE_CALL wkeJSGetAt(wkeJSState* es, wkeJSValue object, int index); +WKE_API void WKE_CALL wkeJSSetAt(wkeJSState* es, wkeJSValue object, int index, wkeJSValue v); -WKE_API jsValue jsString(jsExecState es, const utf8* str); -WKE_API jsValue jsStringW(jsExecState es, const wchar_t* str); -WKE_API jsValue jsObject(jsExecState es); -WKE_API jsValue jsArray(jsExecState es); +WKE_API int WKE_CALL wkeJSGetLength(wkeJSState* es, wkeJSValue object); +WKE_API void WKE_CALL wkeJSSetLength(wkeJSState* es, wkeJSValue object, int length); -WKE_API jsValue jsFunction(jsExecState es, jsNativeFunction fn, unsigned int argCount); -//return the window object -WKE_API jsValue jsGlobalObject(jsExecState es); +WKE_API wkeJSValue WKE_CALL wkeJSGlobalObject(wkeJSState* es); +WKE_API wkeWebView* WKE_CALL wkeJSGetWebView(wkeJSState* es); -WKE_API jsValue jsEval(jsExecState es, const utf8* str); -WKE_API jsValue jsEvalW(jsExecState es, const wchar_t* str); +WKE_API wkeJSValue WKE_CALL wkeJSEval(wkeJSState* es, const utf8* str); +WKE_API wkeJSValue WKE_CALL wkeJSEvalW(wkeJSState* es, const wchar_t* str); -WKE_API jsValue jsCall(jsExecState es, jsValue func, jsValue thisObject, jsValue* args, int argCount); -WKE_API jsValue jsCallGlobal(jsExecState es, jsValue func, jsValue* args, int argCount); +WKE_API wkeJSValue WKE_CALL wkeJSCall(wkeJSState* es, wkeJSValue func, wkeJSValue thisObject, wkeJSValue* args, int argCount); +WKE_API wkeJSValue WKE_CALL wkeJSCallGlobal(wkeJSState* es, wkeJSValue func, wkeJSValue* args, int argCount); -WKE_API jsValue jsGet(jsExecState es, jsValue object, const char* prop); -WKE_API void jsSet(jsExecState es, jsValue object, const char* prop, jsValue v); +WKE_API wkeJSValue WKE_CALL wkeJSGetGlobal(wkeJSState* es, const char* prop); +WKE_API void WKE_CALL wkeJSSetGlobal(wkeJSState* es, const char* prop, wkeJSValue v); -WKE_API jsValue jsGetGlobal(jsExecState es, const char* prop); -WKE_API void jsSetGlobal(jsExecState es, const char* prop, jsValue v); -WKE_API jsValue jsGetAt(jsExecState es, jsValue object, int index); -WKE_API void jsSetAt(jsExecState es, jsValue object, int index, jsValue v); +WKE_API void WKE_CALL wkeJSAddRef(wkeJSState* es, wkeJSValue v); +WKE_API void WKE_CALL wkeJSReleaseRef(wkeJSState* es, wkeJSValue v); +WKE_API void WKE_CALL wkeJSCollectGarbge(); -WKE_API int jsGetLength(jsExecState es, jsValue object); -WKE_API void jsSetLength(jsExecState es, jsValue object, int length); -WKE_API wkeWebView jsGetWebView(jsExecState es); -WKE_API void jsGC(); //garbage collect #ifdef __cplusplus } #endif -#endif \ No newline at end of file +#endif//#ifndef WKE_H diff --git a/wke/wke.rc b/wke/wke.rc index 0701474f..7727be82 100644 --- a/wke/wke.rc +++ b/wke/wke.rc @@ -20,8 +20,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #endif //_WIN32 VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,2,0,0 - PRODUCTVERSION 1,2,0,0 + FILEVERSION 1,2,1,3 + PRODUCTVERSION 1,2,1,3 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,15 +36,15 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "CompanyName", "wke.sf.net\0" + VALUE "CompanyName", "www.github.com/cexer/wke\0" VALUE "FileDescription", "WebKit Embedded\0" - VALUE "FileVersion", "1, 2, 0, 0\0" + VALUE "FileVersion", "1, 2, 1, 3\0" VALUE "InternalName", "wke\0" VALUE "LegalCopyright", "BlzFans@hotmail.com Copyright (C) 2012\0" - VALUE "LegalTrademarks", "wke.sf.net\0" + VALUE "LegalTrademarks", "www.github.com/cexer/wke\0" VALUE "OriginalFilename","wke.dll\0" VALUE "ProductName", "WebKit Embedded\0" - VALUE "ProductVersion", "1, 2, 0, 0\0" + VALUE "ProductVersion", "1, 2, 1, 3\0" END END BLOCK "VarFileInfo" diff --git a/wke/wkeChromeClient.cpp b/wke/wkeChromeClient.cpp new file mode 100644 index 00000000..8a711c35 --- /dev/null +++ b/wke/wkeChromeClient.cpp @@ -0,0 +1,691 @@ +////////////////////////////////////////////////////////////////////////// + +#include "wkeChromeClient.h" +#include + +////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + +ToolTip::ToolTip(CWebView* webView) :m_webView(webView) + ,m_pixels(NULL) +{ + +} + +void ToolTip::set(const String& title, const WebCore::IntPoint& point) +{ + m_title = title; + m_point = point; + m_pixels = NULL; +} + +const String& ToolTip::title() const +{ + return m_title; +} + + +WebCore::IntRect ToolTip::paint(void* bits, int pitch) +{ + WebCore::IntRect rcRet; + if (!m_pixels) + { + if (m_title.isEmpty()) + return rcRet; + + if (!m_hdc) + { + m_hdc = adoptPtr(::CreateCompatibleDC(0)); + ::SelectObject(m_hdc.get(), GetStockObject(DEFAULT_GUI_FONT)); + ::SetTextColor(m_hdc.get(), RGB(0x64, 0x64, 0x64)); + } + + int width = m_webView->width(); + int height = m_webView->height(); + + const int marginH = 4; + const int marginV = 4; + if (marginH * 2 >= width || marginV * 2 >= height) + return rcRet; + + RECT rcText; + rcText.left = marginH; + rcText.right = rcText.left + width / 2; + rcText.top = marginV; + rcText.bottom = rcText.top + height / 2; + ::DrawText(m_hdc.get(), m_title.characters(), m_title.length(), &rcText, DT_WORDBREAK|DT_CALCRECT); + + if (rcText.right > width - marginH) + rcText.right = width - marginH; + + if (rcText.bottom > height - marginV) + rcText.bottom = height - marginV; + + m_rect.left = 0; + m_rect.top = 0; + m_rect.right = rcText.right + marginH; + m_rect.bottom = rcText.bottom + marginV; + + WebCore::BitmapInfo bmp = WebCore::BitmapInfo::createBottomUp(WebCore::IntSize(m_rect.right, m_rect.bottom)); + HBITMAP hbmp = ::CreateDIBSection(0, &bmp, DIB_RGB_COLORS, &m_pixels, NULL, 0); + SelectObject(m_hdc.get(), hbmp); + m_hbitmap = adoptPtr(hbmp); + + unsigned int* ptr = (unsigned int*)m_pixels; + + //background + memset(ptr, 0xFA, m_rect.right * m_rect.bottom * 4); + + //top + memset(ptr, 0x64, m_rect.right * 4); + + //bottom + ptr = (unsigned int*)m_pixels + m_rect.right * (m_rect.bottom - 1); + memset(ptr, 0x64, m_rect.right * 4); + + //left and right + ptr = (unsigned int*)m_pixels + m_rect.right; + for (int i = 1; i < m_rect.bottom; ++i) + { + ptr[0] = 0x64646464; + ptr[-1] = 0x64646464; + ptr += m_rect.right; + } + + //corner + ptr = (unsigned int*)m_pixels; + ptr[m_rect.right + 1] = 0x64646464; + ptr[m_rect.right * 2 - 2] = 0x64646464; + ptr[m_rect.right * (m_rect.bottom - 1) - 2] = 0x64646464; + ptr[m_rect.right * (m_rect.bottom - 2) + 1] = 0x64646464; + + ::DrawText(m_hdc.get(), m_title.characters(), m_title.length(), &rcText, DT_WORDBREAK); + + for (int i = 0; i < m_rect.right * m_rect.bottom; ++i) + { + ((unsigned char*)m_pixels)[i*4 + 3] = 255; + } + + const int offset = 10; + if (m_point.x() + offset + m_rect.right < width) + m_rect.left = m_point.x() + offset; + else if (m_point.x() > m_rect.right + offset) + m_rect.left = m_point.x() - m_rect.right - offset; + else + m_rect.left = width - m_rect.right; + + if (m_point.y() + offset + m_rect.bottom < height) + m_rect.top = m_point.y() + offset; + else if (m_point.y() > m_rect.top + offset) + m_rect.top = m_point.y() - m_rect.bottom - offset; + else + m_rect.top = height - m_rect.bottom; + + m_rect.right += m_rect.left; + m_rect.bottom += m_rect.top; + } + + //copy to dst + int w = m_rect.right - m_rect.left; + int h = m_rect.bottom - m_rect.top; + unsigned char* src = (unsigned char*)m_pixels; + unsigned char* dst = (unsigned char*)bits + m_rect.top * pitch + m_rect.left*4; + + //save corner + memcpy(src, dst, 4); + memcpy(src + (w - 1) * 4, dst + (w - 1) * 4, 4); + memcpy(src + w * (h - 1) * 4, dst + pitch * (h - 1), 4); + memcpy(src + w * h * 4 - 4, dst + pitch * (h - 1) + (w - 1) * 4, 4); + + for (int i = 0; i < h; ++i) + { + memcpy(dst, src, w*4); + src += w*4; + dst += pitch; + } + + rcRet = m_rect; + return rcRet; +} + + + + +ChromeClient::ChromeClient(CWebView* webView) :m_webView(webView) + ,m_tooltip(webView) + ,m_popupMenu(NULL) +{ + +} +void ChromeClient::chromeDestroyed() +{ + dbgMsg(L"frameLoaderDestroyed\n"); + delete this; +} + +WebCore::IntRect ChromeClient::paintToolTip(void* bits, int pitch) +{ + return m_tooltip.paint(bits, pitch); +} + +WebCore::IntRect ChromeClient::paintPopupMenu(void* bits, int pitch) +{ + WebCore::IntRect rc; + if (m_popupMenu) + rc=m_popupMenu->paint(bits, pitch); + return rc; +} + +void ChromeClient::setPopupMenu(PopupMenu* popupMenu) +{ + m_popupMenu = popupMenu; +} + +PopupMenu* ChromeClient::popupMenu() +{ + return m_popupMenu; +} + +void* ChromeClient::webView() const +{ + return m_webView; +} + +void ChromeClient::numWheelEventHandlersChanged(unsigned) +{ + +} + +bool ChromeClient::shouldRubberBandInDirection(WebCore::ScrollDirection) const +{ + return true; +} + +PassRefPtr ChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const +{ + return adoptRef(new EmptySearchPopupMenu); +} + +PassRefPtr ChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const +{ + return adoptRef(new PopupMenu(client, (wke::ChromeClient*)this)); +} + +bool ChromeClient::selectItemAlignmentFollowsMenuWritingDirection() +{ + return false; +} + +bool ChromeClient::selectItemWritingDirectionIsNatural() +{ + return true; +} + +#if PLATFORM(WIN) +void ChromeClient::setLastSetCursorToCurrentCursor() +{ + +} +#endif + + +#if USE(ACCELERATED_COMPOSITING) +void ChromeClient::scheduleCompositingLayerSync() +{ + +} + +void ChromeClient::setNeedsOneShotDrawingSynchronization() +{ + +} + +void ChromeClient::attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) +{ + +} +#endif + +void ChromeClient::formStateDidChange(const WebCore::Node*) +{ + +} + +void ChromeClient::loadIconForFiles(const Vector& filenames, WebCore::FileIconLoader* loader) +{ + loader->notifyFinished(WebCore::Icon::createIconForFiles(filenames)); +} + +void ChromeClient::runOpenPanel(WebCore::Frame*, PassRefPtr chooser) +{ + //cexer ʵļѡ + wchar_t* pathList = new wchar_t[10 * MAX_PATH]; + memset(pathList, 0, 10 * MAX_PATH * sizeof(wchar_t)); + + OPENFILENAMEW ofn = { 0 }; + ofn.Flags = OFN_DONTADDTORECENT|OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_NONETWORKBUTTON|OFN_PATHMUSTEXIST; + if (chooser->settings().allowsMultipleFiles) + ofn.Flags |= OFN_ALLOWMULTISELECT; + + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = NULL; + ofn.lpstrFilter = L"*.*\0*.*\0\0"; + ofn.lpstrFile = pathList; + ofn.nMaxFile = 10 * MAX_PATH; + ofn.lpstrInitialDir = NULL; + ofn.lpstrTitle = NULL; + if (0 != GetOpenFileNameW(&ofn)) + { + Vector chosenFiles; + + wchar_t* path = pathList; + while (*path) + { + size_t pathLen = wcslen(path); + + String pathString((const UChar*)path, pathLen); + chosenFiles.append(pathString); + + path += pathLen + 1; + } + + if (!chosenFiles.isEmpty()) + chooser->chooseFiles(chosenFiles); + } + + delete [] pathList; +} + +void ChromeClient::cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) +{ + +} + +void ChromeClient::requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*) +{ + +} + +#if ENABLE(NOTIFICATIONS) +WebCore::NotificationPresenter* ChromeClient::notificationPresenter() +{ + return 0; +} +#endif + + +#if ENABLE(CONTEXT_MENUS) +void ChromeClient::showContextMenu() +{ + +} +#endif + +void ChromeClient::reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded) +{ + +} + +void ChromeClient::reachedMaxAppCacheSize(int64_t spaceNeeded) +{ + +} + +#if ENABLE(SQL_DATABASE) +void ChromeClient::exceededDatabaseQuota(WebCore::Frame* frame, const WTF::String& databaseName) +{ + const unsigned long long defaultQuota = 5 * 1024 * 1024; + WebCore::DatabaseTracker::tracker().setQuota(frame->document()->securityOrigin(), defaultQuota); +} +#endif + +void ChromeClient::print(WebCore::Frame*) +{ + +} + +void ChromeClient::setToolTip(const WTF::String& toolTip, WebCore::TextDirection) +{ + +} + +void ChromeClient::mouseDidMoveOverElement(const WebCore::HitTestResult& result, unsigned modifierFlags) +{ + WebCore::TextDirection dir; + String title = result.title(dir); + if (title != m_tooltip.title()) + { + WebCore::IntPoint point = ((CWebView*)webView())->mainFrame()->eventHandler()->currentMousePosition(); + m_tooltip.set(title, point); + m_webView->setDirty(true); + } +} + +void ChromeClient::contentsSizeChanged(WebCore::Frame*, const WebCore::IntSize&) const +{ + +} + +void ChromeClient::setCursorHiddenUntilMouseMoves(bool) +{ + +} + +void ChromeClient::setCursor(const WebCore::Cursor& cursor) +{ + HCURSOR platformCursor = cursor.platformCursor()->nativeCursor(); + if (!platformCursor) + return; + + ::SetCursor(platformCursor); +} + +void ChromeClient::scrollbarsModeDidChange() const +{ + +} + +PlatformPageClient ChromeClient::platformPageClient() const +{ + return m_webView ? m_webView->hostWindow() : NULL; +} + +WebCore::IntRect ChromeClient::windowToScreen(const WebCore::IntRect& windowPoint) const +{ + HWND hwnd = m_webView ? m_webView->hostWindow() : NULL; + if (!IsWindow(hwnd)) + return windowPoint; + + POINT tempPoint = { windowPoint.x(), windowPoint.y() }; + ClientToScreen(hwnd, &tempPoint); + + WebCore::IntRect screePoint(tempPoint.x, tempPoint.y, windowPoint.width(), windowPoint.height()); + return screePoint; +} + +WebCore::IntPoint ChromeClient::screenToWindow(const WebCore::IntPoint& screePoint) const +{ + HWND hwnd = m_webView ? m_webView->hostWindow() : NULL; + if (!IsWindow(hwnd)) + return screePoint; + + POINT tempPoint = { screePoint.x(), screePoint.y() }; + ScreenToClient(hwnd, &tempPoint); + + WebCore::IntPoint windowPoint(tempPoint.x, tempPoint.y); + return windowPoint; +} + +void ChromeClient::scroll(const WebCore::IntSize&, const WebCore::IntRect&, const WebCore::IntRect&) +{ + +} + +void ChromeClient::invalidateContentsForSlowScroll(const WebCore::IntRect& rect, bool immediate) +{ + m_webView->addDirtyArea(rect.x(), rect.y(), rect.width(), rect.height()); + //dbgMsg(L"invalidateContentsForSlowScroll\n"); +} + +void ChromeClient::invalidateContentsAndWindow(const WebCore::IntRect& rect, bool immediate) +{ + m_webView->addDirtyArea(rect.x(), rect.y(), rect.width(), rect.height()); + //dbgMsg(L"invalidateContentsAndWindow\n"); +} + +void ChromeClient::invalidateWindow(const WebCore::IntRect& rect, bool immediate) +{ + m_webView->addDirtyArea(rect.x(), rect.y(), rect.width(), rect.height()); + //dbgMsg(L"invalidateWindow\n"); +} + +WebCore::IntRect ChromeClient::windowResizerRect() const +{ + return WebCore::IntRect(); +} + +WebCore::KeyboardUIMode ChromeClient::keyboardUIMode() +{ + return WebCore::KeyboardAccessDefault; +} + +bool ChromeClient::shouldInterruptJavaScript() +{ + return false; +} + +void ChromeClient::setStatusbarText(const WTF::String& text) +{ + dbgMsg(L"setStatusbarText %s\n", CSTR(text)); +} + +bool ChromeClient::runJavaScriptPrompt(WebCore::Frame*, const WTF::String& msg, const WTF::String& defaultValue, WTF::String& result) +{ + outputMsg(L"JavaScript Prompt %s %s\n", CSTR(msg), CSTR(defaultValue)); + + wke::CWebViewHandler& handler = m_webView->m_handler; + if (!handler.promptBoxCallback) + return false; + + wke::CString wkeMsg(msg); + wke::CString wkeDefaultResult(defaultValue); + wke::CString wkeResult(""); + if (!handler.promptBoxCallback(m_webView, handler.promptBoxCallbackParam, &wkeMsg, &wkeDefaultResult, &wkeResult)) + return false; + + result = wkeResult.original(); + return true; +} + +bool ChromeClient::runJavaScriptConfirm(WebCore::Frame*, const WTF::String& msg) +{ + outputMsg(L"JavaScript Confirm %s\n", CSTR(msg)); + + wke::CWebViewHandler& handler = m_webView->m_handler; + if (!handler.confirmBoxCallback) + return false; + + wke::CString wkeMsg(msg); + return handler.confirmBoxCallback(m_webView, handler.confirmBoxCallbackParam, &wkeMsg); +} + +void ChromeClient::runJavaScriptAlert(WebCore::Frame*, const WTF::String& msg) +{ + outputMsg(L"JavaScript Alert %s\n", CSTR(msg)); + + wke::CWebViewHandler& handler = m_webView->m_handler; + if (!handler.alertBoxCallback) + return; + + wke::CString wkeMsg(msg); + handler.alertBoxCallback(m_webView, handler.alertBoxCallbackParam, &wkeMsg); +} + +void ChromeClient::closeWindowSoon() +{ + //cexer ʵ window.close + if (m_webView && m_webView->hostWindow()) + PostMessage(m_webView->hostWindow(), WM_CLOSE, 0, 0); +} + +bool ChromeClient::runBeforeUnloadConfirmPanel(const WTF::String& message, WebCore::Frame* frame) +{ + return true; +} + +bool ChromeClient::canRunBeforeUnloadConfirmPanel() +{ + return true; +} + +void ChromeClient::addMessageToConsole(WebCore::MessageSource source, WebCore::MessageType type, WebCore::MessageLevel level, const WTF::String& message, unsigned int lineNumber, const WTF::String& url) +{ + outputMsg(L"console message %s %d %s\n", CSTR(message), lineNumber, CSTR(url)); + + wke::CWebViewHandler& handler = m_webView->m_handler; + if (!handler.consoleMessageCallback) + return; + + wkeConsoleMessage msgStruct; + msgStruct.source = (wkeMessageSource)source; + msgStruct.type = (wkeMessageType)type; + msgStruct.level = (wkeMessageLevel)level; + msgStruct.lineNumber = lineNumber; + + wke::CString csMessage = message; + wke::CString csUrl = url; + msgStruct.message = &csMessage; + msgStruct.url = &csUrl; + handler.consoleMessageCallback(m_webView, handler.consoleMessageCallbackParam, &msgStruct); +} + +void ChromeClient::setResizable(bool) +{ + +} + +bool ChromeClient::menubarVisible() +{ + return false; +} + +void ChromeClient::setMenubarVisible(bool) +{ + +} + +bool ChromeClient::scrollbarsVisible() +{ + return false; +} + +void ChromeClient::setScrollbarsVisible(bool) +{ + +} + +bool ChromeClient::statusbarVisible() +{ + return false; +} + +void ChromeClient::setStatusbarVisible(bool) +{ + +} + +bool ChromeClient::toolbarsVisible() +{ + return false; +} + +void ChromeClient::setToolbarsVisible(bool) +{ + +} + +void ChromeClient::runModal() +{ + +} + +bool ChromeClient::canRunModal() +{ + return true; +} + +void ChromeClient::show() +{ + +} + +WebCore::Page* ChromeClient::createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest& request, const WebCore::WindowFeatures& features, const WebCore::NavigationAction& action) +{ + // cexer ʵ´ڿ + wke::CWebViewHandler& handler = m_webView->m_handler; + if (!handler.createViewCallback) + return m_webView->page(); + + wkeNewViewInfo info; + info.navigationType = (wkeNavigationType)action.type(); + info.x = features.xSet ? features.x : CW_USEDEFAULT; + info.y = features.ySet ? features.y : CW_USEDEFAULT; + info.width = features.widthSet ? features.width : CW_USEDEFAULT; + info.height = features.heightSet ? features.height : CW_USEDEFAULT; + info.locationBarVisible = features.locationBarVisible; + info.menuBarVisible = features.menuBarVisible; + info.resizable = features.resizable; + info.statusBarVisible = features.statusBarVisible; + info.toolBarVisible = features.toolBarVisible; + info.fullscreen = features.fullscreen; + + wke::CString url = action.url().string(); + info.url = &url; + + wke::CString target = request.frameName(); + info.target = ⌖ + + wke::CWebView* createdWebView = handler.createViewCallback(m_webView, handler.createViewCallbackParam, &info); + if (!createdWebView) + return NULL; + + return createdWebView->page(); +} + +void ChromeClient::focusedFrameChanged(WebCore::Frame*) +{ + +} + +void ChromeClient::focusedNodeChanged(WebCore::Node*) +{ + +} + +void ChromeClient::takeFocus(WebCore::FocusDirection) +{ + +} + +bool ChromeClient::canTakeFocus(WebCore::FocusDirection) +{ + return true; +} + +void ChromeClient::unfocus() +{ + //cexer ʵ window.blur + if (m_webView && m_webView->hostWindow()) + SetFocus(NULL); +} + +void ChromeClient::focus() +{ + //cexer ʵ window.focus + if (m_webView && m_webView->hostWindow()) + SetFocus(m_webView->hostWindow()); +} + +WebCore::FloatRect ChromeClient::pageRect() +{ + return m_rect; +} + +WebCore::FloatRect ChromeClient::windowRect() +{ + return m_rect; +} + +void ChromeClient::setWindowRect(const WebCore::FloatRect& rect) +{ + m_rect = rect; +} + + + +};//namespace wke \ No newline at end of file diff --git a/wke/wkeChromeClient.h b/wke/wkeChromeClient.h new file mode 100644 index 00000000..e8e5237c --- /dev/null +++ b/wke/wkeChromeClient.h @@ -0,0 +1,214 @@ +#ifndef WKE_CHROME_CLLIENT_H +#define WKE_CHROME_CLLIENT_H + +////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "wkeDebug.h" +#include "wkePopupMenu.h" +#include "wkeWebView.h" + +////////////////////////////////////////////////////////////////////////// + + + + +namespace wke +{ + + + +class EmptySearchPopupMenu : public WebCore::SearchPopupMenu { +public: + virtual WebCore::PopupMenu* popupMenu() { return NULL; } + virtual void saveRecentSearches(const AtomicString&, const Vector&) {} + virtual void loadRecentSearches(const AtomicString&, Vector&) {} + virtual bool enabled() { return false; } +}; + + + +class ToolTip +{ +public: + ToolTip(CWebView* webView); + + void set(const String& title, const WebCore::IntPoint& point); + const String& title() const; + WebCore::IntRect paint(void* bits, int pitch); + +private: + String m_title; + WebCore::IntPoint m_point; + + OwnPtr m_hdc; + OwnPtr m_hbitmap; + void* m_pixels; + RECT m_rect; + + CWebView* m_webView; +}; + + + +class ChromeClient : public WebCore::ChromeClient +{ +public: + ChromeClient(CWebView* webView); + + virtual void chromeDestroyed() override; + + virtual void setWindowRect(const WebCore::FloatRect& rect) override; + virtual WebCore::FloatRect windowRect() override; + virtual WebCore::FloatRect pageRect() override; + + virtual void focus() override; + virtual void unfocus() override; + virtual bool canTakeFocus(WebCore::FocusDirection) override; + virtual void takeFocus(WebCore::FocusDirection) override; + virtual void focusedNodeChanged(WebCore::Node*) override; + void focusedFrameChanged(WebCore::Frame*) override; + + virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&) override; + virtual void closeWindowSoon() override; + + virtual void show() override; + virtual bool canRunModal() override; + virtual void runModal() override; + + virtual void setToolbarsVisible(bool) override; + virtual bool toolbarsVisible() override; + virtual void setStatusbarVisible(bool) override; + virtual bool statusbarVisible() override; + virtual void setScrollbarsVisible(bool) override; + virtual bool scrollbarsVisible() override; + virtual void setMenubarVisible(bool) override; + virtual bool menubarVisible() override; + virtual void setResizable(bool) override; + + virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageType, WebCore::MessageLevel, const WTF::String& message, unsigned int lineNumber, const WTF::String& url) override; + + virtual bool canRunBeforeUnloadConfirmPanel() override; + virtual bool runBeforeUnloadConfirmPanel(const WTF::String& message, WebCore::Frame* frame) override; + + virtual void runJavaScriptAlert(WebCore::Frame*, const WTF::String& msg) override; + virtual bool runJavaScriptConfirm(WebCore::Frame*, const WTF::String& msg) override; + virtual bool runJavaScriptPrompt(WebCore::Frame*, const WTF::String& msg, const WTF::String& defaultValue, WTF::String& result) override; + + virtual void setStatusbarText(const WTF::String& text) override; + + virtual bool shouldInterruptJavaScript() override; + + WebCore::KeyboardUIMode keyboardUIMode() override; + + virtual WebCore::IntRect windowResizerRect() const override; + + virtual void invalidateWindow(const WebCore::IntRect& rect, bool immediate) override; + virtual void invalidateContentsAndWindow(const WebCore::IntRect& rect, bool immediate) override; + virtual void invalidateContentsForSlowScroll(const WebCore::IntRect& rect, bool immediate) override; + + virtual void scroll(const WebCore::IntSize&, const WebCore::IntRect&, const WebCore::IntRect&) override; + + virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint& pt) const override; + virtual WebCore::IntRect windowToScreen(const WebCore::IntRect& pt) const override; + + virtual PlatformPageClient platformPageClient() const override; + + virtual void scrollbarsModeDidChange() const override; + + virtual void setCursor(const WebCore::Cursor& cursor) override; + virtual void setCursorHiddenUntilMouseMoves(bool) override; + + virtual void contentsSizeChanged(WebCore::Frame*, const WebCore::IntSize&) const override; + + virtual void mouseDidMoveOverElement(const WebCore::HitTestResult& result, unsigned modifierFlags) override; + + virtual void setToolTip(const WTF::String& toolTip, WebCore::TextDirection) override; + + virtual void print(WebCore::Frame*) override; + +#if ENABLE(SQL_DATABASE) + virtual void exceededDatabaseQuota(WebCore::Frame* frame, const WTF::String& databaseName) override; +#endif + + virtual void reachedMaxAppCacheSize(int64_t spaceNeeded) override; + virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded) override; + +#if ENABLE(CONTEXT_MENUS) + virtual void showContextMenu() override; +#endif + +#if ENABLE(NOTIFICATIONS) + virtual WebCore::NotificationPresenter* notificationPresenter() override; +#endif + virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*) override; + + virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) override; + + virtual void runOpenPanel(WebCore::Frame*, PassRefPtr chooser) override; + + virtual void loadIconForFiles(const Vector& filenames, WebCore::FileIconLoader* loader) override; + + virtual void formStateDidChange(const WebCore::Node*) override; + +#if USE(ACCELERATED_COMPOSITING) + virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override; + virtual void setNeedsOneShotDrawingSynchronization() override; + virtual void scheduleCompositingLayerSync() override; +#endif + + +#if PLATFORM(WIN) + virtual void setLastSetCursorToCurrentCursor() override; +#endif + + virtual bool selectItemWritingDirectionIsNatural() override; + + bool selectItemAlignmentFollowsMenuWritingDirection() override; + + virtual PassRefPtr createPopupMenu(WebCore::PopupMenuClient* client) const override; + virtual PassRefPtr createSearchPopupMenu(WebCore::PopupMenuClient* client) const override; + + virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const override; + + virtual void numWheelEventHandlersChanged(unsigned) override; + + virtual void* webView() const override; + + PopupMenu* popupMenu(); + void setPopupMenu(PopupMenu* popupMenu); + WebCore::IntRect paintPopupMenu(void* bits, int pitch); + WebCore::IntRect paintToolTip(void* bits, int pitch); + +protected: + WebCore::FloatRect m_rect; + CWebView* m_webView; + ToolTip m_tooltip; + PopupMenu* m_popupMenu; +}; + + + + + +};//namespace wke + + + + +#endif //#ifndef WKE_CHROME_CLLIENT_H + + diff --git a/wke/wkeChromeClient.inl b/wke/wkeChromeClient.inl deleted file mode 100644 index 0f87f0e2..00000000 --- a/wke/wkeChromeClient.inl +++ /dev/null @@ -1,550 +0,0 @@ - -#include -#include -#include -#include -#include -#include -#include -#include "wkeDebug.h" -#include "wkePopupMenu.h" - -namespace wke -{ - class EmptySearchPopupMenu : public WebCore::SearchPopupMenu { - public: - virtual WebCore::PopupMenu* popupMenu() { return NULL; } - virtual void saveRecentSearches(const AtomicString&, const Vector&) {} - virtual void loadRecentSearches(const AtomicString&, Vector&) {} - virtual bool enabled() { return false; } - }; - - class ToolTip - { - public: - ToolTip(IWebView* webView) - :webView_(webView) - ,pixels_(NULL) - {} - - void set(const String& title, const WebCore::IntPoint& point) - { - title_ = title; - point_ = point; - pixels_ = NULL; - } - - const String& title() const - { - return title_; - } - - void paint(void* bits, int pitch) - { - if (!pixels_) - { - if (title_.isEmpty()) - return; - - if (!hdc_) - { - hdc_ = adoptPtr(::CreateCompatibleDC(0)); - ::SelectObject(hdc_.get(), GetStockObject(DEFAULT_GUI_FONT)); - ::SetTextColor(hdc_.get(), RGB(0x64, 0x64, 0x64)); - } - - int width = webView_->width(); - int height = webView_->height(); - - const int marginH = 4; - const int marginV = 4; - if (marginH * 2 >= width || marginV * 2 >= height) - return; - - RECT rcText; - rcText.left = marginH; - rcText.right = rcText.left + width / 2; - rcText.top = marginV; - rcText.bottom = rcText.top + height / 2; - ::DrawText(hdc_.get(), title_.characters(), title_.length(), &rcText, DT_WORDBREAK|DT_CALCRECT); - - if (rcText.right > width - marginH) - rcText.right = width - marginH; - - if (rcText.bottom > height - marginV) - rcText.bottom = height - marginV; - - rect_.left = 0; - rect_.top = 0; - rect_.right = rcText.right + marginH; - rect_.bottom = rcText.bottom + marginV; - - WebCore::BitmapInfo bmp = WebCore::BitmapInfo::createBottomUp(WebCore::IntSize(rect_.right, rect_.bottom)); - HBITMAP hbmp = ::CreateDIBSection(0, &bmp, DIB_RGB_COLORS, &pixels_, NULL, 0); - SelectObject(hdc_.get(), hbmp); - hbmp_ = adoptPtr(hbmp); - - unsigned int* ptr = (unsigned int*)pixels_; - - //background - memset(ptr, 0xFA, rect_.right * rect_.bottom * 4); - - //top - memset(ptr, 0x64, rect_.right * 4); - - //bottom - ptr = (unsigned int*)pixels_ + rect_.right * (rect_.bottom - 1); - memset(ptr, 0x64, rect_.right * 4); - - //left and right - ptr = (unsigned int*)pixels_ + rect_.right; - for (int i = 1; i < rect_.bottom; ++i) - { - ptr[0] = 0x64646464; - ptr[-1] = 0x64646464; - ptr += rect_.right; - } - - //corner - ptr = (unsigned int*)pixels_; - ptr[rect_.right + 1] = 0x64646464; - ptr[rect_.right * 2 - 2] = 0x64646464; - ptr[rect_.right * (rect_.bottom - 1) - 2] = 0x64646464; - ptr[rect_.right * (rect_.bottom - 2) + 1] = 0x64646464; - - ::DrawText(hdc_.get(), title_.characters(), title_.length(), &rcText, DT_WORDBREAK); - - for (int i = 0; i < rect_.right * rect_.bottom; ++i) - { - ((unsigned char*)pixels_)[i*4 + 3] = 255; - } - - const int offset = 10; - if (point_.x() + offset + rect_.right < width) - rect_.left = point_.x() + offset; - else if (point_.x() > rect_.right + offset) - rect_.left = point_.x() - rect_.right - offset; - else - rect_.left = width - rect_.right; - - if (point_.y() + offset + rect_.bottom < height) - rect_.top = point_.y() + offset; - else if (point_.y() > rect_.top + offset) - rect_.top = point_.y() - rect_.bottom - offset; - else - rect_.top = height - rect_.bottom; - - rect_.right += rect_.left; - rect_.bottom += rect_.top; - } - - //copy to dst - int w = rect_.right - rect_.left; - int h = rect_.bottom - rect_.top; - unsigned char* src = (unsigned char*)pixels_; - unsigned char* dst = (unsigned char*)bits + rect_.top * pitch + rect_.left*4; - - //save corner - memcpy(src, dst, 4); - memcpy(src + (w - 1) * 4, dst + (w - 1) * 4, 4); - memcpy(src + w * (h - 1) * 4, dst + pitch * (h - 1), 4); - memcpy(src + w * h * 4 - 4, dst + pitch * (h - 1) + (w - 1) * 4, 4); - - for (int i = 0; i < h; ++i) - { - memcpy(dst, src, w*4); - src += w*4; - dst += pitch; - } - } - - private: - String title_; - WebCore::IntPoint point_; - - OwnPtr hdc_; - OwnPtr hbmp_; - void* pixels_; - RECT rect_; - - IWebView* webView_; - }; - - class ChromeClient : public WebCore::ChromeClient - { - public: - ChromeClient(IWebView* webView) - :webView_(webView) - ,toolTip_(webView) - ,popupMenu_(NULL) - {} - - virtual void chromeDestroyed() override - { - dbgMsg(L"frameLoaderDestroyed\n"); - delete this; - } - - virtual void setWindowRect(const WebCore::FloatRect& rect) override - { - rect_ = rect; - } - - virtual WebCore::FloatRect windowRect() override - { - return rect_; - } - - virtual WebCore::FloatRect pageRect() override - { - return rect_; - } - - virtual void focus() override - { - } - - virtual void unfocus() override - { - } - - virtual bool canTakeFocus(WebCore::FocusDirection) override - { - return true; - } - - virtual void takeFocus(WebCore::FocusDirection) override - { - } - - virtual void focusedNodeChanged(WebCore::Node*) override - { - } - - void focusedFrameChanged(WebCore::Frame*) override - { - } - - virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&) override - { - dbgMsg(L"createWindow\n"); - return ((CWebView*)webView_)->page(); - } - - virtual void show() override - { - } - - virtual bool canRunModal() override - { - return true; - } - - virtual void runModal() override - { - } - - virtual void setToolbarsVisible(bool) override - { - } - - virtual bool toolbarsVisible() override - { - return false; - } - - virtual void setStatusbarVisible(bool) override - { - } - - virtual bool statusbarVisible() override - { - return false; - } - - virtual void setScrollbarsVisible(bool) override - { - } - - virtual bool scrollbarsVisible() override - { - return false; - } - - virtual void setMenubarVisible(bool) override - { - } - - virtual bool menubarVisible() override - { - return false; - } - - virtual void setResizable(bool) override - { - } - - virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageType, WebCore::MessageLevel, const WTF::String& message, unsigned int lineNumber, const WTF::String& url) override - { - outputMsg(L"console message %s %d %s\n", CSTR(message), lineNumber, CSTR(url)); - } - - virtual bool canRunBeforeUnloadConfirmPanel() override - { - return true; - } - - virtual bool runBeforeUnloadConfirmPanel(const WTF::String& message, WebCore::Frame* frame) override - { - return true; - } - - virtual void closeWindowSoon() override - { - } - - virtual void runJavaScriptAlert(WebCore::Frame*, const WTF::String& msg) override - { - outputMsg(L"JavaScript Alert %s\n", CSTR(msg)); - } - - virtual bool runJavaScriptConfirm(WebCore::Frame*, const WTF::String& msg) override - { - outputMsg(L"JavaScript Confirm %s\n", CSTR(msg)); - return true; - } - - virtual bool runJavaScriptPrompt(WebCore::Frame*, const WTF::String& msg, const WTF::String& defaultValue, WTF::String& result) override - { - outputMsg(L"JavaScript Prompt %s %s\n", CSTR(msg), CSTR(defaultValue)); - return true; - } - - virtual void setStatusbarText(const WTF::String& text) override - { - dbgMsg(L"setStatusbarText %s\n", CSTR(text)); - } - - virtual bool shouldInterruptJavaScript() override - { - return false; - } - - WebCore::KeyboardUIMode keyboardUIMode() override - { - return WebCore::KeyboardAccessDefault; - } - - virtual WebCore::IntRect windowResizerRect() const override - { - return WebCore::IntRect(); - } - - virtual void invalidateWindow(const WebCore::IntRect& rect, bool immediate) override - { - webView_->addDirtyArea(rect.x(), rect.y(), rect.width(), rect.height()); - //dbgMsg(L"invalidateWindow\n"); - } - - virtual void invalidateContentsAndWindow(const WebCore::IntRect& rect, bool immediate) override - { - webView_->addDirtyArea(rect.x(), rect.y(), rect.width(), rect.height()); - //dbgMsg(L"invalidateContentsAndWindow\n"); - } - - virtual void invalidateContentsForSlowScroll(const WebCore::IntRect& rect, bool immediate) override - { - webView_->addDirtyArea(rect.x(), rect.y(), rect.width(), rect.height()); - //dbgMsg(L"invalidateContentsForSlowScroll\n"); - } - - virtual void scroll(const WebCore::IntSize&, const WebCore::IntRect&, const WebCore::IntRect&) override - { - } - - virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint& pt) const override - { - return pt; - } - - virtual WebCore::IntRect windowToScreen(const WebCore::IntRect& pt) const override - { - return pt; - } - - virtual PlatformPageClient platformPageClient() const override - { - return NULL; - } - - virtual void scrollbarsModeDidChange() const override - { - } - - virtual void setCursor(const WebCore::Cursor& cursor) override - { - HCURSOR platformCursor = cursor.platformCursor()->nativeCursor(); - if (!platformCursor) - return; - - ::SetCursor(platformCursor); - } - - virtual void setCursorHiddenUntilMouseMoves(bool) override - { - } - - virtual void contentsSizeChanged(WebCore::Frame*, const WebCore::IntSize&) const override - { - } - - virtual void mouseDidMoveOverElement(const WebCore::HitTestResult& result, unsigned modifierFlags) override - { - WebCore::TextDirection dir; - String title = result.title(dir); - if (title != toolTip_.title()) - { - WebCore::IntPoint point = ((CWebView*)webView())->mainFrame()->eventHandler()->currentMousePosition(); - toolTip_.set(title, point); - webView_->setDirty(true); - } - } - - virtual void setToolTip(const WTF::String& toolTip, WebCore::TextDirection) override - { - } - - virtual void print(WebCore::Frame*) override - { - } - -#if ENABLE(SQL_DATABASE) - virtual void exceededDatabaseQuota(WebCore::Frame* frame, const WTF::String& databaseName) override - { - const unsigned long long defaultQuota = 5 * 1024 * 1024; - WebCore::DatabaseTracker::tracker().setQuota(frame->document()->securityOrigin(), defaultQuota); - } -#endif - - virtual void reachedMaxAppCacheSize(int64_t spaceNeeded) override - { - } - - virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded) override - { - } - -#if ENABLE(CONTEXT_MENUS) - virtual void showContextMenu() override { } -#endif - -#if ENABLE(NOTIFICATIONS) - virtual WebCore::NotificationPresenter* notificationPresenter() override - { - return 0; - } -#endif - virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*) override - { - } - - virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) override - { - } - - virtual void runOpenPanel(WebCore::Frame*, PassRefPtr) override - { - } - - virtual void loadIconForFiles(const Vector& filenames, WebCore::FileIconLoader* loader) override - { - loader->notifyFinished(WebCore::Icon::createIconForFiles(filenames)); - } - - virtual void formStateDidChange(const WebCore::Node*) override - { - } - -#if USE(ACCELERATED_COMPOSITING) - virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override - { - } - - virtual void setNeedsOneShotDrawingSynchronization() override - { - } - - virtual void scheduleCompositingLayerSync() override - { - } -#endif - - -#if PLATFORM(WIN) - virtual void setLastSetCursorToCurrentCursor() override - { - } -#endif - - virtual bool selectItemWritingDirectionIsNatural() override - { - return true; - } - - bool selectItemAlignmentFollowsMenuWritingDirection() override - { - return false; - } - - virtual PassRefPtr createPopupMenu(WebCore::PopupMenuClient* client) const override - { - return adoptRef(new PopupMenu(client, (wke::ChromeClient*)this)); - } - - virtual PassRefPtr createSearchPopupMenu(WebCore::PopupMenuClient* client) const override - { - return adoptRef(new EmptySearchPopupMenu); - } - - virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const override - { - return true; - } - - virtual void numWheelEventHandlersChanged(unsigned) override - { - } - - virtual void* webView() const override - { - return webView_; - } - - PopupMenu* popupMenu() - { - return popupMenu_; - } - - void setPopupMenu(PopupMenu* popupMenu) - { - popupMenu_ = popupMenu; - } - - void paintPopupMenu(void* bits, int pitch) - { - if (popupMenu_) - popupMenu_->paint(bits, pitch); - } - - void paintToolTip(void* bits, int pitch) - { - toolTip_.paint(bits, pitch); - } - - protected: - WebCore::FloatRect rect_; - IWebView* webView_; - ToolTip toolTip_; - PopupMenu* popupMenu_; - }; -} diff --git a/wke/wkeContextMenuClient.cpp b/wke/wkeContextMenuClient.cpp new file mode 100644 index 00000000..3b41e142 --- /dev/null +++ b/wke/wkeContextMenuClient.cpp @@ -0,0 +1,63 @@ +////////////////////////////////////////////////////////////////////////// + +#include "wkeContextMenuClient.h" + +////////////////////////////////////////////////////////////////////////// + +namespace wke +{ + + +ContextMenuClient::~ContextMenuClient() +{ + +} +void ContextMenuClient::contextMenuDestroyed() +{ + delete this; +} + +void ContextMenuClient::stopSpeaking() +{ + +} + +void ContextMenuClient::speak(const String&) +{ + +} + +bool ContextMenuClient::isSpeaking() +{ + return false; +} + +void ContextMenuClient::lookUpInDictionary(WebCore::Frame*) +{ + +} + +void ContextMenuClient::searchWithGoogle(const WebCore::Frame*) +{ + +} + +void ContextMenuClient::downloadURL(const WebCore::KURL& url) +{ + +} + +void ContextMenuClient::contextMenuItemSelected(WebCore::ContextMenuItem* item, const WebCore::ContextMenu* parentMenu) +{ + +} + +PassOwnPtr ContextMenuClient::customizeMenu(PassOwnPtr menu) +{ + return menu; +} + + + + +};//namespace wke \ No newline at end of file diff --git a/wke/wkeContextMenuClient.h b/wke/wkeContextMenuClient.h new file mode 100644 index 00000000..3ab102fb --- /dev/null +++ b/wke/wkeContextMenuClient.h @@ -0,0 +1,48 @@ +#ifndef WKE_CONTEXT_MENU_CLIENT_H +#define WKE_CONTEXT_MENU_CLIENT_H + +////////////////////////////////////////////////////////////////////////// + + +#include +#include +#include + + +////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + + + +class ContextMenuClient : public WebCore::ContextMenuClient +{ +public: + virtual ~ContextMenuClient(); + + virtual void contextMenuDestroyed() override; + virtual PassOwnPtr customizeMenu(PassOwnPtr menu) override; + virtual void contextMenuItemSelected(WebCore::ContextMenuItem* item, const WebCore::ContextMenu* parentMenu) override; + + virtual void downloadURL(const WebCore::KURL& url) override; + + virtual void searchWithGoogle(const WebCore::Frame*) override; + + virtual void lookUpInDictionary(WebCore::Frame*) override; + + virtual bool isSpeaking() override; + virtual void speak(const String&) override; + virtual void stopSpeaking() override; +}; + + + +} + + + +#endif//#ifndef WKE_CONTEXT_MENU_CLIENT_H \ No newline at end of file diff --git a/wke/wkeContextMenuClient.inl b/wke/wkeContextMenuClient.inl deleted file mode 100644 index 7fbc2613..00000000 --- a/wke/wkeContextMenuClient.inl +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include - -namespace wke -{ - class ContextMenuClient : public WebCore::ContextMenuClient { - public: - virtual ~ContextMenuClient() { } - - virtual void contextMenuDestroyed() override - { - delete this; - } - - virtual PassOwnPtr customizeMenu(PassOwnPtr menu) override - { - return menu; - } - - virtual void contextMenuItemSelected(WebCore::ContextMenuItem* item, const WebCore::ContextMenu* parentMenu) override - { - } - - virtual void downloadURL(const WebCore::KURL& url) override - { - } - - virtual void searchWithGoogle(const WebCore::Frame*) override - { - } - - virtual void lookUpInDictionary(WebCore::Frame*) override - { - } - - virtual bool isSpeaking() override - { - return false; - } - - virtual void speak(const String&) override - { - } - - virtual void stopSpeaking() override - { - } - }; -} diff --git a/wke/wkeDragClient.cpp b/wke/wkeDragClient.cpp new file mode 100644 index 00000000..2905cb62 --- /dev/null +++ b/wke/wkeDragClient.cpp @@ -0,0 +1,55 @@ +////////////////////////////////////////////////////////////////////////// + + +#include "wkeDragClient.h" + + +////////////////////////////////////////////////////////////////////////// + + +namespace wke +{ + + + +DragClient::~DragClient() +{ + +} + + +void DragClient::dragControllerDestroyed() +{ + delete this; +} + +void DragClient::willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*) +{ + +} + +void DragClient::willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData*) +{ + +} + +void DragClient::startDrag(WebCore::DragImageRef dragImage, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, WebCore::Clipboard*, WebCore::Frame*, bool linkDrag /*= false*/) +{ + +} + +WebCore::DragSourceAction DragClient::dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) +{ + return WebCore::DragSourceActionAny; +} + +WebCore::DragDestinationAction DragClient::actionMaskForDrag(WebCore::DragData*) +{ + return WebCore::DragDestinationActionAny; +} + + + + + +};//namespace wke \ No newline at end of file diff --git a/wke/wkeDragClient.h b/wke/wkeDragClient.h new file mode 100644 index 00000000..9d30ca19 --- /dev/null +++ b/wke/wkeDragClient.h @@ -0,0 +1,46 @@ +#ifndef WKE_DRAG_CLIENT_H +#define WKE_DRAG_CLIENT_H + +////////////////////////////////////////////////////////////////////////// + + +#include +#include +#include + + +////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + + + +class DragClient : public WebCore::DragClient +{ +protected: + virtual ~DragClient();; + + virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData*) override; + + virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*) override; + + virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData*) override; + + //We work in window rather than view coordinates here + virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) override; + + virtual void startDrag(WebCore::DragImageRef dragImage, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, WebCore::Clipboard*, WebCore::Frame*, bool linkDrag = false) override; + + virtual void dragControllerDestroyed() override; +}; + + + +} + + +#endif //#ifndef WKE_DRAG_CLIENT_H \ No newline at end of file diff --git a/wke/wkeDragClient.inl b/wke/wkeDragClient.inl deleted file mode 100644 index 8a89b343..00000000 --- a/wke/wkeDragClient.inl +++ /dev/null @@ -1,39 +0,0 @@ - -#include -#include - -namespace wke -{ - class DragClient : public WebCore::DragClient - { - virtual ~DragClient() {}; - - virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData*) override - { - } - - virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*) override - { - } - - virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData*) override - { - return WebCore::DragDestinationActionAny; - } - - //We work in window rather than view coordinates here - virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) override - { - return WebCore::DragSourceActionAny; - } - - virtual void startDrag(WebCore::DragImageRef dragImage, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, WebCore::Clipboard*, WebCore::Frame*, bool linkDrag = false) override - { - } - - virtual void dragControllerDestroyed() override - { - delete this; - } - }; -} \ No newline at end of file diff --git a/wke/wkeEditorClient.cpp b/wke/wkeEditorClient.cpp new file mode 100644 index 00000000..672de036 --- /dev/null +++ b/wke/wkeEditorClient.cpp @@ -0,0 +1,446 @@ +////////////////////////////////////////////////////////////////////////// + + +#include "wkeEditorClient.h" + + +////////////////////////////////////////////////////////////////////////// + + +namespace wke +{ + + + +static const unsigned CtrlKey = 1 << 0; +static const unsigned AltKey = 1 << 1; +static const unsigned ShiftKey = 1 << 2; + +struct KeyDownEntry { + unsigned virtualKey; + unsigned modifiers; + const char* name; +}; + +struct KeyPressEntry { + unsigned charCode; + unsigned modifiers; + const char* name; +}; + +static const KeyDownEntry keyDownEntries[] = { + { VK_LEFT, 0, "MoveLeft" }, + { VK_LEFT, ShiftKey, "MoveLeftAndModifySelection" }, + { VK_LEFT, CtrlKey, "MoveWordLeft" }, + { VK_LEFT, CtrlKey | ShiftKey, "MoveWordLeftAndModifySelection" }, + { VK_RIGHT, 0, "MoveRight" }, + { VK_RIGHT, ShiftKey, "MoveRightAndModifySelection" }, + { VK_RIGHT, CtrlKey, "MoveWordRight" }, + { VK_RIGHT, CtrlKey | ShiftKey, "MoveWordRightAndModifySelection" }, + { VK_UP, 0, "MoveUp" }, + { VK_UP, ShiftKey, "MoveUpAndModifySelection" }, + { VK_PRIOR, ShiftKey, "MovePageUpAndModifySelection" }, + { VK_DOWN, 0, "MoveDown" }, + { VK_DOWN, ShiftKey, "MoveDownAndModifySelection" }, + { VK_NEXT, ShiftKey, "MovePageDownAndModifySelection" }, + { VK_PRIOR, 0, "MovePageUp" }, + { VK_NEXT, 0, "MovePageDown" }, + { VK_HOME, 0, "MoveToBeginningOfLine" }, + { VK_HOME, ShiftKey, "MoveToBeginningOfLineAndModifySelection" }, + { VK_HOME, CtrlKey, "MoveToBeginningOfDocument" }, + { VK_HOME, CtrlKey | ShiftKey, "MoveToBeginningOfDocumentAndModifySelection" }, + + { VK_END, 0, "MoveToEndOfLine" }, + { VK_END, ShiftKey, "MoveToEndOfLineAndModifySelection" }, + { VK_END, CtrlKey, "MoveToEndOfDocument" }, + { VK_END, CtrlKey | ShiftKey, "MoveToEndOfDocumentAndModifySelection" }, + + { VK_BACK, 0, "DeleteBackward" }, + { VK_BACK, ShiftKey, "DeleteBackward" }, + { VK_DELETE, 0, "DeleteForward" }, + { VK_BACK, CtrlKey, "DeleteWordBackward" }, + { VK_DELETE, CtrlKey, "DeleteWordForward" }, + + { 'B', CtrlKey, "ToggleBold" }, + { 'I', CtrlKey, "ToggleItalic" }, + + { VK_ESCAPE, 0, "Cancel" }, + { VK_OEM_PERIOD, CtrlKey, "Cancel" }, + { VK_TAB, 0, "InsertTab" }, + { VK_TAB, ShiftKey, "InsertBacktab" }, + { VK_RETURN, 0, "InsertNewline" }, + { VK_RETURN, CtrlKey, "InsertNewline" }, + { VK_RETURN, AltKey, "InsertNewline" }, + { VK_RETURN, ShiftKey, "InsertNewline" }, + { VK_RETURN, AltKey | ShiftKey, "InsertNewline" }, + + // It's not quite clear whether clipboard shortcuts and Undo/Redo should be handled + // in the application or in WebKit. We chose WebKit. + { 'C', CtrlKey, "Copy" }, + { 'V', CtrlKey, "Paste" }, + { 'X', CtrlKey, "Cut" }, + { 'A', CtrlKey, "SelectAll" }, + { VK_INSERT, CtrlKey, "Copy" }, + { VK_DELETE, ShiftKey, "Cut" }, + { VK_INSERT, ShiftKey, "Paste" }, + { 'Z', CtrlKey, "Undo" }, + { 'Z', CtrlKey | ShiftKey, "Redo" }, +}; + +static const KeyPressEntry keyPressEntries[] = { + { '\t', 0, "InsertTab" }, + { '\t', ShiftKey, "InsertBacktab" }, + { '\r', 0, "InsertNewline" }, + { '\r', CtrlKey, "InsertNewline" }, + { '\r', AltKey, "InsertNewline" }, + { '\r', ShiftKey, "InsertNewline" }, + { '\r', AltKey | ShiftKey, "InsertNewline" }, +}; + +static const char* interpretKeyEvent(const WebCore::KeyboardEvent* evt) +{ + ASSERT(evt->type() == WebCore::eventNames().keydownEvent || evt->type() == WebCore::eventNames().keypressEvent); + + static HashMap* keyDownCommandsMap = 0; + static HashMap* keyPressCommandsMap = 0; + + if (!keyDownCommandsMap) { + keyDownCommandsMap = new HashMap; + keyPressCommandsMap = new HashMap; + + for (unsigned i = 0; i < _countof(keyDownEntries); i++) + keyDownCommandsMap->set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, keyDownEntries[i].name); + + for (unsigned i = 0; i < _countof(keyPressEntries); i++) + keyPressCommandsMap->set(keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, keyPressEntries[i].name); + } + + unsigned modifiers = 0; + if (evt->shiftKey()) + modifiers |= ShiftKey; + if (evt->altKey()) + modifiers |= AltKey; + if (evt->ctrlKey()) + modifiers |= CtrlKey; + + if (evt->type() == WebCore::eventNames().keydownEvent) { + int mapKey = modifiers << 16 | evt->keyCode(); + return mapKey ? keyDownCommandsMap->get(mapKey) : 0; + } + + int mapKey = modifiers << 16 | evt->charCode(); + return mapKey ? keyPressCommandsMap->get(mapKey) : 0; +} + + + + +EditorClient::~EditorClient() +{ + +} +void EditorClient::pageDestroyed() +{ + delete this; +} + +WebCore::TextCheckerClient* EditorClient::textChecker() +{ + return this; +} + +void EditorClient::requestCheckingOfString(WebCore::SpellChecker*, int, WebCore::TextCheckingTypeMask, const WTF::String&) +{ + +} + +void EditorClient::getGuessesForWord(const WTF::String& word, const WTF::String& context, WTF::Vector& guesses) +{ + +} + +void EditorClient::setInputMethodState(bool enabled) +{ + +} + +void EditorClient::willSetInputMethodState() +{ + +} + +bool EditorClient::spellingUIIsShowing() +{ + return false; +} + +void EditorClient::showSpellingUI(bool show) +{ + +} + +void EditorClient::updateSpellingUIWithMisspelledWord(const String&) +{ + +} + +void EditorClient::updateSpellingUIWithGrammarString(const String&, const WebCore::GrammarDetail& detail) +{ + +} + +void EditorClient::checkGrammarOfString(const UChar*, int length, Vector&, int* badGrammarLocation, int* badGrammarLength) +{ + +} + +String EditorClient::getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord) +{ + return String(); +} + +void EditorClient::checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength) +{ + +} + +void EditorClient::learnWord(const String&) +{ + +} + +void EditorClient::ignoreWordInSpellDocument(const String&) +{ + +} + +void EditorClient::textDidChangeInTextArea(WebCore::Element*) +{ + +} + +void EditorClient::textWillBeDeletedInTextField(WebCore::Element*) +{ + +} + +bool EditorClient::doTextFieldCommandFromEvent(WebCore::Element*, WebCore::KeyboardEvent*) +{ + return false; +} + +void EditorClient::textDidChangeInTextField(WebCore::Element*) +{ + +} + +void EditorClient::textFieldDidEndEditing(WebCore::Element*) +{ + +} + +void EditorClient::textFieldDidBeginEditing(WebCore::Element*) +{ + +} + +void EditorClient::handleInputMethodKeydown(WebCore::KeyboardEvent*) +{ + +} + +void EditorClient::handleKeyboardEvent(WebCore::KeyboardEvent* evt) +{ + WebCore::Node* node = evt->target()->toNode(); + ASSERT(node); + WebCore::Frame* frame = node->document()->frame(); + ASSERT(frame); + + const WebCore::PlatformKeyboardEvent* keyEvent = evt->keyEvent(); + if (!keyEvent || keyEvent->isSystemKey()) // do not treat this as text input if it's a system key event + return; + + WebCore::Editor::Command command = frame->editor()->command(interpretKeyEvent(evt)); + + if (keyEvent->type() == WebCore::PlatformKeyboardEvent::RawKeyDown) { + // WebKit doesn't have enough information about mode to decide how commands that just insert text if executed via Editor should be treated, + // so we leave it upon WebCore to either handle them immediately (e.g. Tab that changes focus) or let a keypress event be generated + // (e.g. Tab that inserts a Tab character, or Enter). + if (!command.isTextInsertion() && command.execute(evt)) + evt->setDefaultHandled(); + return; + } + + if (command.execute(evt)) + { + evt->setDefaultHandled(); + return; + } + + // Don't insert null or control characters as they can result in unexpected behaviour + if (evt->charCode() < ' ') + return; + + if (frame->editor()->insertText(evt->keyEvent()->text(), evt)) + evt->setDefaultHandled(); +} + +void EditorClient::redo() +{ + +} + +void EditorClient::undo() +{ + +} + +bool EditorClient::canRedo() const +{ + return false; +} + +bool EditorClient::canUndo() const +{ + return false; +} + +bool EditorClient::canPaste(WebCore::Frame*, bool defaultValue) const +{ + return defaultValue; +} + +bool EditorClient::canCopyCut(WebCore::Frame*, bool defaultValue) const +{ + return defaultValue; +} + +void EditorClient::clearUndoRedoOperations() +{ + +} + +void EditorClient::registerCommandForRedo(PassRefPtr) +{ + +} + +void EditorClient::registerCommandForUndo(PassRefPtr) +{ + +} + +void EditorClient::didSetSelectionTypesForPasteboard() +{ + +} + +void EditorClient::didWriteSelectionToPasteboard() +{ + +} + +void EditorClient::didEndEditing() +{ + +} + +void EditorClient::respondToChangedSelection() +{ + +} + +void EditorClient::respondToChangedContents() +{ + +} + +void EditorClient::didBeginEditing() +{ + +} + +bool EditorClient::shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*) +{ + return true; +} + +bool EditorClient::shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*) +{ + return true; +} + +bool EditorClient::shouldChangeSelectedRange(WebCore::Range* fromRange, WebCore::Range* toRange, WebCore::EAffinity, bool stillSelecting) +{ + return true; +} + +bool EditorClient::shouldInsertText(const String&, WebCore::Range*, WebCore::EditorInsertAction) +{ + return true; +} + +bool EditorClient::shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction) +{ + return true; +} + +bool EditorClient::shouldEndEditing(WebCore::Range*) +{ + return true; +} + +bool EditorClient::shouldBeginEditing(WebCore::Range*) +{ + return true; +} + +int EditorClient::spellCheckerDocumentTag() +{ + return 0; +} + +void EditorClient::toggleGrammarChecking() +{ + +} + +bool EditorClient::isGrammarCheckingEnabled() +{ + return false; +} + +void EditorClient::toggleContinuousSpellChecking() +{ + +} + +bool EditorClient::isContinuousSpellCheckingEnabled() +{ + return false; +} + +bool EditorClient::isSelectTrailingWhitespaceEnabled() +{ + return false; +} + +bool EditorClient::smartInsertDeleteEnabled() +{ + return false; +} + +bool EditorClient::shouldShowDeleteInterface(WebCore::HTMLElement*) +{ + return false; +} + +bool EditorClient::shouldDeleteRange(WebCore::Range*) +{ + return true; +} + + + + +};//namespace wke \ No newline at end of file diff --git a/wke/wkeEditorClient.h b/wke/wkeEditorClient.h new file mode 100644 index 00000000..2484e72e --- /dev/null +++ b/wke/wkeEditorClient.h @@ -0,0 +1,150 @@ +#ifndef WKE_EDITOR_CLIENT_H +#define WKE_EDITOR_CLIENT_H + +////////////////////////////////////////////////////////////////////////// + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +////////////////////////////////////////////////////////////////////////// + + + + +namespace wke +{ + + + + +class EditorClient : public WebCore::EditorClient, public WebCore::TextCheckerClient +{ +public: + virtual ~EditorClient(); + + virtual void pageDestroyed() override; + + virtual bool shouldDeleteRange(WebCore::Range*) override; + + virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*) override; + + virtual bool smartInsertDeleteEnabled() override; + + virtual bool isSelectTrailingWhitespaceEnabled() override; + + virtual bool isContinuousSpellCheckingEnabled() override; + + virtual void toggleContinuousSpellChecking() override; + + virtual bool isGrammarCheckingEnabled() override; + + virtual void toggleGrammarChecking() override; + + virtual int spellCheckerDocumentTag() override; + + virtual bool shouldBeginEditing(WebCore::Range*) override; + + virtual bool shouldEndEditing(WebCore::Range*) override; + + virtual bool shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction) override; + + virtual bool shouldInsertText(const String&, WebCore::Range*, WebCore::EditorInsertAction) override; + + virtual bool shouldChangeSelectedRange(WebCore::Range* fromRange, WebCore::Range* toRange, WebCore::EAffinity, bool stillSelecting) override; + + virtual bool shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*) override; + + virtual bool shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*) override; + + virtual void didBeginEditing() override; + + virtual void respondToChangedContents() override; + + virtual void respondToChangedSelection() override; + + virtual void didEndEditing() override; + + virtual void didWriteSelectionToPasteboard() override; + + virtual void didSetSelectionTypesForPasteboard() override; + + virtual void registerCommandForUndo(PassRefPtr) override; + + virtual void registerCommandForRedo(PassRefPtr) override; + + virtual void clearUndoRedoOperations() override; + + virtual bool canCopyCut(WebCore::Frame*, bool defaultValue) const override; + + virtual bool canPaste(WebCore::Frame*, bool defaultValue) const override; + + virtual bool canUndo() const override; + + virtual bool canRedo() const override; + + virtual void undo() override; + + virtual void redo() override; + + virtual void handleKeyboardEvent(WebCore::KeyboardEvent* evt) override; + + virtual void handleInputMethodKeydown(WebCore::KeyboardEvent*) override; + + virtual void textFieldDidBeginEditing(WebCore::Element*) override; + + virtual void textFieldDidEndEditing(WebCore::Element*) override; + + virtual void textDidChangeInTextField(WebCore::Element*) override; + + virtual bool doTextFieldCommandFromEvent(WebCore::Element*, WebCore::KeyboardEvent*) override; + + virtual void textWillBeDeletedInTextField(WebCore::Element*) override; + + virtual void textDidChangeInTextArea(WebCore::Element*) override; + + virtual void ignoreWordInSpellDocument(const String&) override; + + virtual void learnWord(const String&) override; + + virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength) override; + + virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord) override; + + virtual void checkGrammarOfString(const UChar*, int length, Vector&, int* badGrammarLocation, int* badGrammarLength) override; + + virtual void updateSpellingUIWithGrammarString(const String&, const WebCore::GrammarDetail& detail) override; + + virtual void updateSpellingUIWithMisspelledWord(const String&) override; + + virtual void showSpellingUI(bool show) override; + + virtual bool spellingUIIsShowing() override; + + virtual void willSetInputMethodState() override; + + virtual void setInputMethodState(bool enabled) override; + + virtual void getGuessesForWord(const WTF::String& word, const WTF::String& context, WTF::Vector& guesses) override; + + virtual void requestCheckingOfString(WebCore::SpellChecker*, int, WebCore::TextCheckingTypeMask, const WTF::String&) override; + + virtual WebCore::TextCheckerClient* textChecker() override; +}; + + + + +};//namespace wke + + +#endif//#ifndef WKE_EDITOR_CLIENT_H \ No newline at end of file diff --git a/wke/wkeEditorClient.inl b/wke/wkeEditorClient.inl deleted file mode 100644 index ef0a9419..00000000 --- a/wke/wkeEditorClient.inl +++ /dev/null @@ -1,403 +0,0 @@ - -#include -#include -#include -#include -#include - -namespace wke -{ - static const unsigned CtrlKey = 1 << 0; - static const unsigned AltKey = 1 << 1; - static const unsigned ShiftKey = 1 << 2; - - struct KeyDownEntry { - unsigned virtualKey; - unsigned modifiers; - const char* name; - }; - - struct KeyPressEntry { - unsigned charCode; - unsigned modifiers; - const char* name; - }; - - static const KeyDownEntry keyDownEntries[] = { - { VK_LEFT, 0, "MoveLeft" }, - { VK_LEFT, ShiftKey, "MoveLeftAndModifySelection" }, - { VK_LEFT, CtrlKey, "MoveWordLeft" }, - { VK_LEFT, CtrlKey | ShiftKey, "MoveWordLeftAndModifySelection" }, - { VK_RIGHT, 0, "MoveRight" }, - { VK_RIGHT, ShiftKey, "MoveRightAndModifySelection" }, - { VK_RIGHT, CtrlKey, "MoveWordRight" }, - { VK_RIGHT, CtrlKey | ShiftKey, "MoveWordRightAndModifySelection" }, - { VK_UP, 0, "MoveUp" }, - { VK_UP, ShiftKey, "MoveUpAndModifySelection" }, - { VK_PRIOR, ShiftKey, "MovePageUpAndModifySelection" }, - { VK_DOWN, 0, "MoveDown" }, - { VK_DOWN, ShiftKey, "MoveDownAndModifySelection" }, - { VK_NEXT, ShiftKey, "MovePageDownAndModifySelection" }, - { VK_PRIOR, 0, "MovePageUp" }, - { VK_NEXT, 0, "MovePageDown" }, - { VK_HOME, 0, "MoveToBeginningOfLine" }, - { VK_HOME, ShiftKey, "MoveToBeginningOfLineAndModifySelection" }, - { VK_HOME, CtrlKey, "MoveToBeginningOfDocument" }, - { VK_HOME, CtrlKey | ShiftKey, "MoveToBeginningOfDocumentAndModifySelection" }, - - { VK_END, 0, "MoveToEndOfLine" }, - { VK_END, ShiftKey, "MoveToEndOfLineAndModifySelection" }, - { VK_END, CtrlKey, "MoveToEndOfDocument" }, - { VK_END, CtrlKey | ShiftKey, "MoveToEndOfDocumentAndModifySelection" }, - - { VK_BACK, 0, "DeleteBackward" }, - { VK_BACK, ShiftKey, "DeleteBackward" }, - { VK_DELETE, 0, "DeleteForward" }, - { VK_BACK, CtrlKey, "DeleteWordBackward" }, - { VK_DELETE, CtrlKey, "DeleteWordForward" }, - - { 'B', CtrlKey, "ToggleBold" }, - { 'I', CtrlKey, "ToggleItalic" }, - - { VK_ESCAPE, 0, "Cancel" }, - { VK_OEM_PERIOD, CtrlKey, "Cancel" }, - { VK_TAB, 0, "InsertTab" }, - { VK_TAB, ShiftKey, "InsertBacktab" }, - { VK_RETURN, 0, "InsertNewline" }, - { VK_RETURN, CtrlKey, "InsertNewline" }, - { VK_RETURN, AltKey, "InsertNewline" }, - { VK_RETURN, ShiftKey, "InsertNewline" }, - { VK_RETURN, AltKey | ShiftKey, "InsertNewline" }, - - // It's not quite clear whether clipboard shortcuts and Undo/Redo should be handled - // in the application or in WebKit. We chose WebKit. - { 'C', CtrlKey, "Copy" }, - { 'V', CtrlKey, "Paste" }, - { 'X', CtrlKey, "Cut" }, - { 'A', CtrlKey, "SelectAll" }, - { VK_INSERT, CtrlKey, "Copy" }, - { VK_DELETE, ShiftKey, "Cut" }, - { VK_INSERT, ShiftKey, "Paste" }, - { 'Z', CtrlKey, "Undo" }, - { 'Z', CtrlKey | ShiftKey, "Redo" }, - }; - - static const KeyPressEntry keyPressEntries[] = { - { '\t', 0, "InsertTab" }, - { '\t', ShiftKey, "InsertBacktab" }, - { '\r', 0, "InsertNewline" }, - { '\r', CtrlKey, "InsertNewline" }, - { '\r', AltKey, "InsertNewline" }, - { '\r', ShiftKey, "InsertNewline" }, - { '\r', AltKey | ShiftKey, "InsertNewline" }, - }; - - static const char* interpretKeyEvent(const WebCore::KeyboardEvent* evt) - { - ASSERT(evt->type() == WebCore::eventNames().keydownEvent || evt->type() == WebCore::eventNames().keypressEvent); - - static HashMap* keyDownCommandsMap = 0; - static HashMap* keyPressCommandsMap = 0; - - if (!keyDownCommandsMap) { - keyDownCommandsMap = new HashMap; - keyPressCommandsMap = new HashMap; - - for (unsigned i = 0; i < _countof(keyDownEntries); i++) - keyDownCommandsMap->set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, keyDownEntries[i].name); - - for (unsigned i = 0; i < _countof(keyPressEntries); i++) - keyPressCommandsMap->set(keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, keyPressEntries[i].name); - } - - unsigned modifiers = 0; - if (evt->shiftKey()) - modifiers |= ShiftKey; - if (evt->altKey()) - modifiers |= AltKey; - if (evt->ctrlKey()) - modifiers |= CtrlKey; - - if (evt->type() == WebCore::eventNames().keydownEvent) { - int mapKey = modifiers << 16 | evt->keyCode(); - return mapKey ? keyDownCommandsMap->get(mapKey) : 0; - } - - int mapKey = modifiers << 16 | evt->charCode(); - return mapKey ? keyPressCommandsMap->get(mapKey) : 0; - } - - class EditorClient : public WebCore::EditorClient, public WebCore::TextCheckerClient - { - public: - virtual ~EditorClient() { } - - virtual void pageDestroyed() override - { - delete this; - } - - virtual bool shouldDeleteRange(WebCore::Range*) override - { - return true; - } - - virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*) override - { - return false; - } - - virtual bool smartInsertDeleteEnabled() override - { - return false; - } - - virtual bool isSelectTrailingWhitespaceEnabled() override - { - return false; - } - - virtual bool isContinuousSpellCheckingEnabled() override - { - return false; - } - - virtual void toggleContinuousSpellChecking() override - { - } - - virtual bool isGrammarCheckingEnabled() override - { - return false; - } - - virtual void toggleGrammarChecking() override - { - } - - virtual int spellCheckerDocumentTag() override - { - return 0; - } - - virtual bool shouldBeginEditing(WebCore::Range*) override - { - return true; - } - - virtual bool shouldEndEditing(WebCore::Range*) override - { - return true; - } - - virtual bool shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction) override - { - return true; - } - - virtual bool shouldInsertText(const String&, WebCore::Range*, WebCore::EditorInsertAction) override - { - return true; - } - - virtual bool shouldChangeSelectedRange(WebCore::Range* fromRange, WebCore::Range* toRange, WebCore::EAffinity, bool stillSelecting) override - { - return true; - } - - virtual bool shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*) override - { - return true; - } - - virtual bool shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*) override - { - return true; - } - - virtual void didBeginEditing() override - { - } - - virtual void respondToChangedContents() override - { - } - - virtual void respondToChangedSelection() override - { - } - - virtual void didEndEditing() override - { - } - - virtual void didWriteSelectionToPasteboard() override - { - } - - virtual void didSetSelectionTypesForPasteboard() override - { - } - - virtual void registerCommandForUndo(PassRefPtr) override - { - } - - virtual void registerCommandForRedo(PassRefPtr) override - { - } - - virtual void clearUndoRedoOperations() override - { - } - - virtual bool canCopyCut(WebCore::Frame*, bool defaultValue) const override - { - return defaultValue; - } - - virtual bool canPaste(WebCore::Frame*, bool defaultValue) const override - { - return defaultValue; - } - - virtual bool canUndo() const override - { - return false; - } - - virtual bool canRedo() const override - { - return false; - } - - virtual void undo() override - { - } - - virtual void redo() override - { - } - - virtual void handleKeyboardEvent(WebCore::KeyboardEvent* evt) override - { - WebCore::Node* node = evt->target()->toNode(); - ASSERT(node); - WebCore::Frame* frame = node->document()->frame(); - ASSERT(frame); - - const WebCore::PlatformKeyboardEvent* keyEvent = evt->keyEvent(); - if (!keyEvent || keyEvent->isSystemKey()) // do not treat this as text input if it's a system key event - return; - - WebCore::Editor::Command command = frame->editor()->command(interpretKeyEvent(evt)); - - if (keyEvent->type() == WebCore::PlatformKeyboardEvent::RawKeyDown) { - // WebKit doesn't have enough information about mode to decide how commands that just insert text if executed via Editor should be treated, - // so we leave it upon WebCore to either handle them immediately (e.g. Tab that changes focus) or let a keypress event be generated - // (e.g. Tab that inserts a Tab character, or Enter). - if (!command.isTextInsertion() && command.execute(evt)) - evt->setDefaultHandled(); - return; - } - - if (command.execute(evt)) - { - evt->setDefaultHandled(); - return; - } - - // Don't insert null or control characters as they can result in unexpected behaviour - if (evt->charCode() < ' ') - return; - - if (frame->editor()->insertText(evt->keyEvent()->text(), evt)) - evt->setDefaultHandled(); - } - - virtual void handleInputMethodKeydown(WebCore::KeyboardEvent*) override - { - } - - virtual void textFieldDidBeginEditing(WebCore::Element*) override - { - } - - virtual void textFieldDidEndEditing(WebCore::Element*) override - { - } - - virtual void textDidChangeInTextField(WebCore::Element*) override - { - } - - virtual bool doTextFieldCommandFromEvent(WebCore::Element*, WebCore::KeyboardEvent*) override - { - return false; - } - - virtual void textWillBeDeletedInTextField(WebCore::Element*) override - { - } - - virtual void textDidChangeInTextArea(WebCore::Element*) override - { - } - - virtual void ignoreWordInSpellDocument(const String&) override - { - } - - virtual void learnWord(const String&) override - { - } - - virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength) override - { - } - - virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord) override - { - return String(); - } - - virtual void checkGrammarOfString(const UChar*, int length, Vector&, int* badGrammarLocation, int* badGrammarLength) override - { - } - - virtual void updateSpellingUIWithGrammarString(const String&, const WebCore::GrammarDetail& detail) override - { - } - - virtual void updateSpellingUIWithMisspelledWord(const String&) override - { - } - - virtual void showSpellingUI(bool show) override - { - } - - virtual bool spellingUIIsShowing() override - { - return false; - } - - virtual void willSetInputMethodState() override - { - } - - virtual void setInputMethodState(bool enabled) override - { - } - - virtual void getGuessesForWord(const WTF::String& word, const WTF::String& context, WTF::Vector& guesses) override - { - } - - virtual void requestCheckingOfString(WebCore::SpellChecker*, int, WebCore::TextCheckingTypeMask, const WTF::String&) override - { - } - - virtual WebCore::TextCheckerClient* textChecker() override { return this; } - }; -} \ No newline at end of file diff --git a/wke/wkeFrameLoaderClient.cpp b/wke/wkeFrameLoaderClient.cpp new file mode 100644 index 00000000..71c6f585 --- /dev/null +++ b/wke/wkeFrameLoaderClient.cpp @@ -0,0 +1,849 @@ +////////////////////////////////////////////////////////////////////////// + + +#include "wkeFrameLoaderClient.h" +#include "wkeString.h" + + +////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + +FrameNetworkingContext::FrameNetworkingContext(WebCore::Frame* frame) + : WebCore::FrameNetworkingContext(frame) +{ + +} + +PassRefPtr FrameNetworkingContext::create(WebCore::Frame* frame) +{ + return adoptRef(new FrameNetworkingContext(frame)); +} + + +WebCore::ResourceError FrameNetworkingContext::blockedError(const WebCore::ResourceRequest& request) const +{ + return frame()->loader()->client()->blockedError(request); +} + +WTF::String FrameNetworkingContext::referrer() const +{ + return frame()->loader()->referrer(); +} + +WTF::String FrameNetworkingContext::userAgent() const +{ + return m_userAgent; +} + + + +FrameLoaderClient::FrameLoaderClient(CWebView* webView, WebCore::Page* page) + :m_webView(webView) + ,m_page(page) + ,m_frame(NULL) + ,m_loadFailed(false) + ,m_loaded(false) + ,m_documentReady(false) +{ + +} + + +void FrameLoaderClient::frameLoaderDestroyed() +{ + dbgMsg(L"frameLoaderDestroyed\n"); + delete this; +} + +void FrameLoaderClient::setUserAgent(const WTF::String& str) +{ + m_userAgent = str; +} + +bool FrameLoaderClient::isDocumentReady() const +{ + return m_documentReady; +} + +bool FrameLoaderClient::isLoaded() const +{ + return m_loaded; +} + +bool FrameLoaderClient::isLoadFailed() const +{ + return m_loadFailed; +} + +WebCore::Frame* FrameLoaderClient::frame() const +{ + return m_frame; +} + +void FrameLoaderClient::setFrame(WebCore::Frame* frame) +{ + m_frame = frame; +} + +PassRefPtr FrameLoaderClient::createNetworkingContext() +{ + return FrameNetworkingContext::create(m_frame); +} + +void FrameLoaderClient::registerForIconNotification(bool listen /*= true*/) +{ + +} + + +#if USE(V8) +bool FrameLoaderClient::allowScriptExtension(const WTF::String& extensionName, int extensionGroup) +{ + +} + +void FrameLoaderClient::didCreateIsolatedScriptContext() +{ + +} + +void FrameLoaderClient::didDestroyScriptContextForFrame() +{ + +} + +void FrameLoaderClient::didCreateScriptContextForFrame() +{ + +} +#endif + + +void FrameLoaderClient::didPerformFirstNavigation() const +{ + +} + +void FrameLoaderClient::documentElementAvailable() +{ + +} + +void FrameLoaderClient::dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*) +{ + +} + +WTF::String FrameLoaderClient::overrideMediaType() const +{ + return WTF::String(); +} + +WebCore::ObjectContentType FrameLoaderClient::objectContentType(const WebCore::KURL& url, const WTF::String& mimeType, bool shouldPreferPlugInsForImages) +{ + return WebCore::FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages); +} + +#if ENABLE(PLUGIN_PROXY_FOR_VIDEO) +void FrameLoaderClient::showMediaPlayerProxyPlugin(WebCore::Widget*) +{ + +} + +void FrameLoaderClient::hideMediaPlayerProxyPlugin(WebCore::Widget*) +{ + +} + +PassRefPtr FrameLoaderClient::createMediaPlayerProxyPlugin(const WebCore::IntSize&, WebCore::HTMLMediaElement*, const WebCore::KURL&, const Vector&, const Vector&, const WTF::String&) +{ + +} +#endif + + +PassRefPtr FrameLoaderClient::createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector& paramNames, const Vector& paramValues) +{ + return 0; +} + +void FrameLoaderClient::redirectDataToPlugin(WebCore::Widget* pluginWidget) +{ + +} + +PassRefPtr FrameLoaderClient::createPlugin(const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const Vector& paramNames, const Vector& paramValues, const String& mimeType, bool loadManually) +{ + Vector newParamNames = paramNames; + Vector newParamValues = paramValues; + + unsigned int i = 0; + for (; i < newParamNames.size(); i++) { + if (equalIgnoringCase(paramNames[i], "wmode")) + break; + } + + if (i == newParamNames.size()) { + newParamNames.append("wmode"); + newParamValues.append("opaque"); + } + + if (!equalIgnoringCase(newParamValues[i], "opaque") && + !equalIgnoringCase(newParamValues[i], "transparent")) { + newParamValues[i] = "opaque"; + } + + RefPtr pluginView = WebCore::PluginView::create(m_frame, pluginSize, element, url, newParamNames, newParamValues, mimeType, loadManually); + if (pluginView->status() == WebCore::PluginStatusLoadedSuccessfully) + return pluginView; + + return 0; +} + +void FrameLoaderClient::transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, WebCore::Page*) +{ + +} + +void FrameLoaderClient::didTransferChildFrameToNewDocument(WebCore::Page*) +{ + +} + +PassRefPtr FrameLoaderClient::createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) +{ + FrameLoaderClient* loader = new FrameLoaderClient(m_webView, m_page); + RefPtr childFrame = WebCore::Frame::create(m_page, ownerElement, loader); + loader->setFrame(childFrame.get()); + + m_frame->tree()->appendChild(childFrame); + childFrame->tree()->setName(name); + childFrame->init(); + + m_frame->loader()->loadURLIntoChildFrame(url, referrer, childFrame.get()); + if (!childFrame->tree()->parent()) + return 0; + + return childFrame.release(); +} + +void FrameLoaderClient::download(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&) +{ + +} + +bool FrameLoaderClient::canCachePage() const +{ + return false; +} + +void FrameLoaderClient::dispatchDidBecomeFrameset(bool) +{ + +} + +void FrameLoaderClient::didRestoreFromPageCache() +{ + +} + +void FrameLoaderClient::didSaveToPageCache() +{ + +} + +void FrameLoaderClient::transitionToCommittedForNewPage() +{ + bool transparent = m_webView->isTransparent(); + WebCore::Color backgroundColor = transparent ? WebCore::Color::transparent : WebCore::Color::white; + + WebCore::IntSize size(m_webView->width(), m_webView->height()); + m_frame->createView(size, backgroundColor, transparent, WebCore::IntSize(), false); +} + +void FrameLoaderClient::transitionToCommittedFromCachedFrame(WebCore::CachedFrame*) +{ + +} + +void FrameLoaderClient::savePlatformDataToCachedFrame(WebCore::CachedFrame*) +{ + +} + +String FrameLoaderClient::userAgent(const WebCore::KURL&) +{ + if (m_userAgent.isEmpty()) + { + return "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Safari/535.2 wke/1.2"; + } + else + { + return m_userAgent; + } +} + +void FrameLoaderClient::setTitle(const WebCore::StringWithDirection& title, const WebCore::KURL&) +{ + +} + +PassRefPtr FrameLoaderClient::createDocumentLoader(const WebCore::ResourceRequest& request, const WebCore::SubstituteData& data) +{ + return WebCore::DocumentLoader::create(request, data); +} + +void FrameLoaderClient::prepareForDataSourceReplacement() +{ + +} + +void FrameLoaderClient::didFinishLoad() +{ + +} + +void FrameLoaderClient::provisionalLoadStarted() +{ + +} + +void FrameLoaderClient::restoreViewState() +{ + +} + +void FrameLoaderClient::saveViewStateToItem(WebCore::HistoryItem*) +{ + +} + +void FrameLoaderClient::frameLoadCompleted() +{ + +} + +WTF::String FrameLoaderClient::generatedMIMETypeForURLScheme(const WTF::String& URLScheme) const +{ + return String(); +} + +bool FrameLoaderClient::representationExistsForURLScheme(const WTF::String& URLScheme) const +{ + return false; +} + +bool FrameLoaderClient::canShowMIMETypeAsHTML(const String& MIMEType) const +{ + return true; +} + +bool FrameLoaderClient::canShowMIMEType(const String& MIMEType) const +{ + return true; +} + +bool FrameLoaderClient::canHandleRequest(const WebCore::ResourceRequest&) const +{ + return true; +} + +bool FrameLoaderClient::shouldFallBack(const WebCore::ResourceError&) +{ + return false; +} + +WebCore::ResourceError FrameLoaderClient::pluginWillHandleLoadError(const WebCore::ResourceResponse& response) +{ + return WebCore::ResourceError(String(WebKitErrorDomain), WebKitErrorPlugInWillHandleLoad, response.url().string(), String()); +} + +WebCore::ResourceError FrameLoaderClient::fileDoesNotExistError(const WebCore::ResourceResponse& response) +{ + return WebCore::ResourceError(); +} + +WebCore::ResourceError FrameLoaderClient::cannotShowMIMETypeError(const WebCore::ResourceResponse& response) +{ + return WebCore::ResourceError(); +} + +WebCore::ResourceError FrameLoaderClient::interruptedForPolicyChangeError(const WebCore::ResourceRequest& request) +{ + return WebCore::ResourceError(String(WebKitErrorDomain), WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(), String()); +} + +WebCore::ResourceError FrameLoaderClient::cannotShowURLError(const WebCore::ResourceRequest& request) +{ + return WebCore::ResourceError(String(WebKitErrorDomain), WebKitErrorCannotShowURL, request.url().string(), String()); +} + +WebCore::ResourceError FrameLoaderClient::blockedError(const WebCore::ResourceRequest& request) +{ + return WebCore::ResourceError(String(WebKitErrorDomain), WebKitErrorCannotUseRestrictedPort, request.url().string(), String()); +} + +WebCore::ResourceError FrameLoaderClient::cancelledError(const WebCore::ResourceRequest& request) +{ + return WebCore::ResourceError(String(WebURLErrorDomain), WebURLErrorCancelled, request.url().string(), String()); +} + +void FrameLoaderClient::didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL&) +{ + +} + +void FrameLoaderClient::didDisplayInsecureContent() +{ + +} + +bool FrameLoaderClient::shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const +{ + return true; +} + +bool FrameLoaderClient::shouldGoToHistoryItem(WebCore::HistoryItem*) const +{ + return true; +} + +void FrameLoaderClient::updateGlobalHistoryRedirectLinks() +{ + +} + +void FrameLoaderClient::updateGlobalHistory() +{ + +} + +void FrameLoaderClient::finishedLoading(WebCore::DocumentLoader* loader) +{ + // Telling the frame we received some data and passing 0 as the data is our + // way to get work done that is normally done when the first bit of data is + // received, even for the case of a document with no data (like about:blank) + committedLoad(loader, 0, 0); +} + +void FrameLoaderClient::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length) +{ + loader->commitData(data, length); + if (m_frame->document()->isMediaDocument()) + loader->cancelMainResourceLoad(pluginWillHandleLoadError(loader->response())); +} + +void FrameLoaderClient::didChangeTitle(WebCore::DocumentLoader*) +{ + +} + +void FrameLoaderClient::willChangeTitle(WebCore::DocumentLoader*) +{ + +} + +void FrameLoaderClient::startDownload(const WebCore::ResourceRequest&, const String& suggestedName /*= String()*/) +{ + dbgMsg(L"startDownload\n"); +} + +void FrameLoaderClient::setMainFrameDocumentReady(bool) +{ + +} + +void FrameLoaderClient::postProgressFinishedNotification() +{ + +} + +void FrameLoaderClient::postProgressEstimateChangedNotification() +{ + +} + +void FrameLoaderClient::postProgressStartedNotification() +{ + m_loaded = false; + m_loadFailed = false; + m_documentReady = false; +} + +void FrameLoaderClient::setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&) +{ + +} + +void FrameLoaderClient::revertToProvisionalState(WebCore::DocumentLoader*) +{ + +} + +void FrameLoaderClient::dispatchDidLoadMainResource(WebCore::DocumentLoader*) +{ + +} + +void FrameLoaderClient::dispatchWillSubmitForm(WebCore::FramePolicyFunction function, PassRefPtr formState) +{ + (m_frame->loader()->policyChecker()->*function)(WebCore::PolicyUse); +} + +void FrameLoaderClient::dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) +{ + +} + +void FrameLoaderClient::dispatchUnableToImplementPolicy(const WebCore::ResourceError&) +{ + +} + +void FrameLoaderClient::cancelPolicyCheck() +{ + +} + +void FrameLoaderClient::dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest&, PassRefPtr) +{ + // cexer ʵURLʿ + wke::CWebViewHandler& handler = m_webView->m_handler; + + // Ĭ + if (!handler.navigationCallback) + { + (m_frame->loader()->policyChecker()->*function)(WebCore::PolicyUse); + return; + } + + wkeNavigationType type = (wkeNavigationType)action.type(); + wke::CString url = action.url().string(); + if (handler.navigationCallback(m_webView, handler.navigationCallbackParam, type, &url)) + (m_frame->loader()->policyChecker()->*function)(WebCore::PolicyUse); + else + (m_frame->loader()->policyChecker()->*function)(WebCore::PolicyIgnore); +} + +void FrameLoaderClient::dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr, const WTF::String& frameName) +{ + (m_frame->loader()->policyChecker()->*function)(WebCore::PolicyUse); +} + +void FrameLoaderClient::dispatchDecidePolicyForResponse(WebCore::FramePolicyFunction function, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&) +{ + (m_frame->loader()->policyChecker()->*function)(WebCore::PolicyUse); +} + +void FrameLoaderClient::dispatchShow() +{ + +} + +WebCore::Frame* FrameLoaderClient::dispatchCreatePage(const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr formState, const WTF::String& frameName) +{ + // ʵ´ڿ + wke::CWebViewHandler& handler = m_webView->m_handler; + if (!handler.createViewCallback) + return m_page->mainFrame(); + + wkeNewViewInfo info; + info.navigationType = (wkeNavigationType)action.type(); + info.x = CW_USEDEFAULT; + info.y = CW_USEDEFAULT; + info.width = CW_USEDEFAULT; + info.height = CW_USEDEFAULT; + info.locationBarVisible = true; + info.menuBarVisible = true; + info.resizable = true; + info.statusBarVisible = true; + info.toolBarVisible = true; + info.fullscreen = false; + + wke::CString url(action.url().string()); + info.url = &url; + + wke::CString target(frameName); + info.target = ⌖ + + wke::CWebView* createdWebView = handler.createViewCallback(m_webView, handler.createViewCallbackParam, &info); + if (!createdWebView) + return NULL; + + return createdWebView->mainFrame(); +} + +void FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() +{ + +} + +void FrameLoaderClient::dispatchDidFirstLayout() +{ + +} + +void FrameLoaderClient::dispatchDidFinishLoad() +{ + m_loaded = true; + + wke::CWebViewHandler& handler = m_webView->m_handler; + if (handler.loadingFinishCallback) + { + wkeLoadingResult result = WKE_LOADING_SUCCEEDED; + wke::CString url = m_frame->document()->url().string(); + handler.loadingFinishCallback(m_webView, handler.loadingFinishCallbackParam, &url, result, NULL); + } +} + +void FrameLoaderClient::dispatchDidFinishDocumentLoad(WebCore::FrameLoader* loader) +{ + bool isMainDocumentLoaded = !m_documentReady; + m_documentReady = true; + + WebCore::Frame* frame = loader->frame(); + WebCore::DOMWindow* window = frame->existingDOMWindow(); + WebCore::ScriptController* script = frame->script(); + WebCore::JSDOMWindow* jsWindow = script->globalObject(WebCore::mainThreadNormalWorld()); + + wkeDocumentReadyInfo info = { 0 }; + info.frameJSState = (wkeJSState*)jsWindow->globalExec(); + info.mainFrameJSState = (wkeJSState*)m_webView->globalExec(); + + wke::CString url = window->url(); + info.url = &url; + + wke::CWebViewHandler& handler = m_webView->m_handler; + if (handler.documentReadyCallback) + handler.documentReadyCallback(m_webView, handler.documentReadyCallbackParam, &info); +} + +void FrameLoaderClient::dispatchDidFailLoad(const WebCore::ResourceError& error) +{ + m_loadFailed = true; + + wke::CWebViewHandler& handler = m_webView->m_handler; + if (handler.loadingFinishCallback) + { + wkeLoadingResult result = WKE_LOADING_FAILED; + wke::CString failedReason = error.localizedDescription(); + wke::CString url = error.failingURL(); + + if (error.isCancellation()) + result = WKE_LOADING_CANCELED; + + handler.loadingFinishCallback(m_webView, handler.loadingFinishCallbackParam, &url, result, &failedReason); + } +} + +void FrameLoaderClient::dispatchDidFailProvisionalLoad(const WebCore::ResourceError& error) +{ + m_loadFailed = true; + + wke::CWebViewHandler& handler = m_webView->m_handler; + if (handler.loadingFinishCallback) + { + wkeLoadingResult result = WKE_LOADING_FAILED; + wke::CString failedReason = error.localizedDescription(); + wke::CString url = error.failingURL(); + + if (error.isCancellation()) + result = WKE_LOADING_CANCELED; + + handler.loadingFinishCallback(m_webView, handler.loadingFinishCallbackParam, &url, result, &failedReason); + } +} + +void FrameLoaderClient::dispatchDidCommitLoad() +{ + if (m_frame == NULL || m_frame != m_page->mainFrame()) + return; + + wke::CWebViewHandler& handler = m_webView->m_handler; + if (handler.urlChangedCallback == NULL) + return; + + WebCore::DocumentLoader* loader = m_frame->loader()->documentLoader(); + if (loader == NULL) + return; + + const WebCore::ResourceRequest& request = loader->request(); + const WebCore::KURL& url = request.firstPartyForCookies(); + + wke::CString string(url.string()); + handler.urlChangedCallback(m_webView, handler.urlChangedCallbackParam, &string); +} + +void FrameLoaderClient::dispatchDidChangeIcons(WebCore::IconType type) +{ + +} + +void FrameLoaderClient::dispatchDidReceiveTitle(const WebCore::StringWithDirection& title) +{ + if (m_frame == m_page->mainFrame()) + { + wke::CWebViewHandler& handler = m_webView->m_handler; + if (handler.titleChangedCallback) + { + wke::CString string(title.string()); + handler.titleChangedCallback(m_webView, handler.titleChangedCallbackParam, &string); + } + } +} + +void FrameLoaderClient::dispatchDidStartProvisionalLoad() +{ + +} + +void FrameLoaderClient::dispatchDidReceiveIcon() +{ + +} + +void FrameLoaderClient::dispatchWillClose() +{ + +} + +void FrameLoaderClient::dispatchDidPopStateWithinPage() +{ + +} + +void FrameLoaderClient::dispatchDidReplaceStateWithinPage() +{ + +} + +void FrameLoaderClient::dispatchDidPushStateWithinPage() +{ + +} + +void FrameLoaderClient::dispatchDidChangeLocationWithinPage() +{ + +} + +void FrameLoaderClient::dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate) +{ + +} + +void FrameLoaderClient::dispatchDidCancelClientRedirect() +{ + +} + +void FrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad() +{ + +} + +void FrameLoaderClient::dispatchDidHandleOnloadEvents() +{ + +} + +bool FrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length) +{ + return true; +} + +void FrameLoaderClient::dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&) +{ + +} + +void FrameLoaderClient::dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier) +{ + +} + +void FrameLoaderClient::dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived) +{ + +} + +void FrameLoaderClient::dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse& response) +{ + +} + +#if USE(PROTECTION_SPACE_AUTH_CALLBACK) +bool FrameLoaderClient::canAuthenticateAgainstProtectionSpace(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ProtectionSpace&) +{ + +} +#endif + +void FrameLoaderClient::dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&) +{ + +} + +void FrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&) +{ + +} + +bool FrameLoaderClient::shouldUseCredentialStorage(WebCore::DocumentLoader*, unsigned long identifier) +{ + return true; +} + +void FrameLoaderClient::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse) +{ + request.addHTTPHeaderField("Accept-Language", WebCore::defaultLanguage() + ",en,*"); + request.addHTTPHeaderField("Accept-Charset", m_page->settings()->defaultTextEncodingName() + ",utf-8;q=0.7,*;q=0.3"); +} + +void FrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&) +{ + +} + +void FrameLoaderClient::detachedFromParent3() +{ + +} + +void FrameLoaderClient::detachedFromParent2() +{ + +} + +void FrameLoaderClient::setCopiesOnScroll() +{ + +} + +void FrameLoaderClient::forceLayoutForNonHTML() +{ + +} + +void FrameLoaderClient::forceLayout() +{ + +} + +void FrameLoaderClient::makeRepresentation(WebCore::DocumentLoader*) +{ + +} + +bool FrameLoaderClient::hasWebView() const +{ + return true; +} + + +};//namespace wke \ No newline at end of file diff --git a/wke/wkeFrameLoaderClient.h b/wke/wkeFrameLoaderClient.h new file mode 100644 index 00000000..9c9b71f6 --- /dev/null +++ b/wke/wkeFrameLoaderClient.h @@ -0,0 +1,276 @@ +#ifndef WKE_FRAME_LOADER_CLIENT_H +#define WKE_FRAME_LOADER_CLIENT_H + + +////////////////////////////////////////////////////////////////////////// + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "wkeWebView.h" +#include "wkeDebug.h" + + +////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + + +class FrameNetworkingContext : public WebCore::FrameNetworkingContext +{ +public: + static PassRefPtr create(WebCore::Frame* frame); + +private: + FrameNetworkingContext(WebCore::Frame* frame); + + virtual WTF::String userAgent() const override; + virtual WTF::String referrer() const override; + + virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest& request) const override; + + WTF::String m_userAgent; +}; + + + + +class FrameLoaderClient : public WebCore::FrameLoaderClient +{ +public: + FrameLoaderClient(CWebView* webView, WebCore::Page* page); + virtual void frameLoaderDestroyed() override; + + virtual bool hasWebView() const override; + + virtual void makeRepresentation(WebCore::DocumentLoader*) override; + + virtual void forceLayout() override; + virtual void forceLayoutForNonHTML() override; + + virtual void setCopiesOnScroll() override; + + virtual void detachedFromParent2() override; + virtual void detachedFromParent3() override; + + virtual void assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&) override; + virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse) override; + + virtual bool shouldUseCredentialStorage(WebCore::DocumentLoader*, unsigned long identifier) override; + + virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&) override; + virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&) override; + +#if USE(PROTECTION_SPACE_AUTH_CALLBACK) + virtual bool canAuthenticateAgainstProtectionSpace(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ProtectionSpace&) override; +#endif + + virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse& response) override; + virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived) override; + virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier) override; + virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&) override; + virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length) override; + virtual void dispatchDidHandleOnloadEvents() override; + virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() override; + virtual void dispatchDidCancelClientRedirect() override; + virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate) override; + + virtual void dispatchDidChangeLocationWithinPage() override; + virtual void dispatchDidPushStateWithinPage() override; + virtual void dispatchDidReplaceStateWithinPage() override; + virtual void dispatchDidPopStateWithinPage() override; + + virtual void dispatchWillClose() override; + virtual void dispatchDidReceiveIcon() override; + virtual void dispatchDidStartProvisionalLoad() override; + virtual void dispatchDidReceiveTitle(const WebCore::StringWithDirection& title) override; + virtual void dispatchDidChangeIcons(WebCore::IconType type) override; + virtual void dispatchDidCommitLoad() override; + virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override; + virtual void dispatchDidFailLoad(const WebCore::ResourceError&) override; + virtual void dispatchDidFinishDocumentLoad(WebCore::FrameLoader* loader) override; + virtual void dispatchDidFinishLoad() override; + virtual void dispatchDidFirstLayout() override; + virtual void dispatchDidFirstVisuallyNonEmptyLayout() override; + + virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr formState, const WTF::String& frameName) override; + + virtual void dispatchShow() override; + virtual void dispatchDecidePolicyForResponse(WebCore::FramePolicyFunction function, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&) override; + virtual void dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr, const WTF::String& frameName) override; + virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr) override; + + virtual void cancelPolicyCheck() override; + virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&) override; + + virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) override; + virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction function, PassRefPtr formState) override; + + virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*) override; + + virtual void revertToProvisionalState(WebCore::DocumentLoader*) override; + + virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&) override; + + virtual void postProgressStartedNotification() override; + virtual void postProgressEstimateChangedNotification() override; + virtual void postProgressFinishedNotification() override; + + virtual void setMainFrameDocumentReady(bool) override; + + virtual void startDownload(const WebCore::ResourceRequest&, const String& suggestedName = String()) override; + + virtual void willChangeTitle(WebCore::DocumentLoader*) override; + virtual void didChangeTitle(WebCore::DocumentLoader*) override; + + virtual void committedLoad(WebCore::DocumentLoader* loader, const char* data, int length) override; + virtual void finishedLoading(WebCore::DocumentLoader* loader) override; + + virtual void updateGlobalHistory() override; + virtual void updateGlobalHistoryRedirectLinks() override; + + virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const override; + virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const override; + + virtual void didDisplayInsecureContent() override; + + // The indicated security origin has run active content (such as a + // script) from an insecure source. Note that the insecure content can + // spread to other frames in the same origin. + virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL&) override; + +#define WebURLErrorDomain TEXT("WebURLErrorDomain") +#define WebKitErrorDomain TEXT("WebKitErrorDomain") + enum { + WebURLErrorCancelled = -999, + WebKitErrorCannotShowURL = 101, + WebKitErrorFrameLoadInterruptedByPolicyChange = 102, + WebKitErrorCannotUseRestrictedPort = 103, + WebKitErrorPlugInWillHandleLoad = 204, + }; + + virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest& request) override; + virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest& request) override; + virtual WebCore::ResourceError cannotShowURLError(const WebCore::ResourceRequest& request) override; + virtual WebCore::ResourceError interruptedForPolicyChangeError(const WebCore::ResourceRequest& request) override; + virtual WebCore::ResourceError cannotShowMIMETypeError(const WebCore::ResourceResponse& response) override; + virtual WebCore::ResourceError fileDoesNotExistError(const WebCore::ResourceResponse& response) override; + virtual WebCore::ResourceError pluginWillHandleLoadError(const WebCore::ResourceResponse& response) override; + + virtual bool shouldFallBack(const WebCore::ResourceError&) override; + virtual bool canHandleRequest(const WebCore::ResourceRequest&) const override; + + virtual bool canShowMIMEType(const String& MIMEType) const override; + virtual bool canShowMIMETypeAsHTML(const String& MIMEType) const override; + virtual bool representationExistsForURLScheme(const WTF::String& URLScheme) const override; + virtual WTF::String generatedMIMETypeForURLScheme(const WTF::String& URLScheme) const override; + + virtual void frameLoadCompleted() override; + + virtual void saveViewStateToItem(WebCore::HistoryItem*) override; + virtual void restoreViewState() override; + virtual void provisionalLoadStarted() override; + + virtual void didFinishLoad() override; + + virtual void prepareForDataSourceReplacement() override; + + virtual PassRefPtr createDocumentLoader(const WebCore::ResourceRequest& request, const WebCore::SubstituteData& data) override; + + virtual void setTitle(const WebCore::StringWithDirection& title, const WebCore::KURL&) override; + virtual String userAgent(const WebCore::KURL&) override; + + virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*) override; + virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*) override; + virtual void transitionToCommittedForNewPage() override; + + virtual void didSaveToPageCache() override; + virtual void didRestoreFromPageCache() override; + virtual void dispatchDidBecomeFrameset(bool) override; + virtual bool canCachePage() const override; + virtual void download(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&) override; + + virtual PassRefPtr createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, + const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) override; + + virtual void didTransferChildFrameToNewDocument(WebCore::Page*) override; + virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, WebCore::Page*) override; + + virtual PassRefPtr createPlugin(const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const Vector& paramNames, const Vector& paramValues, const String& mimeType, bool loadManually) override; + virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) override; + + virtual PassRefPtr createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector& paramNames, const Vector& paramValues) override; + +#if ENABLE(PLUGIN_PROXY_FOR_VIDEO) + virtual PassRefPtr createMediaPlayerProxyPlugin(const WebCore::IntSize&, WebCore::HTMLMediaElement*, const WebCore::KURL&, const Vector&, const Vector&, const WTF::String&) override; + virtual void hideMediaPlayerProxyPlugin(WebCore::Widget*) override; + virtual void showMediaPlayerProxyPlugin(WebCore::Widget*) override; +#endif + + virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WTF::String& mimeType, bool shouldPreferPlugInsForImages) override; + virtual WTF::String overrideMediaType() const override; + + virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*) override; + virtual void documentElementAvailable() override; + + virtual void didPerformFirstNavigation() const override; + +#if USE(V8) + virtual void didCreateScriptContextForFrame() override; + virtual void didDestroyScriptContextForFrame() override; + virtual void didCreateIsolatedScriptContext() override; + virtual bool allowScriptExtension(const WTF::String& extensionName, int extensionGroup) override; +#endif + + virtual void registerForIconNotification(bool listen = true) override; + virtual PassRefPtr createNetworkingContext() override; + + void setFrame(WebCore::Frame* frame); + WebCore::Frame* frame() const; + + bool isLoadFailed() const; + bool isLoaded() const; + bool isDocumentReady() const; + void setUserAgent(const WTF::String& str); + +protected: + CWebView* m_webView; + WTF::String m_userAgent; + + WebCore::Page* m_page; + WebCore::Frame* m_frame; + + bool m_loadFailed; + bool m_loaded; + bool m_documentReady; +}; + + + + + +};//namespace wke; + + + +#endif//#ifndef WKE_FRAME_LOADER_CLIENT_H \ No newline at end of file diff --git a/wke/wkeFrameLoaderClient.inl b/wke/wkeFrameLoaderClient.inl deleted file mode 100644 index 1d7145b4..00000000 --- a/wke/wkeFrameLoaderClient.inl +++ /dev/null @@ -1,688 +0,0 @@ - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace wke -{ - class FrameNetworkingContext : public WebCore::FrameNetworkingContext - { - public: - static PassRefPtr create(WebCore::Frame* frame) - { - return adoptRef(new FrameNetworkingContext(frame)); - } - - private: - FrameNetworkingContext(WebCore::Frame* frame) - : WebCore::FrameNetworkingContext(frame) - { - } - - virtual WTF::String userAgent() const override - { - return m_userAgent; - } - - virtual WTF::String referrer() const override - { - return frame()->loader()->referrer(); - } - - virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest& request) const override - { - return frame()->loader()->client()->blockedError(request); - } - - WTF::String m_userAgent; - }; - - class FrameLoaderClient : public WebCore::FrameLoaderClient - { - public: - FrameLoaderClient(IWebView* webView, WebCore::Page* page) - :webView_(webView) - ,page_(page) - ,frame_(NULL) - ,loadFailed_(false) - ,loaded_(false) - ,documentReady_(false) - { - } - - virtual void frameLoaderDestroyed() override - { - dbgMsg(L"frameLoaderDestroyed\n"); - delete this; - } - - virtual bool hasWebView() const override - { - return true; - } - - virtual void makeRepresentation(WebCore::DocumentLoader*) override - { - } - - virtual void forceLayout() override - { - } - - virtual void forceLayoutForNonHTML() override - { - } - - virtual void setCopiesOnScroll() override - { - } - - virtual void detachedFromParent2() override - { - } - - virtual void detachedFromParent3() override - { - } - - virtual void assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&) override - { - } - - virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse) override - { - request.addHTTPHeaderField("Accept-Language", WebCore::defaultLanguage() + ",en,*"); - request.addHTTPHeaderField("Accept-Charset", page_->settings()->defaultTextEncodingName() + ",utf-8;q=0.7,*;q=0.3"); - } - - virtual bool shouldUseCredentialStorage(WebCore::DocumentLoader*, unsigned long identifier) override - { - return true; - } - - virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&) override - { - } - - virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&) override - { - } - -#if USE(PROTECTION_SPACE_AUTH_CALLBACK) - virtual bool canAuthenticateAgainstProtectionSpace(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ProtectionSpace&) override - { - } -#endif - virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse& response) override - { - } - - virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived) override - { - } - - virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier) override - { - } - - virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&) override - { - } - - virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length) override - { - return true; - } - - virtual void dispatchDidHandleOnloadEvents() override - { - } - - virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() override - { - } - - virtual void dispatchDidCancelClientRedirect() override - { - } - - virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate) override - { - } - - virtual void dispatchDidChangeLocationWithinPage() override - { - } - - virtual void dispatchDidPushStateWithinPage() override - { - } - - virtual void dispatchDidReplaceStateWithinPage() override - { - } - - virtual void dispatchDidPopStateWithinPage() override - { - } - - virtual void dispatchWillClose() override - { - } - - virtual void dispatchDidReceiveIcon() override - { - } - - virtual void dispatchDidStartProvisionalLoad() override - { - } - - virtual void dispatchDidReceiveTitle(const WebCore::StringWithDirection& title) override - { - if (frame_ == page_->mainFrame()) - { - const wkeClientHandler* handler = webView_->getClientHandler(); - if (handler && handler->onTitleChanged) - handler->onTitleChanged(handler, (const wkeString)&title.string()); - } - } - - virtual void dispatchDidChangeIcons(WebCore::IconType type) override - { - } - - virtual void dispatchDidCommitLoad() override - { - if (frame_ == NULL || frame_ != page_->mainFrame()) - return; - - const wkeClientHandler* handler = webView_->getClientHandler(); - if (handler == NULL || handler->onURLChanged == NULL) - return; - - WebCore::DocumentLoader* loader = frame_->loader()->documentLoader(); - if (loader == NULL) - return; - - const WebCore::ResourceRequest& request = loader->request(); - const WebCore::KURL& url = request.firstPartyForCookies(); - - handler->onURLChanged(handler, (const wkeString)&url.string()); - } - - virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override - { - loadFailed_ = true; - } - - virtual void dispatchDidFailLoad(const WebCore::ResourceError&) override - { - loadFailed_ = true; - } - - virtual void dispatchDidFinishDocumentLoad() override - { - documentReady_ = true; - } - - virtual void dispatchDidFinishLoad() override - { - loaded_ = true; - } - - virtual void dispatchDidFirstLayout() override - { - } - - virtual void dispatchDidFirstVisuallyNonEmptyLayout() override - { - } - - virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&) override - { - return page_->mainFrame(); - } - - virtual void dispatchShow() override - { - } - - virtual void dispatchDecidePolicyForResponse(WebCore::FramePolicyFunction function, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&) override - { - (frame_->loader()->policyChecker()->*function)(WebCore::PolicyUse); - } - - virtual void dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr, const WTF::String& frameName) override - { - (frame_->loader()->policyChecker()->*function)(WebCore::PolicyUse); - } - - virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr) override - { - (frame_->loader()->policyChecker()->*function)(WebCore::PolicyUse); - } - - virtual void cancelPolicyCheck() override - { - } - - virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&) override - { - } - - virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) override - { - } - - virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction function, PassRefPtr formState) override - { - (frame_->loader()->policyChecker()->*function)(WebCore::PolicyUse); - } - - virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*) override - { - } - - virtual void revertToProvisionalState(WebCore::DocumentLoader*) override - { - } - - virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&) override - { - } - - virtual void postProgressStartedNotification() override - { - loaded_ = false; - loadFailed_ = false; - documentReady_ = false; - } - - virtual void postProgressEstimateChangedNotification() override - { - } - - virtual void postProgressFinishedNotification() override - { - } - - virtual void setMainFrameDocumentReady(bool) override - { - } - - virtual void startDownload(const WebCore::ResourceRequest&, const String& suggestedName = String()) override - { - dbgMsg(L"startDownload\n"); - } - - virtual void willChangeTitle(WebCore::DocumentLoader*) override - { - } - - virtual void didChangeTitle(WebCore::DocumentLoader*) override - { - } - - virtual void committedLoad(WebCore::DocumentLoader* loader, const char* data, int length) override - { - loader->commitData(data, length); - if (frame_->document()->isMediaDocument()) - loader->cancelMainResourceLoad(pluginWillHandleLoadError(loader->response())); - } - - virtual void finishedLoading(WebCore::DocumentLoader* loader) override - { - // Telling the frame we received some data and passing 0 as the data is our - // way to get work done that is normally done when the first bit of data is - // received, even for the case of a document with no data (like about:blank) - committedLoad(loader, 0, 0); - } - - virtual void updateGlobalHistory() override - { - } - - virtual void updateGlobalHistoryRedirectLinks() override - { - } - - virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const override - { - return true; - } - - virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const override - { - return true; - } - - virtual void didDisplayInsecureContent() override - { - } - - // The indicated security origin has run active content (such as a - // script) from an insecure source. Note that the insecure content can - // spread to other frames in the same origin. - virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL&) override - { - } - - #define WebURLErrorDomain TEXT("WebURLErrorDomain") - #define WebKitErrorDomain TEXT("WebKitErrorDomain") - enum { - WebURLErrorCancelled = -999, - WebKitErrorCannotShowURL = 101, - WebKitErrorFrameLoadInterruptedByPolicyChange = 102, - WebKitErrorCannotUseRestrictedPort = 103, - WebKitErrorPlugInWillHandleLoad = 204, - }; - - virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest& request) override - { - return WebCore::ResourceError(String(WebURLErrorDomain), WebURLErrorCancelled, request.url().string(), String()); - } - - virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest& request) override - { - return WebCore::ResourceError(String(WebKitErrorDomain), WebKitErrorCannotUseRestrictedPort, request.url().string(), String()); - } - - virtual WebCore::ResourceError cannotShowURLError(const WebCore::ResourceRequest& request) override - { - return WebCore::ResourceError(String(WebKitErrorDomain), WebKitErrorCannotShowURL, request.url().string(), String()); - } - - virtual WebCore::ResourceError interruptedForPolicyChangeError(const WebCore::ResourceRequest& request) override - { - return WebCore::ResourceError(String(WebKitErrorDomain), WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(), String()); - } - - virtual WebCore::ResourceError cannotShowMIMETypeError(const WebCore::ResourceResponse& response) override - { - return WebCore::ResourceError(); - } - - virtual WebCore::ResourceError fileDoesNotExistError(const WebCore::ResourceResponse& response) override - { - return WebCore::ResourceError(); - } - - virtual WebCore::ResourceError pluginWillHandleLoadError(const WebCore::ResourceResponse& response) override - { - return WebCore::ResourceError(String(WebKitErrorDomain), WebKitErrorPlugInWillHandleLoad, response.url().string(), String()); - } - - virtual bool shouldFallBack(const WebCore::ResourceError&) override - { - return false; - } - - virtual bool canHandleRequest(const WebCore::ResourceRequest&) const override - { - return true; - } - - virtual bool canShowMIMEType(const String& MIMEType) const override - { - return true; - } - - virtual bool canShowMIMETypeAsHTML(const String& MIMEType) const override - { - return true; - } - - virtual bool representationExistsForURLScheme(const WTF::String& URLScheme) const override - { - return false; - } - - virtual WTF::String generatedMIMETypeForURLScheme(const WTF::String& URLScheme) const override - { - return String(); - } - - virtual void frameLoadCompleted() override - { - } - - virtual void saveViewStateToItem(WebCore::HistoryItem*) override - { - } - - virtual void restoreViewState() override - { - } - - virtual void provisionalLoadStarted() override - { - } - - virtual void didFinishLoad() override - { - } - - virtual void prepareForDataSourceReplacement() override - { - } - - virtual PassRefPtr createDocumentLoader(const WebCore::ResourceRequest& request, const WebCore::SubstituteData& data) override - { - return WebCore::DocumentLoader::create(request, data); - } - - virtual void setTitle(const WebCore::StringWithDirection& title, const WebCore::KURL&) override - { - } - - virtual String userAgent(const WebCore::KURL&) override - { - return "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Safari/535.2 wke/1.0"; - } - - virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*) override - { - } - - virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*) override - { - } - - virtual void transitionToCommittedForNewPage() override - { - bool transparent = webView_->transparent(); - WebCore::Color backgroundColor = transparent ? WebCore::Color::transparent : WebCore::Color::white; - - WebCore::IntSize size(webView_->width(), webView_->height()); - frame_->createView(size, backgroundColor, transparent, WebCore::IntSize(), false); - } - - virtual void didSaveToPageCache() override - { - } - - virtual void didRestoreFromPageCache() override - { - } - - virtual void dispatchDidBecomeFrameset(bool) override - { - } - - virtual bool canCachePage() const override - { - return false; - } - - virtual void download(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&) override - { - } - - virtual PassRefPtr createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, - const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) override - { - FrameLoaderClient* loader = new FrameLoaderClient(webView_, page_); - RefPtr childFrame = WebCore::Frame::create(page_, ownerElement, loader); - loader->setFrame(childFrame.get()); - - frame_->tree()->appendChild(childFrame); - childFrame->tree()->setName(name); - childFrame->init(); - - frame_->loader()->loadURLIntoChildFrame(url, referrer, childFrame.get()); - if (!childFrame->tree()->parent()) - return 0; - - return childFrame.release(); - } - - virtual void didTransferChildFrameToNewDocument(WebCore::Page*) override - { - } - - virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, WebCore::Page*) override - { - } - - virtual PassRefPtr createPlugin(const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const Vector& paramNames, const Vector& paramValues, const String& mimeType, bool loadManually) override - { - Vector newParamNames = paramNames; - Vector newParamValues = paramValues; - - unsigned int i = 0; - for (; i < newParamNames.size(); i++) { - if (equalIgnoringCase(paramNames[i], "wmode")) - break; - } - - if (i == newParamNames.size()) { - newParamNames.append("wmode"); - newParamValues.append("opaque"); - } - - if (!equalIgnoringCase(newParamValues[i], "opaque") && - !equalIgnoringCase(newParamValues[i], "transparent")) { - newParamValues[i] = "opaque"; - } - - RefPtr pluginView = WebCore::PluginView::create(frame_, pluginSize, element, url, newParamNames, newParamValues, mimeType, loadManually); - if (pluginView->status() == WebCore::PluginStatusLoadedSuccessfully) - return pluginView; - - return 0; - } - - virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) override - { - } - - virtual PassRefPtr createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector& paramNames, const Vector& paramValues) override - { - return 0; - } - -#if ENABLE(PLUGIN_PROXY_FOR_VIDEO) - virtual PassRefPtr createMediaPlayerProxyPlugin(const WebCore::IntSize&, WebCore::HTMLMediaElement*, const WebCore::KURL&, const Vector&, const Vector&, const WTF::String&) override - { - } - - virtual void hideMediaPlayerProxyPlugin(WebCore::Widget*) override - { - } - - virtual void showMediaPlayerProxyPlugin(WebCore::Widget*) override - { - } -#endif - - virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WTF::String& mimeType, bool shouldPreferPlugInsForImages) override - { - return WebCore::FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages); - } - - virtual WTF::String overrideMediaType() const override - { - return WTF::String(); - } - - virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*) override - { - } - - virtual void documentElementAvailable() override - { - } - - virtual void didPerformFirstNavigation() const override - { - } - -#if USE(V8) - virtual void didCreateScriptContextForFrame() override - { - } - - virtual void didDestroyScriptContextForFrame() override - { - } - - virtual void didCreateIsolatedScriptContext() override - { - } - - virtual bool allowScriptExtension(const WTF::String& extensionName, int extensionGroup) override - { - } -#endif - - virtual void registerForIconNotification(bool listen = true) override - { - } - - virtual PassRefPtr createNetworkingContext() override - { - return FrameNetworkingContext::create(frame_); - } - - void setFrame(WebCore::Frame* frame) - { - frame_ = frame; - } - - WebCore::Frame* frame() const - { - return frame_; - } - - bool isLoadFailed() const - { - return loadFailed_; - } - - bool isLoaded() const - { - return loaded_; - } - - bool isDocumentReady() const - { - return documentReady_; - } - - protected: - IWebView* webView_; - - WebCore::Page* page_; - WebCore::Frame* frame_; - - bool loadFailed_; - bool loaded_; - bool documentReady_; - }; -} \ No newline at end of file diff --git a/wke/wkeInspectorClient.cpp b/wke/wkeInspectorClient.cpp new file mode 100644 index 00000000..a3e9d9c1 --- /dev/null +++ b/wke/wkeInspectorClient.cpp @@ -0,0 +1,48 @@ +////////////////////////////////////////////////////////////////////////// + + +#include "wkeInspectorClient.h" + + +////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + + + + +void InspectorClient::inspectorDestroyed() +{ + delete this; +} + + +bool InspectorClient::sendMessageToFrontend(const String& message) +{ + return false; +} + +void InspectorClient::hideHighlight() +{ + +} + +void InspectorClient::highlight() +{ + +} + +void InspectorClient::openInspectorFrontend(WebCore::InspectorController*) +{ + +} + + + + + +};//namespace wke \ No newline at end of file diff --git a/wke/wkeInspectorClient.h b/wke/wkeInspectorClient.h new file mode 100644 index 00000000..318ab5d7 --- /dev/null +++ b/wke/wkeInspectorClient.h @@ -0,0 +1,41 @@ +#ifndef WKE_INSPECTOR_CLIENT_H +#define WKE_INSPECTOR_CLIENT_H + + +////////////////////////////////////////////////////////////////////////// + + +#include +#include + + +////////////////////////////////////////////////////////////////////////// + + +namespace wke +{ + + + + +class InspectorClient : public WebCore::InspectorClient +{ + virtual void inspectorDestroyed() override; + + virtual void openInspectorFrontend(WebCore::InspectorController*) override; + + virtual void highlight() override; + virtual void hideHighlight() override; + + virtual bool sendMessageToFrontend(const String& message) override; +}; + + + + +};//namespace wke + + + + +#endif//#ifndef WKE_INSPECTOR_CLIENT_H \ No newline at end of file diff --git a/wke/wkeInspectorClient.inl b/wke/wkeInspectorClient.inl deleted file mode 100644 index 4c9d575a..00000000 --- a/wke/wkeInspectorClient.inl +++ /dev/null @@ -1,30 +0,0 @@ -#include - -namespace wke -{ - class InspectorClient : public WebCore::InspectorClient { - - virtual void inspectorDestroyed() override - { - delete this; - } - - virtual void openInspectorFrontend(WebCore::InspectorController*) override - { - } - - virtual void highlight() override - { - } - - virtual void hideHighlight() override - { - } - - virtual bool sendMessageToFrontend(const String& message) override - { - return false; - } - }; - -} \ No newline at end of file diff --git a/wke/wkePlatformStrategies.cpp b/wke/wkePlatformStrategies.cpp new file mode 100644 index 00000000..17d397ba --- /dev/null +++ b/wke/wkePlatformStrategies.cpp @@ -0,0 +1,99 @@ +////////////////////////////////////////////////////////////////////////// + + +#include "wkePlatformStrategies.h" + + +////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + + +void PlatformStrategies::initialize() +{ + DEFINE_STATIC_LOCAL(PlatformStrategies, platformStrategies, ()); + setPlatformStrategies(&platformStrategies); +} + +PlatformStrategies::PlatformStrategies() +{ + +} + +WebCore::VisitedLinkStrategy* PlatformStrategies::createVisitedLinkStrategy() +{ + return this; +} + +WebCore::PluginStrategy* PlatformStrategies::createPluginStrategy() +{ + return this; +} + +WebCore::CookiesStrategy* PlatformStrategies::createCookiesStrategy() +{ + return this; +} + + +void PlatformStrategies::addVisitedLink(WebCore::Page* page, WebCore::LinkHash hash) +{ + page->group().addVisitedLinkHash(hash); +} + +bool PlatformStrategies::isLinkVisited(WebCore::Page* page, WebCore::LinkHash hash, const WebCore::KURL &,const WTF::AtomicString &) +{ + return page->group().isLinkVisited(hash); +} + +void PlatformStrategies::getPluginInfo(const WebCore::Page*, Vector& outPlugins) +{ + const Vector& plugins = WebCore::PluginDatabase::installedPlugins()->plugins(); + + outPlugins.resize(plugins.size()); + + for (size_t i = 0; i < plugins.size(); ++i) { + WebCore::PluginPackage* package = plugins[i]; + + WebCore::PluginInfo info; + info.name = package->name(); + info.file = package->fileName(); + info.desc = package->description(); + + const WebCore::MIMEToDescriptionsMap& mimeToDescriptions = package->mimeToDescriptions(); + + info.mimes.reserveCapacity(mimeToDescriptions.size()); + + WebCore::MIMEToDescriptionsMap::const_iterator end = mimeToDescriptions.end(); + for (WebCore::MIMEToDescriptionsMap::const_iterator it = mimeToDescriptions.begin(); it != end; ++it) { + WebCore::MimeClassInfo mime; + + mime.type = it->first; + mime.desc = it->second; + mime.extensions = package->mimeToExtensions().get(mime.type); + + info.mimes.append(mime); + } + + outPlugins[i] = info; + } +} + +void PlatformStrategies::refreshPlugins() +{ + WebCore::PluginDatabase::installedPlugins()->refresh(); +} + +void PlatformStrategies::notifyCookiesChanged() +{ + +} + + + + +};//namespace wke \ No newline at end of file diff --git a/wke/wkePlatformStrategies.h b/wke/wkePlatformStrategies.h new file mode 100644 index 00000000..f1264e08 --- /dev/null +++ b/wke/wkePlatformStrategies.h @@ -0,0 +1,65 @@ +#ifndef WKE_PLATFORM_STRATEGIES_H +#define WKE_PLATFORM_STRATEGIES_H + + +////////////////////////////////////////////////////////////////////////// + + +#include +#include +#include +#include +#include +#include +#include +#include + + +////////////////////////////////////////////////////////////////////////// + + + + +namespace wke +{ + + + + + +class PlatformStrategies : public WebCore::PlatformStrategies + , private WebCore::CookiesStrategy + , private WebCore::PluginStrategy + , private WebCore::VisitedLinkStrategy +{ +public: + static void initialize(); + +private: + PlatformStrategies(); + virtual WebCore::CookiesStrategy* createCookiesStrategy() override; + + // WebCore::PlatformStrategies + virtual WebCore::PluginStrategy* createPluginStrategy() override; + virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy() override; + + virtual void notifyCookiesChanged() override; + + // WebCore::PluginStrategy + virtual void refreshPlugins() override; + virtual void getPluginInfo(const WebCore::Page*, Vector& outPlugins) override; + virtual bool isLinkVisited(WebCore::Page* page, WebCore::LinkHash hash, const WebCore::KURL &,const WTF::AtomicString &) override; + virtual void addVisitedLink(WebCore::Page* page, WebCore::LinkHash hash) override; +}; + + + + + +};//namespace wke + + + + + +#endif //#ifndef WKE_PLATFORM_STRATEGIES_H \ No newline at end of file diff --git a/wke/wkePlatformStrategies.inl b/wke/wkePlatformStrategies.inl deleted file mode 100644 index 90a7efd6..00000000 --- a/wke/wkePlatformStrategies.inl +++ /dev/null @@ -1,92 +0,0 @@ -#include -#include -#include -#include -#include - -namespace wke { - -class PlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::PluginStrategy, private WebCore::VisitedLinkStrategy { -public: - static void initialize() - { - DEFINE_STATIC_LOCAL(PlatformStrategies, platformStrategies, ()); - setPlatformStrategies(&platformStrategies); - } - -private: - PlatformStrategies() - { - } - - virtual WebCore::CookiesStrategy* createCookiesStrategy() override - { - return this; - } - - // WebCore::PlatformStrategies - virtual WebCore::PluginStrategy* createPluginStrategy() override - { - return this; - } - - virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy() override - { - return this; - } - - virtual void notifyCookiesChanged() override - { - } - - // WebCore::PluginStrategy - virtual void refreshPlugins() override - { - WebCore::PluginDatabase::installedPlugins()->refresh(); - } - - virtual void getPluginInfo(const WebCore::Page*, Vector& outPlugins) override - { - const Vector& plugins = WebCore::PluginDatabase::installedPlugins()->plugins(); - - outPlugins.resize(plugins.size()); - - for (size_t i = 0; i < plugins.size(); ++i) { - WebCore::PluginPackage* package = plugins[i]; - - WebCore::PluginInfo info; - info.name = package->name(); - info.file = package->fileName(); - info.desc = package->description(); - - const WebCore::MIMEToDescriptionsMap& mimeToDescriptions = package->mimeToDescriptions(); - - info.mimes.reserveCapacity(mimeToDescriptions.size()); - - WebCore::MIMEToDescriptionsMap::const_iterator end = mimeToDescriptions.end(); - for (WebCore::MIMEToDescriptionsMap::const_iterator it = mimeToDescriptions.begin(); it != end; ++it) { - WebCore::MimeClassInfo mime; - - mime.type = it->first; - mime.desc = it->second; - mime.extensions = package->mimeToExtensions().get(mime.type); - - info.mimes.append(mime); - } - - outPlugins[i] = info; - } - } - - virtual bool isLinkVisited(WebCore::Page* page, WebCore::LinkHash hash, const WebCore::KURL &,const WTF::AtomicString &) override - { - return page->group().isLinkVisited(hash); - } - - virtual void addVisitedLink(WebCore::Page* page, WebCore::LinkHash hash) override - { - page->group().addVisitedLinkHash(hash); - } -}; - -} \ No newline at end of file diff --git a/wke/wkePopupMenu.cpp b/wke/wkePopupMenu.cpp index e83a7001..74d5aa2a 100644 --- a/wke/wkePopupMenu.cpp +++ b/wke/wkePopupMenu.cpp @@ -1,4 +1,7 @@ +////////////////////////////////////////////////////////////////////////// + + #include #include #include @@ -8,57 +11,64 @@ #include #include #include -#include "wkeWebView.h" + +#include "wkeChromeClient.h" #include "wkePopupMenu.h" +#include "wkeWebView.h" + + +////////////////////////////////////////////////////////////////////////// -#include "wkeChromeClient.inl" // Maximum height of a popup window static const int maxPopupHeight = 320; - static const int optionSpacingMiddle = 1; static const int popupWindowBorderWidth = 1; + namespace wke { -PopupMenu::PopupMenu(WebCore::PopupMenuClient* client, ChromeClient* chromeClient_) - :popupClient_(client) - ,chromeClient_(chromeClient_) - ,scrollOffset_(0) - ,scrollbar_(0) - ,focusedIndex_(0) - ,showPopup_(false) - ,wheelDelta_(0) - ,scrollbarCapturingMouse_(false) - ,pixels_(NULL) + + + +PopupMenu::PopupMenu(WebCore::PopupMenuClient* client, ChromeClient* chromeClient) + :m_popupClient(client) + ,m_chromeClient(chromeClient) + ,m_scrollOffset(0) + ,m_scrollbar(0) + ,m_focusedIndex(0) + ,m_showPopup(false) + ,m_wheelDelta(0) + ,m_scrollbarCapturingMouse(false) + ,m_pixels(NULL) { } PopupMenu::~PopupMenu() { - if (scrollbar_) - scrollbar_->setParent(0); + if (m_scrollbar) + m_scrollbar->setParent(0); hide(); } void PopupMenu::disconnectClient() { - popupClient_ = 0; + m_popupClient = 0; } void PopupMenu::show(const WebCore::IntRect& r, WebCore::FrameView* view, int index) { - showPopup_ = true; + m_showPopup = true; calculatePositionAndSize(r, view); if (clientRect().isEmpty()) return; - if (!scrollbar_ && visibleItems() < client()->listSize()) { + if (!m_scrollbar && visibleItems() < client()->listSize()) { // We need a scroll bar - scrollbar_ = client()->createScrollbar(this, WebCore::VerticalScrollbar, WebCore::SmallScrollbar); - scrollbar_->styleChanged(); + m_scrollbar = client()->createScrollbar(this, WebCore::VerticalScrollbar, WebCore::SmallScrollbar); + m_scrollbar->styleChanged(); WebCore::IntSize size(clientRect().size()); scrollbar()->setFrameRect(WebCore::IntRect(size.width() - scrollbar()->width(), 0, scrollbar()->width(), size.height())); @@ -75,20 +85,21 @@ void PopupMenu::show(const WebCore::IntRect& r, WebCore::FrameView* view, int in setFocusedIndex(index); } - chromeClient_->setPopupMenu(this); + m_chromeClient->setPopupMenu(this); + invalidate(); } void PopupMenu::hide() { - if (!showPopup_) + if (!m_showPopup) return; - showPopup_ = false; + m_showPopup = false; if (client()) client()->popupDidHide(); - if (chromeClient_->popupMenu() == this) - chromeClient_->setPopupMenu(NULL); + if (m_chromeClient->popupMenu() == this) + m_chromeClient->setPopupMenu(NULL); invalidate(); } @@ -102,11 +113,11 @@ void PopupMenu::calculatePositionAndSize(const WebCore::IntRect& r, WebCore::Fra // First, determine the popup's height int itemCount = client()->listSize(); - itemHeight_ = client()->menuStyle().font().fontMetrics().height() + optionSpacingMiddle; - int naturalHeight = itemHeight_ * itemCount; + m_itemHeight = client()->menuStyle().font().fontMetrics().height() + optionSpacingMiddle; + int naturalHeight = m_itemHeight * itemCount; int popupHeight = std::min(maxPopupHeight, naturalHeight); // The popup should show an integral number of items (i.e. no partial items should be visible) - popupHeight -= popupHeight % itemHeight_; + popupHeight -= popupHeight % m_itemHeight; // Next determine its width int popupWidth = 0; @@ -145,7 +156,7 @@ void PopupMenu::calculatePositionAndSize(const WebCore::IntRect& r, WebCore::Fra WebCore::IntRect popupRect(popupX, rScreenCoords.maxY(), popupWidth, popupHeight); - IWebView* webView = (IWebView*)chromeClient_->webView(); + CWebView* webView = (CWebView*)m_chromeClient->webView(); // The popup needs to stay within the bounds of the screen and not overlap any toolbars WebCore::FloatRect screen = WebCore::FloatRect(0, 0, (float)webView->width(), (float)webView->height()); @@ -173,7 +184,7 @@ void PopupMenu::calculatePositionAndSize(const WebCore::IntRect& r, WebCore::Fra popupRect.setWidth(popupRect.width() - (screen.x() - popupRect.x())); popupRect.setX(screen.x()); } - windowRect_ = popupRect; + m_windowRect = popupRect; return; } @@ -187,7 +198,7 @@ bool PopupMenu::setFocusedIndex(int i, bool hotTracking) invalidate(); - focusedIndex_ = i; + m_focusedIndex = i; if (!hotTracking) client()->setTextFromItem(i); @@ -198,17 +209,17 @@ bool PopupMenu::setFocusedIndex(int i, bool hotTracking) int PopupMenu::visibleItems() const { - return clientRect().height() / itemHeight_; + return clientRect().height() / m_itemHeight; } int PopupMenu::listIndexAtPoint(const WebCore::IntPoint& point) const { - return scrollOffset_ + point.y() / itemHeight_; + return m_scrollOffset + point.y() / m_itemHeight; } int PopupMenu::focusedIndex() const { - return focusedIndex_; + return m_focusedIndex; } void PopupMenu::focusFirst() @@ -279,7 +290,7 @@ bool PopupMenu::up(unsigned lines) WebCore::IntRect PopupMenu::clientRect() const { - WebCore::IntRect clientRect = windowRect_; + WebCore::IntRect clientRect = m_windowRect; clientRect.inflate(-popupWindowBorderWidth); clientRect.setLocation(WebCore::IntPoint(0, 0)); return clientRect; @@ -287,33 +298,33 @@ WebCore::IntRect PopupMenu::clientRect() const void PopupMenu::incrementWheelDelta(int delta) { - wheelDelta_ += delta; + m_wheelDelta += delta; } void PopupMenu::reduceWheelDelta(int delta) { ASSERT(delta >= 0); - ASSERT(delta <= abs(wheelDelta_)); + ASSERT(delta <= abs(m_wheelDelta)); - if (wheelDelta_ > 0) - wheelDelta_ -= delta; - else if (wheelDelta_ < 0) - wheelDelta_ += delta; + if (m_wheelDelta > 0) + m_wheelDelta -= delta; + else if (m_wheelDelta < 0) + m_wheelDelta += delta; } bool PopupMenu::scrollToRevealSelection() { - if (!scrollbar_) + if (!m_scrollbar) return false; int index = focusedIndex(); - if (index < scrollOffset_) { + if (index < m_scrollOffset) { ScrollableArea::scrollToYOffsetWithoutAnimation(index); return true; } - if (index >= scrollOffset_ + visibleItems()) { + if (index >= m_scrollOffset + visibleItems()) { ScrollableArea::scrollToYOffsetWithoutAnimation(index - visibleItems() + 1); return true; } @@ -323,7 +334,7 @@ bool PopupMenu::scrollToRevealSelection() void PopupMenu::updateFromElement() { - focusedIndex_ = client()->selectedIndex(); + m_focusedIndex = client()->selectedIndex(); invalidate(); scrollToRevealSelection(); @@ -331,28 +342,28 @@ void PopupMenu::updateFromElement() const int separatorPadding = 4; const int separatorHeight = 1; -void PopupMenu::paint(void* bits, int pitch) +WebCore::IntRect PopupMenu::paint(void* bits, int pitch) { - if (!pixels_) + if (!m_pixels) { - if (!hdc_) - hdc_ = adoptPtr(::CreateCompatibleDC(0)); + if (!m_hdc) + m_hdc = adoptPtr(::CreateCompatibleDC(0)); - WebCore::BitmapInfo bmp = WebCore::BitmapInfo::createBottomUp(windowRect_.size()); - HBITMAP hbmp = ::CreateDIBSection(0, &bmp, DIB_RGB_COLORS, &pixels_, NULL, 0); - SelectObject(hdc_.get(), hbmp); - hbmp_ = adoptPtr(hbmp); + WebCore::BitmapInfo bmp = WebCore::BitmapInfo::createBottomUp(m_windowRect.size()); + HBITMAP hbmp = ::CreateDIBSection(0, &bmp, DIB_RGB_COLORS, &m_pixels, NULL, 0); + SelectObject(m_hdc.get(), hbmp); + m_hbitmap = adoptPtr(hbmp); - WebCore::GraphicsContext context(hdc_.get()); + WebCore::GraphicsContext context(m_hdc.get()); int itemCount = client()->listSize(); - WebCore::IntRect listRect = windowRect_; + WebCore::IntRect listRect = m_windowRect; listRect.setX(0); listRect.setY(0); - listRect.move(0, scrollOffset_ * itemHeight_); + listRect.move(0, m_scrollOffset * m_itemHeight); - for (int y = listRect.y(); y < listRect.maxY(); y += itemHeight_) { - int index = y / itemHeight_; + for (int y = listRect.y(); y < listRect.maxY(); y += m_itemHeight) { + int index = y / m_itemHeight; WebCore::Color optionBackgroundColor, optionTextColor; WebCore::PopupMenuStyle itemStyle = client()->itemStyle(index); if (index == focusedIndex()) { @@ -365,14 +376,14 @@ void PopupMenu::paint(void* bits, int pitch) WebCore::IntRect itemRect; itemRect.setX(popupWindowBorderWidth); - itemRect.setY(popupWindowBorderWidth + (index - scrollOffset_) * itemHeight_); + itemRect.setY(popupWindowBorderWidth + (index - m_scrollOffset) * m_itemHeight); - if (scrollbar_) - itemRect.setWidth(windowRect_.width() - popupWindowBorderWidth * 2 - scrollbar_->frameRect().width()); + if (m_scrollbar) + itemRect.setWidth(m_windowRect.width() - popupWindowBorderWidth * 2 - m_scrollbar->frameRect().width()); else - itemRect.setWidth(windowRect_.width() - popupWindowBorderWidth * 2); + itemRect.setWidth(m_windowRect.width() - popupWindowBorderWidth * 2); - itemRect.setHeight(itemHeight_); + itemRect.setHeight(m_itemHeight); if (itemStyle.isVisible()) context.fillRect(itemRect, optionBackgroundColor, WebCore::ColorSpaceDeviceRGB); @@ -410,16 +421,16 @@ void PopupMenu::paint(void* bits, int pitch) } } - if (scrollbar_) + if (m_scrollbar) { - WebCore::IntRect rect = windowRect_; + WebCore::IntRect rect = m_windowRect; rect.setX(0); rect.setY(0); - scrollbar_->paint(&context, rect); + m_scrollbar->paint(&context, rect); } //border - WebCore::FloatRect rect = windowRect_; + WebCore::FloatRect rect = m_windowRect; rect.setX(0); rect.setY(0); context.setStrokeColor(WebCore::Color::gray, WebCore::ColorSpaceDeviceRGB); @@ -427,10 +438,10 @@ void PopupMenu::paint(void* bits, int pitch) } //copy to dst - int w = windowRect_.width(); - int h = windowRect_.height(); - unsigned char* src = (unsigned char*)pixels_; - unsigned char* dst = (unsigned char*)bits + windowRect_.y() * pitch + windowRect_.x()*4; + int w = m_windowRect.width(); + int h = m_windowRect.height(); + unsigned char* src = (unsigned char*)m_pixels; + unsigned char* dst = (unsigned char*)bits + m_windowRect.y() * pitch + m_windowRect.x()*4; for (int i = 0; i < h; ++i) { @@ -438,6 +449,7 @@ void PopupMenu::paint(void* bits, int pitch) src += w*4; dst += pitch; } + return m_windowRect; } bool PopupMenu::mouseEvent(const WebCore::PlatformMouseEvent& mouseEvent) @@ -445,7 +457,7 @@ bool PopupMenu::mouseEvent(const WebCore::PlatformMouseEvent& mouseEvent) if (scrollbar()) { WebCore::IntPoint mousePoint = mouseEvent.pos(); - mousePoint.move(-windowRect_.x(), -windowRect_.y()); + mousePoint.move(-m_windowRect.x(), -m_windowRect.y()); WebCore::IntRect scrollBarRect = scrollbar()->frameRect(); if (mouseEvent.eventType() == WebCore::MouseEventMoved) @@ -491,10 +503,10 @@ bool PopupMenu::mouseEvent(const WebCore::PlatformMouseEvent& mouseEvent) WebCore::IntPoint mousePoint = mouseEvent.pos(); if (mouseEvent.eventType() == WebCore::MouseEventMoved) { - RECT bounds = windowRect_; + RECT bounds = m_windowRect; if (::PtInRect(&bounds, mousePoint)) { - mousePoint.move(-windowRect_.x(), -windowRect_.y()); + mousePoint.move(-m_windowRect.x(), -m_windowRect.y()); setFocusedIndex(listIndexAtPoint(mousePoint), true); return true; } @@ -507,10 +519,10 @@ bool PopupMenu::mouseEvent(const WebCore::PlatformMouseEvent& mouseEvent) // If the mouse is inside the window, update the focused index. Otherwise, // hide the popup. - RECT bounds = windowRect_; + RECT bounds = m_windowRect; if (::PtInRect(&bounds, mousePoint)) { - mousePoint.move(-windowRect_.x(), -windowRect_.y()); + mousePoint.move(-m_windowRect.x(), -m_windowRect.y()); setFocusedIndex(listIndexAtPoint(mousePoint), true); return true; } @@ -522,7 +534,7 @@ bool PopupMenu::mouseEvent(const WebCore::PlatformMouseEvent& mouseEvent) if (mouseEvent.eventType() == WebCore::MouseEventReleased) { // Only hide the popup if the mouse is inside the popup window. - RECT bounds = windowRect_; + RECT bounds = m_windowRect; if (client() && ::PtInRect(&bounds, mousePoint)) { hide(); int index = focusedIndex(); @@ -667,12 +679,12 @@ bool PopupMenu::keyPress(const WebCore::PlatformKeyboardEvent& keyEvent) int PopupMenu::scrollSize(WebCore::ScrollbarOrientation orientation) const { - return ((orientation == WebCore::VerticalScrollbar) && scrollbar_) ? (scrollbar_->totalSize() - scrollbar_->visibleSize()) : 0; + return ((orientation == WebCore::VerticalScrollbar) && m_scrollbar) ? (m_scrollbar->totalSize() - m_scrollbar->visibleSize()) : 0; } int PopupMenu::scrollPosition(WebCore::Scrollbar*) const { - return scrollOffset_; + return m_scrollOffset; } void PopupMenu::setScrollOffset(const WebCore::IntPoint& offset) @@ -682,21 +694,25 @@ void PopupMenu::setScrollOffset(const WebCore::IntPoint& offset) void PopupMenu::scrollTo(int offset) { - ASSERT(scrollbar_); - if (scrollOffset_ == offset) + ASSERT(m_scrollbar); + if (m_scrollOffset == offset) return; - int scrolledLines = scrollOffset_ - offset; - scrollOffset_ = offset; + int scrolledLines = m_scrollOffset - offset; + m_scrollOffset = offset; invalidate(); } void PopupMenu::invalidate() { - IWebView* webView = (IWebView*)chromeClient_->webView(); + CWebView* webView = (CWebView*)m_chromeClient->webView(); webView->setDirty(true); - pixels_ = NULL; + webView->addDirtyArea(m_windowRect.location().x(),m_windowRect.location().y(),m_windowRect.size().width(),m_windowRect.size().height()); + m_pixels = NULL; } -} \ No newline at end of file + + + +};//namespace wke; \ No newline at end of file diff --git a/wke/wkePopupMenu.h b/wke/wkePopupMenu.h index e5640d38..5830e466 100644 --- a/wke/wkePopupMenu.h +++ b/wke/wkePopupMenu.h @@ -1,102 +1,120 @@ #ifndef WKE_POPUP_MENU_H #define WKE_POPUP_MENU_H + +////////////////////////////////////////////////////////////////////////// + + #include #include #include #include + +////////////////////////////////////////////////////////////////////////// + + + + namespace wke { - class ChromeClient; - class PopupMenu : public WebCore::PopupMenu, private WebCore::ScrollableArea { - public: - PopupMenu(WebCore::PopupMenuClient* client, ChromeClient* chromeClient); - ~PopupMenu(); - virtual void show(const WebCore::IntRect&, WebCore::FrameView*, int index); - virtual void hide(); - virtual void updateFromElement(); - virtual void disconnectClient(); - void paint(void* bits, int pitch); +class ChromeClient; + +class PopupMenu : public WebCore::PopupMenu, private WebCore::ScrollableArea { +public: + PopupMenu(WebCore::PopupMenuClient* client, ChromeClient* chromeClient); + ~PopupMenu(); + + virtual void show(const WebCore::IntRect&, WebCore::FrameView*, int index); + virtual void hide(); + virtual void updateFromElement(); + virtual void disconnectClient(); + + WebCore::IntRect paint(void* bits, int pitch); + + bool mouseEvent(const WebCore::PlatformMouseEvent& mouseEvent); + bool mouseWheel(const WebCore::PlatformWheelEvent& wheelEvent); + + bool keyPress(const WebCore::PlatformKeyboardEvent& keyEvent); + bool keyDown(const WebCore::PlatformKeyboardEvent& keyEvent); + +private: + WebCore::PopupMenuClient* client() const { return m_popupClient; } + + WebCore::Scrollbar* scrollbar() const { return m_scrollbar.get(); } + + bool up(unsigned int lines = 1); + bool down(unsigned int lines = 1); - bool mouseEvent(const WebCore::PlatformMouseEvent& mouseEvent); - bool mouseWheel(const WebCore::PlatformWheelEvent& wheelEvent); + int itemHeight() const { return m_itemHeight; } + const WebCore::IntRect& windowRect() const { return m_windowRect; } + WebCore::IntRect clientRect() const; - bool keyPress(const WebCore::PlatformKeyboardEvent& keyEvent); - bool keyDown(const WebCore::PlatformKeyboardEvent& keyEvent); + int visibleItems() const; - private: - WebCore::PopupMenuClient* client() const { return popupClient_; } + int listIndexAtPoint(const WebCore::IntPoint& pt) const; - WebCore::Scrollbar* scrollbar() const { return scrollbar_.get(); } + bool setFocusedIndex(int index, bool hotTracking = false); + int focusedIndex() const; + void focusFirst(); + void focusLast(); - bool up(unsigned int lines = 1); - bool down(unsigned int lines = 1); + int scrollOffset() const { return m_scrollOffset; } - int itemHeight() const { return itemHeight_; } - const WebCore::IntRect& windowRect() const { return windowRect_; } - WebCore::IntRect clientRect() const; + bool scrollToRevealSelection(); - int visibleItems() const; + void incrementWheelDelta(int delta); + void reduceWheelDelta(int delta); + int wheelDelta() const { return m_wheelDelta; } - int listIndexAtPoint(const WebCore::IntPoint& pt) const; + bool scrollbarCapturingMouse() const { return m_scrollbarCapturingMouse; } + void setScrollbarCapturingMouse(bool b) { m_scrollbarCapturingMouse = b; } - bool setFocusedIndex(int index, bool hotTracking = false); - int focusedIndex() const; - void focusFirst(); - void focusLast(); + // ScrollableArea + virtual int scrollSize(WebCore::ScrollbarOrientation orientation) const; + virtual int scrollPosition(WebCore::Scrollbar*) const; + virtual void setScrollOffset(const WebCore::IntPoint&); + virtual void invalidateScrollbarRect(WebCore::Scrollbar*, const WebCore::IntRect&) { }; + virtual void invalidateScrollCornerRect(const WebCore::IntRect&) { } + virtual bool isActive() const { return true; } + virtual WebCore::ScrollableArea* enclosingScrollableArea() const { return 0; } + virtual bool isScrollCornerVisible() const { return false; } + virtual WebCore::IntRect scrollCornerRect() const { return WebCore::IntRect(); } + virtual WebCore::Scrollbar* verticalScrollbar() const { return m_scrollbar.get(); } - int scrollOffset() const { return scrollOffset_; } + // NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea. + void scrollTo(int offset); - bool scrollToRevealSelection(); - void incrementWheelDelta(int delta); - void reduceWheelDelta(int delta); - int wheelDelta() const { return wheelDelta_; } + void calculatePositionAndSize(const WebCore::IntRect&, WebCore::FrameView*); - bool scrollbarCapturingMouse() const { return scrollbarCapturingMouse_; } - void setScrollbarCapturingMouse(bool b) { scrollbarCapturingMouse_ = b; } + void invalidate(); - // ScrollableArea - virtual int scrollSize(WebCore::ScrollbarOrientation orientation) const; - virtual int scrollPosition(WebCore::Scrollbar*) const; - virtual void setScrollOffset(const WebCore::IntPoint&); - virtual void invalidateScrollbarRect(WebCore::Scrollbar*, const WebCore::IntRect&) { }; - virtual void invalidateScrollCornerRect(const WebCore::IntRect&) { } - virtual bool isActive() const { return true; } - virtual WebCore::ScrollableArea* enclosingScrollableArea() const { return 0; } - virtual bool isScrollCornerVisible() const { return false; } - virtual WebCore::IntRect scrollCornerRect() const { return WebCore::IntRect(); } - virtual WebCore::Scrollbar* verticalScrollbar() const { return scrollbar_.get(); } + WebCore::PopupMenuClient* m_popupClient; + RefPtr m_scrollbar; + int m_scrollOffset; + int m_itemHeight; + int m_focusedIndex; + bool m_showPopup; + int m_wheelDelta; + bool m_scrollbarCapturingMouse; - // NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea. - void scrollTo(int offset); + ChromeClient* m_chromeClient; + OwnPtr m_hdc; + OwnPtr m_hbitmap; + void* m_pixels; + WebCore::IntRect m_windowRect; +}; - void calculatePositionAndSize(const WebCore::IntRect&, WebCore::FrameView*); - void invalidate(); - WebCore::PopupMenuClient* popupClient_; - RefPtr scrollbar_; - int scrollOffset_; - int itemHeight_; - int focusedIndex_; - bool showPopup_; - int wheelDelta_; - bool scrollbarCapturingMouse_; +};//namespace wke - ChromeClient* chromeClient_; - OwnPtr hdc_; - OwnPtr hbmp_; - void* pixels_; - WebCore::IntRect windowRect_; - }; -} -#endif \ No newline at end of file +#endif//#ifndef WKE_POPUP_MENU_H \ No newline at end of file diff --git a/wke/wkeString.cpp b/wke/wkeString.cpp new file mode 100644 index 00000000..315e39bd --- /dev/null +++ b/wke/wkeString.cpp @@ -0,0 +1,160 @@ +////////////////////////////////////////////////////////////////////////// + + +#include +#include + +//cexer: ں棬Ϊе windows.h ᶨ maxmin WebCore ڲ maxmin ִҡ +#include "wkeString.h" + + +////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + + +CString::CString(const WTF::String& str) + : m_string(str) + , m_utf8(NULL) + , m_wide(NULL) +{ + +} + +CString::CString(const CString& that) + : m_string(that.m_string) + , m_wide(NULL) + , m_utf8(NULL) +{ + +} + +CString::CString(const utf8* str, size_t len) + : m_utf8(NULL) + , m_wide(NULL) +{ + assign(str, len); +} + +CString::CString(const wchar_t* str, size_t len) + : m_utf8(NULL) + , m_wide(NULL) +{ + assign(str, len); +} + +CString::~CString() +{ + _free(); +} + +CString& CString::operator=(const WTF::String& str) +{ + if (&m_string != &str) + { + _dirty(); + m_string = str; + } + return *this; +} + +CString& CString::operator=(const CString& str) +{ + return operator=(str.m_string); +} + +CString& CString::operator=(const wchar_t* str) +{ + if (m_wide != str) + assign(str, wcslen(str)); + return *this; +} + +CString& CString::operator=(const utf8* str) +{ + if (m_utf8 != str) + assign(str, strlen(str)); + return *this; +} + +const utf8* CString::string() const +{ + if (!m_utf8) + { + WTF::CString wtfUtf8 = m_string.utf8(); + size_t wtfUtf8Len = wtfUtf8.length(); + + m_utf8 = new utf8[wtfUtf8Len + 1]; + if (wtfUtf8Len != 0) + memcpy(m_utf8, wtfUtf8.data(), wtfUtf8Len); + + m_utf8[wtfUtf8Len] = 0; + } + + return m_utf8; +} + +const wchar_t* CString::stringW() const +{ + if (!m_wide) + { + const wchar_t* wtfWide = m_string.characters(); + size_t wtfWideLen = m_string.length(); + + m_wide = new wchar_t[wtfWideLen + 1]; + if (wtfWideLen != 0) + memcpy(m_wide, wtfWide, wtfWideLen * sizeof(wchar_t)); + + m_wide[wtfWideLen] = 0; + } + + return m_wide; +} + +const WTF::String& CString::original() const +{ + return m_string; +} + +void CString::assign(const utf8* str, size_t len) +{ + m_string = WTF::String::fromUTF8(str, len); + _dirty(); +} + +void CString::assign(const wchar_t* str, size_t len) +{ + WTF::String(str, len).swap(m_string); + _dirty(); +} + +void CString::_dirty() +{ + _free(); +} + +void CString::_free() +{ + if (m_wide) + { + delete [] m_wide; + m_wide = NULL; + } + + if (m_utf8) + { + delete [] m_utf8; + m_utf8 = NULL; + } +} + + + + + +}; + diff --git a/wke/wkeString.h b/wke/wkeString.h new file mode 100644 index 00000000..8466dac6 --- /dev/null +++ b/wke/wkeString.h @@ -0,0 +1,61 @@ +#ifndef WKE_STRING_H +#define WKE_STRING_H + + +#include +#include + +//cexer: ں棬Ϊе windows.h ᶨ maxmin WebCore ڲ maxmin ִҡ +#include "wke.h" + +////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + + + + +class CString +{ +public: + CString(const WTF::String& str); + CString(const utf8* str, size_t len = 0); + CString(const wchar_t* str, size_t len = 0); + ~CString(); + + CString& operator=(const WTF::String& str); + CString& operator=(const utf8* str); + CString& operator=(const wchar_t* str); + + CString(const CString& that); + CString& operator=(const CString& that); + +public: + const utf8* string() const; + const wchar_t* stringW() const; + const WTF::String& original() const; + + void assign(const utf8* str, size_t len = 0); + void assign(const wchar_t* str, size_t len = 0); + +protected: + void _free(); + void _dirty(); + + WTF::String m_string; + mutable utf8* m_utf8; + mutable wchar_t* m_wide; +}; + + + + + +}; + + +#endif//WKE_STRING_H \ No newline at end of file diff --git a/wke/wkeWebView.cpp b/wke/wkeWebView.cpp index 6a44b03a..6dd13588 100644 --- a/wke/wkeWebView.cpp +++ b/wke/wkeWebView.cpp @@ -1,150 +1,137 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + +#include "wkeChromeClient.h" +#include "wkeFrameLoaderClient.h" +#include "wkeContextMenuClient.h" +#include "wkeInspectorClient.h" +#include "wkeEditorClient.h" +#include "wkeDragClient.h" #include "icuwin.h" -#include "stringTable.h" -#include "wkeWebView.h" +//cexer: ں棬Ϊе wke.h -> windows.h ᶨ maxmin WebCore ڲ maxmin ִҡ #include "wkeDebug.h" -#include "wkeChromeClient.inl" -#include "wkeFrameLoaderClient.inl" -#include "wkeContextMenuClient.inl" -#include "wkeInspectorClient.inl" -#include "wkeEditorClient.inl" -#include "wkeDragClient.inl" +#include "wkeWebView.h" -namespace wke -{ +#include +#pragma comment(lib, "shlwapi.lib") - CWebView::CWebView() - :name_(StringTable::emptyString()) - ,transparent_(false) - ,dirty_(false) - ,width_(0) - ,height_(0) - ,gfxContext_(NULL) - ,awake_(true) - ,clientHandler_(NULL) - { - WebCore::Page::PageClients pageClients; - pageClients.chromeClient = new ChromeClient(this); - pageClients.contextMenuClient = new ContextMenuClient; - pageClients.inspectorClient = new InspectorClient; - pageClients.editorClient = new EditorClient; - pageClients.dragClient = new DragClient; - page_ = adoptPtr(new WebCore::Page(pageClients)); - WebCore::Settings* settings = page_->settings(); - settings->setMinimumFontSize(0); - settings->setMinimumLogicalFontSize(9); - settings->setDefaultFontSize(16); - settings->setDefaultFixedFontSize(13); - settings->setJavaScriptEnabled(true); - settings->setPluginsEnabled(true); - settings->setLoadsImagesAutomatically(true); - settings->setDefaultTextEncodingName(icuwin_getDefaultEncoding()); - - settings->setStandardFontFamily("Times New Roman"); - settings->setFixedFontFamily("Courier New"); - settings->setSerifFontFamily("Times New Roman"); - settings->setSansSerifFontFamily("Arial"); - settings->setCursiveFontFamily("Comic Sans MS"); - settings->setFantasyFontFamily("Times New Roman"); - settings->setPictographFontFamily("Times New Roman"); - - settings->setAllowUniversalAccessFromFileURLs(true); - settings->setAllowFileAccessFromFileURLs(true); - - settings->setJavaScriptCanAccessClipboard(true); - settings->setShouldPrintBackgrounds(true); - settings->setTextAreasAreResizable(true); +namespace wke +{ - settings->setLocalStorageEnabled(true); - - UChar dir[256]; - GetCurrentDirectory(256, dir); - wcscat(dir, L"\\localStorage"); - settings->setLocalStorageDatabasePath(dir); - WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(dir); - - FrameLoaderClient* loader = new FrameLoaderClient(this, page_.get()); - mainFrame_ = WebCore::Frame::create(page_.get(), NULL, loader).get(); - loader->setFrame(mainFrame_); - mainFrame_->init(); - page()->focusController()->setActive(true); - hdc_ = adoptPtr(::CreateCompatibleDC(0)); + CWebView::CWebView() + : m_name("") + , m_transparent(false) + , m_dirty(false) + , m_width(0) + , m_height(0) + , m_graphicsContext(NULL) + , m_awake(true) + , m_title("") + , m_cookie("") + , m_hostWindow(NULL) + , m_paintInterval(15) + , m_lastPaintTimeTick(0) + { + _initHandler(); + _initPage(); + _initMemoryDC(); } CWebView::~CWebView() { - delete gfxContext_; - mainFrame_->loader()->detachFromParent(); + delete m_graphicsContext; + m_mainFrame->loader()->detachFromParent(); + } + + bool CWebView::create() + { + return true; } void CWebView::destroy() { - wkeDestroyWebView(this); + delete this; + } + + const utf8* CWebView::name() const + { + return m_name.string(); } - const char* CWebView::name() const + const wchar_t* CWebView::nameW() const { - return name_; + return m_name.stringW(); } - void CWebView::setName(const char* name) + void CWebView::setName(const utf8* name) { - name_ = StringTable::addString(name); + m_name.assign(name); + } + void CWebView::setName(const wchar_t* name) + { + m_name.assign(name); } - bool CWebView::transparent() const + bool CWebView::isTransparent() const { - return transparent_; + return m_transparent; } void CWebView::setTransparent(bool transparent) { - if (transparent_ == transparent) + if (m_transparent == transparent) return; - transparent_ = transparent; - dirtyArea_ = WebCore::IntRect(0, 0, width_, height_); + m_transparent = transparent; + m_dirtyArea = WebCore::IntRect(0, 0, m_width, m_height); setDirty(true); - if (gfxContext_) + if (m_graphicsContext) { - delete gfxContext_; - gfxContext_ = NULL; + delete m_graphicsContext; + m_graphicsContext = NULL; } WebCore::Color backgroundColor = transparent ? WebCore::Color::transparent : WebCore::Color::white; - mainFrame_->view()->updateBackgroundRecursively(backgroundColor, transparent); + m_mainFrame->view()->updateBackgroundRecursively(backgroundColor, transparent); + } + + void CWebView::loadPostURL(const utf8* inUrl,const char * poastData,int nLen ) + { + WebCore::KURL url(WebCore::KURL(), WTF::String::fromUTF8(inUrl), WebCore::UTF8Encoding()); + if (!url.isValid()) + url.setProtocol("http:"); + + if (!url.isValid()) + return; + + if (WebCore::protocolIsJavaScript(url)) + { + m_mainFrame->script()->executeIfJavaScriptURL(url); + return; + } + + WebCore::ResourceRequest request(url); + request.setCachePolicy(WebCore::UseProtocolCachePolicy); + request.setTimeoutInterval(60.f); + request.setHTTPMethod("POST"); + request.setHTTPBody(WebCore::FormData::create(poastData, nLen)); + m_mainFrame->loader()->load(request, false); + } + + void CWebView::loadPostURL(const wchar_t * inUrl,const char * poastData,int nLen ) + { + loadPostURL(String(inUrl).utf8().data(),poastData,nLen); } void CWebView::loadURL(const utf8* inUrl) { - WebCore::KURL url(WebCore::KURL(), inUrl, WebCore::UTF8Encoding()); + //cexer String::fromUTF8ʾڶString::StringinUrllatin1 + //WebCore::KURL url(WebCore::KURL(), inUrl, WebCore::UTF8Encoding()); + WebCore::KURL url(WebCore::KURL(), WTF::String::fromUTF8(inUrl), WebCore::UTF8Encoding()); if (!url.isValid()) url.setProtocol("http:"); @@ -153,7 +140,7 @@ namespace wke if (WebCore::protocolIsJavaScript(url)) { - mainFrame_->script()->executeIfJavaScriptURL(url); + m_mainFrame->script()->executeIfJavaScriptURL(url); return; } @@ -161,7 +148,7 @@ namespace wke request.setCachePolicy(WebCore::UseProtocolCachePolicy); request.setTimeoutInterval(60.f); request.setHTTPMethod("GET"); - mainFrame_->loader()->load(request, false); + m_mainFrame->loader()->load(request, false); } void CWebView::loadURL(const wchar_t* url) @@ -175,11 +162,14 @@ namespace wke RefPtr sharedBuffer = WebCore::SharedBuffer::create(html, strlen(html)); - WebCore::KURL url(WebCore::KURL(), ""); + //cexer ṩһٵ file:/// URL wkeSetFileSystem Ļصᱻ + //WebCore::KURL url(WebCore::KURL(), ""); + WebCore::KURL url(WebCore::KURL(), WTF::String::fromUTF8("file:///dummy"), WebCore::UTF8Encoding()); + WebCore::ResourceRequest request(url); WebCore::SubstituteData substituteData(sharedBuffer.release(), mime, WebCore::UTF8Encoding().name(), url); - mainFrame_->loader()->load(request, substituteData, false); + m_mainFrame->loader()->load(request, substituteData, false); } void CWebView::loadHTML(const wchar_t* html) @@ -188,44 +178,193 @@ namespace wke RefPtr sharedBuffer = WebCore::SharedBuffer::create((const char*)html, wcslen(html)*2); - WebCore::KURL url(WebCore::KURL(), ""); + //cexer ṩһٵ file:/// URL wkeSetFileSystem Ļصᱻ + //WebCore::KURL url(WebCore::KURL(), ""); + WebCore::KURL url(WebCore::KURL(), WTF::String::fromUTF8("file:///dummy"), WebCore::UTF8Encoding()); + WebCore::ResourceRequest request(url); WebCore::SubstituteData substituteData(sharedBuffer.release(), mime, WebCore::UTF16LittleEndianEncoding().name(), url); - mainFrame_->loader()->load(request, substituteData, false); + m_mainFrame->loader()->load(request, substituteData, false); } void CWebView::loadFile(const utf8* filename) { - char url[1024]; - _snprintf(url, 1023, "file:///%s", filename); - url[1023] = '\0'; + char url[4096+1] = { 0 }; + _snprintf(url, 4096, "file:///%s", filename); + url[4096] = '\0'; loadURL(url); } void CWebView::loadFile(const wchar_t* filename) { - wchar_t url[1024]; - _snwprintf(url, 1024, L"file:///%s", filename); - url[1023] = L'\0'; + wchar_t url[4096+1] = { 0 }; + _snwprintf(url, 4096, L"file:///%s", filename); + url[4096] = L'\0'; loadURL(url); } - bool CWebView::isLoaded() const + void CWebView::load(const utf8* str) + { + wchar_t* wstr = NULL; + int wlen = MultiByteToWideChar(CP_UTF8, 0, str, strlen(str), NULL, 0); + wstr = new wchar_t[wlen + 1]; + MultiByteToWideChar(CP_UTF8, 0, str, strlen(str), wstr, wlen); + wstr[wlen] = 0; + + load(wstr); + + delete [] wstr; + } + + + + LPCWSTR GetWorkingDirectory(LPWSTR buffer, size_t bufferSize) + { + GetCurrentDirectoryW(bufferSize, buffer); + wcscat(buffer, L"\\"); + return buffer; + } + + LPCWSTR GetWorkingPath(LPWSTR buffer, size_t bufferSize, LPCWSTR relatedPath) + { + WCHAR dir[MAX_PATH + 1] = { 0 }; + GetWorkingDirectory(dir, MAX_PATH); + _snwprintf(buffer, bufferSize, L"%s%s", dir, relatedPath); + return buffer; + } + + LPCWSTR FormatWorkingPath(LPWSTR buffer, size_t bufferSize, LPCWSTR fmt, ...) + { + WCHAR relatedPath[MAX_PATH + 1] = { 0 }; + va_list args; + va_start(args, fmt); + _vsnwprintf(relatedPath, MAX_PATH, fmt, args); + va_end(args); + + return GetWorkingPath(buffer, bufferSize, relatedPath); + } + + LPCWSTR GetProgramDirectory(LPWSTR buffer, size_t bufferSize) + { + DWORD i = GetModuleFileNameW(NULL, buffer, bufferSize); + + -- i; + while (buffer[i] != '\\' && i != 0) + -- i; + + buffer[i+1] = 0; + return buffer; + } + + LPCWSTR GetProgramPath(LPWSTR buffer, size_t bufferSize, LPCWSTR relatedPath) + { + WCHAR dir[MAX_PATH + 1] = { 0 }; + GetProgramDirectory(dir, MAX_PATH); + _snwprintf(buffer, bufferSize, L"%s%s", dir, relatedPath); + return buffer; + } + + LPCWSTR FormatProgramPath(LPWSTR buffer, size_t bufferSize, LPCWSTR fmt, ...) + { + WCHAR relatedPath[MAX_PATH + 1] = { 0 }; + va_list args; + va_start(args, fmt); + _vsnwprintf(relatedPath, MAX_PATH, fmt, args); + va_end(args); + + return GetProgramPath(buffer, bufferSize, relatedPath); + } + + void CWebView::load(const wchar_t* str) + { + if (!str || str[0] == 0) + { + loadHTML(L"no url specificed"); + return; + } + + //ȷ schemeǺϷ url + static const wchar_t* HTTP_SCHEME = L"http://"; + static const wchar_t* HTTPS_SCHEME = L"https://"; + static const wchar_t* FILE_SCHEME = L"file:///"; + if (wcsnicmp(str, HTTP_SCHEME, wcslen(HTTP_SCHEME)) == 0 || + wcsnicmp(str, HTTPS_SCHEME, wcslen(HTTPS_SCHEME)) == 0 || + wcsnicmp(str, FILE_SCHEME, wcslen(FILE_SCHEME)) == 0) + { + loadURL(str); + return; + } + + // < > ·п HTML + if (wcschr(str, L'<') && wcschr(str, L'>')) + { + loadHTML(str); + return; + } + + bool pathValid = true; + + //Ȳȷ urlҲûȷķ·ַ· + wchar_t fullPath[MAX_PATH + 1] = { 0 }; + + //about:blank ⴦ + if (0 == wcscmp(str, L"about:blank")) + { + pathValid = false; + } + //·а : ַ˵Ǿ· + else if (wcschr(str, L':')) + { + int strLen = wcslen(str); + wcsncpy(fullPath, str, strLen < MAX_PATH ? strLen : MAX_PATH); + } + //·ҪȫΪ· + else + { + do + { + //ӹĿ¼ + GetWorkingPath(fullPath, MAX_PATH, str); + if (PathFileExistsW(fullPath)) + break; + + //EXEĿ¼ + GetProgramPath(fullPath, MAX_PATH, str); + if (PathFileExistsW(fullPath)) + break; + + pathValid = false; + } + while (0); + } + + //ȷǺϷļ· + if (pathValid) + { + loadFile(fullPath); + return; + } + + //ǺϷļ·ֻܵԶ scheme url + loadURL(str); + } + + bool CWebView::isLoadingSucceeded() const { FrameLoaderClient* client = (FrameLoaderClient*)mainFrame()->loader()->client(); return client->isLoaded(); } - bool CWebView::isLoadFailed() const + bool CWebView::isLoadingFailed() const { FrameLoaderClient* client = (FrameLoaderClient*)mainFrame()->loader()->client(); return client->isLoadFailed(); } - bool CWebView::isLoadComplete() const + bool CWebView::isLoadingCompleted() const { - return isLoaded() || isLoadFailed(); + return isLoadingSucceeded() || isLoadingFailed(); } bool CWebView::isDocumentReady() const @@ -234,6 +373,17 @@ namespace wke return client->isDocumentReady(); } + void CWebView::setUserAgent(const utf8 * useragent) + { + FrameLoaderClient* client = (FrameLoaderClient*)mainFrame()->loader()->client(); + client->setUserAgent( WTF::String::fromUTF8(useragent)); + } + + void CWebView::setUserAgent(const wchar_t * useragent ) + { + setUserAgent(String(useragent).utf8().data()); + } + void CWebView::stopLoading() { mainFrame()->loader()->stopAllLoaders(); @@ -246,137 +396,196 @@ namespace wke const utf8* CWebView::title() { - if (mainFrame()->loader()->documentLoader()) - { - const String& str = mainFrame()->loader()->documentLoader()->title().string(); - return StringTable::addString(str.characters(), str.length()); - } + if (!mainFrame()->loader()->documentLoader()) + return "notitle"; - return StringTable::addString("notitle"); + m_title = mainFrame()->loader()->documentLoader()->title().string(); + return m_title.string(); } const wchar_t* CWebView::titleW() { - if (mainFrame()->loader()->documentLoader()) - { - const String& str = mainFrame()->loader()->documentLoader()->title().string(); - return StringTableW::addString(str.characters(), str.length()); - } + if (!mainFrame()->loader()->documentLoader()) + return L"notitle"; - return StringTableW::addString(L"notitle"); + m_title = mainFrame()->loader()->documentLoader()->title().string(); + return m_title.stringW(); } void CWebView::resize(int w, int h) { - if (w != width_ || h != height_) + if (w != m_width || h != m_height) { - mainFrame_->view()->resize(w, h); + m_mainFrame->view()->resize(w, h); - width_ = w; - height_ = h; + m_width = w; + m_height = h; - dirtyArea_ = WebCore::IntRect(0, 0, w, h); + m_dirtyArea = WebCore::IntRect(0, 0, w, h); setDirty(true); - if (gfxContext_) + if (m_graphicsContext) { - delete gfxContext_; - gfxContext_ = NULL; + delete m_graphicsContext; + m_graphicsContext = NULL; } } } int CWebView::width() const { - return width_; + return m_width; } int CWebView::height() const { - return height_; + return m_height; } - int CWebView::contentsWidth() const + int CWebView::contentWidth() const { return mainFrame()->view()->contentsWidth(); } - int CWebView::contentsHeight() const + int CWebView::contentHeight() const { return mainFrame()->view()->contentsHeight(); } void CWebView::setDirty(bool dirty) { - dirty_ = dirty; + m_dirty = dirty; } bool CWebView::isDirty() const { - return dirty_; + return m_dirty; } void CWebView::addDirtyArea(int x, int y, int w, int h) { if (w > 0 && h > 0) { - dirtyArea_.unite(WebCore::IntRect(x, y, w, h)); - dirty_ = true; + m_dirtyArea.unite(WebCore::IntRect(x, y, w, h)); + m_dirty = true; } } void CWebView::layoutIfNeeded() { - mainFrame_->view()->updateLayoutAndStyleIfNeededRecursive(); + m_mainFrame->view()->updateLayoutAndStyleIfNeededRecursive(); } - void CWebView::paint(void* bits, int pitch) + bool CWebView::repaintIfNeeded() { + if(!m_dirty) + return false; + layoutIfNeeded(); - if (gfxContext_ == NULL) + if (m_graphicsContext == NULL) { - WebCore::BitmapInfo bmp = WebCore::BitmapInfo::createBottomUp(WebCore::IntSize(width_, height_)); - HBITMAP hbmp = ::CreateDIBSection(0, &bmp, DIB_RGB_COLORS, &pixels_, NULL, 0); - ::SelectObject(hdc_.get(), hbmp); - hbmp_ = adoptPtr(hbmp); + WebCore::BitmapInfo bmp = WebCore::BitmapInfo::createBottomUp(WebCore::IntSize(m_width, m_height)); + HBITMAP hbmp = ::CreateDIBSection(0, &bmp, DIB_RGB_COLORS, &m_pixels, NULL, 0); + ::SelectObject(m_hdc.get(), hbmp); + m_hbitmap = adoptPtr(hbmp); - gfxContext_ = new WebCore::GraphicsContext(hdc_.get(), transparent_); + m_graphicsContext = new WebCore::GraphicsContext(m_hdc.get(), m_transparent); } - gfxContext_->save(); + m_graphicsContext->save(); + + if (m_transparent) + m_graphicsContext->clearRect(m_dirtyArea); - if (transparent_) - gfxContext_->clearRect(dirtyArea_); + m_graphicsContext->clip(m_dirtyArea); - gfxContext_->clip(dirtyArea_); + m_mainFrame->view()->paint(m_graphicsContext, m_dirtyArea); + + m_graphicsContext->restore(); + ChromeClient* client = (ChromeClient*)page()->chrome()->client(); + client->paintPopupMenu(m_pixels, m_width*4); + + if(m_handler.paintUpdatedCallback) + { + WebCore::IntPoint pt = m_dirtyArea.location(); + WebCore::IntSize sz = m_dirtyArea.size(); + m_handler.paintUpdatedCallback(this, m_handler.paintUpdatedCallbackParam, m_hdc.get(),pt.x(),pt.y(),sz.width(),sz.height()); + } + m_dirtyArea = WebCore::IntRect(); + m_dirty = false; - mainFrame_->view()->paint(gfxContext_, dirtyArea_); + return true; + } - gfxContext_->restore(); + HDC CWebView::viewDC() + { + return m_hdc.get(); + } - dirty_ = false; - dirtyArea_ = WebCore::IntRect(0, 0, 0, 0); + void CWebView::paint(void* bits, int pitch) + { + if(m_dirty) repaintIfNeeded(); - if (pitch == 0 || pitch == width_*4) + if (pitch == 0 || pitch == m_width*4) { - memcpy(bits, pixels_, width_*height_*4); + memcpy(bits, m_pixels, m_width*m_height*4); } else { - unsigned char* src = (unsigned char*)pixels_; + unsigned char* src = (unsigned char*)m_pixels; unsigned char* dst = (unsigned char*)bits; - for(int i = 0; i < height_; ++i) + for(int i = 0; i < m_height; ++i) { - memcpy(dst, src, width_*4); - src += width_*4; + memcpy(dst, src, m_width*4); + src += m_width*4; dst += pitch; } } - ChromeClient* client = (ChromeClient*)page()->chrome()->client(); - client->paintPopupMenu(bits, pitch); - client->paintToolTip(bits, pitch); + } + + void CWebView::paint(void* bits, int bufWid, int bufHei, int xDst, int yDst, int w, int h, int xSrc, int ySrc, bool bCopyAlpha) + { + if(m_dirty) repaintIfNeeded(); + + + if(xSrc + w > m_width) w = m_width - xSrc; + if(ySrc + h > m_height) h = m_height -ySrc; + + if(xDst + w > bufWid) w =bufWid - xDst; + if(yDst + h > bufHei) h = bufHei - yDst; + + int pitchDst = bufWid*4; + int pitchSrc = m_width*4; + + unsigned char* src = (unsigned char*)m_pixels; + unsigned char* dst = (unsigned char*)bits; + src += pitchSrc*ySrc + xSrc*4; + dst += yDst*pitchDst + xDst*4; + + if(bCopyAlpha) + { + for(int j = 0; j< h; j++) + { + memcpy(dst,src,w*4); + dst += pitchDst; + src += pitchSrc; + } + }else + { + for(int j = 0; j< h; j++) + { + for(int i=0;igoForward(); } - void CWebView::selectAll() + void CWebView::editorSelectAll() { mainFrame()->editor()->command("SelectAll").execute(); } - void CWebView::copy() + void CWebView::editorCopy() { page()->focusController()->focusedOrMainFrame()->editor()->command("Copy").execute(); } - void CWebView::cut() + void CWebView::editorCut() { page()->focusController()->focusedOrMainFrame()->editor()->command("Cut").execute(); } - void CWebView::paste() + void CWebView::editorPaste() { page()->focusController()->focusedOrMainFrame()->editor()->command("Paste").execute(); } - void CWebView::delete_() + void CWebView::editorDelete() { page()->focusController()->focusedOrMainFrame()->editor()->command("Delete").execute(); } @@ -429,7 +638,39 @@ namespace wke page()->setCookieEnabled(enable); } - bool CWebView::cookieEnabled() const + //ȡcookies + const wchar_t* CWebView::cookieW() + { + int e = 0; + m_cookie = mainFrame()->document()->cookie(e); + return m_cookie.stringW(); + } + + const utf8* CWebView::cookie() + { + int e = 0; + m_cookie = mainFrame()->document()->cookie(e); + return m_cookie.string(); + } + + void CWebView::setCookieW(const wchar_t* val) + { + m_cookie = val; + + int e = 0; + mainFrame()->document()->setCookie(val, e); + } + + void CWebView::setCookie(const utf8* val) + { + m_cookie = val; + + String string = String::fromUTF8(val); + int e = 0; + mainFrame()->document()->setCookie(val, e); + } + + bool CWebView::isCookieEnabled() const { return page()->cookieEnabled(); } @@ -444,6 +685,16 @@ namespace wke return page()->mediaVolume(); } + void CWebView::setHostWindow(HWND win) + { + m_hostWindow = win; + } + + HWND CWebView::hostWindow() const + { + return m_hostWindow; + } + static WebCore::MouseEventType messageToEventType(unsigned int message) { switch (message) @@ -511,7 +762,7 @@ namespace wke } } - #define SPI_GETWHEELSCROLLCHARS (0x006C) +#define SPI_GETWHEELSCROLLCHARS (0x006C) static int horizontalScrollChars() { static ULONG scrollChars; @@ -529,7 +780,7 @@ namespace wke } - bool CWebView::mouseEvent(unsigned int message, int x, int y, unsigned int flags) + bool CWebView::fireMouseEvent(unsigned int message, int x, int y, unsigned int flags) { if (!mainFrame()->view()->didFirstLayout()) return true; @@ -618,7 +869,7 @@ namespace wke return handled; } - bool CWebView::contextMenuEvent(int x, int y, unsigned int flags) + bool CWebView::fireContextMenuEvent(int x, int y, unsigned int flags) { page()->contextMenuController()->clearContextMenu(); @@ -651,7 +902,7 @@ namespace wke return targetFrame->eventHandler()->sendContextMenuEvent(mouseEvent); } - bool CWebView::mouseWheel(int x, int y, int wheelDelta, unsigned int flags) + bool CWebView::fireMouseWheelEvent(int x, int y, int wheelDelta, unsigned int flags) { if (!mainFrame()->view()->didFirstLayout()) return true; @@ -695,7 +946,7 @@ namespace wke return mainFrame()->eventHandler()->handleWheelEvent(wheelEvent); } - bool CWebView::keyUp(unsigned int virtualKeyCode, unsigned int flags, bool systemKey) + bool CWebView::fireKeyUpEvent(unsigned int virtualKeyCode, unsigned int flags, bool systemKey) { LPARAM keyData = MAKELPARAM(0, (WORD)flags); WebCore::PlatformKeyboardEvent keyEvent(0, virtualKeyCode, keyData, WebCore::PlatformKeyboardEvent::KeyUp, systemKey); @@ -704,7 +955,7 @@ namespace wke return frame->eventHandler()->keyEvent(keyEvent); } - bool CWebView::keyDown(unsigned int virtualKeyCode, unsigned int flags, bool systemKey) + bool CWebView::fireKeyDownEvent(unsigned int virtualKeyCode, unsigned int flags, bool systemKey) { LPARAM keyData = MAKELPARAM(0, (WORD)flags); WebCore::PlatformKeyboardEvent keyEvent(0, virtualKeyCode, keyData, WebCore::PlatformKeyboardEvent::RawKeyDown, systemKey); @@ -739,48 +990,48 @@ namespace wke WebCore::ScrollDirection direction; WebCore::ScrollGranularity granularity; switch (virtualKeyCode) { - case VK_LEFT: - granularity = WebCore::ScrollByLine; - direction = WebCore::ScrollLeft; - break; - - case VK_RIGHT: - granularity = WebCore::ScrollByLine; - direction = WebCore::ScrollRight; - break; - - case VK_UP: - granularity = WebCore::ScrollByLine; - direction = WebCore::ScrollUp; - break; - - case VK_DOWN: - granularity = WebCore::ScrollByLine; - direction = WebCore::ScrollDown; - break; - - case VK_HOME: - granularity = WebCore::ScrollByDocument; - direction = WebCore::ScrollUp; - break; - - case VK_END: - granularity = WebCore::ScrollByDocument; - direction = WebCore::ScrollDown; - break; - - case VK_PRIOR: - granularity = WebCore::ScrollByPage; - direction = WebCore::ScrollUp; - break; - - case VK_NEXT: - granularity = WebCore::ScrollByPage; - direction = WebCore::ScrollDown; - break; - - default: - return false; + case VK_LEFT: + granularity = WebCore::ScrollByLine; + direction = WebCore::ScrollLeft; + break; + + case VK_RIGHT: + granularity = WebCore::ScrollByLine; + direction = WebCore::ScrollRight; + break; + + case VK_UP: + granularity = WebCore::ScrollByLine; + direction = WebCore::ScrollUp; + break; + + case VK_DOWN: + granularity = WebCore::ScrollByLine; + direction = WebCore::ScrollDown; + break; + + case VK_HOME: + granularity = WebCore::ScrollByDocument; + direction = WebCore::ScrollUp; + break; + + case VK_END: + granularity = WebCore::ScrollByDocument; + direction = WebCore::ScrollDown; + break; + + case VK_PRIOR: + granularity = WebCore::ScrollByPage; + direction = WebCore::ScrollUp; + break; + + case VK_NEXT: + granularity = WebCore::ScrollByPage; + direction = WebCore::ScrollDown; + break; + + default: + return false; } if (frame->eventHandler()->scrollRecursively(direction, granularity)) @@ -793,7 +1044,7 @@ namespace wke return false; } - bool CWebView::keyPress(unsigned int charCode, unsigned int flags, bool systemKey) + bool CWebView::fireKeyPressEvent(unsigned int charCode, unsigned int flags, bool systemKey) { LPARAM keyData = MAKELPARAM(0, (WORD)flags); WebCore::PlatformKeyboardEvent keyEvent(0, charCode, keyData, WebCore::PlatformKeyboardEvent::Char, systemKey); @@ -809,19 +1060,19 @@ namespace wke return frame->eventHandler()->keyEvent(keyEvent); } - void CWebView::focus() + void CWebView::setFocus() { WebCore::FocusController* focusController = page()->focusController(); focusController->setFocused(true); } - void CWebView::unfocus() + void CWebView::killFocus() { WebCore::FocusController* focusController = page()->focusController(); focusController->setFocused(false); } - wkeRect CWebView::getCaret() + wkeRect CWebView::caretRect() { wkeRect rect; rect.x = rect.y = 0; @@ -846,58 +1097,58 @@ namespace wke return rect; } - jsValue CWebView::runJS(const wchar_t* script) + wkeJSValue CWebView::runJS(const wchar_t* script) { String string(script); - WebCore::ScriptValue value = mainFrame_->script()->executeScript(string, true); + WebCore::ScriptValue value = m_mainFrame->script()->executeScript(string, true); if (value.hasNoValue()) - return jsUndefined(); + return wkeJSUndefined(globalExec()); - return JSC::JSValue::encode(value.jsValue()); + return (wkeJSValue)JSC::JSValue::encode(value.jsValue()); } - jsValue CWebView::runJS(const utf8* script) + wkeJSValue CWebView::runJS(const utf8* script) { String string = String::fromUTF8(script); - WebCore::ScriptValue value = mainFrame_->script()->executeScript(string, true); + WebCore::ScriptValue value = m_mainFrame->script()->executeScript(string, true); if (value.hasNoValue()) - return jsUndefined(); + return wkeJSUndefined(globalExec()); - return JSC::JSValue::encode(value.jsValue()); + return (wkeJSValue)JSC::JSValue::encode(value.jsValue()); } - jsExecState CWebView::globalExec() + wkeJSState* CWebView::globalExec() { - return mainFrame_->script()->globalObject(WebCore::mainThreadNormalWorld())->globalExec(); + return (wkeJSState*)m_mainFrame->script()->globalObject(WebCore::mainThreadNormalWorld())->globalExec(); } void CWebView::sleep() { - awake_ = false; + m_awake = false; page()->setCanStartMedia(false); page()->willMoveOffscreen(); } - void CWebView::awaken() + void CWebView::wake() { - awake_ = true; + m_awake = true; page()->didMoveOnscreen(); page()->setCanStartMedia(true); } bool CWebView::isAwake() const { - return awake_; + return m_awake; } void CWebView::setZoomFactor(float factor) { - mainFrame_->setPageZoomFactor(factor); + m_mainFrame->setPageZoomFactor(factor); } float CWebView::zoomFactor() const { - return mainFrame_->pageZoomFactor(); + return m_mainFrame->pageZoomFactor(); } void CWebView::setEditable(bool editable) @@ -907,49 +1158,353 @@ namespace wke page()->setEditable(editable); page()->setTabKeyCyclesThroughElements(!editable); if (editable) - mainFrame_->editor()->applyEditingStyleToBodyElement(); + m_mainFrame->editor()->applyEditingStyleToBodyElement(); } } - void CWebView::setClientHandler(const wkeClientHandler* handler) + void CWebView::onTitleChanged(wkeTitleChangedCallback callback, void* callbackParam) { - clientHandler_ = handler; + m_handler.titleChangedCallback = callback; + m_handler.titleChangedCallbackParam = callbackParam; } - const wkeClientHandler* CWebView::getClientHandler() const + void CWebView::onURLChanged(wkeURLChangedCallback callback, void* callbackParam) { - return clientHandler_; + m_handler.urlChangedCallback = callback; + m_handler.urlChangedCallbackParam = callbackParam; } -} -static Vector s_webViews; + void CWebView::onPaintUpdated(wkePaintUpdatedCallback callback, void* callbackParam) + { + m_handler.paintUpdatedCallback = callback; + m_handler.paintUpdatedCallbackParam = callbackParam; + } -wkeWebView wkeCreateWebView() -{ - wke::CWebView* webView = new wke::CWebView; - s_webViews.append(webView); - return webView; -} + void CWebView::onAlertBox(wkeAlertBoxCallback callback, void* callbackParam) + { + m_handler.alertBoxCallback = callback; + m_handler.alertBoxCallbackParam = callbackParam; + } -wkeWebView wkeGetWebView(const char* name) -{ - for (size_t i = 0; i < s_webViews.size(); ++i) + void CWebView::onConfirmBox(wkeConfirmBoxCallback callback, void* callbackParam) { - if (strcmp(s_webViews[i]->name(), name) == 0) - return s_webViews[i]; + m_handler.confirmBoxCallback = callback; + m_handler.confirmBoxCallbackParam = callbackParam; } - return 0; -} + void CWebView::onPromptBox(wkePromptBoxCallback callback, void* callbackParam) + { + m_handler.promptBoxCallback = callback; + m_handler.promptBoxCallbackParam = callbackParam; + } -void wkeDestroyWebView(wkeWebView webView) -{ - size_t pos = s_webViews.find(webView); + void defaultRunAlertBox(wkeWebView* webView, void* param, const wkeString* msg) + { + MessageBoxW(NULL, wkeGetStringW(msg), L"wke", MB_OK); + } + + bool defaultRunConfirmBox(wkeWebView* webView, void* param, const wkeString* msg) + { + int result = MessageBoxW(NULL, wkeGetStringW(msg), L"wke", MB_OKCANCEL); + return result == IDOK; + } + + static unsigned char definputbox_dlg[] = + { + 0x01,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x00,0xc8,0x00,0x06, + 0x00,0x16,0x00,0x11,0x00,0x41,0x01,0x6f,0x00,0x00,0x00,0x00,0x00,0x57,0x00,0x69, + 0x00,0x6e,0x00,0x33,0x00,0x32,0x00,0x49,0x00,0x6e,0x00,0x70,0x00,0x75,0x00,0x74, + 0x00,0x42,0x00,0x6f,0x00,0x78,0x00,0x00,0x00,0x08,0x00,0xbc,0x02,0x00,0x00,0x4d, + 0x00,0x53,0x00,0x20,0x00,0x53,0x00,0x68,0x00,0x65,0x00,0x6c,0x00,0x6c,0x00,0x20, + 0x00,0x44,0x00,0x6c,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0x00,0x81,0x50,0x04,0x00,0x27,0x00,0x38,0x01,0x0e,0x00,0xe9, + 0x03,0x00,0x00,0xff,0xff,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x01,0x00,0x03,0x50,0x0e,0x01,0x04,0x00,0x2e,0x00,0x0e,0x00,0x01, + 0x00,0x00,0x00,0xff,0xff,0x80,0x00,0x4f,0x00,0x4b,0x00,0x73,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x50,0x0e, + 0x01,0x15,0x00,0x2e,0x00,0x0e,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0x80,0x00,0x43, + 0x00,0x41,0x00,0x4e,0x00,0x43,0x00,0x45,0x00,0x4c,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x21,0x00,0x16,0x00,0x08, + 0x00,0x08,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x82,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x02,0x50,0x06,0x00,0x04,0x00,0x00, + 0x01,0x1d,0x00,0xe8,0x03,0x00,0x00,0xff,0xff,0x82,0x00,0x50,0x00,0x72,0x00,0x6f, + 0x00,0x6d,0x00,0x70,0x00,0x74,0x00,0x3a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x10,0xa1,0x50,0x04,0x00,0x39,0x00,0x38, + 0x01,0x31,0x00,0xea,0x03,0x00,0x00,0xff,0xff,0x81,0x00,0x00,0x00,0x00,0x00 + }; + + static const INT_PTR definputbox_buttonids[] = { IDOK, IDCANCEL }; + static LPCWSTR definputbox_buttonnames[] = { L"ȷ", L"ȡ" }; + static const INT definputbox_id_prompt = 1000; + static const INT definputbox_id_edit1 = 1001; + static const INT definputbox_id_edit2 = 1002; + + class CWin32InputBox + { + public: + CWin32InputBox() + : m_hdlg(NULL) + , m_edit(NULL) + , m_pwszResult(NULL) + , m_pwszMessage(NULL) + , m_hParent(NULL) + {} + + ~CWin32InputBox() + { + delete [] m_pwszResult; + m_pwszResult = NULL; + } + + int prompt(HWND hParent, LPCWSTR pwszMsg, LPCWSTR pwszDefaultResult, LPCWSTR* ppwszResult) + { + m_pwszMessage = pwszMsg; + m_pwszDefaultResult = pwszDefaultResult; + m_hParent = hParent; + int ret = DialogBoxIndirectParamW(NULL, (LPDLGTEMPLATEW)definputbox_dlg, hParent, (DLGPROC)&CWin32InputBox::DlgProc, (LPARAM)this); + *ppwszResult = m_pwszResult; + return ret; + } + + protected: + HWND m_hParent; + HWND m_hdlg; + HWND m_edit; + LPCWSTR m_pwszDefaultResult; + LPWSTR m_pwszResult; + LPCWSTR m_pwszMessage; + + void onInitDialog(HWND hDlg) + { + m_hdlg = hDlg; + SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)this); + + // Set the button captions + SetDlgItemTextW(m_hdlg, (int) definputbox_buttonids[0], definputbox_buttonnames[0]); + SetDlgItemTextW(m_hdlg, (int) definputbox_buttonids[1], definputbox_buttonnames[1]); + SetWindowTextW(m_hdlg, L"wke"); + SetDlgItemTextW(m_hdlg, definputbox_id_prompt, m_pwszMessage); + + m_edit = GetDlgItem(m_hdlg, definputbox_id_edit1); + SetWindowText(m_edit, m_pwszDefaultResult); + + RECT rectDlg = { 0 }; + RECT rectEdit = { 0 }; + GetWindowRect(m_hdlg, &rectDlg); + GetWindowRect(m_edit, &rectEdit); + SetWindowPos(m_hdlg, HWND_NOTOPMOST, 0, 0, rectDlg.right - rectDlg.left, rectEdit.bottom - rectDlg.top + 5, SWP_NOMOVE); + ShowWindow(GetDlgItem(m_hdlg, definputbox_id_edit2), SW_HIDE); + + int width = 0; + int height = 0; + { + RECT rect = { 0 }; + GetWindowRect(m_hdlg, &rect); + width = rect.right - rect.left; + height = rect.bottom - rect.top; + } + + int parentWidth = 0; + int parentHeight = 0; + if (HWND parent = GetParent(m_hdlg)) + { + RECT rect = { 0 }; + GetClientRect(parent, &rect); + parentWidth = rect.right - rect.left; + parentHeight = rect.bottom - rect.top; + } + else + { + parentWidth = GetSystemMetrics(SM_CXSCREEN); + parentHeight = GetSystemMetrics(SM_CYSCREEN); + } + + int x = (parentWidth - width) / 2; + int y = (parentHeight - height) / 2; + + MoveWindow(m_hdlg, x, y, width, height, FALSE); + } + + void onOK() + { + int len = GetWindowTextLengthW(m_edit); + m_pwszResult = new WCHAR[len + 1]; + memset(m_pwszResult, 0, (len + 1) * sizeof(WCHAR)); + GetWindowTextW(m_edit, m_pwszResult, len + 1); + EndDialog(m_hdlg, IDOK); + } + + void onCancel() + { + m_pwszResult = new WCHAR[1]; + *m_pwszResult = 0; + EndDialog(m_hdlg, IDCANCEL); + } + + static LRESULT CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) + { + CWin32InputBox* pthis = (CWin32InputBox*)GetWindowLongPtr(hDlg, GWLP_USERDATA); + switch (message) + { + case WM_INITDIALOG: + { + pthis = (CWin32InputBox*)lParam; + pthis->onInitDialog(hDlg); + } + return TRUE; + + case WM_COMMAND: + { + INT_PTR id = LOWORD(wParam); + switch (id) + { + case IDOK: + pthis->onOK(); + break; + + case IDCANCEL: + pthis->onCancel(); + break; + } + } + break; + } + return FALSE; + } + }; - ASSERT(pos != notFound); - if (pos != notFound) + bool defaultRunPromptBox(wkeWebView* webView, void* param, const wkeString* msg, const wkeString* defaultResult, wkeString* result) { - s_webViews.remove(pos); - delete (wke::CWebView*)webView; + LPCWSTR pwszResult = NULL; + + CWin32InputBox inputBox; + if (IDCANCEL == inputBox.prompt(webView->hostWindow(), wkeGetStringW(msg), wkeGetStringW(defaultResult), &pwszResult)) + return false; + + wkeSetStringW(result, pwszResult, wcslen(pwszResult)); + return true; } -} \ No newline at end of file + + void CWebView::_initHandler() + { + memset(&m_handler, 0, sizeof(m_handler)); + m_handler.alertBoxCallback = defaultRunAlertBox; + m_handler.confirmBoxCallback = defaultRunConfirmBox; + m_handler.promptBoxCallback = defaultRunPromptBox; + m_handler.promptBoxCallbackParam = this; + } + + extern "C" IMAGE_DOS_HEADER __ImageBase; + + void CWebView::_initPage() + { + WebCore::Page::PageClients pageClients; + pageClients.chromeClient = new ChromeClient(this); + pageClients.contextMenuClient = new ContextMenuClient; + pageClients.inspectorClient = new InspectorClient; + pageClients.editorClient = new EditorClient; + pageClients.dragClient = new DragClient; + + m_page = adoptPtr(new WebCore::Page(pageClients)); + WebCore::Settings* settings = m_page->settings(); + settings->setMinimumFontSize(0); + settings->setMinimumLogicalFontSize(9); + settings->setDefaultFontSize(16); + settings->setDefaultFixedFontSize(13); + settings->setJavaScriptEnabled(true); + settings->setPluginsEnabled(true); + settings->setLoadsImagesAutomatically(true); + settings->setDefaultTextEncodingName(icuwin_getDefaultEncoding()); + + settings->setStandardFontFamily("Times New Roman"); + settings->setFixedFontFamily("Courier New"); + settings->setSerifFontFamily("Times New Roman"); + settings->setSansSerifFontFamily("Arial"); + settings->setCursiveFontFamily("Comic Sans MS"); + settings->setFantasyFontFamily("Times New Roman"); + settings->setPictographFontFamily("Times New Roman"); + + settings->setAllowUniversalAccessFromFileURLs(true); + settings->setAllowFileAccessFromFileURLs(true); + settings->setJavaScriptCanAccessClipboard(true); + settings->setShouldPrintBackgrounds(true); + settings->setTextAreasAreResizable(true); + settings->setLocalStorageEnabled(true); + settings->setUseHixie76WebSocketProtocol( false ); + + WCHAR storageDir[MAX_PATH + 1] = { 0 }; + GetModuleFileNameW((HMODULE)&__ImageBase, storageDir, MAX_PATH); + PathRemoveFileSpecW(storageDir); + wcscat(storageDir, L"\\wkeStorage"); + settings->setLocalStorageDatabasePath(storageDir); + + FrameLoaderClient* loader = new FrameLoaderClient(this, m_page.get()); + m_mainFrame = WebCore::Frame::create(m_page.get(), NULL, loader).get(); + loader->setFrame(m_mainFrame); + m_mainFrame->init(); + + page()->focusController()->setActive(true); + } + + void CWebView::_initMemoryDC() + { + m_hdc = adoptPtr(::CreateCompatibleDC(0)); + } + + void CWebView::onNavigation(wkeNavigationCallback callback, void* callbackParam) + { + m_handler.navigationCallback = callback; + m_handler.navigationCallbackParam = callbackParam; + } + + void CWebView::onCreateView(wkeCreateViewCallback callback, void* callbackParam) + { + m_handler.createViewCallback = callback; + m_handler.createViewCallbackParam = callbackParam; + } + + void CWebView::onConsoleMessage(wkeConsoleMessageCallback callback, void* callbackParam) + { + m_handler.consoleMessageCallback = callback; + m_handler.consoleMessageCallbackParam = callbackParam; + } + + void CWebView::onLoadingFinish(wkeLoadingFinishCallback callback, void* callbackParam) + { + m_handler.loadingFinishCallback = callback; + m_handler.loadingFinishCallbackParam = callbackParam; + } + + void CWebView::onDocumentReady(wkeDocumentReadyCallback callback, void* callbackParam) + { + m_handler.documentReadyCallback = callback; + m_handler.documentReadyCallbackParam = callbackParam; + } + + void CWebView::setRepaintInterval(int ms) + { + m_paintInterval = ms > 0 ? ms : 15; + } + + int CWebView::repaintInterval() const + { + return m_paintInterval; + } + + + bool CWebView::repaintIfNeededAfterInterval() + { + DWORD nowTick = timeGetTime(); + if (nowTick - m_lastPaintTimeTick < m_paintInterval) + return false; + + bool repainted = repaintIfNeeded(); + if (!repainted) + return false; + + m_lastPaintTimeTick = timeGetTime(); + return true; + } + +};//namespace wke + diff --git a/wke/wkeWebView.h b/wke/wkeWebView.h index 77949f64..900d49a6 100644 --- a/wke/wkeWebView.h +++ b/wke/wkeWebView.h @@ -1,127 +1,267 @@ #ifndef WKE_WEB_VIEW_H #define WKE_WEB_VIEW_H -#include "wke.h" + +////////////////////////////////////////////////////////////////////////// + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//cexer: ں棬Ϊе windows.h ᶨ maxmin WebCore ڲ maxmin ִҡ +#include "wkeString.h" + + +////////////////////////////////////////////////////////////////////////// + + + namespace wke { - class CWebView : public IWebView - { - public: - CWebView(); - ~CWebView(); - - virtual void destroy(); - - virtual const char* name() const; - virtual void setName(const char* name); - - virtual bool transparent() const; - virtual void setTransparent(bool transparent); - - virtual void loadURL(const utf8* inUrl); - virtual void loadURL(const wchar_t* url); - - virtual void loadHTML(const utf8* html); - virtual void loadHTML(const wchar_t* html); - - virtual void loadFile(const utf8* filename); - virtual void loadFile(const wchar_t* filename); - - virtual bool isLoaded() const; - virtual bool isLoadFailed() const; - virtual bool isLoadComplete() const; - virtual bool isDocumentReady() const; - virtual void stopLoading(); - virtual void reload(); - - virtual const utf8* title(); - virtual const wchar_t* titleW(); - - virtual void resize(int w, int h); - virtual int width() const; - virtual int height() const; - - virtual int contentsWidth() const; - virtual int contentsHeight() const; - - virtual void setDirty(bool dirty); - virtual bool isDirty() const; - virtual void addDirtyArea(int x, int y, int w, int h); - - virtual void layoutIfNeeded(); - virtual void paint(void* dst, int pitch); - - virtual bool canGoBack() const; - virtual bool goBack(); - virtual bool canGoForward() const; - virtual bool goForward(); - - virtual void selectAll(); - virtual void copy(); - virtual void cut(); - virtual void paste(); - virtual void delete_(); - - virtual void setCookieEnabled(bool enable); - virtual bool cookieEnabled() const; - - virtual void setMediaVolume(float volume); - virtual float mediaVolume() const; - - virtual bool mouseEvent(unsigned int message, int x, int y, unsigned int flags); - virtual bool contextMenuEvent(int x, int y, unsigned int flags); - virtual bool mouseWheel(int x, int y, int delta, unsigned int flags); - virtual bool keyUp(unsigned int virtualKeyCode, unsigned int flags, bool systemKey); - virtual bool keyDown(unsigned int virtualKeyCode, unsigned int flags, bool systemKey); - virtual bool keyPress(unsigned int charCode, unsigned int flags, bool systemKey); - - virtual void focus(); - virtual void unfocus(); - - virtual wkeRect getCaret(); - - virtual jsValue runJS(const wchar_t* script); - virtual jsValue runJS(const utf8* script); - virtual jsExecState globalExec(); - - virtual void sleep(); - virtual void awaken(); - virtual bool isAwake() const; - - void setZoomFactor(float factor); - float zoomFactor() const; - - void setEditable(bool editable); - - virtual void setClientHandler(const wkeClientHandler* handler); - virtual const wkeClientHandler* getClientHandler() const; - - WebCore::Page* page() const { return page_.get(); } - WebCore::Frame* mainFrame() const { return mainFrame_; } - - protected: - OwnPtr page_; - WebCore::Frame* mainFrame_; - - const char* name_; - bool transparent_; - - int width_; - int height_; - - bool dirty_; - WebCore::IntRect dirtyArea_; - - WebCore::GraphicsContext* gfxContext_; - OwnPtr hdc_; - OwnPtr hbmp_; - void* pixels_; - - bool awake_; - - const wkeClientHandler* clientHandler_; - }; -} - -#endif // + + +struct CWebViewHandler +{ + wkeTitleChangedCallback titleChangedCallback; + void* titleChangedCallbackParam; + + wkeURLChangedCallback urlChangedCallback; + void* urlChangedCallbackParam; + + wkePaintUpdatedCallback paintUpdatedCallback; + void* paintUpdatedCallbackParam; + + wkeAlertBoxCallback alertBoxCallback; + void* alertBoxCallbackParam; + + wkeConfirmBoxCallback confirmBoxCallback; + void* confirmBoxCallbackParam; + + wkePromptBoxCallback promptBoxCallback; + void* promptBoxCallbackParam; + + wkeNavigationCallback navigationCallback; + void* navigationCallbackParam; + + wkeCreateViewCallback createViewCallback; + void* createViewCallbackParam; + + wkeDocumentReadyCallback documentReadyCallback; + void* documentReadyCallbackParam; + + wkeLoadingFinishCallback loadingFinishCallback; + void* loadingFinishCallbackParam; + + wkeConsoleMessageCallback consoleMessageCallback; + void* consoleMessageCallbackParam; +}; + + +class CWebView +{ +public: + CWebView(); + virtual ~CWebView(); + + virtual bool create(); + virtual void destroy(); + + const utf8* name() const; + const wchar_t* nameW() const; + + void setName(const utf8* name); + void setName(const wchar_t* name); + + bool isTransparent() const; + void setTransparent(bool transparent); + + void loadURL(const utf8* inUrl); + void loadURL(const wchar_t* url); + + void loadPostURL(const utf8* inUrl,const char * poastData,int nLen ); + void loadPostURL(const wchar_t * inUrl,const char * poastData,int nLen ); + + void loadHTML(const utf8* html); + void loadHTML(const wchar_t* html); + + void loadFile(const utf8* filename); + void loadFile(const wchar_t* filename); + + void load(const utf8* str); + void load(const wchar_t* str); + + void setUserAgent(const utf8 * useragent); + void setUserAgent(const wchar_t * useragent); + + bool isLoadingSucceeded() const; + bool isLoadingFailed() const; + bool isLoadingCompleted() const; + bool isDocumentReady() const; + void stopLoading(); + void reload(); + + const utf8* title(); + const wchar_t* titleW(); + + virtual void resize(int w, int h); + int width() const; + int height() const; + + int contentWidth() const; + int contentHeight() const; + + void setDirty(bool dirty); + bool isDirty() const; + void addDirtyArea(int x, int y, int w, int h); + + void layoutIfNeeded(); + void paint(void* bits, int pitch); + void paint(void* bits, int bufWid, int bufHei, int xDst, int yDst, int w, int h, int xSrc, int ySrc, bool fKeepAlpha); + bool repaintIfNeeded(); + HDC viewDC(); + + bool canGoBack() const; + bool goBack(); + bool canGoForward() const; + bool goForward(); + + void editorSelectAll(); + void editorCopy(); + void editorCut(); + void editorPaste(); + void editorDelete(); + + const wchar_t* cookieW(); + const utf8* cookie(); + + void setCookieW(const wchar_t* val); + void setCookie(const utf8* val); + + void setCookieEnabled(bool enable); + bool isCookieEnabled() const; + + void setMediaVolume(float volume); + float mediaVolume() const; + + void setHostWindow(HWND win); + HWND hostWindow() const; + + bool fireMouseEvent(unsigned int message, int x, int y, unsigned int flags); + bool fireContextMenuEvent(int x, int y, unsigned int flags); + bool fireMouseWheelEvent(int x, int y, int delta, unsigned int flags); + bool fireKeyUpEvent(unsigned int virtualKeyCode, unsigned int flags, bool systemKey); + bool fireKeyDownEvent(unsigned int virtualKeyCode, unsigned int flags, bool systemKey); + bool fireKeyPressEvent(unsigned int charCode, unsigned int flags, bool systemKey); + + void setFocus(); + void killFocus(); + + wkeRect caretRect(); + + wkeJSValue runJS(const wchar_t* script); + wkeJSValue runJS(const utf8* script); + wkeJSState* globalExec(); + + void sleep(); + void wake(); + bool isAwake() const; + + void setZoomFactor(float factor); + float zoomFactor() const; + + void setEditable(bool editable); + + WebCore::Page* page() const { return m_page.get(); } + WebCore::Frame* mainFrame() const { return m_mainFrame; } + + void onURLChanged(wkeURLChangedCallback callback, void* callbackParam); + void onTitleChanged(wkeTitleChangedCallback callback, void* callbackParam); + virtual void onPaintUpdated(wkePaintUpdatedCallback callback, void* callbackParam); + + void onAlertBox(wkeAlertBoxCallback callback, void* callbackParam); + void onConfirmBox(wkeConfirmBoxCallback callback, void* callbackParam); + void onPromptBox(wkePromptBoxCallback callback, void* callbackParam); + + void onNavigation(wkeNavigationCallback callback, void* callbackParam); + void onCreateView(wkeCreateViewCallback callback, void* callbackParam); + + void onConsoleMessage(wkeConsoleMessageCallback callback, void* callbackParam); + + virtual void onLoadingFinish(wkeLoadingFinishCallback callback, void* callbackParam); + virtual void onDocumentReady(wkeDocumentReadyCallback callback, void* callbackParam); + + void setRepaintInterval(int ms); + int repaintInterval() const; + bool repaintIfNeededAfterInterval(); + +protected: + void _initHandler(); + void _initPage(); + void _initMemoryDC(); + + //ЩӿӦʹCWebViewʵֵģ԰һ࣬ΪԱ + friend class ToolTip; + friend class ChromeClient; + friend class ContextMenuClient; + friend class DrawClient; + friend class EditorClient; + friend class FrameLoaderClient; + friend class InspectorClient; + friend class PlatformStrategies; + + OwnPtr m_page; + WebCore::Frame* m_mainFrame; + wke::CString m_title; + wke::CString m_cookie; + + wke::CString m_name; + bool m_transparent; + + int m_width; + int m_height; + + bool m_dirty; + WebCore::IntRect m_dirtyArea; + + WebCore::GraphicsContext* m_graphicsContext; + OwnPtr m_hdc; + OwnPtr m_hbitmap; + void* m_pixels; + + bool m_awake; + HWND m_hostWindow; + + CWebViewHandler m_handler; + + DWORD m_paintInterval; + DWORD m_lastPaintTimeTick; +}; + + + + +};//namespace wke + + + + +#endif//#ifndef WKE_WEB_VIEW_H diff --git a/wke/wkeWebWindow.cpp b/wke/wkeWebWindow.cpp new file mode 100644 index 00000000..28898489 --- /dev/null +++ b/wke/wkeWebWindow.cpp @@ -0,0 +1,791 @@ +//////////////////////////////////////////////////////////////////////////// + + +#include "wkeWebWindow.h" + + +//////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + +CWebWindow::CWebWindow() +{ + m_hwnd = NULL; + + m_originalPaintUpdatedCallback = NULL; + m_originalPaintUpdatedCallbackParam = NULL; + + m_originalDocumentReadyCallback = NULL; + m_originalDocumentReadyCallbackParam = NULL; + + m_originalLoadingFinishCallback = NULL; + m_originalLoadingFinishCallbackParam = NULL; + + m_windowClosingCallback = NULL; + m_windowClosingCallbackParam = NULL; + + m_windowDestroyCallback = NULL; + m_windowDestroyCallbackParam = NULL; + + _initCallbacks(); +} + + +CWebWindow::~CWebWindow() +{ + +} + + +bool CWebWindow::create(HWND parent, unsigned styles, unsigned styleEx, int x, int y, int width, int height) +{ + CWebView::create(); + return _createWindow(parent, styles, styleEx, x, y, width, height); +} + +bool CWebWindow::create(HWND parent, wkeWindowType type, int x, int y, int width, int height) +{ + unsigned styles = 0; + unsigned styleEx = 0; + switch (type) + { + case WKE_WINDOW_TYPE_CONTROL: + styles = WS_CHILD; + styleEx = 0; + wkeSetTransparent(this, false); + break; + + case WKE_WINDOW_TYPE_TRANSPARENT: + styles = WS_POPUP; + styleEx = WS_EX_LAYERED; + wkeSetTransparent(this, true); + break; + + case WKE_WINDOW_TYPE_POPUP: + default: + styles = WS_OVERLAPPEDWINDOW; + styleEx = 0; + wkeSetTransparent(this, false); + } + + return create(parent, styles, styleEx, x, y, width, height); +} + +void CWebWindow::destroy() +{ + _destroyWindow(); + wkeDestroyWebView(this); +} + +void CWebWindow::onPaintUpdated(wkePaintUpdatedCallback callback, void* callbackParam) +{ + m_originalPaintUpdatedCallback = callback; + m_originalPaintUpdatedCallbackParam = callbackParam; +} + +void CWebWindow::onLoadingFinish(wkeLoadingFinishCallback callback, void* callbackParam) +{ + m_originalLoadingFinishCallback = callback; + m_originalLoadingFinishCallbackParam = callbackParam; +} + +void CWebWindow::onDocumentReady(wkeDocumentReadyCallback callback, void* callbackParam) +{ + m_originalDocumentReadyCallback = callback; + m_originalDocumentReadyCallbackParam = callbackParam; +} + +bool CWebWindow::_createWindow(HWND parent, unsigned styles, unsigned styleEx, int x, int y, int width, int height) +{ + if (IsWindow(m_hwnd)) + return true; + + const wchar_t* szClassName = L"wkeWebWindow"; + MSG msg = { 0 }; + WNDCLASSW wndClass = { 0 }; + if (!GetClassInfoW(NULL, szClassName, &wndClass)) + { + wndClass.style = CS_HREDRAW | CS_VREDRAW; + wndClass.lpfnWndProc = &CWebWindow::_staticWindowProc; + wndClass.cbClsExtra = 200; + wndClass.cbWndExtra = 200; + wndClass.hInstance = GetModuleHandleW(NULL); + wndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wndClass.hCursor = LoadCursor(NULL, IDC_ARROW); + wndClass.hbrBackground= NULL; + wndClass.lpszMenuName = NULL; + wndClass.lpszClassName = szClassName; + RegisterClassW(&wndClass); + } + + //DWORD styleEx = 0; + //DWORD styles = 0; + + //if (WKE_WINDOW_STYLE_LAYERED == (styleFlags & WKE_WINDOW_STYLE_LAYERED)) + // styleEx = WS_EX_LAYERED; + + //if (WKE_WINDOW_STYLE_CHILD == (styleFlags & WKE_WINDOW_STYLE_CHILD)) + // styles |= WS_CHILD; + //else + // styles |= WS_POPUP|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME; + + //if (WKE_WINDOW_STYLE_BORDER == (styleFlags & WKE_WINDOW_STYLE_BORDER)) + // styles |= WS_BORDER; + + //if (WKE_WINDOW_STYLE_CAPTION == (styleFlags & WKE_WINDOW_STYLE_CAPTION)) + // styles |= WS_CAPTION; + + //if (WKE_WINDOW_STYLE_SIZEBOX == (styleFlags & WKE_WINDOW_STYLE_SIZEBOX)) + // styles |= WS_SIZEBOX; + + //if (WKE_WINDOW_STYLE_SHOWLOADING == (styleFlags & WKE_WINDOW_STYLE_SHOWLOADING)) + // styles |= WS_VISIBLE; + + m_hwnd = CreateWindowExW( + styleEx, // window ex-style + szClassName, // window class name + L"wkeWebWindow", // window caption + styles, // window style + x, // initial x position + y, // initial y position + width, // initial x size + height, // initial y size + parent, // parent window handle + NULL, // window menu handle + GetModuleHandleW(NULL), // program instance handle + this); // creation parameters + + if (!IsWindow(m_hwnd)) + return FALSE; + + CWebView::setHostWindow(m_hwnd); + CWebView::resize(width, height); + + return TRUE; +} + +void CWebWindow::_destroyWindow() +{ + //KillTimer(m_hwnd, 100); + RemovePropW(m_hwnd, L"wkeWebWindow"); + DestroyWindow(m_hwnd); + m_hwnd = NULL; +} + +void CWebWindow::_initCallbacks() +{ + CWebView::onPaintUpdated(&CWebWindow::_staticOnPaintUpdated, this); + CWebView::onLoadingFinish(&CWebWindow::_staticOnLoadingFinish, this); + CWebView::onDocumentReady(&CWebWindow::_staticOnDocumentReady, this); +} + +void CWebWindow::_paintDC(HDC hdc, HDC sourceDC) +{ + //InvalidateRect(m_hwnd, NULL, FALSE); + + //HDC hdc = GetDC(m_hwnd); + RECT rcClip; + GetClipBox(hdc, &rcClip); + + RECT rcClient; + GetClientRect(m_hwnd, &rcClient); + + RECT rcInvalid; + IntersectRect(&rcInvalid, &rcClip,&rcClient); + + int srcX = rcInvalid.left - rcClient.left; + int srcY = rcInvalid.top - rcClient.top; + int destX = rcInvalid.left; + int destY = rcInvalid.top; + int width = rcInvalid.right - rcInvalid.left; + int height = rcInvalid.bottom - rcInvalid.top; + BitBlt(hdc, destX, destY, width, height, sourceDC, srcX, srcY, SRCCOPY); + + //ReleaseDC(m_hwnd, hdc); +} + +void CWebWindow::_paintLayeredDC(HDC hdc, HDC sourceDC) +{ + RECT rectDest; + GetWindowRect(m_hwnd, &rectDest); + + SIZE sizeDest = { rectDest.right - rectDest.left, rectDest.bottom - rectDest.top }; + POINT pointDest = { rectDest.left, rectDest.top }; + POINT pointSource = { 0, 0 }; + + //HDC hdcScreen = GetDC(NULL); + //HDC hdcMemory = CreateCompatibleDC(hdcScreen); + //HBITMAP hbmpMemory = CreateCompatibleBitmap(hdcScreen, sizeDest.cx, sizeDest.cy); + //HBITMAP hbmpOld = (HBITMAP)SelectObject(hdcMemory, hbmpMemory); + //BitBlt(hdcMemory, 0, 0, sizeDest.cx, sizeDest.cy, wkeGetViewDC(this), 0, 0, SRCCOPY); + + BLENDFUNCTION blend = { 0 }; + memset(&blend, 0, sizeof(blend)); + blend.BlendOp = AC_SRC_OVER; + blend.SourceConstantAlpha = 255; + blend.AlphaFormat = AC_SRC_ALPHA; + UpdateLayeredWindow(m_hwnd, hdc, &pointDest, &sizeDest, sourceDC, &pointSource, RGB(0,0,0), &blend, ULW_ALPHA); + + //SelectObject(hdcMemory, (HGDIOBJ)hbmpOld); + //DeleteObject((HGDIOBJ)hbmpMemory); + //DeleteDC(hdcMemory); + + //ReleaseDC(NULL, hdcScreen); +} + +LRESULT CALLBACK CWebWindow::_staticWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + CWebWindow* pthis = (CWebWindow*)GetPropW(hwnd, L"wkeWebWindow"); + if (!pthis) + { + if (message == WM_CREATE) + { + LPCREATESTRUCTW cs = (LPCREATESTRUCTW)lParam; + pthis = (CWebWindow*)cs->lpCreateParams; + SetPropW(hwnd, L"wkeWebWindow", (HANDLE)pthis); + } + } + + if (pthis) + return pthis->_windowProc(hwnd, message, wParam, lParam); + else + return DefWindowProcW(hwnd, message, wParam, lParam); +} + +LRESULT CWebWindow::_windowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch(message) + { + case WM_CREATE: + { + DragAcceptFiles(hwnd, TRUE); + //SetTimer(hwnd, 100, 20, NULL); + } + return 0; + + case WM_CLOSE: + if (m_windowClosingCallback) + { + if (!m_windowClosingCallback(this, m_windowClosingCallbackParam)) + return 0; + } + + ShowWindow(hwnd, SW_HIDE); + DestroyWindow(hwnd); + return 0; + + case WM_DESTROY: + { + //KillTimer(hwnd, 100); + RemovePropW(hwnd, L"wkeWebWindow"); + m_hwnd = NULL; + + if (m_windowDestroyCallback) + m_windowDestroyCallback(this, m_windowDestroyCallbackParam); + + wkeDestroyWebView(this); + } + return 0; + + //case WM_TIMER: + // { + // wkeRepaintIfNeeded(this); + // } + // return 0; + + case WM_PAINT: + { + PAINTSTRUCT ps = { 0 }; + HDC hdc = BeginPaint(hwnd, &ps); + _paintDC(hdc, (HDC)wkeGetViewDC(this)); + EndPaint(hwnd, &ps); + } + return 0; + + case WM_ERASEBKGND: + return TRUE; + + case WM_SIZE: + { + RECT rc = { 0 }; + GetClientRect(hwnd, &rc); + int width = rc.right - rc.left; + int height = rc.bottom - rc.top; + + CWebView::resize(width, height); + wkeRepaintIfNeeded(this); + } + return 0; + + case WM_DROPFILES: + { + wchar_t szFile[MAX_PATH + 8] = {0}; + wcscpy(szFile, L"file:///"); + + HDROP hDrop = reinterpret_cast(wParam); + + UINT uFilesCount = DragQueryFileW(hDrop, 0xFFFFFFFF, szFile, MAX_PATH); + if (uFilesCount != 0) + { + UINT uRet = DragQueryFileW(hDrop, 0, (wchar_t*)szFile + 8, MAX_PATH); + if ( uRet != 0) + { + wkeLoadURLW(this, szFile); + SetWindowTextW(hwnd, szFile); + } + } + DragFinish(hDrop); + } + return 0; + + + //case WM_NCHITTEST: + // if (IsWindow(m_hwnd) && flagsOff(GetWindowLong(m_hwnd, GWL_STYLE), WS_CAPTION)) + // { + // IWebkitObserverPtr observer = m_observer.lock(); + // if (!observer) + // break; + + // QPoint cursor(LOWORD(lParam), HIWORD(lParam)); + // ScreenToClient(m_hwnd, &cursor); + + // QRect clientRect; + // QSize clientSize; + // GetClientRect(hwnd, &clientRect); + // clientSize.cx = clientRect.width(); + // clientSize.cy = clientRect.height(); + + // EWebkitHitTest hit = observer->onHitTest(QWebkitView(thisView), clientSize, cursor); + // switch (hit) + // { + // case eWebkitHitLeftTop: return HTTOPLEFT; + // case eWebkitHitLeft: return HTLEFT; + // case eWebkitHitLeftBottom: return HTBOTTOMLEFT; + // case eWebkitHitRightTop: return HTTOPRIGHT; + // case eWebkitHitRight: return HTRIGHT; + // case eWebkitHitRightBottom: return HTBOTTOMRIGHT; + // case eWebkitHitTop: return HTTOP; + // case eWebkitHitBottom: return HTBOTTOM; + // case eWebkitHitCaption: return HTCAPTION; + // case eWebkitHitClient: return HTCLIENT; + // case eWebkitHitNone: return HTCLIENT; + // } + // } + // break; + + //case WM_SETCURSOR: + // if (IsWindow(m_hwnd) && flagsOff(GetWindowLong(m_hwnd, GWL_STYLE), WS_CAPTION)) + // { + // WORD hit = LOWORD(lParam); + // switch (hit) + // { + // case HTCAPTION: + // case HTSYSMENU: + // case HTMENU: + // case HTCLIENT: + // SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW))); + // return TRUE; + + // case HTTOP: + // case HTBOTTOM: + // SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZENS))); + // return TRUE; + + // case HTLEFT: + // case HTRIGHT: + // SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZEWE))); + // return TRUE; + + // case HTTOPLEFT: + // case HTBOTTOMRIGHT: + // SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZENWSE))); + // return TRUE; + + // case HTTOPRIGHT: + // case HTBOTTOMLEFT: + // SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZENESW))); + // return TRUE; + + // default: + // SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW))); + // return TRUE; + // } + // } + // break; + + //case WM_NCLBUTTONDOWN: + // if (IsWindow(m_hwnd) && flagsOff(GetWindowLong(m_hwnd, GWL_STYLE), WS_CAPTION)) + // { + // int hit = wParam; + // switch (hit) + // { + // case HTTOP: SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_SIZE|WMSZ_TOP, lParam); return 0; + // case HTBOTTOM: SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_SIZE|WMSZ_BOTTOM, lParam); return 0; + // case HTLEFT: SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_SIZE|WMSZ_LEFT, lParam); return 0; + // case HTRIGHT: SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_SIZE|WMSZ_RIGHT, lParam); return 0; + // case HTTOPLEFT: SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_SIZE|WMSZ_TOPLEFT, lParam); return 0; + // case HTTOPRIGHT: SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_SIZE|WMSZ_TOPRIGHT, lParam); return 0; + // case HTBOTTOMLEFT: SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_SIZE|WMSZ_BOTTOMLEFT, lParam); return 0; + // case HTBOTTOMRIGHT: SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_SIZE|WMSZ_BOTTOMRIGHT, lParam); return 0; + // case HTCAPTION: SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_MOVE|4, lParam); return 0; + // } + // } + // break; + + //case WM_NCLBUTTONDBLCLK: + // if (IsWindow(m_hwnd) && flagsOff(GetWindowLong(m_hwnd, GWL_STYLE), WS_CAPTION)) + // { + // int hit = wParam; + // if (hit == HTCAPTION) + // { + // if (IsZoomed(m_hwnd)) + // SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_RESTORE, lParam); + // else + // SendMessageW(m_hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, lParam); + // return 0; + // } + // } + // break; + + case WM_KEYDOWN: + { + unsigned int virtualKeyCode = wParam; + unsigned int flags = 0; + if (HIWORD(lParam) & KF_REPEAT) + flags |= WKE_REPEAT; + if (HIWORD(lParam) & KF_EXTENDED) + flags |= WKE_EXTENDED; + + if (wkeFireKeyDownEvent(this, virtualKeyCode, flags, false)) + return 0; + } + break; + + case WM_KEYUP: + { + unsigned int virtualKeyCode = wParam; + unsigned int flags = 0; + if (HIWORD(lParam) & KF_REPEAT) + flags |= WKE_REPEAT; + if (HIWORD(lParam) & KF_EXTENDED) + flags |= WKE_EXTENDED; + + if (wkeFireKeyUpEvent(this, virtualKeyCode, flags, false)) + return 0; + } + break; + + case WM_CHAR: + { + unsigned int charCode = wParam; + unsigned int flags = 0; + if (HIWORD(lParam) & KF_REPEAT) + flags |= WKE_REPEAT; + if (HIWORD(lParam) & KF_EXTENDED) + flags |= WKE_EXTENDED; + + if (wkeFireKeyPressEvent(this, charCode, flags, false)) + return 0; + } + break; + + case WM_LBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + case WM_LBUTTONDBLCLK: + case WM_MBUTTONDBLCLK: + case WM_RBUTTONDBLCLK: + case WM_LBUTTONUP: + case WM_MBUTTONUP: + case WM_RBUTTONUP: + case WM_MOUSEMOVE: + { + if (message == WM_LBUTTONDOWN || message == WM_MBUTTONDOWN || message == WM_RBUTTONDOWN) + { + SetFocus(hwnd); + SetCapture(hwnd); + } + else if (message == WM_LBUTTONUP || message == WM_MBUTTONUP || message == WM_RBUTTONUP) + { + ReleaseCapture(); + } + + int x = LOWORD(lParam); + int y = HIWORD(lParam); + + unsigned int flags = 0; + + if (wParam & MK_CONTROL) + flags |= WKE_CONTROL; + if (wParam & MK_SHIFT) + flags |= WKE_SHIFT; + + if (wParam & MK_LBUTTON) + flags |= WKE_LBUTTON; + if (wParam & MK_MBUTTON) + flags |= WKE_MBUTTON; + if (wParam & MK_RBUTTON) + flags |= WKE_RBUTTON; + + if (wkeFireMouseEvent(this, message, x, y, flags)) + return 0; + } + break; + + case WM_CONTEXTMENU: + { + POINT pt; + pt.x = LOWORD(lParam); + pt.y = HIWORD(lParam); + + if (pt.x != -1 && pt.y != -1) + ScreenToClient(hwnd, &pt); + + unsigned int flags = 0; + + if (wParam & MK_CONTROL) + flags |= WKE_CONTROL; + if (wParam & MK_SHIFT) + flags |= WKE_SHIFT; + + if (wParam & MK_LBUTTON) + flags |= WKE_LBUTTON; + if (wParam & MK_MBUTTON) + flags |= WKE_MBUTTON; + if (wParam & MK_RBUTTON) + flags |= WKE_RBUTTON; + + if (wkeFireContextMenuEvent(this, pt.x, pt.y, flags)) + return 0; + } + break; + + case WM_MOUSEWHEEL: + { + POINT pt; + pt.x = LOWORD(lParam); + pt.y = HIWORD(lParam); + ScreenToClient(hwnd, &pt); + + int delta = GET_WHEEL_DELTA_WPARAM(wParam); + + unsigned int flags = 0; + + if (wParam & MK_CONTROL) + flags |= WKE_CONTROL; + if (wParam & MK_SHIFT) + flags |= WKE_SHIFT; + + if (wParam & MK_LBUTTON) + flags |= WKE_LBUTTON; + if (wParam & MK_MBUTTON) + flags |= WKE_MBUTTON; + if (wParam & MK_RBUTTON) + flags |= WKE_RBUTTON; + + if (wkeFireMouseWheelEvent(this, pt.x, pt.y, delta, flags)) + return 0; + } + break; + + case WM_SETFOCUS: + wkeSetFocus(this); + return 0; + + case WM_KILLFOCUS: + wkeKillFocus(this); + return 0; + + case WM_IME_STARTCOMPOSITION: + { + wkeRect caret = wkeGetCaretRect(this); + + CANDIDATEFORM form; + form.dwIndex = 0; + form.dwStyle = CFS_EXCLUDE; + form.ptCurrentPos.x = caret.x; + form.ptCurrentPos.y = caret.y + caret.h; + form.rcArea.top = caret.y; + form.rcArea.bottom = caret.y + caret.h; + form.rcArea.left = caret.x; + form.rcArea.right = caret.x + caret.w; + + COMPOSITIONFORM compForm; + compForm.ptCurrentPos = form.ptCurrentPos; + compForm.rcArea = form.rcArea; + compForm.dwStyle = CFS_POINT; + + HIMC hIMC = ImmGetContext(hwnd); + ImmSetCandidateWindow(hIMC, &form); + ImmSetCompositionWindow(hIMC, &compForm); + ImmReleaseContext(hwnd, hIMC); + } + return 0; + + case WM_SETCURSOR: + if (LOWORD(lParam) == HTCLIENT) + return TRUE; + } + + return DefWindowProcW(hwnd, message, wParam, lParam); +} + +void CWebWindow::_staticOnPaintUpdated(wkeWebView* webView, void* param, const void* hdc, int x, int y, int cx, int cy) +{ + CWebWindow* pthis = (CWebWindow*)param; + pthis->_onPaintUpdated((HDC)hdc, x, y, cx, cy); +} + +void CWebWindow::_onPaintUpdated(const HDC sourceDC, int x, int y, int cx, int cy) +{ + if (WS_EX_LAYERED == (WS_EX_LAYERED & GetWindowLong(m_hwnd, GWL_EXSTYLE))) + { + HDC hdc = GetDC(NULL); + _paintLayeredDC(hdc, sourceDC); + ReleaseDC(NULL, hdc); + } + else + { + HDC hdc =GetDC(m_hwnd); + _paintDC(hdc, sourceDC); + ReleaseDC(m_hwnd, hdc); + } + + if (m_originalPaintUpdatedCallback) + m_originalPaintUpdatedCallback(this, m_originalPaintUpdatedCallbackParam, sourceDC, x, y, cx, cy); +} + +void CWebWindow::_staticOnLoadingFinish(wkeWebView* webView, void* param, const wkeString* url, wkeLoadingResult result, const wkeString* failedReason) +{ + CWebWindow* pthis = (CWebWindow*)param; + pthis->_onLoadingFinish(url, result, failedReason); +} + +void CWebWindow::_onLoadingFinish(const wkeString* url, wkeLoadingResult result, const wkeString* failedReason) +{ + if (m_originalLoadingFinishCallback) + m_originalLoadingFinishCallback(this, m_originalLoadingFinishCallbackParam, url, result, failedReason); +} + +void CWebWindow::_staticOnDocumentReady(wkeWebView* webView, void* param, const wkeDocumentReadyInfo* info) +{ + CWebWindow* pthis = (CWebWindow*)param; + pthis->_onDocumentReady(info); +} + +void CWebWindow::_onDocumentReady(const wkeDocumentReadyInfo* info) +{ + if (m_originalDocumentReadyCallback) + m_originalDocumentReadyCallback(this, m_originalDocumentReadyCallbackParam, info); +} + +HWND CWebWindow::windowHandle() const +{ + return m_hwnd; +} + +void CWebWindow::onClosing(wkeWindowClosingCallback callback, void* param) +{ + m_windowClosingCallback = callback; + m_windowClosingCallbackParam = param; +} + +void CWebWindow::onDestroy(wkeWindowDestroyCallback callback, void* param) +{ + m_windowDestroyCallback = callback; + m_windowDestroyCallbackParam = param; +} + +void CWebWindow::show(bool b) +{ + ShowWindow(m_hwnd, b ? SW_SHOW : SW_HIDE); +} + +void CWebWindow::enable(bool b) +{ + EnableWindow(m_hwnd, b ? TRUE : FALSE); +} + +void CWebWindow::move(int x, int y, int width, int height) +{ + MoveWindow(m_hwnd, x, y, width, height, FALSE); +} + +void CWebWindow::resize(int width, int height) +{ + POINT point = { 0 }; + { + RECT rect = { 0 }; + GetWindowRect(m_hwnd, &rect); + point.x = rect.left; + point.y = rect.top; + } + + if (WS_CHILD == (WS_CHILD & GetWindowLong(m_hwnd, GWL_STYLE))) + { + HWND parent = GetParent(m_hwnd); + ScreenToClient(parent, &point); + } + + MoveWindow(m_hwnd, point.x, point.y, width, height, FALSE); + CWebView::resize(width, height); +} + +void CWebWindow::moveToCenter() +{ + int width = 0; + int height = 0; + { + RECT rect = { 0 }; + GetWindowRect(m_hwnd, &rect); + width = rect.right - rect.left; + height = rect.bottom - rect.top; + } + + int parentWidth = 0; + int parentHeight = 0; + if (WS_CHILD == (WS_CHILD & GetWindowLong(m_hwnd, GWL_STYLE))) + { + HWND parent = GetParent(m_hwnd); + RECT rect = { 0 }; + GetClientRect(parent, &rect); + parentWidth = rect.right - rect.left; + parentHeight = rect.bottom - rect.top; + } + else + { + parentWidth = GetSystemMetrics(SM_CXSCREEN); + parentHeight = GetSystemMetrics(SM_CYSCREEN); + } + + int x = (parentWidth - width) / 2; + int y = (parentHeight - height) / 2; + + MoveWindow(m_hwnd, x, y, width, height, FALSE); +} + +void CWebWindow::setTitle(const wchar_t* text) +{ + SetWindowTextW(m_hwnd, text); +} + +void CWebWindow::setTitle(const utf8* text) +{ + wchar_t wtext[1024 * 64 + 1] = { 0 }; + MultiByteToWideChar(CP_UTF8, 0, text, strlen(text), wtext, 1024*64); + setTitle(wtext); +} + + + + + + +};//namespace wke + + +//////////////////////////////////////////////////////////////////////////// diff --git a/wke/wkeWebWindow.h b/wke/wkeWebWindow.h new file mode 100644 index 00000000..65801d82 --- /dev/null +++ b/wke/wkeWebWindow.h @@ -0,0 +1,90 @@ +#ifndef WKE_WEB_WINDOW_H +#define WKE_WEB_WINDOW_H + + +#include "wkeWebView.h" + + +////////////////////////////////////////////////////////////////////////// + + + +namespace wke +{ + + +class CWebWindow : public CWebView +{ +public: + CWebWindow(); + ~CWebWindow(); + + bool create(HWND parent, unsigned styles, unsigned styleEx, int x, int y, int width, int height); + bool create(HWND parent, wkeWindowType type, int x, int y, int width, int height); + HWND windowHandle() const; + void destroy(); + + void show(bool b); + void enable(bool b); + void move(int x, int y, int width, int height); + void moveToCenter(); + void resize(int width, int height); + + void setTitle(const wchar_t* text); + void setTitle(const utf8* text); + + void onClosing(wkeWindowClosingCallback callback, void* param); + void onDestroy(wkeWindowDestroyCallback callback, void* param); + +protected: + virtual void onPaintUpdated(wkePaintUpdatedCallback callback, void* callbackParam); + virtual void onLoadingFinish(wkeLoadingFinishCallback callback, void* callbackParam); + virtual void onDocumentReady(wkeDocumentReadyCallback callback, void* callbackParam); + + bool _createWindow(HWND parent, unsigned styles, unsigned styleEx, int x, int y, int width, int height); + void _destroyWindow(); + void _initCallbacks(); + void _paintDC(HDC hdc, HDC sourceDC); + void _paintLayeredDC(HDC hdc, HDC sourceDC); + + static LRESULT CALLBACK _staticWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); + LRESULT _windowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); + + static void _staticOnPaintUpdated(wkeWebView* webView, void* param, const void* hdc, int x, int y, int cx, int cy); + static void _staticOnLoadingFinish(wkeWebView* webView, void* param, const wkeString* url, wkeLoadingResult result, const wkeString* failedReason); + static void _staticOnDocumentReady(wkeWebView* webView, void* param, const wkeDocumentReadyInfo* info); + + void _onPaintUpdated(const HDC hdc, int x, int y, int cx, int cy); + void _onLoadingFinish(const wkeString* url, wkeLoadingResult result, const wkeString* failedReason); + void _onDocumentReady(const wkeDocumentReadyInfo* info); + + HWND m_hwnd; + bool m_acceptDrags; + + wkePaintUpdatedCallback m_originalPaintUpdatedCallback; + void* m_originalPaintUpdatedCallbackParam; + + wkeDocumentReadyCallback m_originalDocumentReadyCallback; + void* m_originalDocumentReadyCallbackParam; + + wkeLoadingFinishCallback m_originalLoadingFinishCallback; + void* m_originalLoadingFinishCallbackParam; + + wkeWindowClosingCallback m_windowClosingCallback; + void* m_windowClosingCallbackParam; + + wkeWindowDestroyCallback m_windowDestroyCallback; + void* m_windowDestroyCallbackParam; +}; + + + + + + + +};//namespace wke + + + +#endif//#ifndef WKE_WEB_WINDOW_H \ No newline at end of file diff --git a/wkeBrowser/Resource.h b/wkeBrowser/Resource.h index 53645504..94402749 100644 --- a/wkeBrowser/Resource.h +++ b/wkeBrowser/Resource.h @@ -21,6 +21,8 @@ #define ID_SET_EDITABLE 32804 #define ID_URL_SF 32805 #define ID_URL_GITHUB 32806 +#define ID_Menu 32902 +#define ID_TOOLS_VIEWCOOKIE 32903 #define IDC_STATIC -1 // Next default values for new objects @@ -29,7 +31,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 130 -#define _APS_NEXT_COMMAND_VALUE 32902 +#define _APS_NEXT_COMMAND_VALUE 32904 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 110 #endif diff --git a/wkeBrowser/render.cpp b/wkeBrowser/render.cpp index 8fccfc15..1a448435 100644 --- a/wkeBrowser/render.cpp +++ b/wkeBrowser/render.cpp @@ -1,10 +1,6 @@ #include "renderGDI.h" -#include "renderD3D.h" CRender* CRender::create(RenderType type) { - if (type == D3D_RENDER) - return new CRenderD3D; - return new CRenderGDI; } diff --git a/wkeBrowser/render.h b/wkeBrowser/render.h index 7e5307fe..eafcc43e 100644 --- a/wkeBrowser/render.h +++ b/wkeBrowser/render.h @@ -18,7 +18,7 @@ class CRender virtual bool init(HWND hView) = 0; virtual void destroy() = 0; virtual void resize(unsigned int w, unsigned int h) = 0; - virtual void render(wkeWebView webView) = 0; + virtual void render(wkeWebView* webView) = 0; }; #endif \ No newline at end of file diff --git a/wkeBrowser/renderD3D.cpp b/wkeBrowser/renderD3D.cpp index a95eb370..ff3685b5 100644 --- a/wkeBrowser/renderD3D.cpp +++ b/wkeBrowser/renderD3D.cpp @@ -123,7 +123,7 @@ void CRenderD3D::resize(unsigned int w, unsigned int h) SAFE_RELEASE(m_pWebViewTexture); } -void CRenderD3D::render(wkeWebView webView) +void CRenderD3D::render(wkeWebView* webView) { if (!LostDeviceRestore()) return; @@ -167,7 +167,7 @@ bool CRenderD3D::LostDeviceRestore() return true; } -bool CRenderD3D::UpdateTexture(wkeWebView webView) +bool CRenderD3D::UpdateTexture(wkeWebView* webView) { if (m_pWebViewTexture == NULL) { @@ -186,14 +186,14 @@ bool CRenderD3D::UpdateTexture(wkeWebView webView) if (FAILED(hr)) return false; - webView->setDirty(true); + wkeSetDirty(webView, true); } - if (webView->isDirty()) + if (wkeIsDirty(webView)) { D3DLOCKED_RECT rect; m_pWebViewTexture->LockRect(0, &rect, NULL, D3DLOCK_DISCARD); - webView->paint(rect.pBits, rect.Pitch); + wkePaint2(webView, rect.pBits, rect.Pitch); m_pWebViewTexture->UnlockRect(0); } diff --git a/wkeBrowser/renderD3D.h b/wkeBrowser/renderD3D.h index be582ff8..bcb8252f 100644 --- a/wkeBrowser/renderD3D.h +++ b/wkeBrowser/renderD3D.h @@ -13,10 +13,10 @@ class CRenderD3D : public CRender virtual bool init(HWND hView); virtual void destroy(); virtual void resize(unsigned int w, unsigned int h); - virtual void render(wkeWebView webView); + virtual void render(wkeWebView* webView); bool LostDeviceRestore(); - bool UpdateTexture(wkeWebView webView); + bool UpdateTexture(wkeWebView* webView); private: HWND m_hView; diff --git a/wkeBrowser/renderGDI.h b/wkeBrowser/renderGDI.h index 2c4cc7b7..5806af99 100644 --- a/wkeBrowser/renderGDI.h +++ b/wkeBrowser/renderGDI.h @@ -50,14 +50,14 @@ class CRenderGDI : public CRender m_pixels = NULL; } - virtual void render(wkeWebView webView) + virtual void render(wkeWebView* webView) { - if (webView->isDirty()) + if (wkeIsDirty(webView)) { if (m_pixels == NULL) createBitmap(); - webView->paint(m_pixels, 0); + wkePaint2(webView, m_pixels, 0); HDC hDC = GetDC(m_hView); BitBlt(hDC, 0, 0, m_width, m_height, m_hDC, 0, 0, SRCCOPY); diff --git a/wkeBrowser/wkeBrowser.aps b/wkeBrowser/wkeBrowser.aps new file mode 100644 index 00000000..79e765bf Binary files /dev/null and b/wkeBrowser/wkeBrowser.aps differ diff --git a/wkeBrowser/wkeBrowser.cpp b/wkeBrowser/wkeBrowser.cpp index 63b204c5..a27fe2ba 100644 --- a/wkeBrowser/wkeBrowser.cpp +++ b/wkeBrowser/wkeBrowser.cpp @@ -1,5 +1,10 @@ #define WIN32_LEAN_AND_MEAN +#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x501) +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x501 +#endif + #include #include #include @@ -7,6 +12,8 @@ #include #include #include +#include +#include #include @@ -14,6 +21,7 @@ #include "render.h" #include "hyperlink.h" + class CTimer { public: @@ -56,94 +64,385 @@ HWND hViewWindow = NULL; TCHAR szTitle[MAX_LOADSTRING]; TCHAR szWindowClass[MAX_LOADSTRING]; -wkeWebView g_webView = NULL; +wkeWebView* g_webView = NULL; CRender* g_render = NULL; -ATOM MyRegisterClass(HINSTANCE hInstance); -BOOL InitInstance(HINSTANCE, int); -LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); -INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); +ATOM MyRegisterClass(HINSTANCE hInstance); +BOOL InitInstance(HINSTANCE, int); +LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); +INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); WNDPROC DefEditProc = NULL; LRESULT CALLBACK UrlEditProc(HWND, UINT, WPARAM, LPARAM); void resizeSubViews(); LRESULT CALLBACK WebViewWndProc(HWND, UINT, WPARAM, LPARAM); -const LPCWSTR wkeWebViewClassName = L"wkeWebView"; +const LPCWSTR wkeWebViewClassName = L"wkeWebView*"; bool registerWebViewWindowClass(); -jsValue JS_CALL js_msgBox(jsExecState es) +wkeJSValue JS_CALL js_msgBox(wkeJSState* es) { - const wchar_t* text = jsToStringW(es, jsArg(es, 0)); - const wchar_t* title = jsToStringW(es, jsArg(es, 1)); + wchar_t text[1025] = { 0 }; + wcsncpy(text, wkeJSToTempStringW(es, wkeJSParam(es, 0)), 1024); - MessageBox(hMainWnd, text, title, 0); + wchar_t title[1025] = { 0 }; + wcsncpy(title, wkeJSToTempStringW(es, wkeJSParam(es, 1)), 1024); - return jsUndefined(); + MessageBoxW(hMainWnd, text, title, MB_OK); + + return wkeJSUndefined(es); } static int s_testCount = 0; -jsValue JS_CALL js_getTestCount(jsExecState es) +wkeJSValue JS_CALL js_getTestCount(wkeJSState* es) +{ + return wkeJSInt(es, s_testCount); +} + +wkeJSValue JS_CALL js_setTestCount(wkeJSState* es) +{ + s_testCount = wkeJSToInt(es, wkeJSParam(es, 0)); + + return wkeJSUndefined(es); +} + +void onTitleChanged(wkeWebView* webView, void* param, const wkeString* title) +{ + SetWindowTextW(hMainWnd, wkeGetStringW(title)); +} + +void onURLChanged(wkeWebView* webView, void* param, const wkeString* url) +{ + SetWindowTextW(hURLBarWnd, wkeGetStringW(url)); +} + +bool onNavigation(wkeWebView* webView, void* param, wkeNavigationType type, const wkeString* url_) { - return jsInt(s_testCount); + const wchar_t* url = wkeGetStringW(url_); + //if (wcsstr(url, L"baidu.com") != NULL) + // return false; + + if (wcsstr(url, L"exec://") == url) + { + PROCESS_INFORMATION processInfo = { 0 }; + STARTUPINFOW startupInfo = { 0 }; + startupInfo.cb = sizeof(startupInfo); + BOOL succeeded = CreateProcessW(NULL, (LPWSTR)url + 7, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo); + if (succeeded) + { + CloseHandle(processInfo.hProcess); + CloseHandle(processInfo.hThread); + } + return false; + } + + return true; } -jsValue JS_CALL js_setTestCount(jsExecState es) +wkeWebView* onCreateView(wkeWebView* webView, void* param, const wkeNewViewInfo* info) { - s_testCount = jsToInt(es, jsArg(es, 0)); + const wchar_t* target = wkeGetStringW(info->target); + const wchar_t* url = wkeGetStringW(info->url); + + if (wcscmp(target, L"") == 0 || wcscmp(target, L"_blank") == 0) + { + if (wcsnicmp(url, L"file:///", 8) == 0) + url += 8; + ShellExecuteW(NULL, L"open", (LPWSTR)url, NULL, NULL, SW_SHOW); + return NULL; + } + else if (wcscmp(target, L"_self") == 0) + { + return webView; + } + else if (wcscmp(target, L"wontOpen") == 0) + { + return NULL; + } + else + { + wkeWebView* newWindow = wkeCreateWebWindow(WKE_WINDOW_TYPE_POPUP, NULL, info->x, info->y, info->width, info->height); + wkeShowWindow(newWindow, SW_SHOW); + return newWindow; + } - return jsUndefined(); + return NULL; } -void onTitleChanged(const wkeClientHandler*, wkeString title) +const wchar_t* messageSourceName(int i) { - SetWindowText(hMainWnd, wkeToStringW(title)); + const wchar_t* s_names[] = { + L"html", + L"xml", + L"js", + L"network", + L"console", + L"other" + }; + return s_names[i]; } -void onURLChanged(const wkeClientHandler*, wkeString url) +const wchar_t* messageTypeName(int i) { - SetWindowText(hURLBarWnd, wkeToStringW(url)); + const wchar_t* s_names[] = { + L"log", + L"dir", + L"dir-xml", + L"trace", + L"start-group", + L"start-group-collapsed", + L"end-group", + L"assert" + }; + return s_names[i]; } +const wchar_t* messageLevelName(int i) +{ + const wchar_t* s_names[] = { + L"tip", + L"log", + L"warning", + L"error", + L"debug" + }; + return s_names[i]; +} + +FILE* g_consoleLog = NULL; +void onConsoleMessage(wkeWebView* webView, void* param, const wkeConsoleMessage* message) +{ + wchar_t msg[1024 * 10 + 1] = { 0 }; + int len = swprintf(msg, 1024*10, L"[%s:%s:%s] %s in %s(%d)", + messageSourceName(message->source), + messageTypeName(message->type), + messageLevelName(message->level), + wkeGetStringW(message->message), + wkeGetStringW(message->url), (int)message->lineNumber); + if (len < 0) + len = 1024 * 10; + msg[len] = 0; + + if (g_consoleLog) + fputws(msg, g_consoleLog); + + OutputDebugStringW(msg); +} + +/* +## ԰󶨶 +wkeWebBrowser.exeڵַ`inject`سעJS`test`עJSпɷ`test`ijԱ`value`ͳԱ`msgbox`ˡ +ڵַ`javascript:test.msgbox('1')`ԵóԱ +ڵַ`javascript:document.write(test.value)`ԷʳԱ +*/ +struct BindTestFunction +{ + static wkeJSValue js_callAsFunction(wkeJSState* es, wkeJSValue object, wkeJSValue* args, int argCount) + { + wchar_t text[1025] = { 0 }; + wchar_t title[1025] = { 0 }; + + if (argCount >= 1) + wcsncpy(text, wkeJSToTempStringW(es, wkeJSParam(es, 0)), 1024); + if (argCount >= 2) + wcsncpy(title, wkeJSToTempStringW(es, wkeJSParam(es, 1)), 1024); + + MessageBoxW(NULL, text, title[0] ? title : NULL, MB_OK); + return wkeJSInt(es, 0); + } + + static void js_releaseFunction(wkeJSData* data) + { + delete data; + } + + static void bindToGlobal(wkeJSState* es) + { + wkeJSData* data = new wkeJSData(); + memset(data, 0, sizeof(wkeJSData)); + strcpy(data->typeName, "Function"); + data->callAsFunction = js_callAsFunction; + data->finalize = js_releaseFunction; + + wkeJSValue func = wkeJSFunction(es, data); + wkeJSSetGlobal(es, "popup", func); + } + + static void bindToObject(wkeJSState* es, wkeJSValue obj) + { + wkeJSData* data = new wkeJSData(); + memset(data, 0, sizeof(wkeJSData)); + strcpy(data->typeName, "Function"); + data->callAsFunction = js_callAsFunction; + data->finalize = js_releaseFunction; + + wkeJSValue func = wkeJSFunction(es, data); + wkeJSSet(es, obj, "popup", func); + } +}; + + +class BindTestObject : public wkeJSData +{ +public: + BindTestObject() + : m_value(0) + { + wkeJSData* data = this; + memset(data, 0, sizeof(wkeJSData)); + strcpy(data->typeName, "Object"); + data->propertyGet = js_getObjectProp; + data->propertySet = js_setObjectProp; + data->finalize = js_releaseObject; + } + + void msgbox(const wchar_t* msg, const wchar_t* title) + { + MessageBoxW(NULL, msg, title, MB_OK); + } + +protected: + static bool js_setObjectProp(wkeJSState* es, wkeJSValue object, const char* propertyName, wkeJSValue value) + { + BindTestObject* pthis = (BindTestObject*)wkeJSGetData(es, object); + if (strcmp(propertyName, "value") == 0) + return pthis->m_value = wkeJSToInt(es, value), true; + else + return false; + } + + static void js_releaseObject(wkeJSData* data) + { + BindTestObject* pthis = (BindTestObject*)data; + delete pthis; + } + + class BindTestMsgbox : public wkeJSData + { + public: + BindTestMsgbox(BindTestObject* obj) + { + wkeJSData* data = this; + memset(data, 0, sizeof(wkeJSData)); + strcpy(data->typeName, "Function"); + data->callAsFunction = js_callAsFunction; + data->finalize = js_releaseFunction; + + m_obj = obj; + } + + protected: + static void js_releaseFunction(wkeJSData* data) + { + BindTestMsgbox* pthis = (BindTestMsgbox*)data; + delete pthis; + } + + static wkeJSValue js_callAsFunction(wkeJSState* es, wkeJSValue object, wkeJSValue* args, int argCount) + { + BindTestMsgbox* pthis = (BindTestMsgbox*)wkeJSGetData(es, object); + + wchar_t text[1025] = { 0 }; + wchar_t title[1025] = { 0 }; + + if (argCount >= 1) + wcsncpy(text, wkeJSToTempStringW(es, wkeJSParam(es, 0)), 1024); + if (argCount >= 2) + wcsncpy(title, wkeJSToTempStringW(es, wkeJSParam(es, 1)), 1024); + + pthis->m_obj->msgbox(text, title[0] ? title : NULL); + return wkeJSInt(es, 0); + } + + protected: + BindTestObject* m_obj; + }; + + static wkeJSValue js_getObjectProp(wkeJSState* es, wkeJSValue object, const char* propertyName) + { + BindTestObject* pthis = (BindTestObject*)wkeJSGetData(es, object); + if (strcmp(propertyName, "value") == 0) + return wkeJSInt(es, pthis->m_value); + + else if (strcmp(propertyName, "msgbox") == 0) + { + return wkeJSFunction(es, new BindTestMsgbox(pthis)); + } + else + return wkeJSUndefined(es); + } + +protected: + int m_value; +}; + + int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { - UNREFERENCED_PARAMETER(hPrevInstance); - UNREFERENCED_PARAMETER(lpCmdLine); + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(lpCmdLine); - LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); - LoadString(hInstance, IDC_WKEBROWSER, szWindowClass, MAX_LOADSTRING); - MyRegisterClass(hInstance); + LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); + LoadString(hInstance, IDC_WKEBROWSER, szWindowClass, MAX_LOADSTRING); + MyRegisterClass(hInstance); - if (!InitInstance (hInstance, nCmdShow)) - return FALSE; + if (!InitInstance (hInstance, nCmdShow)) + return FALSE; CTimer t1, t2, t3; - + wkeInitialize(); t1.Start(); - wkeInit(); + + wkeSettings settings; + memset(&settings, 0, sizeof(settings)); + +#if defined(WKE_BROWSER_USE_LOCAL_PROXY) + settings.proxy.type = WKE_PROXY_SOCKS5; + strcpy(settings.proxy.hostname, "127.0.0.1"); + settings.proxy.port = 1080; + settings.mask |= WKE_SETTING_PROXY; +#endif + //wkeInitializeEx(&settings); + wkeConfigure(&settings); + t1.End(); - jsBindFunction("msgBox", js_msgBox, 2); - jsBindGetter("testCount", js_getTestCount); - jsBindSetter("testCount", js_setTestCount); + //jsBindObject("testObj", js_getObjectProp, js_setObjectProp); + wkeJSBindFunction("msgBox", js_msgBox, 2); + wkeJSBindGetter("testCount", js_getTestCount); + wkeJSBindSetter("testCount", js_setTestCount); t2.Start(); g_webView = wkeCreateWebView(); - g_webView->setTransparent(false); t2.End(); - wkeClientHandler handler; - handler.onTitleChanged = onTitleChanged; - handler.onURLChanged = onURLChanged; - g_webView->setClientHandler(&handler); t3.Start(); - //g_webView->loadURL("file:///html/mac-osx-lion.html"); - //g_webView->loadHTML(L"

Testing

\"Face\"
div with blue border
  • foo
  • bar
  • baz
"); - g_webView->loadFile("html/mac-osx-lion.html"); + wkeSetTransparent(g_webView, false); + wkeOnTitleChanged(g_webView, onTitleChanged, NULL); + wkeOnURLChanged(g_webView, onURLChanged, NULL); + wkeOnNavigation(g_webView, onNavigation, NULL); + wkeOnCreateView(g_webView, onCreateView, NULL); + + if (g_consoleLog = fopen("wkeBrowserConsole.txt", "wb")) + fwrite("\xFF\xFE", 2, 1, g_consoleLog); + + wkeOnConsoleMessage(g_webView, onConsoleMessage, NULL); + //wkeLoadUrl("file:///test/test.html"); + + //UserAgent + wkeSetUserAgent(g_webView, "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"); + + int argc = 0; + LPWSTR* argv = CommandLineToArgvW(GetCommandLineW(), &argc); + if (argc > 1) + wkeLoadW(g_webView, argv[1]); + else + wkeLoadHTMLW(g_webView, L"

Testing

\"Face\"
div with blue border
  • foo
  • bar
  • baz
"); + LocalFree(argv); t3.End(); unsigned int ms1 = t1.GetTime(); @@ -165,22 +464,25 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, 0, hInstance, 0); + //дھ + wkeSetHostWindow(g_webView, hViewWindow); + resizeSubViews(); DefEditProc = reinterpret_cast(GetWindowLongPtr(hURLBarWnd, GWL_WNDPROC)); SetWindowLongPtr(hURLBarWnd, GWL_WNDPROC, reinterpret_cast(UrlEditProc)); SetFocus(hURLBarWnd); - g_render = CRender::create(CRender::D3D_RENDER); + g_render = CRender::create(CRender::GDI_RENDER); g_render->init(hViewWindow); - HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WKEBROWSER)); + HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WKEBROWSER)); MSG msg; msg.message = WM_NULL; - while (msg.message != WM_QUIT) - { + while (msg.message != WM_QUIT) + { if (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) @@ -189,7 +491,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, DispatchMessage(&msg); } } - else if (!IsIconic(hMainWnd) && g_webView->isDirty()) + else if (!IsIconic(hMainWnd) && wkeIsDirty(g_webView)) { g_render->render(g_webView); } @@ -200,31 +502,34 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, } g_render->destroy(); - g_webView->destroy(); - wkeShutdown(); + wkeDestroyWebView(g_webView); + wkeFinalize(); + + if (g_consoleLog) + fclose(g_consoleLog); - return (int) msg.wParam; + return (int) msg.wParam; } ATOM MyRegisterClass(HINSTANCE hInstance) { - WNDCLASSEX wcex; - - wcex.cbSize = sizeof(WNDCLASSEX); - - wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = WndProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; - wcex.hInstance = hInstance; - wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WKEBROWSER)); - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); - wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wcex.lpszMenuName = MAKEINTRESOURCE(IDC_WKEBROWSER); - wcex.lpszClassName = szWindowClass; - wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); - - return RegisterClassEx(&wcex); + WNDCLASSEX wcex; + + wcex.cbSize = sizeof(WNDCLASSEX); + + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = WndProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 0; + wcex.hInstance = hInstance; + wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WKEBROWSER)); + wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcex.lpszMenuName = MAKEINTRESOURCE(IDC_WKEBROWSER); + wcex.lpszClassName = szWindowClass; + wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); + + return RegisterClassEx(&wcex); } BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) @@ -273,14 +578,14 @@ void zoom(bool zoomIn) s_currentZoom = s_zoomLevels[i]; - g_webView->setZoomFactor(s_currentZoom / 100.f); + wkeSetZoomFactor(g_webView, s_currentZoom / 100.f); } void resetZoom() { s_currentZoom = 100; if (g_webView) - g_webView->setZoomFactor(s_currentZoom / 100.f); + wkeSetZoomFactor(g_webView, s_currentZoom / 100.f); } void convertFilename(wchar_t* filename) @@ -352,52 +657,61 @@ void takeScreenshot() if (g_webView == NULL) return; - g_webView->runJS("document.body.style.overflow='hidden'"); - int w = g_webView->contentsWidth(); - int h = g_webView->contentsHeight(); + wkeRunJS(g_webView, "document.body.style.overflow='hidden'"); + int w = wkeGetContentWidth(g_webView); + int h = wkeGetContentHeight(g_webView); - int oldwidth = g_webView->width(); - int oldheight = g_webView->height(); - g_webView->resize(w, h); + int oldwidth = wkeGetWidth(g_webView); + int oldheight = wkeGetHeight(g_webView); + wkeResize(g_webView, w, h); wkeUpdate(); void* pixels = malloc(w*h*4); - g_webView->paint(pixels, 0); + wkePaint2(g_webView, pixels, 0); //save bitmap - saveBitmap(pixels, w, h, g_webView->titleW()); + saveBitmap(pixels, w, h, wkeGetTitleW(g_webView)); free(pixels); - g_webView->resize(oldwidth, oldheight); - g_webView->runJS("document.body.style.overflow='visible'"); + wkeResize(g_webView, oldwidth, oldheight); + wkeRunJS(g_webView, "document.body.style.overflow='visible'"); } -LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +void viewCookie() { - int wmId, wmEvent; - PAINTSTRUCT ps; - HDC hdc; + if (g_webView == NULL) + return; - switch (message) - { - case WM_COMMAND: - wmId = LOWORD(wParam); - wmEvent = HIWORD(wParam); - switch (wmId) - { - case IDM_ABOUT: - DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); - break; + const wchar_t* cookie = wkeGetCookieW(g_webView); + MessageBoxW(NULL, cookie, L"Cookie", MB_OK|MB_ICONINFORMATION); +} + +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + int wmId, wmEvent; + PAINTSTRUCT ps; + HDC hdc; + + switch (message) + { + case WM_COMMAND: + wmId = LOWORD(wParam); + wmEvent = HIWORD(wParam); + switch (wmId) + { + case IDM_ABOUT: + DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); + break; case ID_FILE_GOBACK: if (g_webView) - g_webView->goBack(); + wkeGoBack(g_webView); break; case ID_FILE_GOFORWARD: if (g_webView) - g_webView->goForward(); + wkeGoForward(g_webView); break; case ID_ZOOM_IN: @@ -416,6 +730,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) takeScreenshot(); break; + case ID_TOOLS_VIEWCOOKIE: + viewCookie(); + break; + case ID_SET_EDITABLE: if (g_webView) { @@ -423,12 +741,12 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) UINT state = GetMenuState(hMenu, ID_SET_EDITABLE, MF_BYCOMMAND); if (state & MF_CHECKED) { - g_webView->setEditable(false); + wkeSetEditable(g_webView, false); CheckMenuItem(hMenu, ID_SET_EDITABLE, MF_BYCOMMAND | MF_UNCHECKED); } else { - g_webView->setEditable(true); + wkeSetEditable(g_webView, true); CheckMenuItem(hMenu, ID_SET_EDITABLE, MF_BYCOMMAND | MF_CHECKED); } } @@ -444,24 +762,24 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) SendMessage(hURLBarWnd, WM_CHAR, L'\r', 0); break; - case IDM_EXIT: - DestroyWindow(hWnd); - break; + case IDM_EXIT: + DestroyWindow(hWnd); + break; - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } - break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + break; case WM_INITMENU: { bool canGoBack = false; bool canGoForward = false; - if (g_webView && g_webView->canGoBack()) + if (g_webView && wkeCanGoBack(g_webView)) canGoBack = true; - if (g_webView && g_webView->canGoForward()) + if (g_webView && wkeCanGoForward(g_webView)) canGoForward = true; EnableMenuItem((HMENU)wParam, ID_FILE_GOBACK, canGoBack ? MF_ENABLED : MF_DISABLED); @@ -470,33 +788,31 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) break; - case WM_PAINT: - hdc = BeginPaint(hWnd, &ps); - if (g_webView) - g_webView->setDirty(true); - EndPaint(hWnd, &ps); - break; + case WM_PAINT: + hdc = BeginPaint(hWnd, &ps); + EndPaint(hWnd, &ps); + break; - case WM_DESTROY: - PostQuitMessage(0); - break; + case WM_DESTROY: + PostQuitMessage(0); + break; case WM_SIZE: resizeSubViews(); break; - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } - return 0; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + return 0; } INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { - UNREFERENCED_PARAMETER(lParam); - switch (message) - { - case WM_INITDIALOG: + UNREFERENCED_PARAMETER(lParam); + switch (message) + { + case WM_INITDIALOG: { RECT rect; rect.left = 63; @@ -513,22 +829,53 @@ INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) } return (INT_PTR)TRUE; - case WM_COMMAND: - if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) - { - EndDialog(hDlg, LOWORD(wParam)); - return (INT_PTR)TRUE; - } - break; - } - return (INT_PTR)FALSE; + case WM_COMMAND: + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) + { + EndDialog(hDlg, LOWORD(wParam)); + return (INT_PTR)TRUE; + } + break; + } + return (INT_PTR)FALSE; } LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { bool handled = true; - switch (message) - { + switch (message) + { + //cexer Ϸż + case WM_CREATE: + { + DragAcceptFiles(hWnd, TRUE); + } + return 0; + + case WM_DROPFILES: + { + if (g_webView) + { + wchar_t szFile[MAX_PATH + 8] = {0}; + wcscpy(szFile, L"file:///"); + + HDROP hDrop = reinterpret_cast(wParam); + + UINT uFilesCount = DragQueryFileW(hDrop, 0xFFFFFFFF, szFile, MAX_PATH); + if (uFilesCount != 0) + { + UINT uRet = DragQueryFileW(hDrop, 0, (wchar_t*)szFile + 8, MAX_PATH); + if ( uRet != 0) + { + wkeLoadURLW(g_webView, szFile); + SetWindowTextW(hWnd, szFile); + } + } + DragFinish(hDrop); + } + } + return 0; + case WM_COMMAND: SendMessage(GetParent(hWnd), message, wParam, lParam); return 0; @@ -536,7 +883,7 @@ LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l case WM_SIZE: if (g_webView && g_render) { - g_webView->resize(LOWORD(lParam), HIWORD(lParam)); + wkeResize(g_webView, LOWORD(lParam), HIWORD(lParam)); g_render->resize(LOWORD(lParam), HIWORD(lParam)); } break; @@ -552,7 +899,7 @@ LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l //flags = HIWORD(lParam); - handled = g_webView->keyDown(virtualKeyCode, flags, false); + handled = wkeFireKeyDownEvent(g_webView, virtualKeyCode, flags, false); } break; @@ -567,7 +914,7 @@ LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l //flags = HIWORD(lParam); - handled = g_webView->keyUp(virtualKeyCode, flags, false); + handled = wkeFireKeyUpEvent(g_webView, virtualKeyCode, flags, false); } break; @@ -582,7 +929,7 @@ LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l //flags = HIWORD(lParam); - handled = g_webView->keyPress(charCode, flags, false); + handled = wkeFireKeyPressEvent(g_webView, charCode, flags, false); } break; @@ -627,7 +974,7 @@ LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l //flags = wParam; - handled = g_webView->mouseEvent(message, x, y, flags); + handled = wkeFireMouseEvent(g_webView, message, x, y, flags); } break; @@ -654,7 +1001,7 @@ LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l if (wParam & MK_RBUTTON) flags |= WKE_RBUTTON; - handled = g_webView->contextMenuEvent(pt.x, pt.y, flags); + handled = wkeFireContextMenuEvent(g_webView, pt.x, pt.y, flags); } break; @@ -683,21 +1030,21 @@ LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l //flags = wParam; - handled = g_webView->mouseWheel(pt.x, pt.y, delta, flags); + handled = wkeFireMouseWheelEvent(g_webView, pt.x, pt.y, delta, flags); } break; case WM_SETFOCUS: - g_webView->focus(); + wkeSetFocus(g_webView); break; case WM_KILLFOCUS: - g_webView->unfocus(); + wkeKillFocus(g_webView); break; case WM_IME_STARTCOMPOSITION: { - wkeRect caret = g_webView->getCaret(); + wkeRect caret = wkeGetCaretRect(g_webView); CANDIDATEFORM form; form.dwIndex = 0; @@ -718,7 +1065,7 @@ LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l default: handled = false; break; - } + } if (!handled) return DefWindowProc(hWnd, message, wParam, lParam); @@ -735,7 +1082,7 @@ void resizeSubViews() MoveWindow(hURLBarWnd, 0, 0, rcClient.right, URLBAR_HEIGHT, TRUE); MoveWindow(hViewWindow, 0, URLBAR_HEIGHT, rcClient.right, rcClient.bottom - URLBAR_HEIGHT, TRUE); - g_webView->resize(rcClient.right, rcClient.bottom - URLBAR_HEIGHT); + wkeResize(g_webView, rcClient.right, rcClient.bottom - URLBAR_HEIGHT); } } @@ -766,17 +1113,69 @@ LRESULT CALLBACK UrlEditProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPar { if (message == WM_CHAR && wParam == 13) //Enter Key { - wchar_t url[MAX_URL_LENGTH]; + wchar_t url[MAX_URL_LENGTH] = {0}; *((LPWORD)url) = MAX_URL_LENGTH; int len = SendMessage(hDlg, EM_GETLINE, 0, (LPARAM)url); if (len == 0) return 0; - url[len] = L'\0'; - g_webView->loadURL(url); - SetFocus(hViewWindow); + if (wcsstr(url, L"inject") == url) + { + //jsObjectData* data = new jsObjectData(); + // memset(data, 0, sizeof(jsObjectData)); + // strcpy(data->typeName, "Test"); + // data->propertyGet = js_getObjectProp; + // data->propertySet = js_setObjectProp; + // data->finalize = js_releaseObject; + + BindTestObject* testObj = new BindTestObject(); + wkeJSState* es = wkeGlobalExec(g_webView); + wkeJSValue obj = wkeJSObject(es, testObj); + wkeJSSetGlobal(es, "test", obj); + + BindTestFunction::bindToGlobal(es); + } + else if (wcsstr(url, L"javascript:") == url) + { + url[len] = L'\0'; + wkeRunJSW(g_webView, url + wcslen(L"javascript:")); + } + else if (wcsstr(url, L"call") == url) + { + wkeJSState* es = wkeGlobalExec(g_webView); + wkeJSValue jsDocument = wkeJSGet(es, wkeJSGlobalObject(es), "document"); + + { + char prop[10] = { 0 }; + strcpy(prop, "URL"); + wkeJSValue jsUrl = wkeJSGet(es, jsDocument, prop); + MessageBoxW(NULL, wkeJSToTempStringW(es, jsUrl), NULL, MB_OK); + } + + { + char prop[10] = { 0 }; + strcpy(prop, "title"); + wkeJSValue jsTitle = wkeJSGet(es, jsDocument, prop); + MessageBoxW(NULL, wkeJSToTempStringW(es, jsTitle), NULL, MB_OK); + } + + { + char prop[10] = { 0 }; + strcpy(prop, "cookie"); + wkeJSValue jsCookie = wkeJSGet(es, jsDocument, prop); + MessageBoxW(NULL, wkeJSToTempStringW(es, jsCookie), NULL, MB_OK); + } + + } + else + { + url[len] = L'\0'; + wkeLoadURLW(g_webView, url); + SetFocus(hViewWindow); + } return 0; } return (LRESULT)CallWindowProc((WNDPROC)DefEditProc,hDlg,message,wParam,lParam); } + diff --git a/wkeBrowser/wkeBrowser.h b/wkeBrowser/wkeBrowser.h index e60f2eb7..f0fdb974 100644 --- a/wkeBrowser/wkeBrowser.h +++ b/wkeBrowser/wkeBrowser.h @@ -1,3 +1,5 @@ #pragma once #include "resource.h" + +//#define WKE_BROWSER_USE_LOCAL_PROXY \ No newline at end of file diff --git a/wkeBrowser/wkeBrowser.rc b/wkeBrowser/wkeBrowser.rc index 8ba729cb..0b4086d9 100644 --- a/wkeBrowser/wkeBrowser.rc +++ b/wkeBrowser/wkeBrowser.rc @@ -7,6 +7,9 @@ // // Generated from the TEXTINCLUDE 2 resource. // +#ifndef APSTUDIO_INVOKED +#include "targetver.h" +#endif #define APSTUDIO_HIDDEN_SYMBOLS #include "windows.h" #undef APSTUDIO_HIDDEN_SYMBOLS @@ -15,7 +18,7 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// Ӣ() resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 @@ -49,11 +52,13 @@ BEGIN POPUP "&Tools" BEGIN MENUITEM "Zoom In Ctrl + +", ID_ZOOM_IN - MENUITEM "Zoom Out Ctrl + -", ID_ZOOM_OUT + MENUITEM "Zoom Out Ctrl + -", ID_ZOOM_OUT MENUITEM "Reset Zoom Ctrl + 0", ID_RESET_ZOOM MENUITEM SEPARATOR MENUITEM "Set Editable Ctrl + E", ID_SET_EDITABLE MENUITEM "Screenshot Ctrl + S", ID_TAKE_SCREENSHOT + MENUITEM SEPARATOR + MENUITEM "View cookie", ID_TOOLS_VIEWCOOKIE END POPUP "&Help" BEGIN @@ -71,15 +76,14 @@ IDC_WKEBROWSER ACCELERATORS BEGIN "?", IDM_ABOUT, ASCII, ALT "/", IDM_ABOUT, ASCII, ALT - VK_OEM_PLUS, ID_ZOOM_IN, CONTROL, VIRTKEY - VK_OEM_MINUS, ID_ZOOM_OUT, CONTROL, VIRTKEY - 48, ID_RESET_ZOOM, CONTROL, VIRTKEY - "E", ID_SET_EDITABLE, CONTROL, VIRTKEY - "S", ID_TAKE_SCREENSHOT, CONTROL, VIRTKEY - - VK_ADD, ID_ZOOM_IN, CONTROL, VIRTKEY - VK_SUBTRACT, ID_ZOOM_OUT, CONTROL, VIRTKEY - VK_NUMPAD0, ID_RESET_ZOOM, CONTROL, VIRTKEY + VK_OEM_PLUS, ID_ZOOM_IN, VIRTKEY, CONTROL + VK_OEM_MINUS, ID_ZOOM_OUT, VIRTKEY, CONTROL + "0", ID_RESET_ZOOM, VIRTKEY, CONTROL + "E", ID_SET_EDITABLE, VIRTKEY, CONTROL + "S", ID_TAKE_SCREENSHOT, VIRTKEY, CONTROL + VK_ADD, ID_ZOOM_IN, VIRTKEY, CONTROL + VK_SUBTRACT, ID_ZOOM_OUT, VIRTKEY, CONTROL + VK_NUMPAD0, ID_RESET_ZOOM, VIRTKEY, CONTROL END @@ -99,37 +103,43 @@ BEGIN LTEXT "BlzFans@hotmail.com",IDC_STATIC,42,50,114,8 END -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,2,0,0 - PRODUCTVERSION 1,2,0,0 - FILEFLAGSMASK 0x3fL + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,2,0,0 + PRODUCTVERSION 1,2,0,0 + FILEFLAGSMASK 0x3fL #ifdef _DEBUG - FILEFLAGS 0x1L + FILEFLAGS 0x1L #else - FILEFLAGS 0x0L + FILEFLAGS 0x0L #endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L BEGIN - BLOCK "StringFileInfo" - BEGIN + BLOCK "StringFileInfo" + BEGIN BLOCK "040904B0" - BEGIN - VALUE "CompanyName", "wke.sf.net\0" - VALUE "FileDescription", "wkeBrowser\0" - VALUE "FileVersion", "1, 2, 0, 0\0" - VALUE "InternalName", "wkeBrowser\0" - VALUE "LegalCopyright", "BlzFans@hotmail.com Copyright (C) 2012\0" - VALUE "LegalTrademarks", "wke.sf.net\0" - VALUE "OriginalFilename","wkeBrowser.exe\0" - VALUE "ProductName", "wkeBrowser\0" - VALUE "ProductVersion", "1, 2, 0, 0\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 + BEGIN + VALUE "CompanyName", "wke.sf.net" + VALUE "FileDescription", "wkeBrowser" + VALUE "FileVersion", "1, 2, 0, 0" + VALUE "InternalName", "wkeBrowser" + VALUE "LegalCopyright", "BlzFans@hotmail.com Copyright (C) 2012" + VALUE "LegalTrademarks", "wke.sf.net" + VALUE "OriginalFilename", "wkeBrowser.exe" + VALUE "ProductName", "wkeBrowser" + VALUE "ProductVersion", "1, 2, 0, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 END END @@ -195,7 +205,7 @@ BEGIN IDC_WKEBROWSER "WKEBROWSER" END -#endif // English(U.S.) resources +#endif // Ӣ() resources ///////////////////////////////////////////////////////////////////////////// diff --git a/wkexe/app.c b/wkexe/app.c new file mode 100644 index 00000000..0add45df --- /dev/null +++ b/wkexe/app.c @@ -0,0 +1,169 @@ + +#include "app.h" +#include "cmdline.h" +#include "path.h" + +#include +#include +#include + + + +BOOL FixupHtmlUrl(Application* app) +{ + LPWSTR html = app->options.html; + if (!html || html[0] == 0) + return FALSE; + + // : ˵· + if (wcsstr(html, L":")) + return TRUE; + + // URLµĵַ + html = FixupHtmlFilePath(html); + if (html != app->options.html) + { + free(app->options.html); + app->options.html = html; + } + + return TRUE; +} + +BOOL ProcessOptions(Application* app) +{ + int argc = 0; + LPWSTR* argv = CommandLineToArgvW(GetCommandLineW(), &argc); + ParseOptions(&app->options, argc, argv); + LocalFree(argv); + + return TRUE; +} + +void FillDefultOptions(Application* app) +{ + app->options.cookiePath[0] = 0; + app->options.showHelp = false; + app->options.transparent = false; +} + +void FillDefaultUrl(Application* app) +{ + app->options.html = (WCHAR*)malloc(100); + wcscpy(app->options.html, L"about:blank"); +} + +// ص˹رա true ٴڣ false ʲô +bool HandleWindowClosing(wkeWebView* webWindow, void* param) +{ + Application* app = (Application*)param; + return IDYES == MessageBoxW(NULL, L"ȷҪ˳", L"wkexe", MB_YESNO|MB_ICONQUESTION); +} + +// ص +void HandleWindowDestroy(wkeWebView* webWindow, void* param) +{ + Application* app = (Application*)param; + app->window = NULL; + PostQuitMessage(0); +} + +// صĵسɹ +void HandleDocumentReady(wkeWebView* webWindow, void* param, const wkeDocumentReadyInfo* info) +{ + //ҳسɹ(iframe) + if (info->frameJSState == info->mainFrameJSState) + wkeShowWindow(webWindow, TRUE); +} + +// صҳı +void HandleTitleChanged(wkeWebView* webWindow, void* param, const wkeString* title) +{ + wkeSetWindowTitleW(webWindow, wkeGetStringW(title)); +} + +// صµҳ棬˵ window.open ߵ +wkeWebView* HandleCreateView(wkeWebView* webWindow, void* param, const wkeNewViewInfo* info) +{ + wkeWebView* newWindow = wkeCreateWebWindow(WKE_WINDOW_TYPE_POPUP, NULL, info->x, info->y, info->width, info->height); + wkeShowWindow(newWindow, SW_SHOW); + return newWindow; +} + +// ҳ洰 +BOOL CreateWebWindow(Application* app) +{ + //wkeSettings settings; + //settings.proxy.type = WKE_PROXY_HTTP; + //settings.proxy.hostname = "127.0.0.1:8888"; + //wkeConfigure(&settings); + + if (app->options.transparent) + app->window = wkeCreateWebWindow(WKE_WINDOW_TYPE_TRANSPARENT, NULL, 0, 0, 640, 480); + else + app->window = wkeCreateWebWindow(WKE_WINDOW_TYPE_POPUP, NULL, 0, 0, 640, 480); + + if (!app->window) + return FALSE; + + wkeSetUserAgentW(app->window, app->options.userAgent); + //wkeSetProxy(app->window, app->options.userAgent); + + wkeOnWindowClosing(app->window, HandleWindowClosing, app); + wkeOnWindowDestroy(app->window, HandleWindowDestroy, app); + wkeOnDocumentReady(app->window, HandleDocumentReady, app); + wkeOnTitleChanged(app->window, HandleTitleChanged, app); + wkeOnCreateView(app->window, HandleCreateView, app); + + wkeMoveToCenter(app->window); + wkeLoadW(app->window, app->options.html); + + return TRUE; +} + +void PrintHelpAndQuit(Application* app) +{ + PrintHelp(); + PostQuitMessage(0); +} + +void RunMessageLoop(Application* app) +{ + wkeRunMessageLoop(NULL); +} + +void RunApplication(Application* app) +{ + memset(app, 0, sizeof(Application)); + + if (!ProcessOptions(app)) + FillDefultOptions(app); + + if (!FixupHtmlUrl(app)) + FillDefaultUrl(app); + + wkeInitialize(); + do + { + if (!CreateWebWindow(app)) + { + PrintHelpAndQuit(app); + break; + } + + RunMessageLoop(app); + } + while (0); + wkeFinalize(); +} + +void QuitApplication(Application* app) +{ + FreeOptions(&app->options); + + if (app->window) + { + wkeDestroyWebWindow(app->window); + app->window = NULL; + } +} diff --git a/wkexe/app.h b/wkexe/app.h new file mode 100644 index 00000000..24c25da5 --- /dev/null +++ b/wkexe/app.h @@ -0,0 +1,22 @@ +#ifndef WKEXE_APP_H +#define WKEXE_APP_H + + +#include "cmdline.h" +#include + + + +typedef struct +{ + wkeWebView* window; + CommandOptions options; + +} Application; + + +void RunApplication(Application* app); + + + +#endif//#ifndef WKEXE_APP_H \ No newline at end of file diff --git a/wkexe/cmdline.c b/wkexe/cmdline.c new file mode 100644 index 00000000..3e8a5425 --- /dev/null +++ b/wkexe/cmdline.c @@ -0,0 +1,116 @@ +#include "cmdline.h" +#include "getopt.h" + + +typedef struct +{ + struct option_w option; + LPCWSTR description; + +} OPTIONW; + + +static OPTIONW s_options[] = +{ + {{ L"help", ARG_NONE, NULL, L'h' }, L"ӡϢ\n"}, + {{ L"html", ARG_REQ, NULL, L'x' }, L"Ҫ򿪵HTMLļ"}, + {{ L"transparent", ARG_OPT, 0, L't' }, L"֧ʹ÷ֲ㴰͸"}, + {{ L"cookie", ARG_OPT, 0, L'c' }, L"cookieļ·"}, + {{ L"useragent", ARG_OPT, 0, L'u' }, L"UserAgent"}, + {{ NULL, ARG_NULL, 0, 0 }, NULL} +}; + +void ParseOptions(CommandOptions* options, int argc, LPWSTR* argv) +{ + struct option_w longOptions[100] = { 0 }; + WCHAR shortOptions[100] = { 0 }; + + WCHAR val[2] = { 0 }; + OPTIONW* opt = s_options; + + int i = 0; + do + { + longOptions[i++] = opt->option; + + val[0] = opt->option.val; + wcscat(shortOptions, val); + if (opt->option.has_arg) + wcscat(shortOptions, L":"); + + ++ opt; + } + while (opt->description); + + do + { + int option = getopt_long_w(argc, argv, shortOptions, longOptions, NULL); + if (option == -1) + break; + + switch (option) + { + case L'h': + options->showHelp = TRUE; + break; + + case L'x': + options->html = (WCHAR*)malloc(sizeof(WCHAR) * (wcslen(optarg_w) + 1)); + wcscpy(options->html, optarg_w); + break; + + case L't': + if (!optarg_w || + _wcsicmp(optarg_w, L"yes") == 0 || + _wcsicmp(optarg_w, L"true") == 0) + { + options->transparent = TRUE; + } + else + { + options->transparent = FALSE; + } + break; + + case L'u': + wcscpy(options->userAgent, optarg_w); + break; + } + } + while (1); +} + +void PrintHelp() +{ + WCHAR helpString[1024] = { 0 }; + int helpLength = 0; + + OPTIONW* opt = s_options; + do + { + WCHAR* buffer = (LPWSTR)helpString + helpLength; + int capacity = 1024 - helpLength; + helpLength += _snwprintf(buffer, capacity, L"--%-15s%s\n", opt->option.name, opt->description); + + ++ opt; + } + while (opt->description); + + MessageBoxW(NULL, helpString, L"wkexe", MB_OK|MB_ICONINFORMATION); +} + + +void InitOptions(CommandOptions* options) +{ + memset(options, 0, sizeof(options)); +} + +void FreeOptions(CommandOptions* options) +{ + if (options->html) + { + free(options->html); + options->html = NULL; + } + memset(options, 0, sizeof(options)); +} diff --git a/wkexe/cmdline.h b/wkexe/cmdline.h new file mode 100644 index 00000000..05373f39 --- /dev/null +++ b/wkexe/cmdline.h @@ -0,0 +1,25 @@ +#ifndef WKEXE_CMDLINE_H +#define WKEXE_CMDLINE_H + + +#include + + +typedef struct +{ + int transparent; + WCHAR* html; + int showHelp; + WCHAR cookiePath[MAX_PATH]; + WCHAR userAgent[1024]; + +} CommandOptions; + +void InitOptions(CommandOptions* options); +void ParseOptions(CommandOptions* options, int argc, LPWSTR* argv); +void FreeOptions(CommandOptions* options); + +void PrintHelp(); + + +#endif//#ifndef WKEXE_CMDLINE_H \ No newline at end of file diff --git a/wkexe/getopt.c b/wkexe/getopt.c new file mode 100644 index 00000000..65cfccf7 --- /dev/null +++ b/wkexe/getopt.c @@ -0,0 +1,973 @@ +/* Getopt for Microsoft C +This code is a modification of the Free Software Foundation, Inc. +Getopt library for parsing command line argument the purpose was +to provide a Microsoft Visual C friendly derivative. This code +provides functionality for both Unicode and Multibyte builds. + +Date: 02/03/2011 - Ludvik Jerabek - Initial Release +Version: 1.0 +Comment: Supports getopt, getopt_long, and getopt_long_only +and POSIXLY_CORRECT environment flag +License: LGPL + +Revisions: + +02/03/2011 - Ludvik Jerabek - Initial Release +02/20/2011 - Ludvik Jerabek - Fixed compiler warnings at Level 4 +07/05/2011 - Ludvik Jerabek - Added no_argument, required_argument, optional_argument defs +08/03/2011 - Ludvik Jerabek - Fixed non-argument runtime bug which caused runtime exception +08/09/2011 - Ludvik Jerabek - Added code to export functions for DLL and LIB +02/15/2012 - Ludvik Jerabek - Fixed _GETOPT_THROW definition missing in implementation file +08/01/2012 - Ludvik Jerabek - Created separate functions for char and wchar_t characters so single dll can do both unicode and ansi +10/15/2012 - Ludvik Jerabek - Modified to match latest GNU features +06/19/2015 - Ludvik Jerabek - Fixed maximum option limitation caused by option_a (255) and option_w (65535) structure val variable + +**DISCLAIMER** +THIS MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING, BUT Not LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, OR NON-INFRINGEMENT. SOME JURISDICTIONS DO NOT ALLOW THE +EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT +APPLY TO YOU. IN NO EVENT WILL I BE LIABLE TO ANY PARTY FOR ANY +DIRECT, INDIRECT, SPECIAL OR OTHER CONSEQUENTIAL DAMAGES FOR ANY +USE OF THIS MATERIAL INCLUDING, WITHOUT LIMITATION, ANY LOST +PROFITS, BUSINESS INTERRUPTION, LOSS OF PROGRAMS OR OTHER DATA ON +YOUR INFORMATION HANDLING SYSTEM OR OTHERWISE, EVEN If WE ARE +EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +*/ +#define _CRT_SECURE_NO_WARNINGS +#include +#include +#include +#include "getopt.h" + +#ifdef __cplusplus + #define _GETOPT_THROW throw() +#else + #define _GETOPT_THROW +#endif + +int optind = 1; +int opterr = 1; +int optopt = '?'; +enum ENUM_ORDERING { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }; + +// +// +// Ansi structures and functions follow +// +// + +static struct _getopt_data_a +{ + int optind; + int opterr; + int optopt; + char *optarg; + int __initialized; + char *__nextchar; + enum ENUM_ORDERING __ordering; + int __posixly_correct; + int __first_nonopt; + int __last_nonopt; +} getopt_data_a; +char *optarg_a; + +static void exchange_a(char **argv, struct _getopt_data_a *d) +{ + int bottom = d->__first_nonopt; + int middle = d->__last_nonopt; + int top = d->optind; + char *tem; + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + int len = middle - bottom; + register int i; + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + } + top -= len; + } + else + { + int len = top - middle; + register int i; + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + } + bottom += len; + } + } + d->__first_nonopt += (d->optind - d->__last_nonopt); + d->__last_nonopt = d->optind; +} +static const char *_getopt_initialize_a (const char *optstring, struct _getopt_data_a *d, int posixly_correct) +{ + d->__first_nonopt = d->__last_nonopt = d->optind; + d->__nextchar = NULL; + d->__posixly_correct = posixly_correct | !!getenv("POSIXLY_CORRECT"); + if (optstring[0] == '-') + { + d->__ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + d->__ordering = REQUIRE_ORDER; + ++optstring; + } + else if (d->__posixly_correct) + d->__ordering = REQUIRE_ORDER; + else + d->__ordering = PERMUTE; + return optstring; +} +int _getopt_internal_r_a (int argc, char *const *argv, const char *optstring, const struct option_a *longopts, int *longind, int long_only, struct _getopt_data_a *d, int posixly_correct) +{ + int print_errors = d->opterr; + if (argc < 1) + return -1; + d->optarg = NULL; + if (d->optind == 0 || !d->__initialized) + { + if (d->optind == 0) + d->optind = 1; + optstring = _getopt_initialize_a (optstring, d, posixly_correct); + d->__initialized = 1; + } + else if (optstring[0] == '-' || optstring[0] == '+') + optstring++; + if (optstring[0] == ':') + print_errors = 0; + if (d->__nextchar == NULL || *d->__nextchar == '\0') + { + if (d->__last_nonopt > d->optind) + d->__last_nonopt = d->optind; + if (d->__first_nonopt > d->optind) + d->__first_nonopt = d->optind; + if (d->__ordering == PERMUTE) + { + if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) + exchange_a ((char **) argv, d); + else if (d->__last_nonopt != d->optind) + d->__first_nonopt = d->optind; + while (d->optind < argc && (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')) + d->optind++; + d->__last_nonopt = d->optind; + } + if (d->optind != argc && !strcmp(argv[d->optind], "--")) + { + d->optind++; + if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) + exchange_a((char **) argv, d); + else if (d->__first_nonopt == d->__last_nonopt) + d->__first_nonopt = d->optind; + d->__last_nonopt = argc; + d->optind = argc; + } + if (d->optind == argc) + { + if (d->__first_nonopt != d->__last_nonopt) + d->optind = d->__first_nonopt; + return -1; + } + if ((argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')) + { + if (d->__ordering == REQUIRE_ORDER) + return -1; + d->optarg = argv[d->optind++]; + return 1; + } + d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->optind][1] == '-')); + } + if (longopts != NULL && (argv[d->optind][1] == '-' || (long_only && (argv[d->optind][2] || !strchr(optstring, argv[d->optind][1]))))) + { + char *nameend; + unsigned int namelen; + const struct option_a *p; + const struct option_a *pfound = NULL; + struct option_list + { + const struct option_a *p; + struct option_list *next; + } *ambig_list = NULL; + int exact = 0; + int indfound = -1; + int option_index; + for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++); + namelen = (unsigned int)(nameend - d->__nextchar); + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp(p->name, d->__nextchar, namelen)) + { + if (namelen == (unsigned int)strlen(p->name)) + { + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + pfound = p; + indfound = option_index; + } + else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) + { + struct option_list *newp = (struct option_list*)alloca(sizeof(*newp)); + newp->p = p; + newp->next = ambig_list; + ambig_list = newp; + } + } + if (ambig_list != NULL && !exact) + { + if (print_errors) + { + struct option_list first; + first.p = pfound; + first.next = ambig_list; + ambig_list = &first; + fprintf (stderr, "%s: option '%s' is ambiguous; possibilities:", argv[0], argv[d->optind]); + do + { + fprintf (stderr, " '--%s'", ambig_list->p->name); + ambig_list = ambig_list->next; + } + while (ambig_list != NULL); + fputc ('\n', stderr); + } + d->__nextchar += strlen(d->__nextchar); + d->optind++; + d->optopt = 0; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + d->optind++; + if (*nameend) + { + if (pfound->has_arg) + d->optarg = nameend + 1; + else + { + if (print_errors) + { + if (argv[d->optind - 1][1] == '-') + { + fprintf(stderr, "%s: option '--%s' doesn't allow an argument\n",argv[0], pfound->name); + } + else + { + fprintf(stderr, "%s: option '%c%s' doesn't allow an argument\n",argv[0], argv[d->optind - 1][0],pfound->name); + } + } + d->__nextchar += strlen(d->__nextchar); + d->optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (d->optind < argc) + d->optarg = argv[d->optind++]; + else + { + if (print_errors) + { + fprintf(stderr,"%s: option '--%s' requires an argument\n",argv[0], pfound->name); + } + d->__nextchar += strlen(d->__nextchar); + d->optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + d->__nextchar += strlen(d->__nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + if (!long_only || argv[d->optind][1] == '-' || strchr(optstring, *d->__nextchar) == NULL) + { + if (print_errors) + { + if (argv[d->optind][1] == '-') + { + fprintf(stderr, "%s: unrecognized option '--%s'\n",argv[0], d->__nextchar); + } + else + { + fprintf(stderr, "%s: unrecognized option '%c%s'\n",argv[0], argv[d->optind][0], d->__nextchar); + } + } + d->__nextchar = (char *)""; + d->optind++; + d->optopt = 0; + return '?'; + } + } + { + char c = *d->__nextchar++; + char *temp = (char*)strchr(optstring, c); + if (*d->__nextchar == '\0') + ++d->optind; + if (temp == NULL || c == ':' || c == ';') + { + if (print_errors) + { + fprintf(stderr, "%s: invalid option -- '%c'\n", argv[0], c); + } + d->optopt = c; + return '?'; + } + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option_a *p; + const struct option_a *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + if (longopts == NULL) + goto no_longs; + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + d->optind++; + } + else if (d->optind == argc) + { + if (print_errors) + { + fprintf(stderr,"%s: option requires an argument -- '%c'\n",argv[0], c); + } + d->optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + d->optarg = argv[d->optind++]; + for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; nameend++); + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp(p->name, d->__nextchar, nameend - d->__nextchar)) + { + if ((unsigned int) (nameend - d->__nextchar) == strlen(p->name)) + { + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + pfound = p; + indfound = option_index; + } + else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) + ambig = 1; + } + if (ambig && !exact) + { + if (print_errors) + { + fprintf(stderr, "%s: option '-W %s' is ambiguous\n",argv[0], d->optarg); + } + d->__nextchar += strlen(d->__nextchar); + d->optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + if (pfound->has_arg) + d->optarg = nameend + 1; + else + { + if (print_errors) + { + fprintf(stderr, "%s: option '-W %s' doesn't allow an argument\n",argv[0], pfound->name); + } + d->__nextchar += strlen(d->__nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (d->optind < argc) + d->optarg = argv[d->optind++]; + else + { + if (print_errors) + { + fprintf(stderr, "%s: option '-W %s' requires an argument\n",argv[0], pfound->name); + } + d->__nextchar += strlen(d->__nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + else + d->optarg = NULL; + d->__nextchar += strlen(d->__nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } +no_longs: + d->__nextchar = NULL; + return 'W'; + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + d->optind++; + } + else + d->optarg = NULL; + d->__nextchar = NULL; + } + else + { + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + d->optind++; + } + else if (d->optind == argc) + { + if (print_errors) + { + fprintf(stderr,"%s: option requires an argument -- '%c'\n",argv[0], c); + } + d->optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + d->optarg = argv[d->optind++]; + d->__nextchar = NULL; + } + } + return c; + } +} +int _getopt_internal_a (int argc, char *const *argv, const char *optstring, const struct option_a *longopts, int *longind, int long_only, int posixly_correct) +{ + int result; + getopt_data_a.optind = optind; + getopt_data_a.opterr = opterr; + result = _getopt_internal_r_a (argc, argv, optstring, longopts,longind, long_only, &getopt_data_a,posixly_correct); + optind = getopt_data_a.optind; + optarg_a = getopt_data_a.optarg; + optopt = getopt_data_a.optopt; + return result; +} +int getopt_a (int argc, char *const *argv, const char *optstring) _GETOPT_THROW +{ + return _getopt_internal_a (argc, argv, optstring, (const struct option_a *) 0, (int *) 0, 0, 0); +} +int getopt_long_a (int argc, char *const *argv, const char *options, const struct option_a *long_options, int *opt_index) _GETOPT_THROW +{ + return _getopt_internal_a (argc, argv, options, long_options, opt_index, 0, 0); +} +int getopt_long_only_a (int argc, char *const *argv, const char *options, const struct option_a *long_options, int *opt_index) _GETOPT_THROW +{ + return _getopt_internal_a (argc, argv, options, long_options, opt_index, 1, 0); +} +int _getopt_long_r_a (int argc, char *const *argv, const char *options, const struct option_a *long_options, int *opt_index, struct _getopt_data_a *d) +{ + return _getopt_internal_r_a (argc, argv, options, long_options, opt_index,0, d, 0); +} +int _getopt_long_only_r_a (int argc, char *const *argv, const char *options, const struct option_a *long_options, int *opt_index, struct _getopt_data_a *d) +{ + return _getopt_internal_r_a (argc, argv, options, long_options, opt_index, 1, d, 0); +} + +// +// +// Unicode Structures and Functions +// +// + +static struct _getopt_data_w +{ + int optind; + int opterr; + int optopt; + wchar_t *optarg; + int __initialized; + wchar_t *__nextchar; + enum ENUM_ORDERING __ordering; + int __posixly_correct; + int __first_nonopt; + int __last_nonopt; +} getopt_data_w; +wchar_t *optarg_w; + +static void exchange_w(wchar_t **argv, struct _getopt_data_w *d) +{ + int bottom = d->__first_nonopt; + int middle = d->__last_nonopt; + int top = d->optind; + wchar_t *tem; + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + int len = middle - bottom; + register int i; + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + } + top -= len; + } + else + { + int len = top - middle; + register int i; + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + } + bottom += len; + } + } + d->__first_nonopt += (d->optind - d->__last_nonopt); + d->__last_nonopt = d->optind; +} +static const wchar_t *_getopt_initialize_w (const wchar_t *optstring, struct _getopt_data_w *d, int posixly_correct) +{ + d->__first_nonopt = d->__last_nonopt = d->optind; + d->__nextchar = NULL; + d->__posixly_correct = posixly_correct | !!_wgetenv(L"POSIXLY_CORRECT"); + if (optstring[0] == L'-') + { + d->__ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == L'+') + { + d->__ordering = REQUIRE_ORDER; + ++optstring; + } + else if (d->__posixly_correct) + d->__ordering = REQUIRE_ORDER; + else + d->__ordering = PERMUTE; + return optstring; +} +int _getopt_internal_r_w (int argc, wchar_t *const *argv, const wchar_t *optstring, const struct option_w *longopts, int *longind, int long_only, struct _getopt_data_w *d, int posixly_correct) +{ + int print_errors = d->opterr; + if (argc < 1) + return -1; + d->optarg = NULL; + if (d->optind == 0 || !d->__initialized) + { + if (d->optind == 0) + d->optind = 1; + optstring = _getopt_initialize_w (optstring, d, posixly_correct); + d->__initialized = 1; + } + else if (optstring[0] == L'-' || optstring[0] == L'+') + optstring++; + if (optstring[0] == L':') + print_errors = 0; + if (d->__nextchar == NULL || *d->__nextchar == L'\0') + { + if (d->__last_nonopt > d->optind) + d->__last_nonopt = d->optind; + if (d->__first_nonopt > d->optind) + d->__first_nonopt = d->optind; + if (d->__ordering == PERMUTE) + { + if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) + exchange_w((wchar_t **) argv, d); + else if (d->__last_nonopt != d->optind) + d->__first_nonopt = d->optind; + while (d->optind < argc && (argv[d->optind][0] != L'-' || argv[d->optind][1] == L'\0')) + d->optind++; + d->__last_nonopt = d->optind; + } + if (d->optind != argc && !wcscmp(argv[d->optind], L"--")) + { + d->optind++; + if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) + exchange_w((wchar_t **) argv, d); + else if (d->__first_nonopt == d->__last_nonopt) + d->__first_nonopt = d->optind; + d->__last_nonopt = argc; + d->optind = argc; + } + if (d->optind == argc) + { + if (d->__first_nonopt != d->__last_nonopt) + d->optind = d->__first_nonopt; + return -1; + } + if ((argv[d->optind][0] != L'-' || argv[d->optind][1] == L'\0')) + { + if (d->__ordering == REQUIRE_ORDER) + return -1; + d->optarg = argv[d->optind++]; + return 1; + } + d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->optind][1] == L'-')); + } + if (longopts != NULL && (argv[d->optind][1] == L'-' || (long_only && (argv[d->optind][2] || !wcschr(optstring, argv[d->optind][1]))))) + { + wchar_t *nameend; + unsigned int namelen; + const struct option_w *p; + const struct option_w *pfound = NULL; + struct option_list + { + const struct option_w *p; + struct option_list *next; + } *ambig_list = NULL; + int exact = 0; + int indfound = -1; + int option_index; + for (nameend = d->__nextchar; *nameend && *nameend != L'='; nameend++); + namelen = (unsigned int)(nameend - d->__nextchar); + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!wcsncmp(p->name, d->__nextchar, namelen)) + { + if (namelen == (unsigned int)wcslen(p->name)) + { + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + pfound = p; + indfound = option_index; + } + else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) + { + struct option_list *newp = (struct option_list*)alloca(sizeof(*newp)); + newp->p = p; + newp->next = ambig_list; + ambig_list = newp; + } + } + if (ambig_list != NULL && !exact) + { + if (print_errors) + { + struct option_list first; + first.p = pfound; + first.next = ambig_list; + ambig_list = &first; + fwprintf(stderr, L"%s: option '%s' is ambiguous; possibilities:", argv[0], argv[d->optind]); + do + { + fwprintf (stderr, L" '--%s'", ambig_list->p->name); + ambig_list = ambig_list->next; + } + while (ambig_list != NULL); + fputwc (L'\n', stderr); + } + d->__nextchar += wcslen(d->__nextchar); + d->optind++; + d->optopt = 0; + return L'?'; + } + if (pfound != NULL) + { + option_index = indfound; + d->optind++; + if (*nameend) + { + if (pfound->has_arg) + d->optarg = nameend + 1; + else + { + if (print_errors) + { + if (argv[d->optind - 1][1] == L'-') + { + fwprintf(stderr, L"%s: option '--%s' doesn't allow an argument\n",argv[0], pfound->name); + } + else + { + fwprintf(stderr, L"%s: option '%c%s' doesn't allow an argument\n",argv[0], argv[d->optind - 1][0],pfound->name); + } + } + d->__nextchar += wcslen(d->__nextchar); + d->optopt = pfound->val; + return L'?'; + } + } + else if (pfound->has_arg == 1) + { + if (d->optind < argc) + d->optarg = argv[d->optind++]; + else + { + if (print_errors) + { + fwprintf(stderr,L"%s: option '--%s' requires an argument\n",argv[0], pfound->name); + } + d->__nextchar += wcslen(d->__nextchar); + d->optopt = pfound->val; + return optstring[0] == L':' ? L':' : L'?'; + } + } + d->__nextchar += wcslen(d->__nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + if (!long_only || argv[d->optind][1] == L'-' || wcschr(optstring, *d->__nextchar) == NULL) + { + if (print_errors) + { + if (argv[d->optind][1] == L'-') + { + fwprintf(stderr, L"%s: unrecognized option '--%s'\n",argv[0], d->__nextchar); + } + else + { + fwprintf(stderr, L"%s: unrecognized option '%c%s'\n",argv[0], argv[d->optind][0], d->__nextchar); + } + } + d->__nextchar = (wchar_t *)L""; + d->optind++; + d->optopt = 0; + return L'?'; + } + } + { + wchar_t c = *d->__nextchar++; + wchar_t *temp = (wchar_t*)wcschr(optstring, c); + if (*d->__nextchar == L'\0') + ++d->optind; + if (temp == NULL || c == L':' || c == L';') + { + if (print_errors) + { + fwprintf(stderr, L"%s: invalid option -- '%c'\n", argv[0], c); + } + d->optopt = c; + return L'?'; + } + if (temp[0] == L'W' && temp[1] == L';') + { + wchar_t *nameend; + const struct option_w *p; + const struct option_w *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + if (longopts == NULL) + goto no_longs; + if (*d->__nextchar != L'\0') + { + d->optarg = d->__nextchar; + d->optind++; + } + else if (d->optind == argc) + { + if (print_errors) + { + fwprintf(stderr,L"%s: option requires an argument -- '%c'\n",argv[0], c); + } + d->optopt = c; + if (optstring[0] == L':') + c = L':'; + else + c = L'?'; + return c; + } + else + d->optarg = argv[d->optind++]; + for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != L'='; nameend++); + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!wcsncmp(p->name, d->__nextchar, nameend - d->__nextchar)) + { + if ((unsigned int) (nameend - d->__nextchar) == wcslen(p->name)) + { + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + pfound = p; + indfound = option_index; + } + else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) + ambig = 1; + } + if (ambig && !exact) + { + if (print_errors) + { + fwprintf(stderr, L"%s: option '-W %s' is ambiguous\n",argv[0], d->optarg); + } + d->__nextchar += wcslen(d->__nextchar); + d->optind++; + return L'?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + if (pfound->has_arg) + d->optarg = nameend + 1; + else + { + if (print_errors) + { + fwprintf(stderr, L"%s: option '-W %s' doesn't allow an argument\n",argv[0], pfound->name); + } + d->__nextchar += wcslen(d->__nextchar); + return L'?'; + } + } + else if (pfound->has_arg == 1) + { + if (d->optind < argc) + d->optarg = argv[d->optind++]; + else + { + if (print_errors) + { + fwprintf(stderr, L"%s: option '-W %s' requires an argument\n",argv[0], pfound->name); + } + d->__nextchar += wcslen(d->__nextchar); + return optstring[0] == L':' ? L':' : L'?'; + } + } + else + d->optarg = NULL; + d->__nextchar += wcslen(d->__nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } +no_longs: + d->__nextchar = NULL; + return L'W'; + } + if (temp[1] == L':') + { + if (temp[2] == L':') + { + if (*d->__nextchar != L'\0') + { + d->optarg = d->__nextchar; + d->optind++; + } + else + d->optarg = NULL; + d->__nextchar = NULL; + } + else + { + if (*d->__nextchar != L'\0') + { + d->optarg = d->__nextchar; + d->optind++; + } + else if (d->optind == argc) + { + if (print_errors) + { + fwprintf(stderr,L"%s: option requires an argument -- '%c'\n",argv[0], c); + } + d->optopt = c; + if (optstring[0] == L':') + c = L':'; + else + c = L'?'; + } + else + d->optarg = argv[d->optind++]; + d->__nextchar = NULL; + } + } + return c; + } +} +int _getopt_internal_w (int argc, wchar_t *const *argv, const wchar_t *optstring, const struct option_w *longopts, int *longind, int long_only, int posixly_correct) +{ + int result; + getopt_data_w.optind = optind; + getopt_data_w.opterr = opterr; + result = _getopt_internal_r_w (argc, argv, optstring, longopts,longind, long_only, &getopt_data_w,posixly_correct); + optind = getopt_data_w.optind; + optarg_w = getopt_data_w.optarg; + optopt = getopt_data_w.optopt; + return result; +} +int getopt_w (int argc, wchar_t *const *argv, const wchar_t *optstring) _GETOPT_THROW +{ + return _getopt_internal_w (argc, argv, optstring, (const struct option_w *) 0, (int *) 0, 0, 0); +} +int getopt_long_w (int argc, wchar_t *const *argv, const wchar_t *options, const struct option_w *long_options, int *opt_index) _GETOPT_THROW +{ + return _getopt_internal_w (argc, argv, options, long_options, opt_index, 0, 0); +} +int getopt_long_only_w (int argc, wchar_t *const *argv, const wchar_t *options, const struct option_w *long_options, int *opt_index) _GETOPT_THROW +{ + return _getopt_internal_w (argc, argv, options, long_options, opt_index, 1, 0); +} +int _getopt_long_r_w (int argc, wchar_t *const *argv, const wchar_t *options, const struct option_w *long_options, int *opt_index, struct _getopt_data_w *d) +{ + return _getopt_internal_r_w (argc, argv, options, long_options, opt_index,0, d, 0); +} +int _getopt_long_only_r_w (int argc, wchar_t *const *argv, const wchar_t *options, const struct option_w *long_options, int *opt_index, struct _getopt_data_w *d) +{ + return _getopt_internal_r_w (argc, argv, options, long_options, opt_index, 1, d, 0); +} \ No newline at end of file diff --git a/wkexe/getopt.h b/wkexe/getopt.h new file mode 100644 index 00000000..3360934f --- /dev/null +++ b/wkexe/getopt.h @@ -0,0 +1,136 @@ +/* Getopt for Microsoft C +This code is a modification of the Free Software Foundation, Inc. +Getopt library for parsing command line argument the purpose was +to provide a Microsoft Visual C friendly derivative. This code +provides functionality for both Unicode and Multibyte builds. + +Date: 02/03/2011 - Ludvik Jerabek - Initial Release +Version: 1.0 +Comment: Supports getopt, getopt_long, and getopt_long_only +and POSIXLY_CORRECT environment flag +License: LGPL + +Revisions: + +02/03/2011 - Ludvik Jerabek - Initial Release +02/20/2011 - Ludvik Jerabek - Fixed compiler warnings at Level 4 +07/05/2011 - Ludvik Jerabek - Added no_argument, required_argument, optional_argument defs +08/03/2011 - Ludvik Jerabek - Fixed non-argument runtime bug which caused runtime exception +08/09/2011 - Ludvik Jerabek - Added code to export functions for DLL and LIB +02/15/2012 - Ludvik Jerabek - Fixed _GETOPT_THROW definition missing in implementation file +08/01/2012 - Ludvik Jerabek - Created separate functions for char and wchar_t characters so single dll can do both unicode and ansi +10/15/2012 - Ludvik Jerabek - Modified to match latest GNU features +06/19/2015 - Ludvik Jerabek - Fixed maximum option limitation caused by option_a (255) and option_w (65535) structure val variable + +**DISCLAIMER** +THIS MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING, BUT Not LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, OR NON-INFRINGEMENT. SOME JURISDICTIONS DO NOT ALLOW THE +EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT +APPLY TO YOU. IN NO EVENT WILL I BE LIABLE TO ANY PARTY FOR ANY +DIRECT, INDIRECT, SPECIAL OR OTHER CONSEQUENTIAL DAMAGES FOR ANY +USE OF THIS MATERIAL INCLUDING, WITHOUT LIMITATION, ANY LOST +PROFITS, BUSINESS INTERRUPTION, LOSS OF PROGRAMS OR OTHER DATA ON +YOUR INFORMATION HANDLING SYSTEM OR OTHERWISE, EVEN If WE ARE +EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +*/ +#ifndef __GETOPT_H_ + #define __GETOPT_H_ + + #ifdef _GETOPT_API + #undef _GETOPT_API + #endif + + #if defined(EXPORTS_GETOPT) && defined(STATIC_GETOPT) + #error "The preprocessor definitions of EXPORTS_GETOPT and STATIC_GETOPT can only be used individually" + #elif defined(STATIC_GETOPT) + #pragma message("Warning static builds of getopt violate the Lesser GNU Public License") + #define _GETOPT_API + #elif defined(EXPORTS_GETOPT) + #pragma message("Exporting getopt library") + #define _GETOPT_API __declspec(dllexport) + #else + #pragma message("Importing getopt library") + #define _GETOPT_API __declspec(dllimport) + #endif + + // Change behavior for C\C++ + #ifdef __cplusplus + #define _BEGIN_EXTERN_C extern "C" { + #define _END_EXTERN_C } + #define _GETOPT_THROW throw() + #else + #define _BEGIN_EXTERN_C + #define _END_EXTERN_C + #define _GETOPT_THROW + #endif + + // Standard GNU options + #define null_argument 0 /*Argument Null*/ + #define no_argument 0 /*Argument Switch Only*/ + #define required_argument 1 /*Argument Required*/ + #define optional_argument 2 /*Argument Optional*/ + + // Shorter Options + #define ARG_NULL 0 /*Argument Null*/ + #define ARG_NONE 0 /*Argument Switch Only*/ + #define ARG_REQ 1 /*Argument Required*/ + #define ARG_OPT 2 /*Argument Optional*/ + + #include + #include + +_BEGIN_EXTERN_C + + extern _GETOPT_API int optind; + extern _GETOPT_API int opterr; + extern _GETOPT_API int optopt; + + // Ansi + struct option_a + { + const char* name; + int has_arg; + int *flag; + int val; + }; + extern _GETOPT_API char *optarg_a; + extern _GETOPT_API int getopt_a(int argc, char *const *argv, const char *optstring) _GETOPT_THROW; + extern _GETOPT_API int getopt_long_a(int argc, char *const *argv, const char *options, const struct option_a *long_options, int *opt_index) _GETOPT_THROW; + extern _GETOPT_API int getopt_long_only_a(int argc, char *const *argv, const char *options, const struct option_a *long_options, int *opt_index) _GETOPT_THROW; + + // Unicode + struct option_w + { + const wchar_t* name; + int has_arg; + int *flag; + int val; + }; + extern _GETOPT_API wchar_t *optarg_w; + extern _GETOPT_API int getopt_w(int argc, wchar_t *const *argv, const wchar_t *optstring) _GETOPT_THROW; + extern _GETOPT_API int getopt_long_w(int argc, wchar_t *const *argv, const wchar_t *options, const struct option_w *long_options, int *opt_index) _GETOPT_THROW; + extern _GETOPT_API int getopt_long_only_w(int argc, wchar_t *const *argv, const wchar_t *options, const struct option_w *long_options, int *opt_index) _GETOPT_THROW; + +_END_EXTERN_C + + #undef _BEGIN_EXTERN_C + #undef _END_EXTERN_C + #undef _GETOPT_THROW + #undef _GETOPT_API + + #ifdef _UNICODE + #define getopt getopt_w + #define getopt_long getopt_long_w + #define getopt_long_only getopt_long_only_w + #define option option_w + #define optarg optarg_w + #else + #define getopt getopt_a + #define getopt_long getopt_long_a + #define getopt_long_only getopt_long_only_a + #define option option_a + #define optarg optarg_a + #endif +#endif // __GETOPT_H_ diff --git a/wkexe/main.c b/wkexe/main.c new file mode 100644 index 00000000..6ff0800a --- /dev/null +++ b/wkexe/main.c @@ -0,0 +1,10 @@ + +#include "app.h" + + +int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) +{ + Application app; + RunApplication(&app); + return 0; +} diff --git a/wkexe/path.c b/wkexe/path.c new file mode 100644 index 00000000..b9ae125e --- /dev/null +++ b/wkexe/path.c @@ -0,0 +1,119 @@ + +#include "path.h" +#include + + +#include +#pragma comment(lib, "shell32.lib") + +#include +#pragma comment(lib, "shlwapi.lib") + + +#pragma warning(disable:4996) //'xxxxx': This function or variable may be unsafe. Consider using xxxxxx_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + + +LPCWSTR GetWorkingDirectory(LPWSTR buffer, size_t bufferSize) +{ + GetCurrentDirectoryW(bufferSize, buffer); + wcscat(buffer, L"\\"); + return buffer; +} + +LPCWSTR GetWorkingPath(LPWSTR buffer, size_t bufferSize, LPCWSTR relatedPath) +{ + WCHAR dir[MAX_PATH + 1] = { 0 }; + GetWorkingDirectory(dir, MAX_PATH); + _snwprintf(buffer, bufferSize, L"%s%s", dir, relatedPath); + return buffer; +} + +LPCWSTR FormatWorkingPath(LPWSTR buffer, size_t bufferSize, LPCWSTR fmt, ...) +{ + WCHAR relatedPath[MAX_PATH + 1] = { 0 }; + va_list args; + va_start(args, fmt); + _vsnwprintf(relatedPath, MAX_PATH, fmt, args); + va_end(args); + + return GetWorkingPath(buffer, bufferSize, relatedPath); +} + +LPCWSTR GetProgramDirectory(LPWSTR buffer, size_t bufferSize) +{ + DWORD i = GetModuleFileNameW(NULL, buffer, bufferSize); + + -- i; + while (buffer[i] != '\\' && i != 0) + -- i; + + buffer[i+1] = 0; + return buffer; +} + +LPCWSTR GetProgramPath(LPWSTR buffer, size_t bufferSize, LPCWSTR relatedPath) +{ + WCHAR dir[MAX_PATH + 1] = { 0 }; + GetProgramDirectory(dir, MAX_PATH); + _snwprintf(buffer, bufferSize, L"%s%s", dir, relatedPath); + return buffer; +} + +LPCWSTR FormatProgramPath(LPWSTR buffer, size_t bufferSize, LPCWSTR fmt, ...) +{ + WCHAR relatedPath[MAX_PATH + 1] = { 0 }; + va_list args; + va_start(args, fmt); + _vsnwprintf(relatedPath, MAX_PATH, fmt, args); + va_end(args); + + return GetProgramPath(buffer, bufferSize, relatedPath); +} + + +LPWSTR FixupHtmlFilePath(LPWSTR path) +{ + WCHAR fullPath[MAX_PATH + 1] = { 0 }; + LPWSTR fullUrl = NULL; + + do + { + if (path) + { + GetWorkingPath(fullPath, MAX_PATH, path); + if (PathFileExistsW(fullPath)) + break; + + GetProgramPath(fullPath, MAX_PATH, path); + if (PathFileExistsW(fullPath)) + break; + } + + GetWorkingPath(fullPath, MAX_PATH, L"main.html"); + if (PathFileExistsW(fullPath)) + break; + + GetWorkingPath(fullPath, MAX_PATH, L"wkexe.html"); + if (PathFileExistsW(fullPath)) + break; + + GetProgramPath(fullPath, MAX_PATH, L"index.html"); + if (PathFileExistsW(fullPath)) + break; + + GetProgramPath(fullPath, MAX_PATH, L"main.html"); + if (PathFileExistsW(fullPath)) + break; + + GetProgramPath(fullPath, MAX_PATH, L"wkexe.html"); + if (PathFileExistsW(fullPath)) + break; + + return path; + } + while (0); + + fullUrl = (WCHAR*)malloc(sizeof(WCHAR) * (MAX_PATH + 1 + 10)); + _snwprintf(fullUrl, MAX_PATH + 1 + 10, L"file:///%s", fullPath); + return fullUrl; +} \ No newline at end of file diff --git a/wkexe/path.h b/wkexe/path.h new file mode 100644 index 00000000..54747edd --- /dev/null +++ b/wkexe/path.h @@ -0,0 +1,18 @@ +#ifndef WKEXE_PATH_H +#define WKEXE_PATH_H + +#include +#include + + +LPCWSTR GetWorkingDirectory(LPWSTR buffer, size_t bufferSize); +LPCWSTR GetWorkingPath(LPWSTR buffer, size_t bufferSize, LPCWSTR relatedPath); +LPCWSTR FormatWorkingPath(LPWSTR buffer, size_t bufferSize, LPCWSTR fmt, ...); + +LPCWSTR GetProgramDirectory(LPWSTR buffer, size_t bufferSize); +LPCWSTR GetProgramPath(LPWSTR buffer, size_t bufferSize, LPCWSTR relatedPath); +LPCWSTR FormatProgramPath(LPWSTR buffer, size_t bufferSize, LPCWSTR fmt, ...); + +LPWSTR FixupHtmlFilePath(LPWSTR path); + +#endif//#ifndef WKEXE_PATH_H \ No newline at end of file