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

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

Issue 2116283002: Don't let rounding prematurely influence document size when printing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@620456-2
Patch Set: bug 467579 Created 4 years, 5 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) 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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 bool WebLocalFrameImpl::hasCustomPageSizeStyle(int pageIndex) 1319 bool WebLocalFrameImpl::hasCustomPageSizeStyle(int pageIndex)
1320 { 1320 {
1321 return frame()->document()->styleForPage(pageIndex)->getPageSizeType() != PA GE_SIZE_AUTO; 1321 return frame()->document()->styleForPage(pageIndex)->getPageSizeType() != PA GE_SIZE_AUTO;
1322 } 1322 }
1323 1323
1324 bool WebLocalFrameImpl::isPageBoxVisible(int pageIndex) 1324 bool WebLocalFrameImpl::isPageBoxVisible(int pageIndex)
1325 { 1325 {
1326 return frame()->document()->isPageBoxVisible(pageIndex); 1326 return frame()->document()->isPageBoxVisible(pageIndex);
1327 } 1327 }
1328 1328
1329 void WebLocalFrameImpl::pageSizeAndMarginsInPixels(int pageIndex, WebSize& pageS ize, int& marginTop, int& marginRight, int& marginBottom, int& marginLeft) 1329 void WebLocalFrameImpl::pageSizeAndMarginsInPixels(int pageIndex, WebFloatSize& pageSize, int& marginTop, int& marginRight, int& marginBottom, int& marginLeft)
1330 { 1330 {
1331 IntSize size = pageSize; 1331 FloatSize size = pageSize;
1332 frame()->document()->pageSizeAndMarginsInPixels(pageIndex, size, marginTop, marginRight, marginBottom, marginLeft); 1332 frame()->document()->pageSizeAndMarginsInPixels(pageIndex, size, marginTop, marginRight, marginBottom, marginLeft);
1333 pageSize = size; 1333 pageSize = size;
1334 } 1334 }
1335 1335
1336 WebString WebLocalFrameImpl::pageProperty(const WebString& propertyName, int pag eIndex) 1336 WebString WebLocalFrameImpl::pageProperty(const WebString& propertyName, int pag eIndex)
1337 { 1337 {
1338 DCHECK(m_printContext); 1338 DCHECK(m_printContext);
1339 return m_printContext->pageProperty(frame(), propertyName.utf8().data(), pag eIndex); 1339 return m_printContext->pageProperty(frame(), propertyName.utf8().data(), pag eIndex);
1340 } 1340 }
1341 1341
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2143 { 2143 {
2144 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2144 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2145 } 2145 }
2146 2146
2147 void WebLocalFrameImpl::clearActiveFindMatch() 2147 void WebLocalFrameImpl::clearActiveFindMatch()
2148 { 2148 {
2149 ensureTextFinder().clearActiveFindMatch(); 2149 ensureTextFinder().clearActiveFindMatch();
2150 } 2150 }
2151 2151
2152 } // namespace blink 2152 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698