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

Side by Side Diff: Source/core/page/PrintContext.h

Issue 241643006: Remove more dead code from core/ folder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/page/FocusController.cpp ('k') | Source/core/page/PrintContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 2 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
3 * Copyright (C) 2007 Apple Inc. 3 * Copyright (C) 2007 Apple Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight, bool allowHorizontalT iling = false); 50 void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight, bool allowHorizontalT iling = false);
51 51
52 // Deprecated. Page size computation is already in this class, clients shoul dn't be copying it. 52 // Deprecated. Page size computation is already in this class, clients shoul dn't be copying it.
53 void computePageRectsWithPageSize(const FloatSize& pageSizeInPixels, bool al lowHorizontalTiling); 53 void computePageRectsWithPageSize(const FloatSize& pageSizeInPixels, bool al lowHorizontalTiling);
54 54
55 // These are only valid after page rects are computed. 55 // These are only valid after page rects are computed.
56 size_t pageCount() const { return m_pageRects.size(); } 56 size_t pageCount() const { return m_pageRects.size(); }
57 const IntRect& pageRect(size_t pageNumber) const { return m_pageRects[pageNu mber]; } 57 const IntRect& pageRect(size_t pageNumber) const { return m_pageRects[pageNu mber]; }
58 const Vector<IntRect>& pageRects() const { return m_pageRects; } 58 const Vector<IntRect>& pageRects() const { return m_pageRects; }
59 59
60 float computeAutomaticScaleFactor(const FloatSize& availablePaperSize);
61
62 // Enter print mode, updating layout for new page size. 60 // Enter print mode, updating layout for new page size.
63 // This function can be called multiple times to apply new print options wit hout going back to screen mode. 61 // This function can be called multiple times to apply new print options wit hout going back to screen mode.
64 void begin(float width, float height = 0); 62 void begin(float width, float height = 0);
65 63
66 // FIXME: eliminate width argument. 64 // FIXME: eliminate width argument.
67 void spoolPage(GraphicsContext& ctx, int pageNumber, float width); 65 void spoolPage(GraphicsContext& ctx, int pageNumber, float width);
68 66
69 void spoolRect(GraphicsContext& ctx, const IntRect&);
70
71 // Return to screen mode. 67 // Return to screen mode.
72 void end(); 68 void end();
73 69
74 // Used by layout tests. 70 // Used by layout tests.
75 static int pageNumberForElement(Element*, const FloatSize& pageSizeInPixels) ; // Returns -1 if page isn't found. 71 static int pageNumberForElement(Element*, const FloatSize& pageSizeInPixels) ; // Returns -1 if page isn't found.
76 static String pageProperty(LocalFrame* frame, const char* propertyName, int pageNumber); 72 static String pageProperty(LocalFrame* frame, const char* propertyName, int pageNumber);
77 static bool isPageBoxVisible(LocalFrame* frame, int pageNumber); 73 static bool isPageBoxVisible(LocalFrame* frame, int pageNumber);
78 static String pageSizeAndMarginsInPixels(LocalFrame* frame, int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int mar ginLeft); 74 static String pageSizeAndMarginsInPixels(LocalFrame* frame, int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int mar ginLeft);
79 static int numberOfPages(LocalFrame*, const FloatSize& pageSizeInPixels); 75 static int numberOfPages(LocalFrame*, const FloatSize& pageSizeInPixels);
80 // Draw all pages into a graphics context with lines which mean page boundar ies. 76 // Draw all pages into a graphics context with lines which mean page boundar ies.
(...skipping 14 matching lines...) Expand all
95 // Used to prevent misuses of begin() and end() (e.g., call end without begi n). 91 // Used to prevent misuses of begin() and end() (e.g., call end without begi n).
96 bool m_isPrinting; 92 bool m_isPrinting;
97 93
98 HashMap<String, Element*> m_linkedDestinations; 94 HashMap<String, Element*> m_linkedDestinations;
99 bool m_linkedDestinationsValid; 95 bool m_linkedDestinationsValid;
100 }; 96 };
101 97
102 } 98 }
103 99
104 #endif 100 #endif
OLDNEW
« no previous file with comments | « Source/core/page/FocusController.cpp ('k') | Source/core/page/PrintContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698