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

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

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) 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 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 lifecycle().advanceTo(DocumentLifecycle::StyleClean); 846 lifecycle().advanceTo(DocumentLifecycle::StyleClean);
847 847
848 if (shouldPerformScrollAnchoring()) 848 if (shouldPerformScrollAnchoring())
849 m_scrollAnchor.save(); 849 m_scrollAnchor.save();
850 } 850 }
851 851
852 bool FrameView::shouldPerformScrollAnchoring() const { 852 bool FrameView::shouldPerformScrollAnchoring() const {
853 return RuntimeEnabledFeatures::scrollAnchoringEnabled() && 853 return RuntimeEnabledFeatures::scrollAnchoringEnabled() &&
854 !RuntimeEnabledFeatures::rootLayerScrollingEnabled() && 854 !RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
855 m_scrollAnchor.hasScroller() && 855 m_scrollAnchor.hasScroller() &&
856 layoutBox()->style()->overflowAnchor() != AnchorNone; 856 layoutBox()->style()->overflowAnchor() != AnchorNone &&
857 !m_frame->document()->finishingOrIsPrinting();
857 } 858 }
858 859
859 static inline void layoutFromRootObject(LayoutObject& root) { 860 static inline void layoutFromRootObject(LayoutObject& root) {
860 LayoutState layoutState(root); 861 LayoutState layoutState(root);
861 root.layout(); 862 root.layout();
862 } 863 }
863 864
864 void FrameView::prepareLayoutAnalyzer() { 865 void FrameView::prepareLayoutAnalyzer() {
865 bool isTracing = false; 866 bool isTracing = false;
866 TRACE_EVENT_CATEGORY_GROUP_ENABLED( 867 TRACE_EVENT_CATEGORY_GROUP_ENABLED(
(...skipping 3606 matching lines...) Expand 10 before | Expand all | Expand 10 after
4473 } 4474 }
4474 4475
4475 bool FrameView::canThrottleRendering() const { 4476 bool FrameView::canThrottleRendering() const {
4476 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4477 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4477 return false; 4478 return false;
4478 return m_subtreeThrottled || 4479 return m_subtreeThrottled ||
4479 (m_hiddenForThrottling && m_crossOriginForThrottling); 4480 (m_hiddenForThrottling && m_crossOriginForThrottling);
4480 } 4481 }
4481 4482
4482 } // namespace blink 4483 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698