Recent

Author Topic: Status of Gecko SDK Port  (Read 83373 times)

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Status of Gecko SDK Port
« Reply #30 on: November 16, 2009, 01:15:05 am »
I've committed the ported Gecko source to CCR Subversion and created a wiki page:

http://wiki.lazarus.freepascal.org/GeckoPort

Thanks.

-Phil

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Status of Gecko SDK Port
« Reply #31 on: December 01, 2009, 05:07:38 am »
I've expanded the GeckoPort wiki topic:

http://wiki.lazarus.freepascal.org/GeckoPort

I also committed an updated version of the GeckoPort package:

- Replaced BrowseWin sample app with ChromeWin app that works better since it implements all required interfaces.

- Several changes to GeckoChromeWindow.pas

- Now assumes new ObjC-based Cocoa widgetset instead of old PasCocoa-based Cocoa widgetset. The new widgetset does not work as well with Gecko as the old widgetset did (nothing displayed in ChromeWin window), but it's the future so GeckoPort is now using it even though it's very new.

Note that several Linux users have confirmed that an exception is raised in libmozjs.so when libxul.so's XRE_InitEmbedding function is called from nsXRE.pas. If anyone has any ideas on what's wrong, please post them here.

Thanks.

-Phil

troops

  • Newbie
  • Posts: 4
Re: Status of Gecko SDK Port
« Reply #32 on: January 08, 2010, 03:42:00 pm »
Dear sir,

How implement a OnBeforeNavigate and OnDocumentCompete at this excellent component ? :)
And similar function activeElement :o)

I'm try migration ie to gecko ;)

(sorry for my english i'am french)

thanks!
« Last Edit: January 08, 2010, 03:44:38 pm by troops »

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Status of Gecko SDK Port
« Reply #33 on: January 08, 2010, 04:20:48 pm »
I don't know what those are.

Maybe you could take a look at TGeckoBrowserListener.OnStateChange?

Thanks.

-Phil

troops

  • Newbie
  • Posts: 4
Re: Status of Gecko SDK Port
« Reply #34 on: January 08, 2010, 04:35:06 pm »
Hi Phil, thanks for reply,

I tried to use OnStateChange, but this event is not accessible from the component TGeckoBrowser (I use the SVN version and makes regular updates). Are you a example ?

Just as I had not found a method GeckoBrowser.Stop/Abort
« Last Edit: January 08, 2010, 04:37:30 pm by troops »

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Status of Gecko SDK Port
« Reply #35 on: January 08, 2010, 08:23:46 pm »
Sorry, you're beyond my understanding of this. You'll probably need to spend some time with the ported source.

Thanks.

-Phil

troops

  • Newbie
  • Posts: 4
Re: Status of Gecko SDK Port
« Reply #36 on: January 12, 2010, 08:42:23 pm »
Hi

I'm create a SVN in Sourceforge with my modifications.

https://geckobrowser.svn.sourceforge.net/svnroot/geckobrowser

If you want i can update your SVN (or not...)

- LoadURI (about:blank) by default. If not necessary add LoadURI onShow of Tform.

Add events:

OnDocumentBegin
OnDocumentComplete
OnDocumentUnload
OnDOMBlur
OnDOMInputChanged
OnDOMInputFocus
OnPageShow


Add Property's:
Popupmenu;
Stop;
StopAll;
StopNetwork;

January, 12 2010

Add Property Links in TGeckoBrowser
---------------------------------------------------
Count            -> Count links in page
Href[index]         -> Return HREF link by Index
AnchorText[index]    -> Return AnchorText of Link by Index (include HTML)
Element[index]      -> Return XPCOM nsIDOMHTMLAnchorElement by Index.


Add Property Forms in TGeckoBrowser
---------------------------------------------------
Count                  -> Count forms in page
GetFormControlCount       -> Return Count control by form Index (Include INPUT, TEXTAREA, SELECT)
Values[fIndex, iIndex]      -> Return ou write Value of control iIndex to form fIndex
Names[fIndex, iIndex]      -> Return Name of control iIndex to form fIndex (readonly)


Add Property's
---------------------------------------------------
AllowImages: Boolean      -> Enabled/Disabled Images in Browser (Read and write)
AllowJavascript: Boolean   -> Enabled/Disabled Javascript in Browser (Read and write)
AllowPlugins: Boolean      -> Enabled/Disabled Plugins in Browser (Read and write)
AllowSubFrames: Boolean      -> Enabled/Disabled Subframes in Browser document. (Read and write)
« Last Edit: January 12, 2010, 08:47:50 pm by troops »

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Status of Gecko SDK Port
« Reply #37 on: January 12, 2010, 08:46:42 pm »
Maybe once you've reached a point where you think you've added most of what you want changed, we can look at merging them into the Lazarus CCR. It appears that you're using Delphi so just remember that changes need to be FPC / Lazarus compatible.

Also, normally you don't post compiled files like .dcu to a Subversion site.

Thanks.

-Phil


Hi

I'm create a SVN in Sourceforge with my modifications.

https://geckobrowser.svn.sourceforge.net/svnroot/geckobrowser

If you want i can update your SVN (or not...)

Add events:

OnDocumentBegin
OnDocumentComplete
OnDocumentUnload
OnDOMBlur
OnDOMInputChanged
OnDOMInputFocus
OnPageShow


Add Property's:
Popupmenu;
Stop;
StopAll;
StopNetwork;

January, 12 2010

Add Property Links in TGeckoBrowser
---------------------------------------------------
Count            -> Count links in page
Href[index]         -> Return HREF link by Index
AnchorText[index]    -> Return AnchorText of Link by Index (include HTML)
Element[index]      -> Return XPCOM nsIDOMHTMLAnchorElement by Index.


Add Property Forms in TGeckoBrowser
---------------------------------------------------
Count                  -> Count forms in page
GetFormControlCount       -> Return Count control by form Index (Include INPUT, TEXTAREA, SELECT)
Values[fIndex, iIndex]      -> Return ou write Value of control iIndex to form fIndex
Names[fIndex, iIndex]      -> Return Name of control iIndex to form fIndex (readonly)


Add Property's
---------------------------------------------------
AllowImages: Boolean      -> Enabled/Disabled Images in Browser (Read and write)
AllowJavascript: Boolean   -> Enabled/Disabled Javascript in Browser (Read and write)
AllowPlugins: Boolean      -> Enabled/Disabled Plugins in Browser (Read and write)
AllowSubFrames: Boolean      -> Enabled/Disabled Subframes in Browser document. (Read and write)

troops

  • Newbie
  • Posts: 4
Re: Status of Gecko SDK Port
« Reply #38 on: January 12, 2010, 08:49:31 pm »
I think it is compatible with Lazarus. (oups... for DCU Files)

vrode

  • Newbie
  • Posts: 5
Re: Status of Gecko SDK Port
« Reply #39 on: January 13, 2010, 10:49:54 am »
On WindowsXP with FireFox 3.0 i have error on init GeckoBrowser.
I had add code in unit nsInit
function GRE_GetGREPathWithProperties and now all OK.
Code: [Select]
var
  LenS: DWORD;   
  S, sValue: AnsiString; 
...

...
  sValue := 'SOFTWARE\Mozilla\Mozilla Firefox';
  if RegOpenKeyEx(HKEY_LOCAL_MACHINE, PAnsiChar(sValue), 0,
                  KEY_QUERY_VALUE, hRegKey) = ERROR_SUCCESS then
  begin
    SetLength(S, buflen);
    LenS := buflen;
    ok := RegQueryValueExA(hRegKey, PAnsiChar('CurrentVersion'), nil, nil,
        @S[1], @LenS) = ERROR_SUCCESS;
    RegCloseKey(hRegKey);
    if ok then
      begin
        S := PAnsiChar(S);
        sValue := sValue + '\' + S + '\Main';
        LenS := buflen;
        ok := (RegOpenKeyEx(HKEY_LOCAL_MACHINE, PAnsiChar(sValue), 0,
                  KEY_QUERY_VALUE, hRegKey) = ERROR_SUCCESS) and
              (RegQueryValueExA(hRegKey, PAnsiChar('Install Directory'), nil, nil,
                  PByte(buf), @LenS) = ERROR_SUCCESS);
        RegCloseKey(hRegKey);
        if ok then
          begin
            NS_StrLCat(Buf, '\xpcom.dll', BufLen);
            Result := NS_OK;
            Exit;
          end;
      end;
  end;

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Status of Gecko SDK Port
« Reply #40 on: January 13, 2010, 06:42:18 pm »
Thanks. Where did you insert that code in GRE_GetGREPathWithProperties?

The original code I ported did not work with the current version of Firefox, hence why I hardwired the location if the function failed.

In my testing it seems like it stopped working with my Firefox DLL's following a point upgrade, but I haven't tested with the latest point upgrade. What version of Firefox are you using?

If you're planning to distribute an app that uses your user's Firefox DLL's, that might be risky if what I observed is true. By distributing your own xulrunner DLL's below your app, everyone will be using a version that you tested and is known to work correctly.

Thanks.

-Phil

vrode

  • Newbie
  • Posts: 5
Re: Status of Gecko SDK Port
« Reply #41 on: January 13, 2010, 07:35:58 pm »
I insert the code in the end of function before last line
Code: [Select]
Result := NS_ERROR_FAILURE;
Firefox version 3.0.
Now update to 3.5.7 and my app run OK.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Status of Gecko SDK Port
« Reply #42 on: January 13, 2010, 07:59:37 pm »
If I have time, I'll test here and maybe introduce your changes in the SVN version, although I might check first to see if xulrunner is installed below the app and, if not, then use your approach to use the installed Firefox .dll's. That way if somebody wants to use a local copy of xulrunner, they don't have to change the code to prevent it from using Firefox dll's.

Also, maybe I'll introduce some of the new events and properties (see above).

We haven't been able to get this to work on Linux or OS X yet, so Gecko SDK is not real useful to me yet.

Thanks.

-Phil

cd

  • Jr. Member
  • **
  • Posts: 54
Re: Status of Gecko SDK Port
« Reply #43 on: January 19, 2010, 03:19:34 pm »
I get a RunError(229) at line
1709 baseWin.Repaint(True);   
of GeckoBrowser while trying to run GBrowser app.
Can anyone tell what this means?

I also failed to run ChromeWin with the same error.

xulrunner is a subfolder of SampleApp folder.

cd

  • Jr. Member
  • **
  • Posts: 54
Re: Status of Gecko SDK Port
« Reply #44 on: February 12, 2010, 11:14:30 am »
i still cannot find the reason for this RunError(229)
can anyone help?

 

TinyPortal © 2005-2018