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

Unified Diff: components/dom_distiller/core/javascript/dom_distiller_viewer.js

Issue 1130703003: Show template before distiller finishes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-superclass
Patch Set: Fix flaky test Created 5 years, 7 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/javascript/dom_distiller_viewer.js
diff --git a/components/dom_distiller/core/javascript/dom_distiller_viewer.js b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
index 4a80bba65d38d28c1aba4551d05cf11e7e575149..75292a270961ead9a40f27cec80579aade7819fb 100644
--- a/components/dom_distiller/core/javascript/dom_distiller_viewer.js
+++ b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
@@ -49,12 +49,18 @@ function setTitle(title) {
collapse.style.height = "0px";
holder.textContent = title;
+ document.title = title;
var newHeight = Math.max(90, holder.getBoundingClientRect().height);
collapse.style.transition = "height 0.2s";
collapse.style.height = newHeight + "px";
}
+// Set the text direction of the document ('ltr', 'rtl', or 'auto').
+function setTextDirection(direction) {
+ document.body.setAttribute('dir', direction);
+}
+
// Maps JS Font Family to CSS class and then changes body class name.
// CSS classes must agree with distilledpage.css.
function useFontFamily(fontFamily) {
« no previous file with comments | « components/dom_distiller/core/html/dom_distiller_viewer.html ('k') | components/dom_distiller/core/test_request_view_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698