WebKit
zjjzcgao
浏览器开发
展开
-
WebKit JS extension (2)
How to add a global function in JS?1. DOMWindow.h void test();2. DOMWindow.cpp void test() { runTest(); }3. Implement runTest in the following files: Chrome.h(.cpp) ChromeClient.h WebChromeClient.h(.cpp) WebInspectorDelegate.原创 2011-05-11 12:47:00 · 1335 阅读 · 5 评论 -
编译WebKit
要想了解WebKit,首先需要找到它的源代码。这个比较简单,因为我们可以通过http://www.webkit.org/找到每天的WebKit的版本,当然你也可以通过SVN checkout自己想要的版本,可以保证的是这些版本99%都能编译通过,除了个别的commit会有例外,比原创 2011-10-05 12:32:21 · 1264 阅读 · 0 评论 -
WebKit中字符串操作总结
1. BSTR to String BSTR resultBSTR; String result; result = String(resultBSTR, SysStringLen(resultBSTR)); SysFreeString(resultBSTR); // Inside WebKit String result = toString(原创 2011-05-11 13:07:00 · 1298 阅读 · 0 评论 -
编译V8
编译V8整体说来还是比较简单的,按照http://code.google.com/p/v8/上的instructions一步一步没有太大问题。这里记录一下具体的步骤:1. 安装SVN2. 安装python,最好是2.4以上版本3. 安装scons.4. 验证上面三个是否成功:svn --versionpython -Vscons --version如果有一个没有成功原创 2011-11-23 20:16:33 · 2480 阅读 · 0 评论 -
WebKit编译之cairo
今天把WebKit的最新代码下下来编了一个cairo版,有一些注意事项需要注意:1. python的版本不能低于2.5,最好是2.6以上。一开始我是用2.4,编译出错。2. cairo的依赖文件通过以下命令得到:update-webkit --wincairo3. 有几个文件编码有问题,好在只是一些字符串,把乱码改掉就好了4. 用VS2005打开,选择cairo编译项DONE.原创 2011-11-05 15:41:28 · 2820 阅读 · 1 评论 -
WebKit实现Chrome插件
这几天一直忙着在WebKit中实现Chrome的Extension。首先从标准来说还是完全遵循Chrome extension的标准,当然包括manifest.json文件的解析。接下来的任务分两块:1. 插件service:提供一些接口供调用者操作插件,如插入插件、禁用插件、启用插件等。2. 插件的管理:如何加载插件到application,调用插件service的接口实现插件管原创 2011-11-05 15:48:12 · 1152 阅读 · 1 评论 -
话说localStorage的实现
Chrome实现localStorage与WebKit实现的方式差异很大,但是到了最底层数据库的存储还是走到了一起。如果只是通过WebKit实现localStorage的话需要做一些具体的工作:1. 首先让webview实例知道localStorage存储的具体位置,这个位置在WebKit based的浏览器中是默认在%AppData%\Local\Apple Computer\W原创 2011-12-09 20:57:53 · 2900 阅读 · 2 评论 -
WebKit中RefPtr和PassRefPtr的使用
简单的说,RefPtr变量被赋值时,引用计数加1,当这个变量赋值给其他变量时,引用计数减1。PassRefPtr和RefPtr一样,被赋值和赋值给其他变量时,引用计数会发生变化。除此之外,当PassRefPtr变量赋值给另外一个PassRefPtr或者RefPtr变量时,其本身的计数器将会变成0。所以赋值一般用这种形式:static RefPtr g_oneRingToRuleTh原创 2012-02-15 11:05:29 · 1137 阅读 · 0 评论 -
WebKit的第三方库之CFLite
整个WebKit工程包括了很多的第三方库,其中一个是OpenCFLite。OpenCFLite是一种便携式版本的苹果公司的开源CoreFoundation框架。(这句话拷贝自网络。)那么CoreFoundation又是什么呢?CoreFoundation的目的是提供基原创 2011-10-05 13:36:10 · 2565 阅读 · 0 评论 -
如何让页面监测Iframe页面的状态?
不知道这个应用有多少场合会用到呢?反正我们目前需要这样的需求。目前通过javascript似乎没法监测子页面的状态,虽然HTML5给IFrame加了一个contentDocument,但是仍然无法通过这个对象将子页面的状态返回给父页面的js来监测。于是乎,原创 2011-10-13 19:31:19 · 2304 阅读 · 0 评论 -
WebKit Drag & Drop
1. DragDestination dragDestinationActionMaskForDraggingInfo : WebKit asks for the dragging types which are allowed by client willPerformDragDestinationAction : WebKit allows clients to handle this action first. However in my mind, this interface shou原创 2011-05-11 11:51:00 · 728 阅读 · 0 评论 -
libcurl in WebKit
<br /><script><br />document.cookie="test=a";<br /></script><br /> <br />In WebKit, this kind of cookies can't be send to server. Let's analysis the reason:<br /> <br />In WebKit, this kind of cookie will be parsed by JS engine, and then store to libcurl C原创 2011-05-14 00:25:00 · 656 阅读 · 0 评论 -
WebKit and offlineCache
Refer to http://www.w3.org/TR/html5/offline.html to see the spec for HTML5 offline application cache.1. Write a normal html file with js files and css files2. Change to 3. write a file named "test.manifest" as following:CACHE MANIFEST# v0.1test.html# Stan原创 2011-05-18 15:44:00 · 955 阅读 · 1 评论 -
How to integration google_breakpad to WebKit
<br />1. Copy google_breakpad from chromium<br />2. Change some compile options:<br /> Standard Windows Libraries<br /> Remove all DEBUG options<br /> Runtime Library to /MD<br />3. DONE原创 2011-04-18 19:35:00 · 612 阅读 · 0 评论 -
WebKit JS callback functions(3)
In JSC, we can implement an JS function easily, however it may be hard for us to implement an JS function with one or more callback functions, like: window.ourOwnFunction("param1", "param2", funct原创 2011-06-09 15:32:00 · 1314 阅读 · 4 评论 -
Extern JS DOM in WebKit (1)
How JSDOMWindow.h and JSDOMWindow.cpp generated?One word: it's generated by CodeGeneratorJS.pm.But sometimes you might say that the js object has been defined, but why its related function does not appear in the JSDOMWindow.h file?Then you can modify this原创 2011-04-21 11:04:00 · 944 阅读 · 0 评论 -
WebKit网络连接数
<br />每个host允许最大连接数:6<br />每个host无限制连接数:10000<br /> <br />非http协议最大请求数:20<br /> <br />前提:REQUEST_MANAGEMENT_ENABLED原创 2011-04-25 11:46:00 · 633 阅读 · 0 评论 -
今天追WebKit的一个crash,追了一天也没有出现!
不是不出现,而是时候未到!继续追!原创 2011-10-13 19:23:30 · 547 阅读 · 0 评论 -
CEF一探
之前一直在用WebKit,没有用chromium,一则Chromium太大,二则对于我们而言Chromium实在有点奢侈,于是一直是在WebKit的基础上进行修改优化。于是乎产生了一系列问题,比如cairo库实在效率低,又比如JSC比V8差得还蛮远的。。。最近终于痛下决心把CEF整合了一下,目测效果还是很不错的。原创 2013-03-22 12:49:28 · 1663 阅读 · 3 评论