Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
| index 7670a94ed4d4cd3f3e1da7540485fee25745c399..fbd42edbd84476774c600eaa60ccb66f0f8f109c 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
| @@ -300,7 +300,16 @@ void GetScreenInfoForWindow(WebScreenInfo* results, aura::Window* window) { |
| results->depth = 24; |
| results->depthPerComponent = 8; |
| results->deviceScaleFactor = display.device_scale_factor(); |
| + |
| + // The Display rotation and the WebScreenInfo orientation are not the same |
|
sky
2014/06/16 20:18:42
Are you saying the webkit rotation is relative to
mlamouri (slow - plz ping)
2014/06/16 20:23:27
The value is Blink is the rotation of the renderin
sky
2014/06/16 20:53:02
I got it. Can you clarify here that webscreeninfo
mlamouri (slow - plz ping)
2014/06/16 21:07:29
By the way, WebScreenInfo behaves like that becaus
|
| + // angle. The former is the physical display rotation while the later is the |
| + // rotation required by the content to be shown properly on the screen, in |
| + // other words, the opposite of the rotation as described by Display. |
| results->orientationAngle = display.RotationAsDegree(); |
| + if (results->orientationAngle == 90) |
| + results->orientationAngle = 270; |
| + else if (results->orientationAngle == 270) |
| + results->orientationAngle = 90; |
| } |
| bool PointerEventActivates(const ui::Event& event) { |