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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 2417683002: Disable scroll anchoring when in printing mode (Closed)
Patch Set: Add comment Created 4 years, 2 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 621
622 String userAgent() const final; 622 String userAgent() const final;
623 void disableEval(const String& errorMessage) final; 623 void disableEval(const String& errorMessage) final;
624 624
625 CSSStyleSheet& elementSheet(); 625 CSSStyleSheet& elementSheet();
626 626
627 virtual DocumentParser* createParser(); 627 virtual DocumentParser* createParser();
628 DocumentParser* parser() const { return m_parser.get(); } 628 DocumentParser* parser() const { return m_parser.get(); }
629 ScriptableDocumentParser* scriptableDocumentParser() const; 629 ScriptableDocumentParser* scriptableDocumentParser() const;
630 630
631 bool printing() const { return m_printing; } 631 // FinishingPrinting denotes that the non-printing layout state is being
632 void setPrinting(bool isPrinting) { m_printing = isPrinting; } 632 // restored.
633 bool wasPrinting() const { return m_wasPrinting; } 633 enum PrintingState { NotPrinting, Printing, FinishingPrinting };
634 bool printing() const { return m_printing == Printing; }
635 bool finishingOrIsPrinting() {
636 return m_printing == Printing || m_printing == FinishingPrinting;
637 }
638 void setPrinting(PrintingState state) { m_printing = state; }
634 639
635 bool paginatedForScreen() const { return m_paginatedForScreen; } 640 bool paginatedForScreen() const { return m_paginatedForScreen; }
636 void setPaginatedForScreen(bool p) { m_paginatedForScreen = p; } 641 void setPaginatedForScreen(bool p) { m_paginatedForScreen = p; }
637 642
638 bool paginated() const { return printing() || paginatedForScreen(); } 643 bool paginated() const { return printing() || paginatedForScreen(); }
639 644
640 enum CompatibilityMode { QuirksMode, LimitedQuirksMode, NoQuirksMode }; 645 enum CompatibilityMode { QuirksMode, LimitedQuirksMode, NoQuirksMode };
641 646
642 void setCompatibilityMode(CompatibilityMode); 647 void setCompatibilityMode(CompatibilityMode);
643 CompatibilityMode getCompatibilityMode() const { return m_compatibilityMode; } 648 CompatibilityMode getCompatibilityMode() const { return m_compatibilityMode; }
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 AtomicString m_baseTarget; 1436 AtomicString m_baseTarget;
1432 1437
1433 // Mime-type of the document in case it was cloned or created by XHR. 1438 // Mime-type of the document in case it was cloned or created by XHR.
1434 AtomicString m_mimeType; 1439 AtomicString m_mimeType;
1435 1440
1436 Member<DocumentType> m_docType; 1441 Member<DocumentType> m_docType;
1437 Member<DOMImplementation> m_implementation; 1442 Member<DOMImplementation> m_implementation;
1438 1443
1439 Member<CSSStyleSheet> m_elemSheet; 1444 Member<CSSStyleSheet> m_elemSheet;
1440 1445
1441 bool m_printing; 1446 PrintingState m_printing;
1442 bool m_wasPrinting;
1443 bool m_paginatedForScreen; 1447 bool m_paginatedForScreen;
1444 1448
1445 CompatibilityMode m_compatibilityMode; 1449 CompatibilityMode m_compatibilityMode;
1446 // This is cheaper than making setCompatibilityMode virtual. 1450 // This is cheaper than making setCompatibilityMode virtual.
1447 bool m_compatibilityModeLocked; 1451 bool m_compatibilityModeLocked;
1448 1452
1449 std::unique_ptr<CancellableTaskFactory> 1453 std::unique_ptr<CancellableTaskFactory>
1450 m_executeScriptsWaitingForResourcesTask; 1454 m_executeScriptsWaitingForResourcesTask;
1451 1455
1452 bool m_hasAutofocused; 1456 bool m_hasAutofocused;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1690 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1687 1691
1688 } // namespace blink 1692 } // namespace blink
1689 1693
1690 #ifndef NDEBUG 1694 #ifndef NDEBUG
1691 // Outside the WebCore namespace for ease of invocation from gdb. 1695 // Outside the WebCore namespace for ease of invocation from gdb.
1692 CORE_EXPORT void showLiveDocumentInstances(); 1696 CORE_EXPORT void showLiveDocumentInstances();
1693 #endif 1697 #endif
1694 1698
1695 #endif // Document_h 1699 #endif // Document_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698