Commit 0299de34 authored by mlamouri@chromium.org's avatar mlamouri@chromium.org

Make Display's rotation and WebScreenInfo rotation worke together on Aura.

BUG=162827

Review URL: https://codereview.chromium.org/293033004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277759 0039d316-1c4b-4281-b951-d872f2087c98
parent db2304da
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment