From 18f5a136e4ab830a3303c6a6f1d87c7f34eb7fd9 Mon Sep 17 00:00:00 2001 From: paulmeyer Date: Tue, 3 Mar 2015 13:56:20 -0800 Subject: Fix for MIME handler bug. The bug resulted from a previous bugfix (https://codereview.chromium.org/939443002/) that added a conversion from logical to physical units to fix a similar sizing bug with other guestviews. However, MIME handler guests never use logical pixels, so this conversion broke their sizing when they are created in a zoomed embedder. This patch adds a more robust method of checking whether sizes are provided in logical or physical units, and all cases are handled appropriately. BUG=462194 Review URL: https://codereview.chromium.org/972193003 Cr-Commit-Position: refs/heads/master@{#318948} --- extensions/common/guest_view/guest_view_constants.cc | 1 + extensions/common/guest_view/guest_view_constants.h | 1 + 2 files changed, 2 insertions(+) (limited to 'extensions/common/guest_view') diff --git a/extensions/common/guest_view/guest_view_constants.cc b/extensions/common/guest_view/guest_view_constants.cc index 3ce10726..f478c64 100644 --- a/extensions/common/guest_view/guest_view_constants.cc +++ b/extensions/common/guest_view/guest_view_constants.cc @@ -14,6 +14,7 @@ const char kAttributeMinHeight[] = "minheight"; const char kAttributeMinWidth[] = "minwidth"; const char kElementWidth[] = "elementWidth"; const char kElementHeight[] = "elementHeight"; +const char kElementSizeIsLogical[] = "elementSizeIsLogical"; // Events. const char kEventResize[] = "guestViewInternal.onResize"; diff --git a/extensions/common/guest_view/guest_view_constants.h b/extensions/common/guest_view/guest_view_constants.h index f42cab7..16bf023 100644 --- a/extensions/common/guest_view/guest_view_constants.h +++ b/extensions/common/guest_view/guest_view_constants.h @@ -17,6 +17,7 @@ extern const char kAttributeMinHeight[]; extern const char kAttributeMinWidth[]; extern const char kElementWidth[]; extern const char kElementHeight[]; +extern const char kElementSizeIsLogical[]; // Events. extern const char kEventResize[]; -- cgit v1.1