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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1619963002: Add UseCounter for weird body+viewport scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mousewheel-usecounter
Patch Set: Fix typo Created 4 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 681c3f1294106099e26e9b5e690e39038250a3bb..8635fbebf2b65f4c2d861b942056491fd9ece6fb 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -1637,6 +1637,12 @@ void Document::inheritHtmlAndBodyElementStyles(StyleRecalcChange change)
} else {
ASSERT(element == documentElement());
overflowStyle = documentElementStyle.get();
+
+ // The body element has its own scrolling box, independent from the viewport.
+ // This is a bit of a weird edge case in the CSS spec that we might want to try to
+ // eliminate some day (eg. for ScrollTopLeftInterop - see http://crbug.com/157855).
+ if (bodyStyle && !bodyStyle->isOverflowVisible())
+ UseCounter::count(*this, UseCounter::BodyScrollsInAdditionToViewport);
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698