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

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

Issue 14643011: Reset page scale factor to 1.0 on navigation to a new page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revise, add test. 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
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index ee84fbfc31be8ffef88fe548329f7aeb731d54f6..3c1a2109311d4d3d010f904ab868376a4a17fc93 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1780,6 +1780,16 @@ void Internals::setPageScaleFactor(float scaleFactor, int x, int y, ExceptionCod
page->setPageScaleFactor(scaleFactor, IntPoint(x, y));
}
+float Internals::pageScaleFactor(ExceptionCode& ec)
+{
+ Document* document = contextDocument();
+ if (!document || !document->page()) {
+ ec = INVALID_ACCESS_ERR;
+ return 1;
+ }
+ return document->page()->pageScaleFactor();
+}
+
void Internals::webkitWillEnterFullScreenForElement(Document* document, Element* element)
{
if (!document)

Powered by Google App Engine
This is Rietveld 408576698