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

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

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/PrintContext.h ('k') | Source/core/page/scrolling/ScrollingCoordinator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PrintContext.cpp
diff --git a/Source/core/page/PrintContext.cpp b/Source/core/page/PrintContext.cpp
index c25100e9fc1198515afc1874df3c9fb006cc33dd..3cbcb53fbbdb20e0e38749abdf5529e22860bbf7 100644
--- a/Source/core/page/PrintContext.cpp
+++ b/Source/core/page/PrintContext.cpp
@@ -171,24 +171,6 @@ void PrintContext::begin(float width, float height)
m_frame->setPrinting(true, minLayoutSize, originalPageSize, printingMaximumShrinkFactor / printingMinimumShrinkFactor);
}
-float PrintContext::computeAutomaticScaleFactor(const FloatSize& availablePaperSize)
-{
- if (!m_frame->view())
- return 1;
-
- bool useViewWidth = true;
- if (m_frame->document() && m_frame->document()->renderView())
- useViewWidth = m_frame->document()->renderView()->style()->isHorizontalWritingMode();
-
- float viewLogicalWidth = useViewWidth ? m_frame->view()->contentsWidth() : m_frame->view()->contentsHeight();
- if (viewLogicalWidth < 1)
- return 1;
-
- float maxShrinkToFitScaleFactor = 1 / printingMaximumShrinkFactor;
- float shrinkToFitScaleFactor = (useViewWidth ? availablePaperSize.width() : availablePaperSize.height()) / viewLogicalWidth;
- return max(maxShrinkToFitScaleFactor, shrinkToFitScaleFactor);
-}
-
void PrintContext::spoolPage(GraphicsContext& ctx, int pageNumber, float width)
{
// FIXME: Not correct for vertical text.
@@ -205,16 +187,6 @@ void PrintContext::spoolPage(GraphicsContext& ctx, int pageNumber, float width)
ctx.restore();
}
-void PrintContext::spoolRect(GraphicsContext& ctx, const IntRect& rect)
-{
- // FIXME: Not correct for vertical text.
- ctx.save();
- ctx.translate(-rect.x(), -rect.y());
- ctx.clip(rect);
- m_frame->view()->paintContents(&ctx, rect);
- ctx.restore();
-}
-
void PrintContext::end()
{
ASSERT(m_isPrinting);
« no previous file with comments | « Source/core/page/PrintContext.h ('k') | Source/core/page/scrolling/ScrollingCoordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698