Chromium Code Reviews| Index: Source/core/html/ImageDocument.cpp |
| diff --git a/Source/core/html/ImageDocument.cpp b/Source/core/html/ImageDocument.cpp |
| index f20e8d50eaffbd36cf4e5f78c6bed9eb545bdeee..569353cec8fc9a9b869ccdace1b0a44825905c3c 100644 |
| --- a/Source/core/html/ImageDocument.cpp |
| +++ b/Source/core/html/ImageDocument.cpp |
| @@ -264,12 +264,12 @@ void ImageDocument::imageClicked(int x, int y) |
| updateLayout(); |
| - float scale = this->scale(); |
| + double scale = this->scale(); |
| - int scrollX = static_cast<int>(x / scale - (float)frame()->view()->width() / 2); |
| - int scrollY = static_cast<int>(y / scale - (float)frame()->view()->height() / 2); |
| + double scrollX = x / scale - (double)frame()->view()->width() / 2; |
|
eae
2014/10/08 16:19:36
Use c++ style static_cast please
Yufeng Shen (Slow to review)
2014/10/08 18:12:08
Done.
|
| + double scrollY = y / scale - (double)frame()->view()->height() / 2; |
| - frame()->view()->setScrollPosition(IntPoint(scrollX, scrollY)); |
| + frame()->view()->setScrollPosition(DoublePoint(scrollX, scrollY)); |
| } |
| } |