On Jun 9, 12:27 am, "L. David Baron" <[EMAIL PROTECTED]> wrote: > On Sunday 2008-06-08 22:19 -0700, [EMAIL PROTECTED] wrote: > > > > > I am reading the 'Key Data Structures' slide from: > >http://www.mozilla.org/newlayout/doc/gecko-overview.htm > > > I am trying to find what is the attribute in Frame which points to > > 'View'? > > > I have read, > >http://lxr.mozilla.org/mozilla1.8.0/source/layout/generic/nsIFrame.h > >http://lxr.mozilla.org/mozilla1.8.0/source/layout/xul/base/src/nsBox.h > >http://lxr.mozilla.org/mozilla1.8.0/source/layout/generic/nsFrame.h > > > But I don't see nsFrame or its parent class (nsBox, nsIFrame) which > > has an attribute to 'View'. > > > Can you please tell me where is the attribute in Framae which links to > > View? > > See at the implementation of the GetView method in nsFrame.cpp on > mozilla-central:http://hg.mozilla.org/mozilla-central/index.cgi/file/377f2910d180/lay... > or the equivalent on the 1.8.0 > branch:http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/generic/n... > > (They're pretty much the same, and either answers your question.) > > -David > > -- > L. David Baron http://dbaron.org/ > Mozilla Corporation http://www.mozilla.com/
I looks like the SetView() of nsFrame will eventually calls PresContext()->PropertyTable()->SetProperty()... It seems to me it is the PresContext() owns the view. And yet, from http://www.mozilla.org/newlayout/doc/gecko-overview.htm it said View is owned by Frame. So can you please tell me which owns the View? PresContext() or Frame()? And how many Views are there per html Document? 1 for the whole document? 5748 nsresult 5749 nsIFrame::SetProperty(nsIAtom* aPropName, 5750 void* aPropValue, 5751 NSPropertyDtorFunc aPropDtorFunc, 5752 void* aDtorData) 5753 { 5754 return PresContext()->PropertyTable()-> 5755 SetProperty(this, aPropName, aPropValue, aPropDtorFunc, aDtorData); 5756 } Thank you. _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

