summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/webframe_impl.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 7d382dd..7df51c5 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -97,6 +97,7 @@ 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"
@@ -1767,10 +1768,13 @@ 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.
- 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();
+ 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();
}
void WebFrameImpl::GetPageRect(int page, gfx::Rect* page_size) const {