Bug 98064 - ScrollView::setScrollPosition is overridden by FrameView, but is not virtual
Summary: ScrollView::setScrollPosition is overridden by FrameView, but is not virtual
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 97287
  Show dependency treegraph
 
Reported: 2012-10-01 13:54 PDT by Tim Horton
Modified: 2012-10-02 09:46 PDT (History)
3 users (show)

See Also:


Attachments
patch (2.39 KB, patch)
2012-10-01 13:58 PDT, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2012-10-01 13:54:26 PDT
This results in some functions (scrollBy) using ScrollView's implementation, and others (scrollTo) using FrameView's, and leads to a lot of confusion/brokenness.
Comment 1 Tim Horton 2012-10-01 13:58:48 PDT
Created attachment 166536 [details]
patch
Comment 2 Tim Horton 2012-10-01 23:20:53 PDT
Thanks!

http://trac.webkit.org/changeset/130123
Comment 3 Darin Adler 2012-10-02 09:20:58 PDT
Comment on attachment 166536 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=166536&action=review

> Source/WebCore/platform/ScrollView.h:187
> +    virtual void setScrollPosition(const IntPoint&);

I recommend using the OVERRIDE macro in cases like this.
Comment 4 Tim Horton 2012-10-02 09:46:17 PDT
(In reply to comment #3)
> (From update of attachment 166536 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=166536&action=review
> 
> > Source/WebCore/platform/ScrollView.h:187
> > +    virtual void setScrollPosition(const IntPoint&);
> 
> I recommend using the OVERRIDE macro in cases like this.

Hi, Darin!

I did, on FrameView (the overriding subclass). I don't think it belongs on ScrollView since ScrollView is originating setScrollPosition, right?