gecko

Gecko API for DOM

房东的猫 提交于 2019-12-07 07:25:39
问题 Does Gecko expose an API for working directly with its DOM? I'm looking for a class like HtmlElement that can be used to build/traverse trees of HTML content. I'm trying to host Gecko as a web browser control in a desktop application, and would prefer a direct API rather than going through COM. Thanks! 回答1: Yes, virtually all of the classes relating to the DOM are exposed through XPCOM. In fact, I believe the entire functionality of Gecko is exposed this way. 回答2: greyfade: whilst your answer

How do I embed Gecko using gecko-sharp on Mono/Windows?

南笙酒味 提交于 2019-12-07 03:01:44
问题 Gecko is the rendering engine for Firefox. Using gecko-sharp it is possible to embed it to any Mono/GTK# program. There is a sample application called GladeSharpBrowser for doing this. I could manage to build it using a modified project file, but it is crashing. This sould help you reproduce the problem: I have used SharpDevelop 3.0 and a tutorial to set it up with my Mono 2.2 installation. I have made sure it calls Mono's gmcs for compilation using ProcMon. After setting up SharpDevelop, the

Typed Arrays in Gecko 2: Float32Array concatenation and expansion

感情迁移 提交于 2019-12-06 18:23:04
问题 I'm a bit confused with Javascript Typed Arrays. What I have are several Float32Array s, that have no concat method. I don't know how many are them in advance, btw. I'd like to concatenate them all inside another Float32Array, but: as I said before, there is no concatenation method if I try to write past the array length, the array is not expanded (aka this won't work - please note that event.frameBuffer and buffer are both Float32Array and that I don't know what the final length of my buffer

Using GeckoWebBrowser (v45.0.34.0) in a VB.NET project

早过忘川 提交于 2019-12-06 13:49:19
I am trying to make GeckoWebBrowser (version 45.0.34.0) control to work into my VB.NET project with no luck!!! Here is the steps I follow... 1. I do right click on my project into Solution Explorer list and then Manage NuGet Packages . 2. I find and install Geckofx45. 3. Then I go into my Project's properties , into Compile tab and I change Target CPU to x86 . 4. I Rebuild my project. 5. Then I add GeckoWebBrowser control into my Toolbox by selecting the Geckofx-Winforms.dll file from ...\packages\Geckofx45.45.0.34\lib\net45 folder. 6. I add a GeckoWebBrowser control into my form and just for

highlight the text of the DOM range element,

痴心易碎 提交于 2019-12-06 10:21:49
问题 I am able to highlight the text on the HTML page(rendered through gtkmozembed), which is selected, like below. var range, sel; if (window.getSelection) { sel = window.getSelection(); if (sel.getRangeAt) { range = sel.getRangeAt(0); } document.designMode = "on"; if (range) { sel.removeAllRanges(); sel.addRange(range); } document.execCommand("HiliteColor", false, colour); document.designMode = "off"; } Well,it works very fine.Now i am trying to store the information(startNode, startOffset

Textarea and div padding differences in Firefox

微笑、不失礼 提交于 2019-12-06 08:00:25
I made a fiddle here. http://jsfiddle.net/pmVeR/ The textarea and div render identically in both Safari and Chrome. But in Firefox, there is an extra 2px padding on the right of the textarea , which affects the word wrapping. What's also mysterious is that without white-space: pre-wrap; this extra padding seems to vary depending on the width of the element. I can fix this by detecting FireFox and adding padding-right:2px to my div , but I would like to know if this can be fixed without a browser hack? CSS div, textarea { font-family: Courier; font-size: 14px; margin: 0; padding: 0; outline: 0;

Accessing Firefox cache from an XPCOM component

孤街醉人 提交于 2019-12-06 07:42:15
Does anybody know how to get local path of file cached by Firefox based on its URL from an XPCOM component? To access cached items, new cache session must be created using createSession method provided in nsICacheService . This method creates nsICacheSession object. Information about cache item can be obtained using openCacheEntry method of the session object (method return nsICacheEntryDescriptor ). To read data user must open input stream using openInputStream method of the cache entry object. 来源: https://stackoverflow.com/questions/61453/accessing-firefox-cache-from-an-xpcom-component

Integrate GeckoView in Android

笑着哭i 提交于 2019-12-06 07:01:41
问题 I'm facing problem in file upload in webview in Kitkat(4.4). As per https://code.google.com/p/android/issues/detail?id=62220 it can't be done in 4.4 due to missing method in new version of webview. Hence searched and found GeckoView(https://wiki.mozilla.org/Mobile/GeckoView) as alternative for webview. I followed all steps specified at https://wiki.mozilla.org/Mobile/GeckoView, still project is not running in emulator as well as android device. I tried downloading and importing sample project

网站被攻击怎么办 如何查找网站漏洞攻击源

此生再无相见时 提交于 2019-12-06 06:38:05
很多企业网站被攻击,导致网站打开跳转到别的网站,尤其一些彩票等非法网站上去,甚至有些网站被攻击的打不开,客户无法访问首页,给客户造成了很大的经济损失,很多客户找到我们SINE安全公司寻求防止网站被攻击的解决方案,针对这一情况,我们安全部门的技术,给大家普及一下网站被攻击后该如何查找攻击源以及对检测网站存在的漏洞,防止网站再次被攻击。 网站被黑被攻击后,我们首先要检查的就是对网站的访问日志进行打包压缩,完整的保存下来,根据客户反映的问题时间,被攻击的特征等等方面进行记录,然后一一的对网站日志进行分析,网站的访问日志记录了所有用户对网站的访问记录,以及访问了那些页面,网站出现的错误提示,都可以有利于我们查找攻击源,网站存在的那些漏洞也都可以查找出来,并对网站的漏洞进行修复。 我们就拿前段时间某一个企业客户的网站,进行举例:先看下这个日志记录: 2019-06-03 00:01:18 W3SVC6837 202.85.214.117 GET /Review.aspx class=1&byid=23571 80 - 101.89.239.230 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+SLCC2;+.NE T+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media

gecko框架概述

感情迁移 提交于 2019-12-06 01:41:53
#1 gecko概述 最近在研究metaq消息队列,它里面用到的NIO通信框架是gecko,文档是这么描述的 Gecko是一个Java NIO的通讯组件,它在一个轻量级的NIO框架的基础上提供了更高层次的封装和功能。 支持的RPC调用方式包括RR(request-response)和pipeline。 0 可插拔的协议设计 1 连接池 2 分组管理和负载均衡 3 Failover/Retry 4 重连管理 5 同步和异步调用 本文就按照日常NIO通信框架和RPC所面临的问题来看下gecko是怎么解决和实现的 #2 gecko实现NIO通信框架 ##2.1 NIO类库的使用 像Netty、Mina这种NIO通信框架都是不使用Jdk自带的NIO类库,自己重写NIO类库。而gecko则是使用的是jdk自带的NIO类库,具体的差别,我现在还不太了解 ##2.2 线程模型的选择 先简单描述下NIO形式下的线程模型,具体参考这篇文章 infoq:Netty系列之Netty线程模型 传统BIO模型 比较简单,每来一个连接就创建一个线程来处理。这时候最大线程数就成了连接数的限制。 Reactor单线程模型 使用一个线程,使用Selector来监听连接的建立和连接的读写事件,然后仍然是该线程去完成事件的处理。 Reactor多线程模型 使用一个主线程,该线程的Selector只负责接收连接的建立