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

Unified Diff: Source/core/page/PrintContext.h

Issue 469833003: Cannot preview PDFs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « no previous file | Source/core/page/PrintContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PrintContext.h
diff --git a/Source/core/page/PrintContext.h b/Source/core/page/PrintContext.h
index ea9a3de3f37f7d90fc67868522b50b28b851d058..4e63605d38346bee645fe908301364d026dfd5a0 100644
--- a/Source/core/page/PrintContext.h
+++ b/Source/core/page/PrintContext.h
@@ -48,13 +48,14 @@ public:
// FIXME: This means that CSS page breaks won't be on page boundary if the size is different than what was passed to begin(). That's probably not always desirable.
// FIXME: Header and footer height should be applied before layout, not after.
// FIXME: The printRect argument is only used to determine page aspect ratio, it would be better to pass a FloatSize with page dimensions instead.
- void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight, bool allowHorizontalTiling = false);
+ virtual void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight);
// Deprecated. Page size computation is already in this class, clients shouldn't be copying it.
+ // FIXME: Everyone passes |false| for the second paramer. We should remove the second parameter.
void computePageRectsWithPageSize(const FloatSize& pageSizeInPixels, bool allowHorizontalTiling);
Vitaly Buka (NO REVIEWS) 2014/08/13 21:43:44 virtual, because it's also m_pageRects related an
// These are only valid after page rects are computed.
- size_t pageCount() const { return m_pageRects.size(); }
+ virtual size_t pageCount() const { return m_pageRects.size(); }
const IntRect& pageRect(size_t pageNumber) const { return m_pageRects[pageNumber]; }
Vitaly Buka (NO REVIEWS) 2014/08/13 21:17:42 pageRect maybe called with incorrect pageNumber if
const Vector<IntRect>& pageRects() const { return m_pageRects; }
Vitaly Buka (NO REVIEWS) 2014/08/13 21:17:42 same
abarth-chromium 2014/08/13 21:23:14 That's true. What do you recommend?
Vitaly Buka (NO REVIEWS) 2014/08/13 21:43:44 maybe /*no virtual*/ size_t pageCount() const { r
Vitaly Buka (NO REVIEWS) 2014/08/13 21:53:27 Actually even better to do following all 3 non vir
@@ -63,7 +64,7 @@ public:
void begin(float width, float height = 0);
Vitaly Buka (NO REVIEWS) 2014/08/13 21:17:42 begin should be virtual for consistency
abarth-chromium 2014/08/13 21:23:14 Will do.
// Return to screen mode.
- void end();
+ virtual void end();
// Used by layout tests.
static int pageNumberForElement(Element*, const FloatSize& pageSizeInPixels); // Returns -1 if page isn't found.
« no previous file with comments | « no previous file | Source/core/page/PrintContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698