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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2203123004: Don't adjust for scrolling of the ancestor, rather than un-adjusting for it later. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 if (isHorizontalWritingMode() && shouldPlaceBlockDirectionScrollbarOnLogical Left()) 1006 if (isHorizontalWritingMode() && shouldPlaceBlockDirectionScrollbarOnLogical Left())
1007 result.expand(-verticalScrollbarWidth(), 0); 1007 result.expand(-verticalScrollbarWidth(), 0);
1008 return result; 1008 return result;
1009 } 1009 }
1010 1010
1011 bool LayoutBox::mapScrollingContentsRectToBoxSpace(LayoutRect& rect, ApplyOverfl owClipFlag applyOverflowClip, VisualRectFlags visualRectFlags) const 1011 bool LayoutBox::mapScrollingContentsRectToBoxSpace(LayoutRect& rect, ApplyOverfl owClipFlag applyOverflowClip, VisualRectFlags visualRectFlags) const
1012 { 1012 {
1013 if (!hasOverflowClip()) 1013 if (!hasOverflowClip())
1014 return true; 1014 return true;
1015 1015
1016 if (applyOverflowClip == ApplyNonScrollOverflowClip && scrollsOverflow()) {
1017 return true;
1018 }
1019
1016 LayoutSize offset = LayoutSize(-scrolledContentOffset()); 1020 LayoutSize offset = LayoutSize(-scrolledContentOffset());
1017 rect.move(offset); 1021 rect.move(offset);
1018 1022
1019 if (applyOverflowClip == ApplyNonScrollOverflowClip && scrollsOverflow())
1020 return true;
1021
1022 LayoutRect clipRect = overflowClipRect(LayoutPoint()); 1023 LayoutRect clipRect = overflowClipRect(LayoutPoint());
1023 1024
1024 bool doesIntersect; 1025 bool doesIntersect;
1025 if (visualRectFlags & EdgeInclusive) { 1026 if (visualRectFlags & EdgeInclusive) {
1026 doesIntersect = rect.inclusiveIntersect(clipRect); 1027 doesIntersect = rect.inclusiveIntersect(clipRect);
1027 } else { 1028 } else {
1028 rect.intersect(clipRect); 1029 rect.intersect(clipRect);
1029 doesIntersect = !rect.isEmpty(); 1030 doesIntersect = !rect.isEmpty();
1030 } 1031 }
1031 return doesIntersect; 1032 return doesIntersect;
(...skipping 3933 matching lines...) Expand 10 before | Expand all | Expand 10 after
4965 m_rareData->m_snapAreas->remove(&snapArea); 4966 m_rareData->m_snapAreas->remove(&snapArea);
4966 } 4967 }
4967 } 4968 }
4968 4969
4969 SnapAreaSet* LayoutBox::snapAreas() const 4970 SnapAreaSet* LayoutBox::snapAreas() const
4970 { 4971 {
4971 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; 4972 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr;
4972 } 4973 }
4973 4974
4974 } // namespace blink 4975 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698