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

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

Issue 330513002: Disentangle updating the ScrollingCoordinator from RenderLayerCompositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix assert Created 6 years, 6 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 | Annotate | Revision Log
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 } 116 }
117 117
118 void ScrollingCoordinator::notifyLayoutUpdated() 118 void ScrollingCoordinator::notifyLayoutUpdated()
119 { 119 {
120 m_scrollGestureRegionIsDirty = true; 120 m_scrollGestureRegionIsDirty = true;
121 m_touchEventTargetRectsAreDirty = true; 121 m_touchEventTargetRectsAreDirty = true;
122 m_shouldScrollOnMainThreadDirty = true; 122 m_shouldScrollOnMainThreadDirty = true;
123 } 123 }
124 124
125 void ScrollingCoordinator::updateAfterCompositingChange() 125 void ScrollingCoordinator::updateAfterCompositingChangeIfNeeded()
126 { 126 {
127 TRACE_EVENT0("input", "ScrollingCoordinator::updateAfterCompositingChange"); 127 if (!shouldUpdateAfterCompositingChange())
128 return;
129
130 TRACE_EVENT0("input", "ScrollingCoordinator::updateAfterCompositingChangeIfN eeded");
128 131
129 if (m_scrollGestureRegionIsDirty) { 132 if (m_scrollGestureRegionIsDirty) {
130 // Compute the region of the page where we can't handle scroll gestures and mousewheel events 133 // Compute the region of the page where we can't handle scroll gestures and mousewheel events
131 // on the impl thread. This currently includes: 134 // on the impl thread. This currently includes:
132 // 1. All scrollable areas, such as subframes, overflow divs and list bo xes, whose composited 135 // 1. All scrollable areas, such as subframes, overflow divs and list bo xes, whose composited
133 // scrolling are not enabled. We need to do this even if the frame view whose layout was updated 136 // scrolling are not enabled. We need to do this even if the frame view whose layout was updated
134 // is not the main frame. 137 // is not the main frame.
135 // 2. Resize control areas, e.g. the small rect at the right bottom of d iv/textarea/iframe when 138 // 2. Resize control areas, e.g. the small rect at the right bottom of d iv/textarea/iframe when
136 // CSS property "resize" is enabled. 139 // CSS property "resize" is enabled.
137 // 3. Plugin areas. 140 // 3. Plugin areas.
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 bool frameIsScrollable = frameView && frameView->isScrollable(); 980 bool frameIsScrollable = frameView && frameView->isScrollable();
978 if (frameIsScrollable != m_wasFrameScrollable) 981 if (frameIsScrollable != m_wasFrameScrollable)
979 return true; 982 return true;
980 983
981 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : 0) 984 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : 0)
982 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( ); 985 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( );
983 return false; 986 return false;
984 } 987 }
985 988
986 } // namespace WebCore 989 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | Source/core/rendering/compositing/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698