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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2675763006: Fix paint invalidation issue on exiting printing (Closed)
Patch Set: Created 3 years, 10 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 | « third_party/WebKit/ManualTests/print-iframe-containing-fixed.html ('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) 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 : Document::FinishingPrinting); 583 : Document::FinishingPrinting);
584 view()->adjustMediaTypeForPrinting(printing); 584 view()->adjustMediaTypeForPrinting(printing);
585 585
586 if (shouldUsePrintingLayout()) { 586 if (shouldUsePrintingLayout()) {
587 view()->forceLayoutForPagination(pageSize, originalPageSize, 587 view()->forceLayoutForPagination(pageSize, originalPageSize,
588 maximumShrinkRatio); 588 maximumShrinkRatio);
589 } else { 589 } else {
590 if (LayoutView* layoutView = view()->layoutView()) { 590 if (LayoutView* layoutView = view()->layoutView()) {
591 layoutView->setPreferredLogicalWidthsDirty(); 591 layoutView->setPreferredLogicalWidthsDirty();
592 layoutView->setNeedsLayout(LayoutInvalidationReason::PrintingChanged); 592 layoutView->setNeedsLayout(LayoutInvalidationReason::PrintingChanged);
593 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) 593 layoutView->setShouldDoFullPaintInvalidationForViewAndAllDescendants();
594 layoutView->setShouldDoFullPaintInvalidationForViewAndAllDescendants();
595 } 594 }
596 view()->layout(); 595 view()->layout();
597 view()->adjustViewSize(); 596 view()->adjustViewSize();
598 } 597 }
599 598
600 // Subframes of the one we're printing don't lay out to the page size. 599 // Subframes of the one we're printing don't lay out to the page size.
601 for (Frame* child = tree().firstChild(); child; 600 for (Frame* child = tree().firstChild(); child;
602 child = child->tree().nextSibling()) { 601 child = child->tree().nextSibling()) {
603 if (child->isLocalFrame()) 602 if (child->isLocalFrame())
604 toLocalFrame(child)->setPrinting(printing, FloatSize(), FloatSize(), 0); 603 toLocalFrame(child)->setPrinting(printing, FloatSize(), FloatSize(), 0);
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 938 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
940 m_frame->client()->frameBlameContext()->Enter(); 939 m_frame->client()->frameBlameContext()->Enter();
941 } 940 }
942 941
943 ScopedFrameBlamer::~ScopedFrameBlamer() { 942 ScopedFrameBlamer::~ScopedFrameBlamer() {
944 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 943 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
945 m_frame->client()->frameBlameContext()->Leave(); 944 m_frame->client()->frameBlameContext()->Leave();
946 } 945 }
947 946
948 } // namespace blink 947 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/ManualTests/print-iframe-containing-fixed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698