[webkit-changes] [38716] trunk
Darin Adler
darin at apple.com
Mon Nov 24 12:02:35 PST 2008
> Modified: trunk/WebCore/rendering/RenderView.h (38715 => 38716)
> --- trunk/WebCore/rendering/RenderView.h 2008-11-24 19:41:02 UTC
> (rev 38715)
> +++ trunk/WebCore/rendering/RenderView.h 2008-11-24 19:58:04 UTC
> (rev 38716)
> @@ -84,7 +84,8 @@
> virtual void absoluteRects(Vector<IntRect>&, int tx, int ty,
> bool topLevel = true);
> virtual void absoluteQuads(Vector<FloatQuad>&, bool topLevel =
> true);
>
> - IntRect selectionRect(bool clipToVisibleContent = true) const;
> + virtual IntRect selectionRect(bool);
> + IntRect selectionBounds(bool clipToVisibleContent = true) const;
>
> void setMaximalOutlineSize(int o) { m_maximalOutlineSize = o; }
> int maximalOutlineSize() const { return m_maximalOutlineSize; }
One other thing you could have done here is to make the inherited
selectionRect private. That way you'd get a compile time error if you
had an actual RenderView* and tried to call selectionRect. I often
make virtual functions private in derived classes if the call doesn't
make sense if you have that derived class pointer. For example, in a
class HTMLInputElement a virtual function named isInputElement()
should be private since you'd want to catch unnecessary virtual
function calls in cases where the object is already known to be an
HTMLInputElement.
-- Darin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-changes/attachments/20081124/eeedcea1/attachment-0001.html>
More information about the webkit-changes
mailing list