| 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 | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 9 * rights reserved. | 9 * rights reserved. |
| 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 : Document::FinishingPrinting); | 584 : Document::FinishingPrinting); |
| 585 view()->adjustMediaTypeForPrinting(printing); | 585 view()->adjustMediaTypeForPrinting(printing); |
| 586 | 586 |
| 587 if (shouldUsePrintingLayout()) { | 587 if (shouldUsePrintingLayout()) { |
| 588 view()->forceLayoutForPagination(pageSize, originalPageSize, | 588 view()->forceLayoutForPagination(pageSize, originalPageSize, |
| 589 maximumShrinkRatio); | 589 maximumShrinkRatio); |
| 590 } else { | 590 } else { |
| 591 if (LayoutView* layoutView = view()->layoutView()) { | 591 if (LayoutView* layoutView = view()->layoutView()) { |
| 592 layoutView->setPreferredLogicalWidthsDirty(); | 592 layoutView->setPreferredLogicalWidthsDirty(); |
| 593 layoutView->setNeedsLayout(LayoutInvalidationReason::PrintingChanged); | 593 layoutView->setNeedsLayout(LayoutInvalidationReason::PrintingChanged); |
| 594 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 594 layoutView->setShouldDoFullPaintInvalidationForViewAndAllDescendants(); |
| 595 layoutView->setShouldDoFullPaintInvalidationForViewAndAllDescendants(); | |
| 596 } | 595 } |
| 597 view()->layout(); | 596 view()->layout(); |
| 598 view()->adjustViewSize(); | 597 view()->adjustViewSize(); |
| 599 } | 598 } |
| 600 | 599 |
| 601 // Subframes of the one we're printing don't lay out to the page size. | 600 // Subframes of the one we're printing don't lay out to the page size. |
| 602 for (Frame* child = tree().firstChild(); child; | 601 for (Frame* child = tree().firstChild(); child; |
| 603 child = child->tree().nextSibling()) { | 602 child = child->tree().nextSibling()) { |
| 604 if (child->isLocalFrame()) | 603 if (child->isLocalFrame()) |
| 605 toLocalFrame(child)->setPrinting(printing, FloatSize(), FloatSize(), 0); | 604 toLocalFrame(child)->setPrinting(printing, FloatSize(), FloatSize(), 0); |
| 606 } | 605 } |
| 607 | 606 |
| 608 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 607 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
| 609 view()->setShouldInvalidateAllPaintAndPaintProperties(); | 608 view()->layoutView()->setSubtreeNeedsPaintPropertyUpdate(); |
| 610 | 609 |
| 611 if (!printing) | 610 if (!printing) |
| 612 document()->setPrinting(Document::NotPrinting); | 611 document()->setPrinting(Document::NotPrinting); |
| 613 } | 612 } |
| 614 | 613 |
| 615 bool LocalFrame::shouldUsePrintingLayout() const { | 614 bool LocalFrame::shouldUsePrintingLayout() const { |
| 616 // Only top frame being printed should be fit to page size. | 615 // Only top frame being printed should be fit to page size. |
| 617 // Subframes should be constrained by parents only. | 616 // Subframes should be constrained by parents only. |
| 618 return document()->printing() && | 617 return document()->printing() && |
| 619 (!tree().parent() || !tree().parent()->isLocalFrame() || | 618 (!tree().parent() || !tree().parent()->isLocalFrame() || |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 935 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 937 m_frame->client()->frameBlameContext()->Enter(); | 936 m_frame->client()->frameBlameContext()->Enter(); |
| 938 } | 937 } |
| 939 | 938 |
| 940 ScopedFrameBlamer::~ScopedFrameBlamer() { | 939 ScopedFrameBlamer::~ScopedFrameBlamer() { |
| 941 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 940 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 942 m_frame->client()->frameBlameContext()->Leave(); | 941 m_frame->client()->frameBlameContext()->Leave(); |
| 943 } | 942 } |
| 944 | 943 |
| 945 } // namespace blink | 944 } // namespace blink |
| OLD | NEW |