OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.annotation.SuppressLint; | |
7 import android.content.Context; | 8 import android.content.Context; |
8 import android.content.res.Resources; | 9 import android.content.res.Resources; |
9 import android.graphics.Bitmap; | 10 import android.graphics.Bitmap; |
10 import android.graphics.Canvas; | 11 import android.graphics.Canvas; |
11 import android.graphics.Color; | 12 import android.graphics.Color; |
12 import android.graphics.Paint; | 13 import android.graphics.Paint; |
13 import android.graphics.Path; | 14 import android.graphics.Path; |
14 import android.graphics.Path.Direction; | 15 import android.graphics.Path.Direction; |
15 import android.graphics.PointF; | 16 import android.graphics.PointF; |
16 import android.graphics.PorterDuff.Mode; | 17 import android.graphics.PorterDuff.Mode; |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
525 return new PointF(x, y); | 526 return new PointF(x, y); |
526 } | 527 } |
527 | 528 |
528 /** | 529 /** |
529 * Returns true if the point is inside the final drawable area for this popu p zoomer. | 530 * Returns true if the point is inside the final drawable area for this popu p zoomer. |
530 */ | 531 */ |
531 private boolean isTouchOutsideArea(float x, float y) { | 532 private boolean isTouchOutsideArea(float x, float y) { |
532 return !mClipRect.contains(x, y); | 533 return !mClipRect.contains(x, y); |
533 } | 534 } |
534 | 535 |
536 @SuppressLint("ClickableViewAccessibility") | |
aurimas (slooooooooow)
2014/08/12 02:47:55
This actually does not fix the bug, just adds a su
| |
535 @Override | 537 @Override |
536 public boolean onTouchEvent(MotionEvent event) { | 538 public boolean onTouchEvent(MotionEvent event) { |
537 mGestureDetector.onTouchEvent(event); | 539 mGestureDetector.onTouchEvent(event); |
538 return true; | 540 return true; |
539 } | 541 } |
540 | 542 |
541 private static class ReverseInterpolator implements Interpolator { | 543 private static class ReverseInterpolator implements Interpolator { |
542 private final Interpolator mInterpolator; | 544 private final Interpolator mInterpolator; |
543 | 545 |
544 public ReverseInterpolator(Interpolator i) { | 546 public ReverseInterpolator(Interpolator i) { |
545 mInterpolator = i; | 547 mInterpolator = i; |
546 } | 548 } |
547 | 549 |
548 @Override | 550 @Override |
549 public float getInterpolation(float input) { | 551 public float getInterpolation(float input) { |
550 input = 1.0f - input; | 552 input = 1.0f - input; |
551 if (mInterpolator == null) return input; | 553 if (mInterpolator == null) return input; |
552 return mInterpolator.getInterpolation(input); | 554 return mInterpolator.getInterpolation(input); |
553 } | 555 } |
554 } | 556 } |
555 } | 557 } |
OLD | NEW |