[webkit-changes] [38716] trunk
Simon Fraser
simon.fraser at apple.com
Mon Nov 24 12:31:34 PST 2008
On Nov 24, 2008, at 12:02 PM, Darin Adler wrote:
>> 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.
The case we're more interested in here is someone calling
selectionRect() on a RenderView object through a base class pointer,
but I guess making it private would keep that behavior, and also give
compile-time failure on calls through a RenderView*, so I can do that.
r=you to make RV::selectionRect private?
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-changes/attachments/20081124/1a1ecca0/attachment.html>
More information about the webkit-changes
mailing list