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

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

Issue 2145823002: Implement the overflow-anchor CSS property as an opt-out for ScrollAnchoring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Put opt-out behind RuntimeEnabledFeature and update tests Created 4 years, 5 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 b70b61105eceb4957c8cb06e00abdc7d45830ecc..fb07362ec796570eb368d2a4ab36c7bc87ecac47 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -823,7 +823,7 @@ void FrameView::performPreLayoutTasks()
if (!m_scrollAnchor.hasScroller())
m_scrollAnchor.setScroller(m_viewportScrollableArea ? m_viewportScrollableArea : this);
- if (RuntimeEnabledFeatures::scrollAnchoringEnabled())
+ if (shouldPerformScrollAnchoring())
m_scrollAnchor.save();
}
@@ -2122,7 +2122,7 @@ void FrameView::performPostLayoutTasks()
scrollToFragmentAnchor();
// TODO(skobes): Figure out interactions between scroll anchor, fragment anchor, and history restoration.
- if (RuntimeEnabledFeatures::scrollAnchoringEnabled())
+ if (shouldPerformScrollAnchoring())
m_scrollAnchor.restore();
sendResizeEventIfNeeded();
@@ -4097,7 +4097,7 @@ ScrollableArea* FrameView::layoutViewportScrollableArea()
return layoutViewItem.isNull() ? nullptr : layoutViewItem.getScrollableArea();
}
-LayoutObject* FrameView::viewportLayoutObject()
+LayoutObject* FrameView::viewportLayoutObject() const
{
if (Document* document = frame().document()) {
if (Element* element = document->viewportDefiningElement())
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698