Commit 73c92caf authored by sigbjornf@opera.com's avatar sigbjornf@opera.com

Remove unused ScrollAnimatorNone::PerAxisData constructor argument.

The 'parent' argument is not used, remove it.

This implicitly fixes an incorrect invocation of the constructor from
ScrollAnimatorNoneTest::SavePerAxisData, which following r183583 was
passing in an uninitialized pointer value as argument.

R=mkwst
BUG=

Review URL: https://codereview.chromium.org/648273002

git-svn-id: svn://svn.chromium.org/blink/trunk@183625 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent cc186ed9
......@@ -190,7 +190,7 @@ double ScrollAnimatorNone::PerAxisData::releaseArea(Curve curve, double startT,
return endValue - startValue;
}
ScrollAnimatorNone::PerAxisData::PerAxisData(ScrollAnimatorNone* parent, float* currentPosition, int visibleLength)
ScrollAnimatorNone::PerAxisData::PerAxisData(float* currentPosition, int visibleLength)
: m_currentPosition(currentPosition)
, m_visibleLength(visibleLength)
{
......@@ -365,8 +365,8 @@ void ScrollAnimatorNone::PerAxisData::updateVisibleLength(int visibleLength)
ScrollAnimatorNone::ScrollAnimatorNone(ScrollableArea* scrollableArea)
: ScrollAnimator(scrollableArea)
, m_horizontalData(this, &m_currentPosX, scrollableArea->visibleWidth())
, m_verticalData(this, &m_currentPosY, scrollableArea->visibleHeight())
, m_horizontalData(&m_currentPosX, scrollableArea->visibleWidth())
, m_verticalData(&m_currentPosY, scrollableArea->visibleHeight())
, m_startTime(0)
, m_animationActive(false)
{
......
......@@ -92,7 +92,7 @@ protected:
friend class ::ScrollAnimatorNoneTest;
struct PLATFORM_EXPORT PerAxisData {
PerAxisData(ScrollAnimatorNone* parent, float* currentPos, int visibleLength);
PerAxisData(float* currentPos, int visibleLength);
void reset();
bool updateDataFromParameters(float step, float delta, float scrollableSize, double currentTime, Parameters*);
bool animateScroll(double currentTime);
......
......@@ -184,7 +184,7 @@ class ScrollAnimatorNoneTest : public testing::Test {
public:
struct SavePerAxisData : public ScrollAnimatorNone::PerAxisData {
SavePerAxisData(const ScrollAnimatorNone::PerAxisData& data)
: ScrollAnimatorNone::PerAxisData(m_mockScrollAnimatorNone.get(), 0, 768)
: ScrollAnimatorNone::PerAxisData(0, 768)
, m_mockScrollableArea(true)
, m_mockScrollAnimatorNone(MockScrollAnimatorNone::create(&m_mockScrollableArea))
{
......@@ -221,7 +221,7 @@ public:
virtual void SetUp()
{
m_currentPosition = 100;
m_data = new ScrollAnimatorNone::PerAxisData(m_mockScrollAnimatorNone.get(), &m_currentPosition, 768);
m_data = new ScrollAnimatorNone::PerAxisData(&m_currentPosition, 768);
}
virtual void TearDown()
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment