#include "wtf/text/WTFString.h"
namespace blink {
-class WebLayer;
class WebScrollbarLayer;
}
-namespace WebCore {
+namespace blink {
typedef unsigned MainThreadScrollingReasons;
-class Document;
class LocalFrame;
class FrameView;
class GraphicsLayer;
class Page;
class Region;
class ScrollableArea;
-class ViewportConstraints;
class ScrollingCoordinator {
public:
// Called when any frame has done its layout.
void notifyLayoutUpdated();
- // Should be called after compositing has been updated.
- void updateAfterCompositingChange();
-
- bool needsToUpdateAfterCompositingChange() const { return m_scrollGestureRegionIsDirty || m_touchEventTargetRectsAreDirty || frameViewIsDirty(); }
+ void updateAfterCompositingChangeIfNeeded();
void updateHaveWheelEventHandlers();
void updateHaveScrollEventHandlers();
HasSlowRepaintObjects = 1 << 0,
HasViewportConstrainedObjectsWithoutSupportingFixedLayers = 1 << 1,
HasNonLayerViewportConstrainedObjects = 1 << 2,
+ ThreadedScrollingDisabled = 1 << 3
};
MainThreadScrollingReasons mainThreadScrollingReasons() const;
explicit ScrollingCoordinator(Page*);
bool isForMainFrame(ScrollableArea*) const;
+ bool isForViewport(ScrollableArea*) const;
Page* m_page;
bool m_shouldScrollOnMainThreadDirty;
private:
+ bool shouldUpdateAfterCompositingChange() const { return m_scrollGestureRegionIsDirty || m_touchEventTargetRectsAreDirty || frameViewIsDirty(); }
+
void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons);
bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const;
- bool touchHitTestingEnabled() const;
void setShouldHandleScrollGestureOnMainThreadRegion(const Region&);
void setTouchEventTargetRects(LayerHitTestRects&);
void computeTouchEventTargetRects(LayerHitTestRects&);
bool frameViewIsDirty() const;
- typedef HashMap<ScrollableArea*, OwnPtr<blink::WebScrollbarLayer> > ScrollbarMap;
+ using ScrollbarMap = HashMap<ScrollableArea*, OwnPtr<blink::WebScrollbarLayer>>;
ScrollbarMap m_horizontalScrollbars;
ScrollbarMap m_verticalScrollbars;
HashSet<const RenderLayer*> m_layersWithTouchRects;
MainThreadScrollingReasons m_lastMainThreadScrollingReasons;
};
-} // namespace WebCore
+} // namespace blink
#endif // ScrollingCoordinator_h