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

Unified Diff: webkit/glue/webframe_impl.cc

Issue 20222: Revert WebFrameImpl::ComputePageRects() rev 9258 changes (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webframe_impl.cc
===================================================================
--- webkit/glue/webframe_impl.cc (revision 9478)
+++ webkit/glue/webframe_impl.cc (working copy)
@@ -97,7 +97,6 @@
#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 @@
// 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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698