Finding the relevant part of the code

I noticed that the options menu that appear when we right click, differ depending on which area we are right-clicking on. When we right click on a text field (including password text field), the options that pop up are different with when we right click on other area, such as image. So, I think I’ll have to find the relevant part of code that handles the displaying of options according to the area.  I have been exploring the browser using DOMinspector.  Thanks to a clear and helpful guide from Gary.

I tried to inspect the options by right clicking on the password text field. Here is what I get:

Apparently, the part that is highlighted is an HTML element with ID: pass. I think this might be helpful in future, as I can use the element ID to check whether the right click is on a password field. Next, I will need to find the XUL element for the options. I noticed that whenever I right click on the password field, the right click options would not appear, instead the box is highlighted and the same HTML element is inspected. Tried several times, and finally I could get the options to appear. The correct way of doing is to left click on the content of the password field and then right click to display the options. Another left click will inspect the menu.


An interesting keyword that I have noticed is the ‘contentAreaContextMenu’. I searched for the documentation for this word in the Mozilla’s developer website and I found several articles related to what I need to do for my project. Have been reading on these documentations for the past few days. I will start on hooking the extra option this week. Hopefully, I can get it done by the end of this week or next week. Next, I will need to find, read and understand the part of code that handles the storing of password. Haven’t started on this one yet, so if anyone has any idea, please feel free to share with me.

Advertisements

3 Responses to “Finding the relevant part of the code”

  1. dhumphrey Says:

    Really awesome to see you making forward motion here. Keep going, this is good stuff.

    Dave

  2. Gary Kwong Says:

    > Next, I will need to find, read and understand the part of code that handles the storing of password. Haven’t started on this one yet, so if anyone has any idea, please feel free to share with me.

    These might be in Toolkit -> Password Manager of the bugzilla component. i.e. the toolkit directory, possibly. That’s about the only clue I have. 🙂

  3. Moinopeance Says:

    Fantastic, I didn’t heard about that up to the present. Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: