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

Side by Side Diff: Source/WebCore/rendering/RenderView.cpp

Issue 10700087: Merge 119548 - Special layout handler should be done on top frame being printed. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 5 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/page/Frame.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 bool RenderView::printing() const 645 bool RenderView::printing() const
646 { 646 {
647 return document()->printing(); 647 return document()->printing();
648 } 648 }
649 649
650 bool RenderView::shouldUsePrintingLayout() const 650 bool RenderView::shouldUsePrintingLayout() const
651 { 651 {
652 if (!printing() || !m_frameView) 652 if (!printing() || !m_frameView)
653 return false; 653 return false;
654 Frame* frame = m_frameView->frame(); 654 Frame* frame = m_frameView->frame();
655 // Only root frame should have special handling for printing. 655 return frame && frame->shouldUsePrintingLayout();
656 return frame && !frame->tree()->parent();
657 } 656 }
658 657
659 size_t RenderView::getRetainedWidgets(Vector<RenderWidget*>& renderWidgets) 658 size_t RenderView::getRetainedWidgets(Vector<RenderWidget*>& renderWidgets)
660 { 659 {
661 size_t size = m_widgets.size(); 660 size_t size = m_widgets.size();
662 661
663 renderWidgets.reserveCapacity(size); 662 renderWidgets.reserveCapacity(size);
664 663
665 RenderWidgetSet::const_iterator end = m_widgets.end(); 664 RenderWidgetSet::const_iterator end = m_widgets.end();
666 for (RenderWidgetSet::const_iterator it = m_widgets.begin(); it != end; ++it ) { 665 for (RenderWidgetSet::const_iterator it = m_widgets.begin(); it != end; ++it ) {
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 951
953 void RenderView::removeFixedPositionedObject(RenderBox* object) 952 void RenderView::removeFixedPositionedObject(RenderBox* object)
954 { 953 {
955 if (!m_positionedObjects) 954 if (!m_positionedObjects)
956 return; 955 return;
957 956
958 m_positionedObjects->remove(object); 957 m_positionedObjects->remove(object);
959 } 958 }
960 959
961 } // namespace WebCore 960 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/page/Frame.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698