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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.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/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 9767274a2a6a1a2784f48e208702e6774aae7ad4..9171b0b3b1e9cbc3aabe27f2e21a1bd35e3f1a9b 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -828,9 +828,16 @@ void PaintLayerScrollableArea::clampScrollOffsetsAfterLayout() {
}
bool PaintLayerScrollableArea::shouldPerformScrollAnchoring() const {
+ bool disableForPrinting = false;
+ if (box().frame() && box().frame()->view()) {
+ disableForPrinting =
+ box().frame()->view()->disableScrollAnchoringForPrinting();
+ }
+
return RuntimeEnabledFeatures::scrollAnchoringEnabled() &&
m_scrollAnchor.hasScroller() &&
- layoutBox()->style()->overflowAnchor() != AnchorNone;
+ layoutBox()->style()->overflowAnchor() != AnchorNone &&
+ !disableForPrinting;
}
ScrollBehavior PaintLayerScrollableArea::scrollBehaviorStyle() const {

Powered by Google App Engine
This is Rietveld 408576698