Open Bug 890500 Opened 13 years ago Updated 3 years ago

Gecko SDK- Link properties not getting honoured

Categories

(Core :: General, defect)

2.0 Branch
x86
macOS
defect

Tracking

()

UNCONFIRMED

People

(Reporter: bhargava.animesh29, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36 Steps to reproduce: I am using gecko SDK to embed firefox within my desktop (WIN & MAC) application. I am able to display my web content correctly inside my embedded browser , only the links on web pages are being shown in black and are not underlined. Following are the properties in greprefs.js . pref("browser.anchor_color", "#0000EE"); pref("browser.active_color", "#EE0000"); pref("browser.visited_color", "#551A8B"); pref("browser.underline_anchors", true); No matter what value i change in the file for these properties , the changes are not propagated . Because of this user is not able to distinguish between normal text and links. Also nothing happens on mouse hovering , ideally the mouse cursor should have changed into hand. Please help in resolving this, i am unable to proceed as to how to fix this. Thanks Actual results: No change in link properties even after editing properties file. Also the default values are also not getting picked. Links should be displayed as blue and underline by default. Expected results: Links are appearing as black and not underlined.
Is your docshell chrome or content? All those preferences only apply to content docshells.
I am not sure what type it is. I think it's chrome since i have modified chrome-manifest to include JS components. Is there a way i can figure it out? I had a existing code which used gecko sdk 1.9 . I upgraded it to gecko SDK and found out this issue. How to i resolve the issue if docshell is chrome ? I'll try to find out the exact type of docshell used.
> Is there a way i can figure it out? Check what nsIDocShellTreeItem.itemType returns for your docshell? > How to i resolve the issue if docshell is chrome ? Set it to be a content docshell instead.
I used following piece of code in opening web page and open URL functions : PRInt32 itemType; nsCOMPtr<nsIDocShellTreeItem> shellType(do_QueryInterface(myWebBrowser)); shellType->GetItemType(&itemType); Both time itemType was 2 (typeContentWrapper). Am i missing something here? Please suggest what to do next. thanks
The next step is probably stepping through PresShell::SetPreferenceStyleRules and seeing what happens in it.
I added following lines while opening web page nsIPresShell* PresShell=GetPresShell(); PresShell::SetPreferenceStyleRules(); but i get following error Internal string headers are not available from external-linkage code. If i define MOZILLA_INTERNAL_API in preprocessor definition then i get #error nsStringAPI.h is only usable from non-MOZILLA_INTERNAL_API code! I am not sure how to proceed on this. Any input shall be really helpful. thanks
No, I meant you attach a debugger to the process and see what happens when Gecko itself calls SetPreferenceStyleRules.
There is only single instance of SetPreferenceStyleRules in nsIPresShell.h which is virtual definition virtual NS_HIDDEN_(nsresult) SetPreferenceStyleRules (PRBool aForceReflow)=0;
Yes, but it has an implementation in PresShell, which is what you want to step through.
I dont see any PresShell. Could you please tell me where to look specifically in gecko SDK. Thanks
It's in layout/base/nsPresShell.cpp. If your Gecko has debug symbols, you should be ale to breakpoint on PresShell::SetPreferenceStyleRules. If it doesn't, you need one with debug symbols.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.