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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2417683002: Disable scroll anchoring when in printing mode (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 5cfb85f3f5f5fddc20055ed245de877eeb10987f..dddeed406e871c0518ecb3702e29d40b0d3e1524 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -187,6 +187,7 @@ FrameView::FrameView(LocalFrame* frame)
m_currentUpdateLifecyclePhasesTargetState(
DocumentLifecycle::Uninitialized),
m_scrollAnchor(this),
+ m_disableScrollAnchoringForPrinting(false),
m_needsScrollbarsUpdate(false),
m_suppressAdjustViewSize(false),
m_allowsLayoutInvalidationAfterLayoutClean(true) {
@@ -853,7 +854,8 @@ bool FrameView::shouldPerformScrollAnchoring() const {
return RuntimeEnabledFeatures::scrollAnchoringEnabled() &&
!RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
m_scrollAnchor.hasScroller() &&
- layoutBox()->style()->overflowAnchor() != AnchorNone;
+ layoutBox()->style()->overflowAnchor() != AnchorNone &&
+ !m_disableScrollAnchoringForPrinting;
}
static inline void layoutFromRootObject(LayoutObject& root) {

Powered by Google App Engine
This is Rietveld 408576698