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

Side by Side Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 1256043007: Recompute slow scroll regions after overflow recalc (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: replace iframe with div Created 5 years, 3 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
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 130 }
131 } 131 }
132 132
133 void ScrollingCoordinator::notifyLayoutUpdated() 133 void ScrollingCoordinator::notifyLayoutUpdated()
134 { 134 {
135 m_scrollGestureRegionIsDirty = true; 135 m_scrollGestureRegionIsDirty = true;
136 m_touchEventTargetRectsAreDirty = true; 136 m_touchEventTargetRectsAreDirty = true;
137 m_shouldScrollOnMainThreadDirty = true; 137 m_shouldScrollOnMainThreadDirty = true;
138 } 138 }
139 139
140 void ScrollingCoordinator::notifyOverflowUpdated()
141 {
142 m_scrollGestureRegionIsDirty = true;
143 }
144
140 void ScrollingCoordinator::scrollableAreasDidChange() 145 void ScrollingCoordinator::scrollableAreasDidChange()
141 { 146 {
142 ASSERT(m_page); 147 ASSERT(m_page);
143 if (!m_page->mainFrame()->isLocalFrame() || !m_page->deprecatedLocalMainFram e()->view()) 148 if (!m_page->mainFrame()->isLocalFrame() || !m_page->deprecatedLocalMainFram e()->view())
144 return; 149 return;
145 150
146 // Layout may update scrollable area bounding boxes. It also sets the same d irty 151 // Layout may update scrollable area bounding boxes. It also sets the same d irty
147 // flag making this one redundant (See |ScrollingCoordinator::notifyLayoutUp dated|). 152 // flag making this one redundant (See |ScrollingCoordinator::notifyLayoutUp dated|).
148 // So if layout is expected, ignore this call allowing scrolling coordinator 153 // So if layout is expected, ignore this call allowing scrolling coordinator
149 // to be notified post-layout to recompute gesture regions. 154 // to be notified post-layout to recompute gesture regions.
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 bool frameIsScrollable = frameView && frameView->isScrollable(); 1081 bool frameIsScrollable = frameView && frameView->isScrollable();
1077 if (frameIsScrollable != m_wasFrameScrollable) 1082 if (frameIsScrollable != m_wasFrameScrollable)
1078 return true; 1083 return true;
1079 1084
1080 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr) 1085 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr)
1081 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); 1086 return WebSize(frameView->contentsSize()) != scrollLayer->bounds();
1082 return false; 1087 return false;
1083 } 1088 }
1084 1089
1085 } // namespace blink 1090 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698