You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: zhouchao <cha...@ut...> - 2009-04-21 13:58:51
|
Dear friends, After the Firefox is updated to 3.08, the lasuli sidebar was broken. I think you will have interests to know the reason: First you need to know how LaSuli highlight fragments. For example, I opened a webpage from our website: http://www.hypertopic.org/test.htm The source code of test.htm: <html> <body> <p>my content example</p> <p><p></p> example my document. </body> </html> Firefox send a GET request to retrieve the test.htm, then parse and render the page, generate a dom tree. When the page is loaded the firefox will raise a "state changed" event, LaSuli catch that event and start to get html file source code. But LaSuli only allowed to get the html code after firefox parsed and rendered. So here is what LaSuli got: <html> <body> <p>my content example</p> <p></p> example my document. </body> </html> (Note: the firefox removed the useless tags, and fixed the errors) Then we select the text (e.g. "my document") on the webpage and click the "highlight it" menu item. LaSuli will got the coordinate (e.g. 52+63) of the selection. Since we use the coordinate to locate the fragments, we're unable to highlight the text by manipulating the dom element. We have to add background color via the html source code. The following codes are the result of LaSuli highlight: <html> <body> <p>my content example</p> <p></p> example <span style="background-color:red">my document</span>. </body> </html> Okay, then we need firefox to display the above highlighted html codes, so LaSuli replace the html codes in the browsing window with the highlighted html codes. Firefox re-parse and re-render the html file. All of those processes work well until firefox 3.08. Firefox 3.08 improved the security, so when the html document in the main windows is replaced, firefox also replaces the URL address to chrome://lasuli/...sidebar.xul. That cause the conflicts with zeotro. After few days' research, I found out that using dom to highlight the text is the only option. Here is what I'm planning to do: To highligh the text (52+63): 1. Get the text content in that coordinate, in our example, that will be "my document". 2. Using firefox's gfind service to locate the dom element in the web page. 3. create a new dom element with background color to replace the founded dom element. The step 2-3, is also used by other hightlight extensions. I believe that will work. I'm sorry for the slow progress, and I will keep you updated. Best regards, Chao |
|
From: zhouchao <cha...@ut...> - 2009-04-21 12:08:04
|
test |