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

Unified Diff: components/dom_distiller/core/viewer.cc

Issue 1225183002: Font size in DomDistiller prefs syncs with local scaling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: keep focus when useFontScaling() is called, add tests Created 5 years, 5 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: components/dom_distiller/core/viewer.cc
diff --git a/components/dom_distiller/core/viewer.cc b/components/dom_distiller/core/viewer.cc
index 2e131618e1faa4107cf96bc45142602443a416c6..99d706b7b89c032f03a5276ec2eb6c3c799207a2 100644
--- a/components/dom_distiller/core/viewer.cc
+++ b/components/dom_distiller/core/viewer.cc
@@ -303,6 +303,13 @@ const std::string GetDistilledPageFontFamilyJs(
return "useFontFamily('" + GetJsFontFamily(font_family) + "');";
}
+const std::string GetDistilledPageFontScalingJs(
+ float scaling) {
+ std::stringstream ss;
cjhopman 2015/07/17 20:28:04 maybe: return "useFontScaling(" + base::DoubleToS
wychen 2015/07/31 21:03:37 Done.
+ ss << "useFontScaling(" << scaling << ");";
+ return ss.str();
+}
+
} // namespace viewer
} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698