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

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: 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 fa8b38802cb6b0846b7f5ea4280e7666a3efba79..05bbbb0edcbc28ed3a50d0872004dee10f825402 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -822,7 +822,7 @@ void FrameView::performPreLayoutTasks()
if (!m_scrollAnchor.hasScroller())
m_scrollAnchor.setScroller(m_viewportScrollableArea ? m_viewportScrollableArea : this);
- if (RuntimeEnabledFeatures::scrollAnchoringEnabled())
+ if (anchorScroll())
m_scrollAnchor.save();
}
@@ -2121,7 +2121,7 @@ void FrameView::performPostLayoutTasks()
scrollToFragmentAnchor();
// TODO(skobes): Figure out interactions between scroll anchor, fragment anchor, and history restoration.
- if (RuntimeEnabledFeatures::scrollAnchoringEnabled())
+ if (anchorScroll())
m_scrollAnchor.restore();
sendResizeEventIfNeeded();
@@ -4076,7 +4076,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())

Powered by Google App Engine
This is Rietveld 408576698