summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/guest_view
diff options
context:
space:
mode:
authorpaulmeyer <paulmeyer@chromium.org>2015-03-03 13:56:20 -0800
committerCommit bot <commit-bot@chromium.org>2015-03-03 21:56:49 +0000
commit18f5a136e4ab830a3303c6a6f1d87c7f34eb7fd9 (patch)
treeb875af97d1c84123c4c808dba776aed8d54a72bc /extensions/renderer/guest_view
parent2b35c8e3046ccd7f3e344b9dc1053acd7dc5f4a9 (diff)
downloadchromium_src-18f5a136e4ab830a3303c6a6f1d87c7f34eb7fd9.zip
chromium_src-18f5a136e4ab830a3303c6a6f1d87c7f34eb7fd9.tar.gz
chromium_src-18f5a136e4ab830a3303c6a6f1d87c7f34eb7fd9.tar.bz2
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}
Diffstat (limited to 'extensions/renderer/guest_view')
-rw-r--r--extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc b/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
index 49dae79..ff18e04 100644
--- a/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
+++ b/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
@@ -11,6 +11,7 @@
#include "content/public/renderer/render_view.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_messages.h"
+#include "extensions/common/guest_view/guest_view_constants.h"
#include "extensions/renderer/guest_view/extensions_guest_view_container.h"
#include "extensions/renderer/script_context.h"
#include "v8/include/v8.h"
@@ -74,6 +75,10 @@ void GuestViewInternalCustomBindings::AttachGuest(
static_cast<base::DictionaryValue*>(params_as_value.release()));
}
+ // Add flag to |params| to indicate that the element size is specified in
+ // logical units.
+ params->SetBoolean(guestview::kElementSizeIsLogical, true);
+
linked_ptr<ExtensionsGuestViewContainer::Request> request(
new ExtensionsGuestViewContainer::AttachRequest(
guest_view_container,