About hyper link in Mozilla

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

About hyper link in Mozilla

aaroncuilu@gmail.com
Hi

I am a newbe to Mozilla source code. I feel interesting about the code
to make hyper link work in brower. (e.g. when your mouse is over the
link, pointer shape is changed. when you clicked, brower is directed to
another web site.) However I am not familiar with the source code. Does
any one know which part of code is for it?

Thanks.

_______________________________________________
mozilla-layout mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-layout
Reply | Threaded
Open this post in threaded view
|

Re: About hyper link in Mozilla

Christian Biesinger
Hi,

[hidden email] wrote:
> I am a newbe to Mozilla source code. I feel interesting about the code
> to make hyper link work in brower. (e.g. when your mouse is over the
> link, pointer shape is changed.

This part is done in the UA style sheet, not directly in code:
http://lxr.mozilla.org/seamonkey/source/layout/style/ua.css#116

> when you clicked, brower is directed to
> another web site.) However I am not familiar with the source code. Does
> any one know which part of code is for it?

Click handling is done on the content node:
http://lxr.mozilla.org/seamonkey/source/content/html/content/src/nsHTMLAnchorElement.cpp#283
calls
http://lxr.mozilla.org/seamonkey/source/content/html/content/src/nsGenericHTMLElement.cpp#1446
which eventually calls
http://lxr.mozilla.org/seamonkey/source/content/base/src/nsGenericElement.cpp#3779
etc

As that's all in content/ this is more of a DOM question than a layout
one...

-biesi
_______________________________________________
mozilla-layout mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-layout