[Webkit-unassigned] [Bug 26278] Patch that make WebCore have a RenderTheme per page
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 15 16:00:53 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=26278
------- Comment #10 from kenneth.christiansen at openbossa.org 2009-06-15 16:00 PDT -------
As classes are inheriting from RenderTheme, I cannot make the ctor and dtor
private in RenderTheme.h, but I can do it in the implementations such as
RenderThemeQt.h.
Another question:
Is this right? or do I need to do a releaseRef or so here.
+ static inline PassRefPtr<RenderTheme> defaultTheme()
+ {
+ return RenderTheme::themeForPage(0);
+ };
Also is this change right?
PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page)
{
if (page)
- return adoptRef(new RenderThemeQt(page));
+ return RenderThemeQt::create(page);
- static RefPtr<RenderTheme> fallback = new RenderThemeQt(0);
- return fallback; // keep the reference of one.
+ static RefPtr<RenderTheme> fallback =
RenderThemeQt::create(0).releaseRef();
+ return fallback;
}
Could you explain me why the code causes a destructor to be run when the
process exits? I would really like to understand how to use the RefPtr's
correctly.
Thanks for your comments!
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list