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

Side by Side Diff: Source/web/WebLocalFrameImpl.cpp

Issue 379793002: [Blink] Support NumCopies print preset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebPluginContainerImpl.h » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 bool WebLocalFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node) 1312 bool WebLocalFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node)
1313 { 1313 {
1314 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFr omFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer()); 1314 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFr omFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer());
1315 1315
1316 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint()) 1316 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint())
1317 return false; 1317 return false;
1318 1318
1319 return pluginContainer->isPrintScalingDisabled(); 1319 return pluginContainer->isPrintScalingDisabled();
1320 } 1320 }
1321 1321
1322 int WebLocalFrameImpl::getPrintCopiesForPlugin(const WebNode& node)
1323 {
1324 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFro mFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer());
1325
1326 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint())
1327 return 1;
1328
1329 return pluginContainer->getCopiesToPrint();
1330 }
1331
1322 bool WebLocalFrameImpl::hasCustomPageSizeStyle(int pageIndex) 1332 bool WebLocalFrameImpl::hasCustomPageSizeStyle(int pageIndex)
1323 { 1333 {
1324 return frame()->document()->styleForPage(pageIndex)->pageSizeType() != PAGE_ SIZE_AUTO; 1334 return frame()->document()->styleForPage(pageIndex)->pageSizeType() != PAGE_ SIZE_AUTO;
1325 } 1335 }
1326 1336
1327 bool WebLocalFrameImpl::isPageBoxVisible(int pageIndex) 1337 bool WebLocalFrameImpl::isPageBoxVisible(int pageIndex)
1328 { 1338 {
1329 return frame()->document()->isPageBoxVisible(pageIndex); 1339 return frame()->document()->isPageBoxVisible(pageIndex);
1330 } 1340 }
1331 1341
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 1869
1860 void WebLocalFrameImpl::invalidateAll() const 1870 void WebLocalFrameImpl::invalidateAll() const
1861 { 1871 {
1862 ASSERT(frame() && frame()->view()); 1872 ASSERT(frame() && frame()->view());
1863 FrameView* view = frame()->view(); 1873 FrameView* view = frame()->view();
1864 view->invalidateRect(view->frameRect()); 1874 view->invalidateRect(view->frameRect());
1865 invalidateScrollbar(); 1875 invalidateScrollbar();
1866 } 1876 }
1867 1877
1868 } // namespace blink 1878 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698