[webkit-reviews] review granted: [Bug 21647] RenderStyle should inherit from RefCounted : [Attachment 24435] Patch #4

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 16 15:56:44 PDT 2008

Adam Roben (aroben) <aroben at apple.com> has granted Dave Hyatt
<hyatt at apple.com>'s request for review:
Bug 21647: RenderStyle should inherit from RefCounted

Attachment 24435: Patch #4

------- Additional Comments from Adam Roben (aroben) <aroben at apple.com>
 379	 // The pseudo element style can be cached or uncached.  Use the cached
method if the pseudo element doesn't respect
 380	 // any pseudo classes (and therefore has no concept of changing
 381	 RenderStyle* getCachedPseudoStyle(RenderStyle::PseudoId, RenderStyle*
parentStyle = 0) const;
 382	 PassRefPtr<RenderStyle> getUncachedPseudoStyle(RenderStyle::PseudoId,
RenderStyle* parentStyle = 0) const;

Is it possible to assert that people are calling the right function?

 36 inline RenderStyle* defaultStyle()
3937 {
 38	RenderStyle* s_defaultStyle =
 39	return s_defaultStyle;
4140 }

I think you meant to declare s_defaultStyle static.

142119 RenderStyle::RenderStyle(const RenderStyle& o)
143	 : inherited_flags(o.inherited_flags)
 120	 : RefCounted<RenderStyle>()
 121	 , inherited_flags(o.inherited_flags)

The RefCounted() isn't necessary here.

Were we leaking RenderStyle::pseudoStyle before? I don't see any existing calls
to deref() it.

r=me if you fix the defaultStyle() bug.

More information about the webkit-reviews mailing list