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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 157553002: Remove the Pagination struct, clean up viewport scroll policy propagation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 10 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 | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 8749fcde911476abd216155fb756a27989bedc75..ebd15524ad0d70881d4703ed958fb8f33e239318 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -331,17 +331,9 @@ void RenderBox::updateFromStyle()
setFloating(!isOutOfFlowPositioned() && styleToUse->isFloating());
bool boxHasOverflowClip = false;
- // We also handle <body> and <html>, whose overflow applies to the viewport.
- if (!styleToUse->isOverflowVisible() && !isRootObject && isRenderBlock()) {
- // Overflow on the body can propagate to the viewport under the following conditions.
- // (1) The root element is <html>.
- // (2) We are the primary <body> (can be checked by looking at document.body).
- // (3) The root element has visible overflow.
- if (isBody() && document().documentElement()->hasTagName(htmlTag)
- && document().body() == node()
- && document().documentElement()->renderer()->style()->isOverflowVisible()) {
- boxHasOverflowClip = false;
- } else {
+ if (!styleToUse->isOverflowVisible() && isRenderBlock() && !isViewObject) {
+ // If overflow has been propagated to the viewport, it has no effect here.
+ if (node() != document().viewportDefiningElement()) {
boxHasOverflowClip = true;
if (!hasOverflowClip()) {
// If we are getting an overflow clip, preemptively erase any overflowing content.
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698