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

Unified Diff: Source/core/testing/Internals.cpp

Issue 14408004: Fix incorrect evaluation of resolution media queries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 months 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
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 3a03e64ed227275377c4b2b9bc21f44c891ecf92..0d46f35bacc3fb05479e80e611706eed224f4e21 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1767,6 +1767,17 @@ String Internals::pageSizeAndMarginsInPixels(int pageNumber, int width, int heig
return PrintContext::pageSizeAndMarginsInPixels(frame(), pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft);
}
+void Internals::setDeviceScaleFactor(float scaleFactor, ExceptionCode& ec)
+{
+ Document* document = contextDocument();
+ if (!document || !document->page()) {
+ ec = INVALID_ACCESS_ERR;
+ return;
+ }
+ Page* page = document->page();
+ page->setDeviceScaleFactor(scaleFactor);
johnme 2013/04/29 13:25:45 Shouldn't you restore the original device scale fa
+}
+
void Internals::setPageScaleFactor(float scaleFactor, int x, int y, ExceptionCode& ec)
{
Document* document = contextDocument();
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698