summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authormaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-12 14:03:05 +0000
committermaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-12 14:03:05 +0000
commitb23d4d836691b1d5d4df0797ed703ea21328542f (patch)
tree3a88ae93ebe81b9d73fbfa541594c44d9a62d138 /webkit
parent1a842f967fa5ae7d8bc6cea50d63157bdbc5d010 (diff)
downloadchromium_src-b23d4d836691b1d5d4df0797ed703ea21328542f.zip
chromium_src-b23d4d836691b1d5d4df0797ed703ea21328542f.tar.gz
chromium_src-b23d4d836691b1d5d4df0797ed703ea21328542f.tar.bz2
Revert WebFrameImpl::ComputePageRects() (webkit\glue\webframe_impl.cc)
implementation to rev 9214. The pages_ member of WebFrameImpl must be set properly or printing will fail. Patch contributed by Marshall Greenblatt <magreenblatt@gmail.com> Review url: http://codereview.chromium.org/20222/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9652 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webframe_impl.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 5cf992f..e44bb9c 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -97,7 +97,6 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "markup.h"
#include "Page.h"
#include "PlatformContextSkia.h"
-#include "PrintContext.h"
#include "RenderFrame.h"
#if defined(OS_WIN)
#include "RenderThemeChromiumWin.h"
@@ -1769,13 +1768,10 @@ int WebFrameImpl::ComputePageRects(const gfx::Size& page_size_px) {
// TODO(maruel): Weird. We don't do that.
// Everything is in pixels :(
// pages_ and page_height are actually output parameters.
- WebCore::FloatRect rect(0, 0,
- static_cast<float>(page_size_px.width()),
- static_cast<float>(page_size_px.height()));
- WebCore::PrintContext print_context(frame());
- float page_height;
- print_context.computePageRects(rect, 0, 0, 1.0, page_height);
- return print_context.pageCount();
+ int page_height;
+ WebCore::IntRect rect(0, 0, page_size_px.width(), page_size_px.height());
+ computePageRectsForFrame(frame(), rect, 0, 0, 1.0, pages_, page_height);
+ return pages_.size();
}
void WebFrameImpl::GetPageRect(int page, gfx::Rect* page_size) const {