OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "web/DevToolsEmulator.h" | 5 #include "web/DevToolsEmulator.h" |
6 | 6 |
7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
9 #include "core/frame/VisualViewport.h" | 9 #include "core/frame/VisualViewport.h" |
10 #include "core/input/EventHandler.h" | 10 #include "core/input/EventHandler.h" |
11 #include "core/page/Page.h" | 11 #include "core/page/Page.h" |
12 #include "core/style/ComputedStyle.h" | 12 #include "core/style/ComputedStyle.h" |
13 #include "platform/RuntimeEnabledFeatures.h" | 13 #include "platform/RuntimeEnabledFeatures.h" |
14 #include "platform/geometry/FloatRect.h" | 14 #include "platform/geometry/FloatRect.h" |
15 #include "platform/geometry/FloatSize.h" | 15 #include "platform/geometry/FloatSize.h" |
16 #include "platform/geometry/IntRect.h" | 16 #include "platform/geometry/IntRect.h" |
17 #include "platform/geometry/IntSize.h" | 17 #include "platform/geometry/IntSize.h" |
18 #include "platform/loader/fetch/MemoryCache.h" | 18 #include "platform/loader/fetch/MemoryCache.h" |
| 19 #include "platform/wtf/PtrUtil.h" |
19 #include "public/platform/WebLayerTreeView.h" | 20 #include "public/platform/WebLayerTreeView.h" |
20 #include "web/WebInputEventConversion.h" | 21 #include "web/WebInputEventConversion.h" |
21 #include "web/WebLocalFrameImpl.h" | 22 #include "web/WebLocalFrameImpl.h" |
22 #include "web/WebSettingsImpl.h" | 23 #include "web/WebSettingsImpl.h" |
23 #include "web/WebViewImpl.h" | 24 #include "web/WebViewImpl.h" |
24 #include "wtf/PtrUtil.h" | |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 static float calculateDeviceScaleAdjustment(int width, | 28 static float calculateDeviceScaleAdjustment(int width, |
29 int height, | 29 int height, |
30 float deviceScaleFactor) { | 30 float deviceScaleFactor) { |
31 // Chromium on Android uses a device scale adjustment for fonts used in text | 31 // Chromium on Android uses a device scale adjustment for fonts used in text |
32 // autosizing for improved legibility. This function computes this adjusted | 32 // autosizing for improved legibility. This function computes this adjusted |
33 // value for text autosizing. | 33 // value for text autosizing. |
34 // For a description of the Android device scale adjustment algorithm, see: | 34 // For a description of the Android device scale adjustment algorithm, see: |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 m_lastPinchAnchorCss.reset(); | 530 m_lastPinchAnchorCss.reset(); |
531 m_lastPinchAnchorDip.reset(); | 531 m_lastPinchAnchorDip.reset(); |
532 } | 532 } |
533 return true; | 533 return true; |
534 } | 534 } |
535 | 535 |
536 return false; | 536 return false; |
537 } | 537 } |
538 | 538 |
539 } // namespace blink | 539 } // namespace blink |
OLD | NEW |