| Index: ui/gfx/screen_android.cc
|
| diff --git a/ui/gfx/screen_android.cc b/ui/gfx/screen_android.cc
|
| index 9114b8554537519fb2eec3966cc4c12710b308ab..31e3baaeea5bf4c77677dd37e72216857d8e41bb 100644
|
| --- a/ui/gfx/screen_android.cc
|
| +++ b/ui/gfx/screen_android.cc
|
| @@ -33,10 +33,16 @@ class ScreenAndroid : public Screen {
|
| virtual gfx::Display GetPrimaryDisplay() const OVERRIDE {
|
| gfx::DeviceDisplayInfo device_info;
|
| const float device_scale_factor = device_info.GetDIPScale();
|
| + // Note: GetPhysicalDisplayWidth/Height() does not subtract window
|
| + // decorations etc. Use it instead of GetDisplayWidth/Height() when
|
| + // available.
|
| const gfx::Rect bounds_in_pixels =
|
| - gfx::Rect(
|
| - device_info.GetDisplayWidth(),
|
| - device_info.GetDisplayHeight());
|
| + gfx::Rect(device_info.GetPhysicalDisplayWidth()
|
| + ? device_info.GetPhysicalDisplayWidth()
|
| + : device_info.GetDisplayWidth(),
|
| + device_info.GetPhysicalDisplayHeight()
|
| + ? device_info.GetPhysicalDisplayHeight()
|
| + : device_info.GetDisplayHeight());
|
| const gfx::Rect bounds_in_dip =
|
| gfx::Rect(gfx::ToCeiledSize(gfx::ScaleSize(
|
| bounds_in_pixels.size(), 1.0f / device_scale_factor)));
|
|
|