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

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

Issue 815363003: FrameView now notifies ScrollCoorinator of changes in its scrollable area set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove extra line Created 5 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 unified diff | Download patch
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 } 112 }
113 113
114 void ScrollingCoordinator::notifyLayoutUpdated() 114 void ScrollingCoordinator::notifyLayoutUpdated()
115 { 115 {
116 m_scrollGestureRegionIsDirty = true; 116 m_scrollGestureRegionIsDirty = true;
117 m_touchEventTargetRectsAreDirty = true; 117 m_touchEventTargetRectsAreDirty = true;
118 m_shouldScrollOnMainThreadDirty = true; 118 m_shouldScrollOnMainThreadDirty = true;
119 } 119 }
120 120
121 void ScrollingCoordinator::scrollAreaSetDidChange()
122 {
123 // Wait until after layout to update.
Ian Vollick 2015/01/07 17:58:03 Why don't we want to set the dirty bit when we nee
majidvp 2015/01/07 19:52:28 A layout also sets the same dirty flag forcing the
Ian Vollick 2015/01/07 19:56:23 Ah, thanks, that makes sense. In that case, could
majidvp 2015/01/12 16:28:27 Done.
124 if (!m_page->deprecatedLocalMainFrame()->view() || m_page->deprecatedLocalMa inFrame()->view()->needsLayout())
125 return;
126
127 m_scrollGestureRegionIsDirty = true;
128 }
129
121 void ScrollingCoordinator::updateAfterCompositingChangeIfNeeded() 130 void ScrollingCoordinator::updateAfterCompositingChangeIfNeeded()
122 { 131 {
123 if (!m_page->mainFrame()->isLocalFrame()) 132 if (!m_page->mainFrame()->isLocalFrame())
124 return; 133 return;
125 134
126 if (!shouldUpdateAfterCompositingChange()) 135 if (!shouldUpdateAfterCompositingChange())
127 return; 136 return;
128 137
129 TRACE_EVENT0("input", "ScrollingCoordinator::updateAfterCompositingChangeIfN eeded"); 138 TRACE_EVENT0("input", "ScrollingCoordinator::updateAfterCompositingChangeIfN eeded");
130 139
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 bool frameIsScrollable = frameView && frameView->isScrollable(); 1007 bool frameIsScrollable = frameView && frameView->isScrollable();
999 if (frameIsScrollable != m_wasFrameScrollable) 1008 if (frameIsScrollable != m_wasFrameScrollable)
1000 return true; 1009 return true;
1001 1010
1002 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr) 1011 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr)
1003 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( ); 1012 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( );
1004 return false; 1013 return false;
1005 } 1014 }
1006 1015
1007 } // namespace blink 1016 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698