Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: third_party/WebKit/Source/core/page/PagePopupClient.cpp

Issue 1454613002: Page popups should respect zoom factor of the anchor element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add 1.25 zoom tests Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/page/PagePopupClient.cpp
diff --git a/third_party/WebKit/Source/core/page/PagePopupClient.cpp b/third_party/WebKit/Source/core/page/PagePopupClient.cpp
index a1256de1bf6d36bdc588cf23bc58e17b1d554e59..13aa9eb3c4cf5469380a69dd3164ff814f556e6e 100644
--- a/third_party/WebKit/Source/core/page/PagePopupClient.cpp
+++ b/third_party/WebKit/Source/core/page/PagePopupClient.cpp
@@ -31,11 +31,21 @@
#include "config.h"
#include "core/page/PagePopupClient.h"
+#include "core/dom/NodeComputedStyle.h"
#include "wtf/text/CharacterNames.h"
#include "wtf/text/StringBuilder.h"
namespace blink {
+float PagePopupClient::zoomFactor()
+{
+ if (const ComputedStyle* style = ownerElement().computedStyle())
+ return style->effectiveZoom();
+ if (LocalFrame* frame = ownerElement().document().frame())
+ return frame->pageZoomFactor();
+ return 1;
+}
+
#define addLiteral(literal, data) data->append(literal, sizeof(literal) - 1)
void PagePopupClient::addJavaScriptString(const String& str, SharedBuffer* data)
« no previous file with comments | « third_party/WebKit/Source/core/page/PagePopupClient.h ('k') | third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698