OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 void LocalFrame::setPrinting(bool printing, const FloatSize& pageSize, const Flo
atSize& originalPageSize, float maximumShrinkRatio) | 174 void LocalFrame::setPrinting(bool printing, const FloatSize& pageSize, const Flo
atSize& originalPageSize, float maximumShrinkRatio) |
175 { | 175 { |
176 // In setting printing, we should not validate resources already cached for
the document. | 176 // In setting printing, we should not validate resources already cached for
the document. |
177 // See https://bugs.webkit.org/show_bug.cgi?id=43704 | 177 // See https://bugs.webkit.org/show_bug.cgi?id=43704 |
178 ResourceCacheValidationSuppressor validationSuppressor(document()->fetcher()
); | 178 ResourceCacheValidationSuppressor validationSuppressor(document()->fetcher()
); |
179 | 179 |
180 document()->setPrinting(printing); | 180 document()->setPrinting(printing); |
181 view()->adjustMediaTypeForPrinting(printing); | 181 view()->adjustMediaTypeForPrinting(printing); |
182 | 182 |
183 document()->styleResolverChanged(RecalcStyleDeferred); | 183 document()->styleResolverChanged(); |
184 if (shouldUsePrintingLayout()) { | 184 if (shouldUsePrintingLayout()) { |
185 view()->forceLayoutForPagination(pageSize, originalPageSize, maximumShri
nkRatio); | 185 view()->forceLayoutForPagination(pageSize, originalPageSize, maximumShri
nkRatio); |
186 } else { | 186 } else { |
187 view()->forceLayout(); | 187 view()->forceLayout(); |
188 view()->adjustViewSize(); | 188 view()->adjustViewSize(); |
189 } | 189 } |
190 | 190 |
191 // Subframes of the one we're printing don't lay out to the page size. | 191 // Subframes of the one we're printing don't lay out to the page size. |
192 for (RefPtr<LocalFrame> child = tree().firstChild(); child; child = child->t
ree().nextSibling()) | 192 for (RefPtr<LocalFrame> child = tree().firstChild(); child; child = child->t
ree().nextSibling()) |
193 child->setPrinting(printing, FloatSize(), FloatSize(), 0); | 193 child->setPrinting(printing, FloatSize(), FloatSize(), 0); |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 LocalFrame* LocalFrame::localFrameRoot() | 641 LocalFrame* LocalFrame::localFrameRoot() |
642 { | 642 { |
643 LocalFrame* curFrame = this; | 643 LocalFrame* curFrame = this; |
644 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) | 644 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) |
645 curFrame = curFrame->tree().parent(); | 645 curFrame = curFrame->tree().parent(); |
646 | 646 |
647 return curFrame; | 647 return curFrame; |
648 } | 648 } |
649 | 649 |
650 } // namespace WebCore | 650 } // namespace WebCore |
OLD | NEW |