summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderLayer.h
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2010-12-07 17:22:45 -0800
committerShimeng (Simon) Wang <swang@google.com>2010-12-22 14:15:40 -0800
commit4576aa36e9a9671459299c7963ac95aa94beaea9 (patch)
tree3863574e050f168c0126ecb47c83319fab0972d8 /WebCore/rendering/RenderLayer.h
parent55323ac613cc31553107b68603cb627264d22bb0 (diff)
downloadexternal_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.zip
external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.gz
external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.bz2
Merge WebKit at r73109: Initial merge by git.
Change-Id: I61f1a66d9642e3d8405d3ac6ccab2a53421c75d8
Diffstat (limited to 'WebCore/rendering/RenderLayer.h')
-rw-r--r--WebCore/rendering/RenderLayer.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/WebCore/rendering/RenderLayer.h b/WebCore/rendering/RenderLayer.h
index be3ddc6..db4da64 100644
--- a/WebCore/rendering/RenderLayer.h
+++ b/WebCore/rendering/RenderLayer.h
@@ -249,14 +249,14 @@ public:
// Scrolling methods for layers that can scroll their overflow.
void scrollByRecursively(int xDelta, int yDelta);
- IntSize scrolledContentOffset() const { return IntSize(scrollXOffset() + m_scrollLeftOverflow, scrollYOffset()); }
+ IntSize scrolledContentOffset() const { return IntSize(scrollXOffset() + m_scrollLeftOverflow, scrollYOffset() + m_scrollTopOverflow); }
- int scrollXOffset() const { return m_scrollX + m_scrollOriginX; }
- int scrollYOffset() const { return m_scrollY; }
+ int scrollXOffset() const { return m_scrollX + m_scrollOrigin.x(); }
+ int scrollYOffset() const { return m_scrollY + m_scrollOrigin.y(); }
void scrollToOffset(int x, int y, bool updateScrollbars = true, bool repaint = true);
- void scrollToXOffset(int x) { scrollToOffset(x, m_scrollY); }
- void scrollToYOffset(int y) { scrollToOffset(m_scrollX + m_scrollOriginX, y); }
+ void scrollToXOffset(int x) { scrollToOffset(x, m_scrollY + m_scrollOrigin.y()); }
+ void scrollToYOffset(int y) { scrollToOffset(m_scrollX + m_scrollOrigin.x(), y); }
void scrollRectToVisible(const IntRect&, bool scrollToAnchor = false, const ScrollAlignment& alignX = ScrollAlignment::alignCenterIfNeeded, const ScrollAlignment& alignY = ScrollAlignment::alignCenterIfNeeded);
IntRect getRectToExpose(const IntRect& visibleRect, const IntRect& exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY);
@@ -308,7 +308,9 @@ public:
// Returns true if the accelerated compositing is enabled
bool hasAcceleratedCompositing() const;
-
+
+ bool canRender3DTransforms() const;
+
void updateLayerPosition();
enum UpdateLayerPositionsFlag {
@@ -642,9 +644,22 @@ protected:
// Our scroll offsets if the view is scrolled.
int m_scrollX;
int m_scrollY;
- int m_scrollOriginX; // only non-zero for rtl content
- int m_scrollLeftOverflow; // only non-zero for rtl content
-
+
+ // There are 8 possible combinations of writing mode and direction. Scroll origin (and its corresponding left/top overflow)
+ // will be non-zero in the x or y axis if there is any reversed direction or writing-mode. The combinations are:
+ // writing-mode / direction scrollOrigin.x() set scrollOrigin.y() set
+ // horizontal-tb / ltr NO NO
+ // horizontal-tb / rtl YES NO
+ // horizontal-bt / ltr NO YES
+ // horizontal-bt / rtl YES YES
+ // vertical-lr / ltr NO NO
+ // vertical-lr / rtl NO YES
+ // vertical-rl / ltr YES NO
+ // vertical-rl / rtl YES YES
+ IntPoint m_scrollOrigin;
+ int m_scrollLeftOverflow;
+ int m_scrollTopOverflow;
+
// The width/height of our scrolled area.
int m_scrollWidth;
int m_scrollHeight;