[Webkit-unassigned] [Bug 121822] Move more style change code from RenderObject to RenderElement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 24 04:45:46 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=121822





--- Comment #3 from Antti Koivisto <koivisto at iki.fi>  2013-09-24 04:44:48 PST ---
> This sentence ends right in the middle of

That's because I

> I think you should mark this OVERRIDE, even though it’s "= 0" in the base class. Still useful to get an error if the function signatures don’t match. Like when we change from PassRefPtr to just RefPtr some day, if we do it wrong.

Yeah.

> 
> > Source/WebCore/rendering/RenderElement.h:82
> > +    virtual void styleWillChange(StyleDifference, const RenderStyle*);
> > +    virtual void styleDidChange(StyleDifference, const RenderStyle*);
> 
> If not OVERRIDE then does this still need to be virtual? Do derived classes override this?

Yes, they have overrides.

> Since RenderText objects inherit their style from their parents, isn’t there something even more efficient we can do?

The plan is to move m_style pointer to RenderElement and have RenderText just use the parent style. That will require a few more patches.

> > Source/WebCore/rendering/RenderText.h:154
> > +    virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
> 
> Why is this still virtual, if it’s not an override? Are there classes derived from RenderText that override this?

Surprisingly there are RenderText subclasses and there is an override for this.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list