diff options
author | George Mount <mount@google.com> | 2011-12-15 14:15:29 -0800 |
---|---|---|
committer | George Mount <mount@google.com> | 2011-12-15 14:15:29 -0800 |
commit | 9eed8ed825add8ca47f2e673db2145bcb7251d48 (patch) | |
tree | 203265efe8b91c96db9d325bca5977d450d9df2d /Source/WebCore/platform | |
parent | 46ded0d896cca693053fe2459c1930de95b65cd9 (diff) | |
download | external_webkit-9eed8ed825add8ca47f2e673db2145bcb7251d48.zip external_webkit-9eed8ed825add8ca47f2e673db2145bcb7251d48.tar.gz external_webkit-9eed8ed825add8ca47f2e673db2145bcb7251d48.tar.bz2 |
Start RTL overflow scroll scrolled rightmost.
Bug 5507867
Change-Id: I5ad4f23945d168dc0b59fa8e62406228873a721a
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r-- | Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp index de9fcae..5a54716 100644 --- a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp @@ -606,9 +606,13 @@ bool GraphicsLayerAndroid::repaint() m_foregroundClipLayer->setPosition(x, y); m_foregroundClipLayer->setSize(width, height); + int rtlOffset = 0; // LTR uses no offset. + if (!layer->renderer()->style()->isLeftToRightDirection()) { + rtlOffset = layer->scrollWidth() - clip.width(); // Scroll all the way right. + } // Need to offset the foreground layer by the clip layer in order // for the contents to be in the correct position. - m_foregroundLayer->setPosition(-x, -y); + m_foregroundLayer->setPosition(-x - rtlOffset, -y); // Set the scrollable bounds of the layer. m_foregroundLayer->setScrollLimits(-x, -y, m_size.width(), m_size.height()); m_foregroundLayer->markAsDirty(m_dirtyRegion); |