| Index: public/web/WebDeviceEmulationParams.h
|
| diff --git a/public/web/WebDeviceEmulationParams.h b/public/web/WebDeviceEmulationParams.h
|
| index a55872ba8482621572a53deccb060fdd5f165cdb..c1e8f4ca842e2a4edacfe7949092d9ca2acdaf37 100644
|
| --- a/public/web/WebDeviceEmulationParams.h
|
| +++ b/public/web/WebDeviceEmulationParams.h
|
| @@ -6,6 +6,7 @@
|
| #define WebDeviceEmulationParams_h
|
|
|
| #include "../platform/WebFloatPoint.h"
|
| +#include "../platform/WebPoint.h"
|
| #include "../platform/WebRect.h"
|
| #include "../platform/WebSize.h"
|
|
|
| @@ -13,7 +14,7 @@ namespace blink {
|
|
|
| // All sizes are measured in device independent pixels.
|
| struct WebDeviceEmulationParams {
|
| - // For mobile, screen has the same size as view, which is positioned at (0;0).
|
| + // For mobile, |screenSize| and |viewPosition| are used.
|
| // For desktop, screen size and view position are preserved.
|
| enum ScreenPosition {
|
| Desktop,
|
| @@ -23,6 +24,12 @@ struct WebDeviceEmulationParams {
|
|
|
| ScreenPosition screenPosition;
|
|
|
| + // Emulated screen size. Used with |screenPosition == Mobile|.
|
| + WebSize screenSize;
|
| +
|
| + // Position of view on the screen. Used with |screenPosition == Mobile|.
|
| + WebPoint viewPosition;
|
| +
|
| // If zero, the original device scale factor is preserved.
|
| float deviceScaleFactor;
|
|
|
| @@ -47,7 +54,7 @@ struct WebDeviceEmulationParams {
|
|
|
| inline bool operator==(const WebDeviceEmulationParams& a, const WebDeviceEmulationParams& b)
|
| {
|
| - return a.screenPosition == b.screenPosition && a.deviceScaleFactor == b.deviceScaleFactor && a.viewSize == b.viewSize && a.fitToView == b.fitToView && a.offset == b.offset && a.scale == b.scale;
|
| + return a.screenPosition == b.screenPosition && a.screenSize == b.screenSize && a.viewPosition == b.viewPosition && a.deviceScaleFactor == b.deviceScaleFactor && a.viewSize == b.viewSize && a.fitToView == b.fitToView && a.offset == b.offset && a.scale == b.scale;
|
| }
|
|
|
| inline bool operator!=(const WebDeviceEmulationParams& a, const WebDeviceEmulationParams& b)
|
|
|