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

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

Issue 2583733003: Use LayoutObject::subtreeNeedsPaintPropertyUpdate for printing invalidation (Closed)
Patch Set: - Created 3 years, 12 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
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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 } 586 }
587 587
588 // Subframes of the one we're printing don't lay out to the page size. 588 // Subframes of the one we're printing don't lay out to the page size.
589 for (Frame* child = tree().firstChild(); child; 589 for (Frame* child = tree().firstChild(); child;
590 child = child->tree().nextSibling()) { 590 child = child->tree().nextSibling()) {
591 if (child->isLocalFrame()) 591 if (child->isLocalFrame())
592 toLocalFrame(child)->setPrinting(printing, FloatSize(), FloatSize(), 0); 592 toLocalFrame(child)->setPrinting(printing, FloatSize(), FloatSize(), 0);
593 } 593 }
594 594
595 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) 595 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
596 view()->setShouldInvalidateAllPaintAndPaintProperties(); 596 view()->setSubtreeNeedsPaintPropertyUpdate();
597 597
598 if (!printing) 598 if (!printing)
599 document()->setPrinting(Document::NotPrinting); 599 document()->setPrinting(Document::NotPrinting);
600 } 600 }
601 601
602 bool LocalFrame::shouldUsePrintingLayout() const { 602 bool LocalFrame::shouldUsePrintingLayout() const {
603 // Only top frame being printed should be fit to page size. 603 // Only top frame being printed should be fit to page size.
604 // Subframes should be constrained by parents only. 604 // Subframes should be constrained by parents only.
605 return document()->printing() && 605 return document()->printing() &&
606 (!tree().parent() || !tree().parent()->isLocalFrame() || 606 (!tree().parent() || !tree().parent()->isLocalFrame() ||
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 927 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
928 m_frame->client()->frameBlameContext()->Enter(); 928 m_frame->client()->frameBlameContext()->Enter();
929 } 929 }
930 930
931 ScopedFrameBlamer::~ScopedFrameBlamer() { 931 ScopedFrameBlamer::~ScopedFrameBlamer() {
932 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 932 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
933 m_frame->client()->frameBlameContext()->Leave(); 933 m_frame->client()->frameBlameContext()->Leave();
934 } 934 }
935 935
936 } // namespace blink 936 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698