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

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

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.h
diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h
index d8f183533b304cbc72c827789d3e7ae11255013c..2d8fb9c4259920ba0e16984f38f7091da9042be7 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.h
+++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -727,6 +727,13 @@ class CORE_EXPORT FrameView final
// PaintInvalidator.
void invalidatePaintIfNeeded(const PaintInvalidationState&);
+ bool disableScrollAnchoringForPrinting() {
+ return m_disableScrollAnchoringForPrinting;
+ }
+ void setDisableScrollAnchoringForPrinting(bool value) {
+ m_disableScrollAnchoringForPrinting = value;
+ }
+
// Only for SPv2.
std::unique_ptr<JSONObject> compositedLayersAsJSON(LayerTreeFlags);
@@ -1058,6 +1065,10 @@ class CORE_EXPORT FrameView final
DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState;
ScrollAnchor m_scrollAnchor;
+ // This is set when we're in printing mode. We can't reuse the m_printing bit
+ // from blink::Document because it's reset before the set of layouts caused
skobes 2016/10/12 22:40:31 This seems wrong. Isn't Document::m_printing clea
ymalik 2016/10/13 13:48:04 Not quite. Document::m_printing is cleared from Lo
skobes 2016/10/13 16:24:00 Ah, I suspect LocalFrame::setPrinting does a layou
ymalik 2016/10/14 16:30:56 Yes an enum is cleaner in this case. It also allow
+ // by printing.
+ bool m_disableScrollAnchoringForPrinting;
bool m_needsScrollbarsUpdate;
bool m_suppressAdjustViewSize;

Powered by Google App Engine
This is Rietveld 408576698