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

Unified Diff: content/renderer/render_widget.h

Issue 7831028: Compute pageScaleFactor on page so that fixed layout page fits width of window. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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: content/renderer/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 3bad78a5d109e9877a1035c282578a14e39d0517..0c2c37aa5aa9275edfcfa0a2c61bdd0bedd82cad 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -246,10 +246,15 @@ class RenderWidget : public IPC::Channel::Listener,
gfx::Rect* location,
gfx::Rect* clip);
+ // Gets the size of the document according to WebKit.
+ virtual gfx::Size GetContentSize();
jam 2011/09/02 17:11:41 what's the point of adding these virtual methods t
Fady Samuel 2011/09/08 23:46:39 Done.
+ virtual float GetPageScaleFactor();
+
// Gets the scroll offset of this widget, if this widget has a notion of
// scroll offset.
virtual gfx::Point GetScrollOffset();
+
jam 2011/09/02 17:11:41 ?
Fady Samuel 2011/09/08 23:46:39 Done.
// Sets the "hidden" state of this widget. All accesses to is_hidden_ should
// use this method so that we can properly inform the RenderThread of our
// state.
@@ -425,6 +430,10 @@ class RenderWidget : public IPC::Channel::Listener,
// Indicates if the next sequence of Char events should be suppressed or not.
bool suppress_next_char_events_;
+ // Whether the page scale factor has been set by the page viewport tag or
+ // user. If not, we may choose to zoom out to fit all the content width.
+ bool page_scale_factor_set_;
+
// Set to true if painting to the window is handled by the accelerated
// compositor.
bool is_accelerated_compositing_active_;

Powered by Google App Engine
This is Rietveld 408576698