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

Side by Side Diff: third_party/WebKit/Source/core/page/PrintContext.cpp

Issue 2802903002: Move PrintBrowser from SPV2 to SPV1 (Closed)
Patch Set: Only call PrintContext::end() if we are exiting Print mode not PrintBrowser mode Created 3 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
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 27 matching lines...) Expand all
38 // in order to accommodate the widest line. If the page would have to be 38 // in order to accommodate the widest line. If the page would have to be
39 // reduced smaller to make the widest line fit, we just clip instead (this 39 // reduced smaller to make the widest line fit, we just clip instead (this
40 // behavior matches MacIE and Mozilla, at least). 40 // behavior matches MacIE and Mozilla, at least).
41 // TODO(rhogan): Decide if this quirk is still required. 41 // TODO(rhogan): Decide if this quirk is still required.
42 const float printingMaximumShrinkFactor = 2; 42 const float printingMaximumShrinkFactor = 2;
43 43
44 PrintContext::PrintContext(LocalFrame* frame) 44 PrintContext::PrintContext(LocalFrame* frame)
45 : m_frame(frame), m_isPrinting(false), m_linkedDestinationsValid(false) {} 45 : m_frame(frame), m_isPrinting(false), m_linkedDestinationsValid(false) {}
46 46
47 PrintContext::~PrintContext() { 47 PrintContext::~PrintContext() {
48 if (m_isPrinting) 48 if (m_isPrinting && !RuntimeEnabledFeatures::printBrowserEnabled())
pdr. 2017/04/10 00:24:34 Ditto here. I think we should remove the changes t
49 end(); 49 end();
50 } 50 }
51 51
52 void PrintContext::computePageRects(const FloatRect& printRect, 52 void PrintContext::computePageRects(const FloatRect& printRect,
53 float headerHeight, 53 float headerHeight,
54 float footerHeight, 54 float footerHeight,
55 float userScaleFactor, 55 float userScaleFactor,
56 float& outPageHeight) { 56 float& outPageHeight) {
57 m_pageRects.clear(); 57 m_pageRects.clear();
58 outPageHeight = 0; 58 outPageHeight = 0;
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 printContext.computePageRectsWithPageSize(scaledPageSize); 342 printContext.computePageRectsWithPageSize(scaledPageSize);
343 return printContext.pageCount(); 343 return printContext.pageCount();
344 } 344 }
345 345
346 DEFINE_TRACE(PrintContext) { 346 DEFINE_TRACE(PrintContext) {
347 visitor->trace(m_frame); 347 visitor->trace(m_frame);
348 visitor->trace(m_linkedDestinations); 348 visitor->trace(m_linkedDestinations);
349 } 349 }
350 350
351 } // namespace blink 351 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698