| Index: third_party/WebKit/Source/core/page/ChromeClient.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/ChromeClient.cpp b/third_party/WebKit/Source/core/page/ChromeClient.cpp
|
| index 5edee8ddfab1b61a466c3eab240d2344a2979a47..ae5565f2d1f388b9b0ae063946e49cbb16d840a6 100644
|
| --- a/third_party/WebKit/Source/core/page/ChromeClient.cpp
|
| +++ b/third_party/WebKit/Source/core/page/ChromeClient.cpp
|
| @@ -191,4 +191,15 @@ void ChromeClient::print(LocalFrame* frame)
|
| printDelegate(frame);
|
| }
|
|
|
| +float ChromeClient::screenToViewport(float length) const
|
| +{
|
| + // Convert the thickness in the screen (dip) to the viewport by applying
|
| + // the invert of the viewport to screen scale.
|
| + // TODO(oshima): Add native implementation instead of using viewportToScreen.
|
| +
|
| + IntRect inScreen(0, 0, 100, 0);
|
| + inScreen = viewportToScreen(inScreen);
|
| + return length * 100.f / inScreen.width();
|
| +}
|
| +
|
| } // namespace blink
|
|
|