summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-22 20:02:58 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-22 20:02:58 +0000
commit71a1426dea83fad4fd6e5c3fd938dec01da450d0 (patch)
tree2cc63eb307eb726eb179c3963a7e389a9f3a926a
parent8dd404bbb05b99e7ee13b4e70899ebbcaeb3e8fb (diff)
downloadchromium_src-71a1426dea83fad4fd6e5c3fd938dec01da450d0.zip
chromium_src-71a1426dea83fad4fd6e5c3fd938dec01da450d0.tar.gz
chromium_src-71a1426dea83fad4fd6e5c3fd938dec01da450d0.tar.bz2
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
-rw-r--r--chrome/renderer/render_view.cc7
1 files 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() {