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

Unified Diff: WebCore/rendering/RenderLayer.cpp

Issue 3364013: Merge 67001 - 2010-09-08 Peter Kasting <pkasting@google.com>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « WebCore/rendering/RenderLayer.h ('k') | WebCore/rendering/RenderListBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/rendering/RenderLayer.cpp
===================================================================
--- WebCore/rendering/RenderLayer.cpp (revision 67003)
+++ WebCore/rendering/RenderLayer.cpp (working copy)
@@ -1363,9 +1363,9 @@
if (updateScrollbars) {
if (m_hBar)
- m_hBar->setValue(scrollXOffset());
+ m_hBar->setValue(scrollXOffset(), Scrollbar::NotFromScrollAnimator);
if (m_vBar)
- m_vBar->setValue(m_scrollY);
+ m_vBar->setValue(m_scrollY, Scrollbar::NotFromScrollAnimator);
}
// Schedule the scroll DOM event.
@@ -1618,6 +1618,20 @@
// FIXME (Radar 4118564): We should also autoscroll the window as necessary to keep the point under the cursor in view.
}
+int RenderLayer::scrollSize(ScrollbarOrientation orientation) const
+{
+ Scrollbar* scrollbar = ((orientation == HorizontalScrollbar) ? m_hBar : m_vBar).get();
+ return scrollbar ? (scrollbar->totalSize() - scrollbar->visibleSize()) : 0;
+}
+
+void RenderLayer::setScrollOffsetFromAnimation(const IntPoint& offset)
+{
+ if (m_hBar)
+ m_hBar->setValue(offset.x(), Scrollbar::FromScrollAnimator);
+ if (m_vBar)
+ m_vBar->setValue(offset.y(), Scrollbar::FromScrollAnimator);
+}
+
void RenderLayer::valueChanged(Scrollbar*)
{
// Update scroll position from scrollbars.
@@ -2068,7 +2082,7 @@
// so this is needed to keep everything working (see how scrollXOffset()
// differs from scrollYOffset() to get an idea of why the horizontal and
// vertical scrollbars need to be treated differently).
- m_hBar->setValue(scrollXOffset());
+ m_hBar->setValue(scrollXOffset(), Scrollbar::NotFromScrollAnimator);
}
if (m_vBar) {
int clientHeight = box->clientHeight();
« no previous file with comments | « WebCore/rendering/RenderLayer.h ('k') | WebCore/rendering/RenderListBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698