Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index 1d02cf51a8f803f3045df673fe1cb1b8534986fd..07ef46374045ad50d8da1febc73c18298d05acb8 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -1995,13 +1995,24 @@ void Document::updateStyleAndLayoutTreeForNode(const Node* node) { |
updateStyleAndLayoutTree(); |
} |
-void Document::updateStyleAndLayoutIgnorePendingStylesheetsForNode(Node* node) { |
+void Document::updateStyleAndLayoutIgnorePendingStylesheetsForNode( |
+ const Node* node) { |
DCHECK(node); |
if (!node->inActiveDocument()) |
return; |
updateStyleAndLayoutIgnorePendingStylesheets(); |
} |
+void Document::updateScrollPosition(const Node* node) { |
+ if (node) |
+ updateStyleAndLayoutIgnorePendingStylesheetsForNode(node); |
+ else |
+ updateStyleAndLayoutIgnorePendingStylesheets(); |
+ |
+ if (FrameView* frameView = view()) |
+ frameView->performScrollAnchoringAdjustments(); |
+} |
+ |
void Document::updateStyleAndLayout() { |
DCHECK(isMainThread()); |