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

Unified Diff: Source/core/rendering/RenderLayerScrollableArea.h

Issue 776943003: Factor painting code from RenderLayerScrollableArea into ScrollableAreaPainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerScrollableArea.h
diff --git a/Source/core/rendering/RenderLayerScrollableArea.h b/Source/core/rendering/RenderLayerScrollableArea.h
index 2d983c06fbbe36750a1448c6060b96b0e5354da8..5705c4431ece33d74ecf68e31ef410f72be630f7 100644
--- a/Source/core/rendering/RenderLayerScrollableArea.h
+++ b/Source/core/rendering/RenderLayerScrollableArea.h
@@ -44,6 +44,10 @@
#ifndef RenderLayerScrollableArea_h
#define RenderLayerScrollableArea_h
+
+#include "core/rendering/LayerFragment.h"
+#include "core/rendering/RenderBox.h"
+
#include "platform/scroll/ScrollableArea.h"
namespace blink {
@@ -129,8 +133,7 @@ public:
bool hasScrollbar() const { return m_hBar || m_vBar; }
- // FIXME: This should be removed.
- bool hasScrollCorner() const { return m_scrollCorner; }
+ RenderScrollbarPart* scrollCorner() const { return m_scrollCorner; }
void resize(const PlatformEvent&, const LayoutSize&);
IntSize offsetFromResizeCorner(const IntPoint& absolutePoint) const;
@@ -153,10 +156,6 @@ public:
DoubleSize adjustedScrollOffset() const { return DoubleSize(scrollXOffset(), scrollYOffset()); }
- void paintResizer(GraphicsContext*, const IntPoint& paintOffset, const IntRect& damageRect);
- void paintOverflowControls(GraphicsContext*, const IntPoint& paintOffset, const IntRect& damageRect, bool paintingOverlayControls);
- void paintScrollCorner(GraphicsContext*, const IntPoint&, const IntRect& damageRect);
-
void positionOverflowControls(const IntSize& offsetFromRoot);
// isPointInResizeControl() is used for testing if a pointer/touch position is in the resize control
@@ -184,6 +183,19 @@ public:
void setTopmostScrollChild(RenderLayer*);
RenderLayer* topmostScrollChild() const { ASSERT(!m_nextTopmostScrollChild); return m_topmostScrollChild; }
+ IntRect resizerCornerRect(const IntRect&, ResizerHitTestType) const;
+
+ RenderBox& box() const;
+ RenderLayer* layer() const;
+
+ RenderScrollbarPart* resizer() { return m_resizer; }
+
+ const IntPoint& cachedOverlayScrollbarOffset() { return m_cachedOverlayScrollbarOffset; }
+ void setCachedOverlayScrollbarOffset(const IntPoint& offset) { m_cachedOverlayScrollbarOffset = offset; }
+
+ IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const;
+ IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const;
+
private:
bool hasHorizontalOverflow() const;
bool hasVerticalOverflow() const;
@@ -194,8 +206,7 @@ private:
DoubleSize clampScrollOffset(const DoubleSize&) const;
- IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const;
- IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const;
+
LayoutUnit verticalScrollbarStart(int minX, int maxX) const;
LayoutUnit horizontalScrollbarStart(int minX) const;
IntSize scrollbarOffset(const Scrollbar*) const;
@@ -209,14 +220,9 @@ private:
void updateScrollCornerStyle();
// See comments on isPointInResizeControl.
- IntRect resizerCornerRect(const IntRect&, ResizerHitTestType) const;
- bool overflowControlsIntersectRect(const IntRect& localRect) const;
void updateResizerAreaSet();
void updateResizerStyle();
- void drawPlatformResizerImage(GraphicsContext*, IntRect resizerCornerRect);
- RenderBox& box() const;
- RenderLayer* layer() const;
void updateScrollableAreaSet(bool hasOverflow);
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698