IRC Log Viewer » #firebreath » 2011-09-27

IRC Nick Time (GMT-7) Message
Jega 02:09 What is the windows event for browser tab close event. I have WM_CLOSE which fires only when the entire browser closed
pascal 06:09 Hello
I'm having an issue on Mac lion : I just cloned the latest Firebreath version and generated a brand new project (to make sure my code was not getting in the way), and I get compilation errors on PluginEventMacCocoa.mm for that project
the exact error is : /src/PluginAuto/Mac/PluginEventMacCocoa.mm:77: error: no matching function for call to 'FB::MouseDownEvent::MouseDownEvent(FB::MouseButtonEvent::MouseButton, double&, double&)'
that line is :
MouseDownEvent ev(MouseButtonEvent::MouseButton_Left, x, y);
but the constructor that xcode finds has normally 4 args : MouseDownEvent(MouseButton btn, int x, int y, unsigned int state) : MouseButtonEvent(btn, x, y, state) { }
pascal 06:09 (just reconnected from a desktop irc client)
taxilian 10:09 pascal: when you say "latest firebreath version" you're talking about the master branch?
Jega 10:09 taxilian, is there any way the plugin tab closed event captured by the plugin?
taxilian 10:09 you mean other than the shutdown() call on the plugin object?
Jega 10:09 the shutdown is called only when the entire browser is closed
in my case
taxilian 10:09 that is incorrect
shutdown() on your PluginCore object is called when the object tag is shut down
as is the destructor, unless you have a circular reference in your shared_ptrs
Jega 10:09 sorry I am not using firebreath
I used a plugin that comes with sumatraPDF
I wrote some code on NPP_Shutdown
taxilian 10:09 ahh. I see. well, somewhere they have to be handling the NPP_Destroy call, which is made when the object tag destructs
Jega 10:09 but it seems to work only when the entire browser is closed
taxilian 10:09 often that is the case; NP_Shutdown is the module shutdown, not the plugin instance shutdown
NPP_Destroy is the instance shutdown
Jega 10:09 Great. You are God. will looke for the code. if not I will try to implement my own
kylehuff 10:09 it would probably less work in the long-run to just port your plugin over to firebreath...
taxilian 10:09 you can't make your own NPP_Destroy; it has to be connected into the NPPluginFuncs structure
and there will be one somewhere
check the GetEntryPoints entrypoint; that's where the pointer is set
Jega 10:09 perfect.
I am a PHP guy, and this NPAPI project and VC++ completely changed my lifestyle :-(
have to work 18 hours a day to do a simple thing :(
thank you for all your nice work
taxilian 10:09 lol. it may surprise you to know that my first 6 years of professional development were also PHP
and I was working on a javascript SDK when I started doing plugin stuff
I got sick of plugins that didn't interact properly with javascript, decided to fix it
Jega 10:09 ultimately you saved others mysery. it was to difficult for me to do a fullscreen pdf using muPDF
then I decided a project that uses muPDF that has an active npapi plugin
it works well. except the issue I mentioned
great work!. thank you
taxilian 10:09 good luck
Jega 11:09 taxilian: found the NPP_detroy and changed my code from NPP_shutdown to NPP_destroy. now it works fine
thanks for the help
taxilian 11:09 glad I could help
wish all problems people bring to me were that easy to solve ;-)
Jega 11:09 :-)
kylehuff 11:09 okay, so, I've been stepping through DllRegisterServer, and I have a question; at any point is <Bad Ptr> normal? "LpszT" is listed as <Bad Ptr> while evaluating this statement: "LPCTSTR lpszT = OLE2CT_EX(lpszKey, _ATL_SAFE_ALLOCA_DEF_THRESHOLD);"
taxilian 11:09 it'll be a bad pointer until after it's assigned
bad pointer *usually* means (in cases like this) just that the variable hasn't been initialized yet
kylehuff 11:09 ah, okay... I'll keep on keepin' on
taxilian 11:09 thanks, man
kylehuff 11:09 okay, that was just the first time I saw something dark and scary...
taxilian 11:09 if you can track that down, we can releaase 1.6RC2 today
kylehuff 11:09 I'll try, worse case scenario, I can at least provide RDP access to this VM, and someone who knows what they are doing can look at it.
taxilian 11:09 heh. when it comes to what you're troubleshooting, *nobody* knows what they're doing
I'd be doing exactly what you're doing
though the fact that it even gets as far as it has tells us something; it isn't a DLL dependency issue or it wouldn't have even hit the entrypoint
my next guess would be some sort of parse error
kylehuff 11:09 ah, well, if so, I might be able to track that down...
taxilian 11:09 that's my guess
I'm not sure why it'd be a parse error on vs express and not vs full, though
:-/
could be something with the different ATL versions
kylehuff 11:09 okay, I've run accross an return hr; where hr has a value of E_ACCESSDENIED; is this of concern?
taxilian 11:09 hmm. quite possibly; where is it?
kylehuff 11:09 in file atlbase.h, inline HRESULT WINAPI CAtlModule::UpdateRegistryFromResourceS(UINT nResID, BOOL bRegister, struct _ATL_REGMAP_ENTRY* pMapEntries /*= NULL*/) throw()
taxilian 11:09 can you see if you can step into that function?
kylehuff 11:09 I think I need to restart it, I went too far
taxilian 11:09 yeah, that's easy to do
(going to far, that is)
kylehuff 11:09 can I set a break at that method? in atlbase.h?
taxilian 11:09 should be able to
kylehuff 11:09 cool, that will make it faster
omg, I need to shut off this intellisense crap...
taxilian 11:09 in a VM? good idea
kylehuff 11:09 between that and the bloody "Scanning #includes for additional files (2123 of billions)" I don't have any CPU left to even use the stupid thing
kylehuff 12:09 okay, it looks like the E_ACCESSDENIED is happening at line 1492 of statreg.h, which is this line: "if (FAILED(hr = RegisterSubkeys(szToken, keyCur.m_hKey, bRegister, FALSE)))"
taxilian 12:09 hmm… that's weird. there shouldn't be any access denied...
unless… hmm. I have an idea
let me think for a few minutes
kylehuff 13:09 okay, let me know if need to know the value of any of those parameters. I think if nothing else, I could at least provide the value of FALSE... =c )
taxilian 13:09 what is szToken?
and keyCur
kylehuff 13:09 szToken is "123 L'{'"
and keyCur I can't inspect, it just says : "keyCur {m_hKey=0x00000122 pfnDeleteKeyEx=0x00000000 pfnDeleteKey=0x00000000 } ATL::CRegKey"
if I try to expand the m_hKey member, it says Error: expression cannot be evaluated.
taxilian 13:09 can you pastebin the .rgs files from projects/<project>/gen/?
kylehuff 13:09 sure.
here you are taxilian: https://gist.github.com/c0692bff8197b70492ed
taxilian 13:09 any way you can figure out if the m_hKey there is HKCR?
kylehuff 13:09 I can certainly try
kylehuff 13:09 as far as I can tell, m_hKey is always "Error: expression cannot be evaluated". likewise for hKey, and hKeyParent...
taxilian 13:09 szToken is the token from a larger string
can you find the larger string? it's the whole RGS file
kylehuff 13:09 you mean this: szToken 0x001cbb18 "{B415CD14-B45D-4BCA-B552-B06175C38606}" wchar_t *
taxilian 13:09 szToken will keep changing as it goes through
but somewhere there is a variable that points to the beginning of the unprocessed part of the string
kylehuff 13:09 ah, okay. I will add a watch on that var
ugh, I just realized that there is some possibly useful output on the console when it exits.. paste inbound
https://gist.github.com/327fbaf9936758426b72
is that what you are looking for?
taxilian 13:09 hmm. quite possibly
taxilian 13:09 brb
taxilian 14:09 pascal: I just pushed a fix for the build error you were having
FireBreathBot 14:09 Commit 6c76d1a on master by Richard Bateman: "Fixed build error on mac" http://goo.gl/BgHAB
taxilian 14:09 and there it is
FireBreathBot 14:09 Commit fff31b1 on firebreath-1.6 by Kyle L. Huff: "Fixed order of declaration for variable 'result'" http://goo.gl/to4kC
Commit 6c76d1a on firebreath-1.6 by Richard Bateman: "Fixed build error on mac" http://goo.gl/BgHAB
pascal 14:09 taxilian: thanks :)
taxilian 14:09 sorry about that
pascal 14:09 sorry, I went out for the evening
so, thanks for the fix :)
taxilian 14:09 I have been in the middle of merging a bunch of changes and suddenly found a crash in my company's plugin on Lion that I needed to track down
so that problem got overlooked
hopefully RC2 should be out in the next day or two
that's my goal, anyway
pascal 14:09 ok, I was wondering how was this RC going :)
taxilian 14:09 heh. it's actually been going really well
it's pretty much release quality
pascal 14:09 so I'll make sure to check for updates in the next few weeks
taxilian 14:09 but we keep fixing other bugs and I keep not having time to finish things up
pascal 14:09 at least, it's good to hear that you're close
so, by the way, thanks for this great framework
taxilian 14:09 you're welcome. if you find it useful, please try to contribute back in whatever way you are able
pascal 14:09 the portability really works like a dream :)
ok, I'll see to it
I confirm that it solves my issue. Thanks
taxilian 14:09 awesome. thanks for making sure we knew about it
kylehuff 14:09 I see there is some GTK version detection for using the GTK method "gtk_widget_get_window" or not, is that to resolve FIREBREATH-120?
FireBreathBot 14:09 FIREBREATH-120: Summary: Add support for GTK+ 2.12
FIREBREATH-120: Assigned To: richard
FIREBREATH-120: Priority: Major, Status: Open, http://jira.firebreath.org/browse/FIREBREATH-120
taxilian 14:09 yes
kylehuff 14:09 ok, cool. I have no need for it personally, I was just going to look at that if it still needed resolved
FireBreathBot 14:09 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-120 issue resolved by richard "Thanks for the patch!"
dtecta 15:09 I'm trying to build a FireBreath plugin using /MD (Dynamic C runtime) under Visual C++ 9.0. I generated a configuration using prep2008.cmd and then enabled WITH_DYNAMIC_MSVC_RUNTIME using the Cmake GUI. Is that the correct way to do this?
FireBreathBot 16:09 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-130 issue created by chinthuts
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-130 issue commented by richard "I won't have time to do this in the next month or so; if you would like to implement it, pop into..."
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-130 issue updated by richard
taxilian 16:09 welcome
Chinthu 16:09 thanks
Could you please tell me how to get started
or where to start from
taxilian 16:09 okay; first of all, you will need to implement two different solutions; one for IE, one for NPAPI
Chinthu 16:09 ok
taxilian 16:09 so the place to start is to create an API probably on BrowserHost that will do what you want
!findfile NpapiTypes
FireBreathBot 16:09 Found 2 matching file(s) in the master branch. First 2 are:
src/NpapiCore/NpapiTypes.cpp http://goo.gl/YAOrI
src/NpapiCore/NpapiTypes.h http://goo.gl/vhW7d
Chinthu 16:09 ok
taxilian 16:09 then you'll need to implement that API on both NpapiBrowserHost and ActiveXBrowserHost
I've actually discussed this with someone already; go to http://logs.firebreath.org and search for pushpopupsenabledstate
so there are two ways you can do it on NPAPI; both require you to call PushPopupsEnabledState(true) before and then PopPopupsEnabledState after
!find pushpopupsenabledstate
FireBreathBot 16:09 Found 1 possible matches. Displaying 1
/^ NPN_PushPopupsEnabledStateProcPtr pushpopupsenabledstate;$/ (m) found in src/3rdParty/gecko-sdk/includes/npfunctions.h: http://goo.gl/erUxv
taxilian 16:09 hmm.
!findfile npapibrowserhost.cpp
FireBreathBot 16:09 Found 1 matching file(s) in the master branch. First 1 are:
src/NpapiCore/NpapiBrowserHost.cpp http://goo.gl/AMLjZ
taxilian 16:09 there they are: https://github.com/firebreath/FireBreath/blob/master/src/NpapiCore/NpapiBrowserHost.cpp#L523
for IE, you can probably use this: http://msdn.microsoft.com/en-us/library/aa752133(v=vs.85).aspx
Chinthu 16:09 ok, thanks
taxilian 16:09 the simplest would be to create a navigate method (or whatever) and use NPN_GetUrl (GetUrl on NpapiBrowserHost) on NPAPI
then you just provide a URL and a frame name; to open in a new window/tab, just pass _blank
Chinthu 17:09 ok
taxilian 17:09 if you put this all in git on your own fork on github it'll be easy for me to look at your changes and make suggestions to clean things up, as well as to pull your changes in when they are ready so that you don't have to be the sole tester/maintainer
Chinthu 17:09 ok, I will put it in git
taxilian 17:09 cool
keep me posted
!findfile logger
FireBreathBot 17:09 Found 8 matching file(s) in the master branch. First 5 are:
src/PluginAuto/null/NullLogger.cpp http://goo.gl/TDM6C
src/libs/log4cplus/include/log4cplus/logger.h http://goo.gl/fFNnf
src/libs/log4cplus/include/log4cplus/spi/loggerfactory.h http://goo.gl/HJLq0
src/libs/log4cplus/include/log4cplus/spi/loggerimpl.h http://goo.gl/ObZxH
src/libs/log4cplus/include/log4cplus/spi/rootlogger.h http://goo.gl/yN3Qx
taxilian 17:09 !findfile logging.h
FireBreathBot 17:09 Found 1 matching file(s) in the master branch. First 1 are:
src/ScriptingCore/logging.h http://goo.gl/smuEj
taxilian 17:09 !findfile APITypes.h
FireBreathBot 17:09 Found 2 matching file(s) in the master branch. First 2 are:
src/NpapiCore/NpapiTypes.h http://goo.gl/vhW7d
src/ScriptingCore/APITypes.h http://goo.gl/xJCGm
Chinthu 19:09 Hello Mr.Richard
could you please tell me how firebreath is opening web pages
?
taxilian 19:09 Chinthu: sorry, what? I don't understand the question
Chinthu 19:09 when I do ->getDOMDocument()->getElement("location")->setProperty("href", url);
what is happening behind it?
taxilian 19:09 exactly what it looks like
that's the equiv of doing in javascript document.location.href = url
Chinthu 19:09 are you using FB::variant FB::JSFunction::exec( const std::vector<variant>& args ) to execute it
taxilian 19:09 JSFunction?
JSFunction has nothing to do with it
JSObject is what you want to look at
Chinthu 19:09 ohh ok
taxilian 19:09 just look at the code; it's pretty self explanatory
Chinthu 19:09 how do you determine the browser? because I can see the functions isChrome() , isSafari() etc.. but I cannot find any code that is using this
taxilian 19:09 you don't
you use inheritance
!find Window.cpp
FireBreathBot 19:09 Could not find any tags matching Window.cpp
taxilian 19:09 !findfile Window.cpp
FireBreathBot 19:09 Found 3 matching file(s) in the master branch. First 3 are:
src/ActiveXCore/AXDOM/Window.cpp http://goo.gl/B8Ktp
src/PluginCore/Win/WinMessageWindow.cpp http://goo.gl/EsGu6
src/ScriptingCore/DOM/Window.cpp http://goo.gl/LlQeI
taxilian 19:09 One of those two is used for NPAPI, the ActiveX one is used on IE
Chinthu 19:09 ok
taxilian 19:09 you shouldn't need to modify those for what you're doing, however
Chinthu 20:09 now I am not really sure about what to do in BroserHost
taxilian 20:09 BrowserHost itself you just need to add a virtual function
NpapiBrowserHost extends BrowserHost and needs to do the actual work
and ActiveXBrowserHost