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 ad3e95fd1bf5617693fd450862633c47393ddf10..26e425bccaaec777f383371a9c807a740c03bca1 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -306,7 +306,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 |
+ // 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, relative to the physical 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) { |