Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 350 roundToDevicePixelTowardZero(elasticDeltaForTimeDelta(m _startStretch.height(), -m_origVelocity.height(), (float)timeDelta))); | 350 roundToDevicePixelTowardZero(elasticDeltaForTimeDelta(m _startStretch.height(), -m_origVelocity.height(), (float)timeDelta))); |
| 351 | 351 |
| 352 if (fabs(delta.x()) >= 1 || fabs(delta.y()) >= 1) { | 352 if (fabs(delta.x()) >= 1 || fabs(delta.y()) >= 1) { |
| 353 m_client->immediateScrollByWithoutContentEdgeConstraints(FloatSize(d elta.x(), delta.y()) - m_client->stretchAmount()); | 353 m_client->immediateScrollByWithoutContentEdgeConstraints(FloatSize(d elta.x(), delta.y()) - m_client->stretchAmount()); |
| 354 | 354 |
| 355 FloatSize newStretch = m_client->stretchAmount(); | 355 FloatSize newStretch = m_client->stretchAmount(); |
| 356 | 356 |
| 357 m_stretchScrollForce.setWidth(reboundDeltaForElasticDelta(newStretch .width())); | 357 m_stretchScrollForce.setWidth(reboundDeltaForElasticDelta(newStretch .width())); |
| 358 m_stretchScrollForce.setHeight(reboundDeltaForElasticDelta(newStretc h.height())); | 358 m_stretchScrollForce.setHeight(reboundDeltaForElasticDelta(newStretc h.height())); |
| 359 } else { | 359 } else { |
| 360 m_client->immediateScrollBy(m_origOrigin - m_client->absoluteScrollP osition()); | 360 //m_client->adjustScrollPositionToBoundsIfNecessary(); |
|
eseidel
2014/05/29 00:12:20
Commented out code..??
| |
| 361 m_client->immediateScrollBy(m_origOrigin - m_client->absoluteScrollPosition()); | |
|
eseidel
2014/05/29 00:12:20
Bad indent??
| |
| 361 | 362 |
| 362 stopSnapRubberbandTimer(); | 363 stopSnapRubberbandTimer(); |
| 363 m_stretchScrollForce = FloatSize(); | 364 m_stretchScrollForce = FloatSize(); |
| 364 m_startTime = 0; | 365 m_startTime = 0; |
| 365 m_startStretch = FloatSize(); | 366 m_startStretch = FloatSize(); |
| 366 m_origOrigin = FloatPoint(); | 367 m_origOrigin = FloatPoint(); |
| 367 m_origVelocity = FloatSize(); | 368 m_origVelocity = FloatSize(); |
| 368 } | 369 } |
| 369 } else { | 370 } else { |
| 370 m_startTime = [NSDate timeIntervalSinceReferenceDate]; | 371 m_startTime = [NSDate timeIntervalSinceReferenceDate]; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 419 return m_client->shouldRubberBandInDirection(ScrollLeft); | 420 return m_client->shouldRubberBandInDirection(ScrollLeft); |
| 420 if (wheelEvent.deltaX() < 0) | 421 if (wheelEvent.deltaX() < 0) |
| 421 return m_client->shouldRubberBandInDirection(ScrollRight); | 422 return m_client->shouldRubberBandInDirection(ScrollRight); |
| 422 | 423 |
| 423 return true; | 424 return true; |
| 424 } | 425 } |
| 425 | 426 |
| 426 } // namespace WebCore | 427 } // namespace WebCore |
| 427 | 428 |
| 428 #endif // USE(RUBBER_BANDING) | 429 #endif // USE(RUBBER_BANDING) |
| OLD | NEW |