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

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

Issue 476463002: Fix for plugin printing regression. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Wed 08/13/2014 15:15:15.97 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..04636f255cf9f61debb9befda0d4461569047f1d 100644
--- a/Source/core/page/PrintContext.h
+++ b/Source/core/page/PrintContext.h
@@ -40,7 +40,7 @@ class Node;
class PrintContext : public NoBaseWillBeGarbageCollectedFinalized<PrintContext> {
public:
explicit PrintContext(LocalFrame*);
- ~PrintContext();
+ virtual ~PrintContext();
LocalFrame* frame() const { return m_frame; }
@@ -48,10 +48,11 @@ 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.
- void computePageRectsWithPageSize(const FloatSize& pageSizeInPixels, bool allowHorizontalTiling);
+ // FIXME: Everyone passes |false| for the second paramer. We should remove the second parameter.
+ virtual void computePageRectsWithPageSize(const FloatSize& pageSizeInPixels, bool allowHorizontalTiling);
// These are only valid after page rects are computed.
size_t pageCount() const { return m_pageRects.size(); }
@@ -60,10 +61,10 @@ public:
// Enter print mode, updating layout for new page size.
// This function can be called multiple times to apply new print options without going back to screen mode.
- void begin(float width, float height = 0);
+ virtual void begin(float width, float height = 0);
// 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