From 71a1426dea83fad4fd6e5c3fd938dec01da450d0 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Tue, 22 Sep 2009 20:02:58 +0000 Subject: On 'window.print()' javascript command, print only the frame that is represented by 'window'. The behavior was broken in r20876. BUG=18749 TEST=window.print() on a subframe works. Review URL: http://codereview.chromium.org/206033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26847 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/render_view.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index ddd1793..406bdca 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1371,11 +1371,8 @@ void RenderView::didAddMessageToConsole( } void RenderView::printPage(WebFrame* frame) { - DCHECK(webview()); - if (webview()) { - // Print the full page - not just the frame the javascript is running from. - Print(webview()->GetMainFrame(), true); - } + DCHECK(frame); + Print(frame, true); } void RenderView::didStartLoading() { -- cgit v1.1